cogai icon indicating copy to clipboard operation
cogai copied to clipboard

Chunks syntax: Is "rule" a specific chunk type?

Open tidoust opened this issue 4 years ago • 1 comments

Looking at rule definitions in Introduction to chunks and rules, I see that all examples use a rule chunk type. Is this how rules are identified? Or are rules identified because they have @condition and @action properties?

If the former, same question as in #2, shouldn't rule be prefixed with @ since it's specific to the rule language itself?

tidoust avatar May 29 '20 14:05 tidoust

Rules are identified by having the type "rule" and being in the "rules" module. A chunk of type "rule" is expected to have both the @condition and @action properties. Note that rules can be compiled from other modules, and in principle uncompiled. This is needed when you want to reason about rules, see: https://www.w3.org/Data/demos/chunks/chunks.html#compilation

draggett avatar Jun 03 '20 09:06 draggett