Response to Review of Reaction RuleML 1.02

From RuleML Wiki
Jump to: navigation, search

The comments below, in boxes, were received in regard to the Reaction RuleML 1.02 Review. Immediately after each boxed comment, there is an enumerated RuleML response addressing it, with corresonding numbers.

All comments received during the (extended and now closed) Review comment period for Reaction RuleML 1.02 have been addressed in the responses below.

1 Patrick Hung

I read and browse the web site. Overall it is pretty good and I have to congratulate for all of your achievements. It is very impressive!

I did not check and validate each single syntax in the XML documents. Here are there suggestions I have for the web site:

(1) Is there any formal document like a recommendation for RuleML? I only see related books, papers and slides.

(2) Referring to:

2 Examples Numerous sample RuleML documents have been prepared and maintained in the Examples directory.

Maybe it is better to have a README file in each folder and help the users to understand how to understand the examples.

(3) Is there any section to list our the implementation of RuleML such as an open source project?

(1) No, there is no additional external document. The online specification consists of normative and informative components, as stated in the introduction. The linked background documents and presentations are just informative.

(2) Thanks for the suggestion. The examples itself already contain inline comments. We will provide an overview or README in the next release 1.03.

(3) Reaction RuleML is using Github: https://github.com/RuleML/reaction-ruleml/tree/1.02. A list of translators (http://wiki.ruleml.org/index.php/RuleML_Implementations#Translators) and engines (http://wiki.ruleml.org/index.php/RuleML_Implementations#Engines) is maintained on the main RuleML Wiki (http://ruleml.org).

2 Grzegorz J. Nalepa

  1. I understand this is a spec, not a tutorial - these are in your lectures, presentations and papers. However, I would still expect a little elaboration on the use of main/common elements, some basic examples.
  2. the spec itself grew quite large: I am wondering if there is any way of modularization?
  3. a minor comment: in such solutions I try to avoid duplicated names - they might get lost if some tool breaks capitalization, this applies to pairs: 31/32, 48/49,3/94 in the Glossary.

(1) We added an illustrative example and linked further examples in Appendix 1. We also added a primer as prequisite in the quick links and added additional lectures and tutorials in the background section. More elaborated examples are a topic of future work for the Glossary in the 1.03 release.

(2) The overal specification of RuleML (http://wiki.ruleml.org/index.php/Specification_of_RuleML_1.02) is modularized into the language families. The Reaction RuleML family is further modularized and documented by the schema docs: http://reaction.ruleml.org/1.02/doc/.

(3) Yes, this is an open issue which has not been addressed in the 1.02 release.

3 Alexei A. Morozov

What is a mechanism of co-ordination of execution of distributed RuleML specifications? I mean, that it is stated that the @key and @keyref constructs are to be used for definition of the distributed programs. Meanwhile, it looks like a program in Reaction RuleML can have a state - I mean, that several basic means for the update of the logic program state are provided; therefore a particular program can have a state that can be updated. Thus, the question is how a Reaction RuleML program can account the state of another Reaction RuleML program (probably executed in another computer)? Am I right that the @key and @keyref constructs are not sufficient to refer given instance of the Reaction RuleML program with the particular state, but only a text of this program published in the Web Server? Is a Reaction RuleML program stateless or it has a state?

The key-keyref mechanism is only for syntactic distribution of Reaction RuleML descriptions. That is, parts of the description are defined separately and can be syntactically joined together by an XML parser with the key-keyref mechanism. What you are referring to is the actual execution of a rule program, where the rule engine executes the Reaction RuleML performatives / actions, leading to new program states.

If you have multiple rule programs running in different distributed rule agents / inference services, Reaction RuleML provides messaging reaction rules which can interchange messages via send and receive performatives. These messages can contain, e.g., queries, which are applied to the current program state of the receiving agent. Also, it is possible to consult (semantically import) Reaction RuleML knowledge from an enclosed Message into a rule agent, e.g. for uploading mobile rule code. The message interchange format of Reaction RuleML has mechanisms for referencing the conversation state by a conversation identifier (cid). By that, long running negotiation and coordination protocols with state can be implemented.

For defining the semantics of coordination (and negotiation) mechanisms, Reaction RuleML has introduced Semantic Profiles since 1.0. With the @style attribute, a Semantic Profile can be referenced and used by the translators and interpreters of Reaction RuleML.

4 Fariba Sadri

http://wiki.ruleml.org/index.php/Specification_of_Reaction_RuleML_1.02 (including http://wiki.ruleml.org/index.php/Glossary_of_Reaction_RuleML_1.02)

There is a wealth of information online on the above pages, and it has been interesting to browse and sample. My comments below are mostly about issues I am curious or unclear about.

http://wiki.ruleml.org/index.php/Specification_of_Reaction_RuleML_1.02

1 Overview:

I am curious: It states “Rules (Rule) generalizing Implies” and “Negations, including classical (strong) and negation-as-failure (weak) forms, with, e.g., well-founded or answer-set semantics, and generic negations”. So is there an overall declarative semantics for the rules, encapsulating these different negations? If not, then what does it mean to say the negation has these possible semantics?


2 Examples:

http://reaction.ruleml.org/1.02/exa/eca/SimpleECARule.rrml

I find the example unclear: Firstly the English description on the page can be edited a little for English. “This example defines a simple Event-Condition-Action rule which is triggered by an event pattern in the on part. A matching event instance is asserted which triggers the pattern in the ECA rule. The ECA rule proofs the condition and executes the action which asserts a new fact to the knowledge base. This fact is then queried.” Secondly, it is misleading to say “A matching event instance is asserted which triggers…”. Such an event is not asserted because of the ECA rule. Is it? But if it happens to be asserted then the ECA rule is triggered. Is that right? Perhaps a more declarative reading of the rule would be more helpful and more accurate. Thirdly, “The ECA rule proves ….” maybe better to say “the ECA rule engine proves” . Finally, why is the knowledge base queried in the end to see whom John loves? I think my overall confusion is that I don’t know if the description is (or should be) operational or declarative.

http://reaction.ruleml.org/1.02/exa/eca/ComplexECARule.rrml English: “This examples show …” “The asserted event instance sequence triggers the …” It is not clear to me why the word “asserted” is used here (and everywhere else in this context).

The on part is This does not seem to quite match the algebra given on slide 14 at http://www.slideshare.net/swadpasc/paschke-rule-ml2014keynote I guess the “,” means “and”. I would find it very helpful if at the top of the page the complex event is shown simply on one line according to the algebra (with time variables and constraints?) before showing the rather complex XML.

http://reaction.ruleml.org/1.02/exa/eca/DerivationECARule.rrml

“if price of drink is more than 19 then it is expensive” However the XML has the figure 15, not 19. Is that a mistake or am I misunderstanding the syntax?


CEP slides at http://www.slideshare.net/swadpasc/paschke-rule-ml2014keynote

Slide 14 No explicit times or temporal constraints – why not? Slide 17 Difference between complex events and complex actions? Having looked at the glossary at http://wiki.ruleml.org/index.php/Glossary_of_Reaction_RuleML_1.02 I am still not clear, conceptually what the difference is between the two.


6 Appendices

6.1 http://reaction.ruleml.org/1.02/exa/cep/SimpleCEPRule.rrml

Is the description of the example correct?

“This example defines a simple Event-Condition-Action rule which is triggered by an event pattern in the on part. A matching event instance is asserted which triggers the pattern in the ECA rule. The ECA rule proofs the condition and executes the action which asserts a new fact to the knowledge base. This fact is then queried.”

The final two sentences (executes the action which asserts a new fact to the knowledge base. This fact is then queried) seem unintuitive, as the action is that of sending a message to someone.

What actually is the semantics of these rules?

For example isn’t there a difference between “on the order of a person for a drink if the drink is wine do assert that John likes the person" and “"on receiving the order of a person for a drink if the drink is wine do tell person (=send to person message) that John likes the person"?


http://wiki.ruleml.org/index.php/Glossary_of_Reaction_RuleML_1.02

The schema document on “Every” at http://reaction.ruleml.org/1.02/doc/kr-cep/ is too complicated for me to follow at first or even second glance. But I do wonder why on the glossary “Every” and “Exists” look so different from one another. In logic they are very close. However, “Every” is said to be an “Operator used to connect two or more sentences”, but the examples given suggest “Every” is (more or less) the normal quantifier we know from logic.


(1) Reaction RuleML has introduced Semantic Profiles since version 1.0, which can reference the intended semantics such as answer set semantics or well-founded semantics.

(2) Simple ECA example: The description of the ECA rule example has been improved. The RuleML primitives / actions are ordered, i.e. the query is executed after the assertion of the fact (which triggers the ECA rule).

Complex ECA example: The description of the complex ECA rule example has been corrected. The event pattern is (a;(b;c)).

(3) Derivation ECA example: has been corrected.

(4) CEP Slides: Slide 14 only shows how the operators correlate the events (not an actual implementation of the events and the operators). Slide 17: The difference between complex actions and complex events is that complex events are happenings/occurences, while complex actions are actively executed and might fail during execution.

(5) Appendix / Example: has been corrected.

(6) The "every" operator is used to define a repeated time, e.g. "every Friday". We have improved the description in the Glossary to make this clear.


5 Szymon Bobek

  1. Some elements have "real-life", intuitive examples, like <Atom>, other have less intuitive abstract examples like Answer, and some has no examples at all, while needed. In some cases it would be reasonable to provide an explanation of a syntax in a for of example written in commonly known rule-language, like Prolog, Clips, Drools. That could make the abstract examples much much more understandable
  2. Some examples are black and white (<Answer>) some colored (<Atom>), all should has colored syntax.
  3. Maybe it would be worth considering two types of indexes: one alphabetical, and the other one - structural, so that tags will not be mixed with attributes. In fact, this is automatically generated in schema docs, and could be useful in this spec, as well. This was done in case of <Attribute> in a form of the "see" section - such a section will be useful in other elements too.
  4. Direct links to schema docs, not one general link for every element.
  5. The elements that refer to more advanced features, like temporal elements require much more clarification about what temporal relations could be expressed with them, what are limitation of such, etc. This is something that I could not quite get, but maybe due to the quick reading through the spec, but is it possible for instance to define a rule that is able to say "if for the 60% of the time during last 70 minutes, the value of the attribute X, has been equal to y then do something"? In other words - there was not clear for me to what extent the semantics of the elements in RuleML are well specified (especially temporal - some reffered to situation calculus, some not), and where there is a place for "free interpretation".
  6. To sum up, I know that the language was developed for the general purposes, to serve as the most universal notation for encoding and exchanging rule-based knowledge, but the concrete examples and clear specification of the limitation and expressiveness of the language cannot be skipped. Otherwise the specification will be too general, and for me personally - not very useful (from the technical and engineering point of view as a person who would like to simply use it in practical use-cases).

(1) We will provide more examples in the 1.03 release.

(2) This has been harmonized in the Glossary.

(3) We plan a more automated approach for creating the Glossary and might be able to address this in the 1.03 release.

(4) This will be also solved by the automated Glossary creation in the next release.

(5) The semantics is not described in the Glossary, but in a Semantic Profile defining the temporal semantics.

(6) Thank you for the comments. More examples and more tutorials are on the todo list.

6 Zhili Zhao

Specification of Reaction RuleML 1.02

Section 1.1: Implicit quantification (closure), including reference to externally defined extended quantifiers such as numerical quantification=> Implicit quantification (closure), including references to externally defined extended quantifiers such as numerical quantification

Glossary of Reaction RuleML 1.02

1. by <content>, which acts as an extension point to embed one of the many existing XML serializations of actions => by <content>, which acts as an extension point to embed one of many existing XML serializations of actions (This sentence can also be found in 49, 140, 143 and 156.)

10 (@arity), 73 (@key), 74 (@keyref): these attributes don’t have descriptions.

13. The @card @minCard @maxCard attribute is used to define the number of required event occurrences.=> The @card @minCard @maxCard attribute defines the number of event occurrences which at least are allowed to occur.

43. The default semantics applies the elseDo to the negation of the <if>-part in production rules and the negation of the combined=> The default semantics apply the elseDo to the negation of the <if>-part in production rules and the negation of the combined

46.

 <right>
   1
 <right>
 The end label of “right” is not correct.

49. by external reference using the @iri attributes => by external reference using the @iri attribute

77. The optional @card @minCard @maxCard attribute can be used to define the maximum number of loops=> The optional @card @minCard @maxCard attributes can be used to define the maximum number of loops

84. an optional <sender> and <receiver> : indicates the sender and the target of the message: please make sure if <sender> and <receiver> are optional.

89. In CEP Reaction RuleML the mode attribute is also used for <Message> defining the communication mode with the values "inbound", "outbound" and "bidirectional" communication.=> In CEP Reaction RuleML the mode attribute is also used for defining the communication mode with the values "inbound", "outbound" and "bidirectional" communication.

96. Note that oids are not required to be unique within a rulebase.=> please make sure if oids are required to be unique or not.

110. The defined xmlns mappings is processed before processing of any mappings from @prefix on the same attribute value=> The defined xmlns mappings are processed before processing of any mappings from @prefix on the same attribute value

111. The optional @card @minCard @maxCard attribute acts as a generic size boundary / counter in the operational semantic profiles.=> The optional @card @minCard @maxCard attribute act as a generic size boundary / counter in the operational semantic profiles.

128. There is a distinction into the rule interface signature which is define by the <signature> role and the concrete implementation of a rule defined by its parts (<on>, <if>, <then>, <do>, <after>, <else>, <elseDo>).=> There is a distinction into the rule interface signature which is defined by the <signature> role and the concrete implementation of a rule defined by its parts (<on>, <if>, <then>, <do>, <after>, <else>, <elseDo>).

The following example show how a <Rule> by selecting different parts can be configured to a particular rule sort.=> The following example shows how a <Rule> by selecting different parts can be configured to a particular rule sort.

151. The following examples shows the typical template of a test.=> The following example shows the typical template of a test.

161. The next examples replaces a rule with another rule.=> The next example replaces a rule with another rule. The third examples uses place holder variables which are substituted by variable bindings defined in the equations of the update rulebase.=> The third example uses place holder variables which are substituted by variable bindings defined in the equations of the update rulebase.

Thank you for the corrections, which helped us to improve the spec.