WILSON

WILSON is a symbolic logic processing language written by User:john.ohno in 2009. It is based on a simplified subset form of PROLOG syntax, and is non-Turing-complete, instead correlating directly to formal symbolic logic.

(Contents derived from the WILSON introduction manual)

Description
WILSON is a highly cut-down symbolic logic language with a syntax loosely based on PROLOG. In WILSON, there are no variables – only symbols which are either true or false. Given a dependent relationship between the values of these symbols, WILSON will compute the value of any symbol whose value is unknown. The syntax for defining a symbol  is as follows: foo :- bar, baz, !quux. This means that  is true if and only if   and   are true and   is false. Similarly, you can define based on 'or': foo :- bar, baz; !quux. This means that  is true if either both   and   are true, or if   is false. To define  as always true, the following is useful:

foo.

Syntax
The BNF syntax for WILSON is as follows:

predicate ::= / name ':-' (expr*) '.' / expr ::= / ( ( '!' name) | (name ( ',' | ';' ) ))* ( name ) / name ::= / ([A-Za-z0-9]+) /

Implementation
The WILSON compiler will generate equivalent source code in FORTH for your expressions, and should check for and notify of most common errors.

To run the WILSON compiler: cat foo.raw | wilson2forth > foo.fs The canonical extension for WILSON source files is.

External resources

 * Translator written in GNU FLEX that translates WILSON source into GNU FORTH compatible FORTH source code.