3 ms·
>"worse of all, the order in which you wrote your clauses in the program makes a difference to how it gets executed and, indeed, whether any part of the program
by sgt101 8y ago
>"worse of all, the order in which you wrote your clauses in the program makes a difference to how it gets executed and, indeed, whether any part of the program is reachable"
That's because the algorithm that prolog uses to do unification uses committed choice - if the logic could be run using efficiently grounded answer sets then the behaviour could be made consistent and that would make the semantics a whole lot clearer. Especially if ! was done away with as well.