Skip to content

pdnm/purelog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

purelog

Core Prolog interpreter.

Build

stack init
stack build

Run

stack exec purelog-exe <code.pl>

During idle:

  • quit to exit
  • strategy(BFS). to switch to BFS (default is DFS)
  • strategy(DFS). to switch to DFS

During search:

  • ; to find the next solution
  • . to terminate searching
  • # to print the number of solutions found
  • $ to find the remaining solutions

Examples

stack exec purelog-exe sample.pl

  • equal(f(g(a,X),X), f(Y, b)).
  • ancestor(X, Y).
  • append([a, b], [c, d], R).
  • append([A, b], [c, D], [a, B, C, d]).
  • reverse([a, b, c, d], R).

About

Core Prolog interpreter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published