29 ms·
I would be gladly writing a lot of stuff in a Prolog-like language if there was a dialect that separated rule construction from traversal manipulation. This is
by gambler 6y ago
I would be gladly writing a lot of stuff in a Prolog-like language if there was a dialect that separated rule construction from traversal manipulation. This is such an obvious thing. I should be able to construct a set of rules and then say "but this time, ignore this branch" (without changing the tree with cuts). Or something like "do depth-first for up to 1000 levels and give me the incomplete set of answers".
In SQL you don't change the database simply because you want to run a different query. You manipulate the query, the indices and the query hints.
- falsissime 6y agoIn fact, you can do this with Prolog already, however, you have restrict yourself to the pure monotonic subset. Many parts of Prolog the do not fit can be replaced by purer counterparts. See library(si), library(reif), library(clpz) for such attempts.
- rurban 6y agoI'm quite happy with picat, which supports traditional if and loops. It's also fast and supports some solvers, recursive backtracking is optional. Skipping an expr by cut is in every prolog, but loops not.
- grizzles 6y agoYou could try datalog with your own parser. Personally I feel like their is a need for a new industry standard language that lets you encode assertions with either a boolean or a probability.