CAMPRule is a small language built on top of CAMP (Calculus for
Aggregating Matching Patterns). It help to bridge the gap between
the CAMP core calculus and real-world production rule languages such
as JRules.
The language is built as a set of macros on top of CAMP. It is
described in Section 3 of the article "A Pattern Calculus for Rule
Languages: Expressiveness, Compilation, and Mechanization" by Avraham
Shinnar, Jérôme Siméon, and Martin Hirzel (ECOOP'2015).
Inductivecamp_rule :=
| rule_when : camp -> camp_rule -> camp_rule(* Match against each element of the working memory. *)
| rule_global : camp -> camp_rule -> camp_rule(* Match against the working memory as a collection *)
| rule_not : camp -> camp_rule -> camp_rule(* A rule that must not match any working memory element. *)
| rule_return : camp -> camp_rule(* Rule to return a value for each successful match-set. *)
| rule_match : camp -> camp_rule. (* This allows a rule to simply match a camp pattern. *)