Limited Reasoner Demo: Textual User Interface

Quick start: select an example and check the output in the terminal.

For further demos and details on the reasoner, click here.

TUI

Load an example:
delay after each command

The Problem Description Language

A problem description consists of four parts:

  1. declarations of sorts, variables, standard names, and functions;
  2. optional abbreviations for formulas;
  3. the knowledge definition;
  4. queries.

The syntax of these segments is as follows, where this font is a word of the the problem description language, and this font 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 sort, x, n, f are identifiers and arity 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 literal is of the following form:

where ti is a term. A term is either the identifier of a previously declared variable x, a previously declared standard name n, or a compound term f(t'1, ..., t'k) where a previously declared function symbol f of arity k is applied to other terms t'i. When f is a constant symbol (that is, has arity 0), the brackets may be omitted. Variables in the KB are implicitly universally quantified.

A belief-level is a natural number ≥ 0 that indicates how much reasoning effort the reasoner can spend on proving the formula in the modality. The modal operator 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 belief-level 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 belief-level 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.

Within 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 formula1 || formula2 is known, write Know<belief-level> (formula1 || formula2). The formula Know<belief-level> formula1 || formula2 by contrast says that either formula1 is known or formula2 is true.

Any formula abbreviation formula-id must be defined before use:

where formula-id is the identifier by which the formula can later be referred. formula-id 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:

  1. formula contains no modal operators and its normal form (≈ prenex-NNF) is a clause without existentially quantified variables;
  2. formula is of the form Know<belief-level> formula' where formula' satisfies to condition 1 (the belief-level is ignored);
  3. formula is of the form Bel<belief-level1,belief-level2> formula1 ==> formula2 where !formula1 || formula2 satisfies to condition 1 (the belief-levels affect how faithful the induced system of spheres is to the unlimited logic).

Free variables in formula 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 disjunction KB: literal1 || ... || literalk 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 x (literal1 && literal2) -> (literal3 || literal4).

Queries are of the form:

where formula is subjective, which means functions must not occur outside of modal operators (but variables, names, quantifiers, etc. may). The prefix Query: is optional. Alternatively, the Assert: and Refute: prefixes can be used to require a certain outcome: the former fails when the query comes out false, the latter fails when the query comes out false; this is useful for automated testing.

Procedure calls are of the form Call: proc(arg1,...,argk). In particular, they include:

C-style single line comments are supported as well: // rest of line is comment.

Known Bugs

There's are two known bugs regarding the M<k> operator. For one thing, within G it's too aggressive and thus finds inconsistencies it shouldn't. For another, inconsistencies due to Fa x f(...) /= x clauses are not detected at the moment. Fixes shouldn't be too difficult, will be coming soon.

Possibly there's another bug that sometimes more names need to be considered, namely when a split uses one or more of the p+1 names, possibly we need to add new names. Not sure yet if that's really a bug or if the lemmas from the theory can be improved.