- From: Paul Vincent <pvincent@tibco.com>
- Date: Mon, 28 Apr 2008 10:10:42 -0700
- To: "Christian de Sainte Marie" <csma@ilog.fr>
- Cc: <public-rif-wg@w3.org>
Christian - thanks for the diagrams - would be good if you assigned ownership to each one so we can relate the discussion vs the model :) My 2 cents: metadata and rule organization are SEPARATE concepts. Using rule organization to define metadata is unnecessarily restrictive (original thought: plain daft, IMHO), and confuses container, inheritance and reference relationships. Why? Example: Group1 has metadata Meta1 which applies (i.e. is inherited by the container relationship) to its contents Rule1a and Rule1b. Group2 has metadata Meta2 which applies to its contents Rule2a and Rule2b. But Rule1a and Rule2a also share Meta3, and Rule1b and Rule2b share Meta4. Solution? Do I create groups Group1a, Group1b as subgroups of Group1, and Group2a, Group2b as subgroups of Group2, to handle metadata Meta3 and Meta4? BUT I could equally organize the same rules and metadata with Meta3 and Meta3 associated with Group1 and Group2, and subgroups for Meta1 and Meta2. Presto: we have another complication in rule interchange. Better solution (IMHO): Any element in RIF can have any number of metadata annotations. These are irrelevant (by definition, it seems) to rule semantics AND interchange semantics. Rule translators can if desired remove such metadata annotations, especially if they have no role in the target (e.g. runtime use only). And if you want to share metadata across entities, then you define an IRI to a metadata concept and specify that common linkage in every element that shares it. [Hmmm sounds a bit like an RDF use case...] Paul Vincent TIBCO | Business Optimization | Business Rules & CEP > -----Original Message----- > From: public-rif-wg-request@w3.org [mailto:public-rif-wg-request@w3.org] > On Behalf Of Christian de Sainte Marie > Sent: 28 April 2008 14:25 > To: Chris Welty > Cc: Sandro Hawke; Jos de Bruijn; public-rif-wg@w3.org > Subject: Re: ISSUE-51: Another possible compromise for metadata syntax > > All, > > Since I like diagrams, esp. when it comes to compare designs, I tried > and translated all these syntaxes into UML-like diagrams (which leads me > to propose a new solution, in the end). > > The rule part of BLD as it was published in WD2 is diagram-1 (I put ??? > when the XML syntax does not give the role a name). > > Chris Welty wrote: > > > > The current BLD draft shows: > > > > Document ::= 'Document' '(' IRIMETA? DIRECTIVE* Group? ')' > > Group ::= 'Group' IRIMETA? '(' (RULE | Group)* ')' > > Shown on diagram 2 (without the DIRECTIVE, which I leave out in all the > folowwing diagrams as well). > > > [ChrisW] suggest[s] something like: > > > > Document ::= 'Document' '(' IRIMETA? DIRECTIVE* (Group | Rule)* ')' > > Group ::= 'Group' IRIMETA? '(' (RULE | Group)* ')' > > Rule ::= 'Rule' IRIMETA? '(' RULE ')' > > Diagram 3. On the diagram, I had to make explicit the abstract class > that is common to Group and Rule; I called it ITEM. So, what the diagram > really show is (I attached the 'meta' association to the abstract ITEM > to make for readibility purposes): > > Document ::= 'Document' '(' IRIMETA? DIRECTIVE* ITEM* ')' > ITEM ::= [ Rule | Group ] > Group ::= 'Group' IRIMETA? ITEM* > Rule ::= 'Rule' IRIMETA? '(' RULE ')' > RULE ::= [ 'Forall' Var+ '(' CLAUSE ')' | CLAUSE ] > > > Also, *as a different point*, if we keep this I would suggest modifiying > > the Group production so that you don't have to type 'Group' for every > > repeated rule within a group, something like: > > > > Group ::= 'Group' IRIMETA? '(' (RULE* | Group)* ')' > > I do not understand this: your initial production allows 0 to many RULEs > in a Group without having to loop through the Group construct (and, > thus, without having to type 'Group' for each new RULE? > > However, your proposal raises two questions: > > 1. do we really want some implementation to produce a RIF document where > the RULEs are all 'Forall' or CLAUSE 'sentence's in a 'Group', whereas > another implementation, for the same set of rules, would produce a > document where the would all be 'Rules' directly 'contain'ed in the > Document (e.g. in the case where there are no subgrouping of rules in > the original set)? > > 2. do we want all facts (heads without a body - was the Talking Heads > group about facts, btw?) to have to be labelled 'Rule'? After all, that > was why CLAUSEs where introduced: to separate rules properly said from > facts > > One way to avoid both would be to allow Groups to contain ITEMs, not > RULEs or other FORMULAs directly (diagram 4): > > Document ::= 'Document' '(' IRIMETA? DIRECTIVE* ITEM* ')' > ITEM ::= [ Rule | Fact | Group ] > Group ::= 'Group' IRIMETA? ITEM* > Rule ::= 'Rule' IRIMETA? '(' RULE ')' > RULE ::= [ 'Forall' Var+ '(' Implies ')' | Implies ] > Fact ::= ATOMIC > > Wouldn't that last version satisfy everybody? And we can even get rid of > the CLAUSE production :-) > > (NB: if we want to all universally quantified facts, we only need to > associate Fact to a new abstract FACT as a formula, instead of ATOMIC > directly, where FACT ::= [ 'Forall' Var+ '(' ATOMIC ')' | ATOMIC ]) > > Cheers, > > Christian
Received on Monday, 28 April 2008 17:11:26 UTC