From: <ki...@cs...> - 2002-02-28 01:04:17
|
Terry wrote: > > Whatever the semantics of assert and retract should be, I dont think > we should go into infinite loops. Bart would call it the "infinite loop" (INFLOOP) semantics :-) > So my proposal is to put a "lock" on asserted/interned tries by having > the first instruction of these tries be choice point that implements a > simple "lock" that ensures that the same trie cannot be both written > to and read from at the same time. What does it mean in practical terms? That backtracking over predicate being updated is not allowed, but you would get an error message? > The lock is acquired either by one_node_check_insert() or by executing > the first choice point in an asserted trie, and will allow any number > of readers *or* a single writer. > > The lock is released at the end of one_node_check_insert() or when > backtracking out of the trie. Is it possible to get deadlocked under this schema? Say, the clause aborts or is cut. I suppose the lock will also be released? Thanks for looking into this. I suspected that there is more to this example than simply backtracking over an update. Usually when I backtrack over an update I get hit by the SIGSEGV semantics, not the INFLOOP one :-) --michael |