How-to guides¶
How-to guides are recipes: each shows how to accomplish one task, assuming you know the basics (see the tutorials otherwise).
- Build and parse terms: create terms from Python values or Prolog text, inspect them, and print them back.
- Query solvers: configure solvers and queries (knowledge bases, limits, timeouts, laziness, flags, operators).
- Define predicates in Python: extend solvers with predicates and arithmetic functions written in Python, packed into libraries.
- Use Python objects from Prolog: create Python objects, call their methods and read their attributes from Prolog code, with OOPLib.
- Read and write streams: load programs from files, and connect solvers' input and output to Python streams; use ISO Prolog stream predicates with IOLib.
- Handle errors: catch logic errors in Prolog and in Python.
- Run probabilistic programs: compute the probability of queries with ProbLog.
- Use the REPL: experiment with Prolog interactively.
- Use the terminal IDE: install and start it (locally, or with Docker), then edit theories and solve queries in a terminal user interface.
- Contribute: set up a development environment, run the checks, write documentation, and release.