Quick start: have a look at the "Problem Description", hit the "Click me!" button, and check the output under "Reasoning Results".
For further demos and details on the reasoner, click here.
Load an example:
If you like, you can edit the text. For help on the syntax, see below.
Click the button above to let the reasoner do its work. It should report the results of the queries below. Note that the reasoner brings the query formulas into a normal form (similar to negation normal form), so the printed formulas below may differ syntactically from your queries.
Click here to display/hide debug output.
A problem description consists of four parts:
The syntax of these segments is as follows, where this font is a word of the the problem description language, and represents a meta-variable.
All sorts, variables, names, and function symbols must be declared before they are used. Declarations are of the following form:
where
, , , are identifiers and is a natural number ≥ 0. An identifier is a sequence of lower- and upper-case letters, digits, underscore and dash symbols, with the first symbol being a letter or underscore. No two sorts can have the same identifier. No two variables, names, or functions can have the same identifier.The following constructs are well-formed formulas:
A
is of the following form:where where a previously declared function symbol ( , , ) of arity is applied to other terms . When is a constant symbol (that is, has arity 0), the brackets may be omitted. Variables in the KB are implicitly universally quantified.
is a term. A term is either the identifier of a previously declared variable , a previously declared standard name , or a compound termA Know is the usual knowledge modality, Cons means a formula is considered possible (that is, its negation is not known), and Bel is conditional belief. All three operators are sound but incomplete with respect to the unlimited logic of only-knowing/believing. The can have two different meanings. The one within Know and the first parameter of Bel specify how many terms may be split. A split means to select a term f(n1,...,nl) and consider all possible denotations of that term; that is, the reasoner tests all (relevant) assignments for these terms. The in Cons and the second parameter of Bel, on the other hand, specify how many terms can be freely assigned a value, which means to select a (possibly non-ground) term f(t1,...,tl) and fix its denotation.
is a natural number ≥ 0 that indicates how much reasoning effort the reasoner can spend on proving the in the modality. The modal operatorWithin the scope of the Guarantee modality the reasoner is allowed to assume the knowledge base is consistent, which may improve performance because it limits the splitting search space.
Operator precedence is as follows: equivalence < implication < disjunction < conjunction < negation, quantifiers, modalities < brackets. Note the maximal precedence of quantifiers and modalities. Use brackets to expand the scope of a quantifier or a modal operator. For example, to say that is known, write || Know<. The formula > ( || )Know< by contrast says that either > || is known or is true.
Any formula abbreviation
must be defined before use:where
is the identifier by which the formula can later be referred. can be re-assigned new values.The knowledge base consists of a sequence of statements of the following form:
where one of the following syntactic conditions must be satisfied:
Free variables in KB: meets this requirement trivially. Implications are also allowed, provided that the negation of the antecedent as well as the consequent meet above form, as does || || KB: Ex . ( && ) -> ( || )
in KB definitions are implicitly universally quantified. The formal definition of the normal form is tedious, but the idea is this: push negations inwards but not into clauses, and pull quantifiers out of clauses. The rationale is to create new clauses (while avoiding the exponential blowup of a full CNF). Additionally, terms are flattened so that no two function symbols occur in a any literal. For instance, a disjunctionQueries are of the form:
where Assert and Refute versions differ from the Query version in that they yield a error when the query does not come out true or false, respectively; this is useful for automated testing.
is subjective, which means functions must not occur outside of modal operators (but variables, names, quantifiers, etc. may). TheProcedure calls are of the form Call: . In particular, they include: ( , , )
Furthermore simple control structures are allowed: if-then-else, while-loops, and for-loops. See the Battleship and Sudoku code for examples.
C-style single line comments are supported as well: // .