Lucianpedia Wiki


Simple List Prolog to List Prolog is a SWI-Prolog GitHub repository that changes

predicate_name to [n, predicate_name]


variable_name to [v, variable_name]

in List Prolog.  This allows features such as grammars that need the distinction between grammar predicate calls and variables in grammars, where Simple List Prolog is output by CAWPS, which can output at least three lines of a predicate, rather than CAWMP's two lines.

Diagram of List Prolog Converters[]

The diagram below shows the cyclic nature of the List Prolog converters. 

Simple List Prolog
e.g. [[a,[b,c],(:-),

converts to

List Prolog
e.g. [[[n,a],[[v,b],[v,c]],":-",

converts to

Normal List Prolog
e.g. a(B,C) :-

which converts to Simple List Prolog, and so on.

Normal List Prolog requires modifications to mathematical operator syntax and grammars before it is compatible with SWI-Prolog.  Normal List Prolog is useful for easy reading of multiple levels of brackets.

Diagram of List Prolog Converters

Diagram of List Prolog Converters