In my thesis, I present problems and techniques in tabling Transaction Logic (TR). TR is an extension of classical logic programming with backtrackable state updates and it has a top-down evaluation algorithm similar to Prolog's SLD derivation extended with execution paths of states instead of a single global state. This backward chaining algorithm can be very inefficient by re-computing the same transactional queries more than once, or can enter into infinite loops by visiting the same paths of states an infinite number of times when computing answers to recursive programs. We solve these problems by memoizing (caching) the calls, call initial states, unifications (answers) and return states in a searchable structure for the Sequential Transaction Logic, respective building a graph for the query and tabling the nodes ready for current execution for the Concurrent Transaction Logic.
展开▼