[eclipse-clp-users] Searching working memory without destructive unification?

From: -dp- <david_at_...151...>
Date: Fri, 13 Nov 2009 09:45:43 +0800
I need to search working memory with a query that contains a mixture of
atoms and variables, and the functor and arity of the query will change (in
a data-driven design).

It's important that the contents of working memory not change as a result of
such search, such as a variable being bound to an atom or compound term in
the query.

I haven't been able to find a predicate for non-destructive unification
(e.g., it might keep bindings in one of its arguments), and my current best
idea is to construct a dummy query with the same functor and arity but will
all new free vars. After each successful destructive unification with a
dummy query, I'd use my own non-destructive unification predicate to compare
the found item with the real query.

Is there an easier way to do this?

David
Received on Fri Nov 13 2009 - 02:18:24 CET

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST