Open tidoust opened 3 years ago
I am unconvinced about modules being created by default as that sounds like something for a scripting specification. For this specification, we just need to note that "goal" is the default value for each condition and action chunk in the absence of an explicit @module declaration in that chunk.
The scripting API allows applications to create as many modules as needed and to declare additional operations for each module, but it assumes that at least the "goal" and "rules" module are created. This is, however, beyond the scope of this specification.
For now, I think it is safer to assume that rules are only in the "rules" module. The mapping mechanism can be used to "compile" rules from other modules to the "rules" module. I am looking forward to work on compiling rule conditions to a RETE style discrimination network for scaling up to much larger sets of facts and rules. Reinforcement learning of rules will involve a richer API, e.g. for copying and mutating rules.
whether modules can be read-only
That is an interesting idea and also relates to what metadata is needed to manage access when different clients have different restrictions on what they can do. I suggest we defer this until we have the corresponding implementation experience.
See related comment from @ngcharithperera:
@draggett noted that:
The specification needs to clarify:
The Rule engine execution section would be the perfect place to write these rules down.