next up previous
Next: Query Up: Operational Semantics Previous: Operational Semantics

Lazy

A module with lazy search strategy uses the fastest way to obtain the solution for a query. By fastest we understand the minimum number of new queries generated, for both the user and the submodules, to solve the current query. The strategy is based on the combined action of 1) a search procedure that, looking at the current state of the module (values of the facts and current rules, relations and functions), finds the next query that is relevant to the current query, and 2) the updating of the module state by means of the specialisation of the knowledge base. This cycle is repeated until the answer for the query is generated.

We should remember which are the components of a module that participate in giving a value to a fact. A fact receives a value from the user (if the fact appears in the list of imported facts), from a submodule (if the fact is a prefixed one), by means of needs relations (in the sense explained in Section 3.1.4), from a function associated to a fact (the value of the fact will be the result of the evaluation of the function), from the rules (the value will be obtained as a combination of the conclusions of rules), or from the meta-rules (the value is the result of the reflection of a K meta-predicate instance.





Josep Puyol-Gruart
Thu Oct 23 15:34:13 MET DST 1997