NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Alternative futures? (Score:1)
Still, I don't think that quite solves the problem if you assert a fact and your query fails, you probably want to retract that fact.
This feels to me like you want an 'alternative futures' model of time: that is, when you backtrack, you not only go back to a previous 'time' but also arrange things so that when you go 'forward' again you are moving forward on a different timeline that diverges from the first at the point the backtrack went back to. If you change something and don't backtrack, subsequent computations stay on the same timeline so they keep any changes that were made.
Of course, this means that you end up storing every state that has been present in every hypothetical timeline your program has visited, which may be a problem. If there's no way to retrieve values from 'other' timelines, you could garbage-collect them at the point they become inaccessible.
Reply to This
Re: (Score:2)
I've no intention of simulating the many-worlds hypothesis [wikipedia.org] in Prolog, thank you ;)
I'll leave that to Damian.
Re: (Score:1)
If git can do it so can you.