w3c / cogai

for work by the Cognitive AI community group
Other
54 stars 25 forks source link

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

Open tidoust opened 4 years ago

tidoust commented 4 years ago

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?

draggett commented 4 years ago

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