FANDOM


IntroductionEdit

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

predicate_name to [n, predicate_name]

and

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 ConvertersEdit

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

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

converts to

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

converts to

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

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

Community content is available under CC-BY-SA unless otherwise noted.