|
|
|
|
|
by wizzwizz4
594 days ago
|
|
It doesn't scale that well because integers are their own, opaque thing in Prolog, and the is predicate is unidirectional. However, there's no inherent reason this has to be the case: you can construct your own representation of the integers from the Peano axioms, and recover bidirectionality of addition. (You'll want to be using some typed variant of Prolog with the "unary tree of units" optimisation, otherwise integers take O(n) space in memory, but it's possible in the language.) Prolog works how it does, because it's (mostly) backwards-compatible with a facts database used for symbolic AI research, where all atoms were opaque. |
|
https://github.com/triska/clpz