#+title:Datalog parsers for PureScript

October 28, 2015 ยท View on GitHub

  • Supported formats

| Syntax flavour | constants | variables | rule | support | |----------------------------------+-----------+----------------+------+---------------| | 'Standard' datalog (like Prolog) | lowercase | uppercase | :- | getting there | | Prolog | lowercase | uppercase | :- | | | Datalog with ? variables | | start with ? | :- | | | Datomic | | start with ? | | | | LogiQL | | | <- | |

  • Examples

Syntax example adapted from MITRE datalog:

#+BEGIN_SRC prolog % facts parent(john, douglas). parent(bob, john). parent(ebbon, bob).

% rules ancestor(A, B) :- parent(A, B).

ancestor(A, B) :- parent(A, C), D = C, ancestor(D, B).

% query ancestor(A, B)? #+END_SRC