Skip to content

How to load multiple theories #14

Answered by gciatto
vasily-kartashov asked this question in Q&A
Discussion options

You must be logged in to vote

There are 2 ways to load multiple theories into a solver:

  • either you concatenate them all via the Theory.plus operator, and then you crate a solver out of the whole concatenated theory
  • or you crate an empty MutableSolver and you load each theory via the Mutable Solver.appendStaticKb method

The difference among static and dynamic KBs is very important as well.

Clauses in the dynamic KB can be affected by the retract- and assert-like predicates. Clauses in the static KB cannot. So in the general case you may want to lead theories parsed from file into the static KB, as this is the usual Prolog way of consulting theory files

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vasily-kartashov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants