Re: "recursive rules" vs "recursive terms"

No, the problem occurs when there is a cycle in the graph where nodes 
are rules and edges are between relation names in the body of a rule and 
the head of a rule.  As Harold pointed out, this can easily be found by 
static analysis of a ruleset.

Note we discussed this same issue in an email thread [1] started by 
Hassan about doing append in production rules.  My solution [2] like my 
factorial solution also used the "trick" of asserting goal facts (which 
I believe but cannot prove is too difficult for an automated RIF tranlator)

[1] http://lists.w3.org/Archives/Public/public-rif-wg/2006Mar/0085.html
[2] http://lists.w3.org/Archives/Public/public-rif-wg/2006Mar/0198.html

Sandro Hawke wrote:

>Can the problem Gary labeled "recursion" be narrowed to only be talking
>about recursive generation of terms?  Recursive references between
>predicates are not a problem in production rules -- it's just when they
>start building larger terms or new terms (ala gensym or math builtins)
>that the engine gets in a loop, right?  (I'm sure there's a better way
>to characterize this kind of rule, but I can't remember a term for it.
>I'm just realizing that the label "recursive" cuts off much more of the
>space than is necessary.)
>
>       -- Sandro
>
>
>
>  
>

Received on Monday, 18 December 2006 19:50:29 UTC