Open sjl opened 8 years ago
Are you sure that is
is what you want?
Consider CLPFD:
https://www.metalevel.at/prolog/clpfd
https://github.com/triska/clpz
CLPFD is a form of constraint programming, and would ensure that your programs remain declarative.
This is what Screamer implements by the way: nikodemus.github.io/screamer/
If you'd choose to go this route then you could either:
Write it in CL and expose the predicates themselves as black-box abstractions (all_distinct/1 is basically an impl. of bipartite matching for example).
Write it in your fact language (but you'd have to have native support in the compiler to not have to resort to Peano arithmetic).
You're more familiar with the codebase so can probably see what would be the easiest.
Arithmetic operations on numbers would be good. We can lean heavily on Lisp, probably just need to implement
is
as a special form.