This is an archive of an inactive wiki and cannot be modified.

Syntactic Abstraction

TBC (Justify and explain the metasyntax)

However they may differ in their expressive power, their concrete syntax and their semantics, most rule languages share a lot at the abstract syntax level. RIF will be based on a common extensible abstract syntax and a standard way to derive a concrete XML syntax.

See also RIF Syntax

From Sandro

Extending the language described by a BNF grammar requires inserting a disjunction (alternate) into a production. In the asn06 model, it requires adding a new production (subclass). Arguably it's simple to think of an extension as just adding things (in any order), rather than as changing something.

To say that differently, when you're have a spot in the syntax where a "Foo" can go, do you want to say "a Foo can be a RedFoo, a BlueFoo, or a GreenFoo", or do you want to say "a RedFoo is a Foo, a BlueFoo is a Foo, and a GreenFoo is a Foo." The latter form seems preferable when you're expecting new subclasses of Foo to come along -- it doesn't suggest we're done listing the subclasses.

From Hassan


From ChrisW

Choosing the abstract syntax as the primary (though, again, perhaps non-normative) syntax appeals to me because it allows us to focus on certain aspects of RIF while postponing others. For example, we need to consider in Phase 1 how to integrate RDF into RIF (to the extent it is compatible with the CORE semantics). How will this be done? RDF only allows binary predicates, and treats unary predication as a special kind of binary predicate, e.g. the atom P(A) in a rule language would be expressed as type(A,P) in RDF. Do we define a mapping from RDF triples into RIF syntax, or does RIF carry RDF triples as RDF? We also need to consider how to transmit RDF data as ground atoms in RIF. Are we going to invent our own special RIF syntax for RDF triples, or are we going to invent a special RDF syntax for higher-arity predicates, or are some of our ground atoms going to be in RDF and the rest in our own syntax, or something else? Are rules going to look different than ground atoms? etc etc. We have not really begun to discuss the alternatives here.

By working at the level of an abstract syntax, we can postpone that decision and work on the current issues. It seems to me that we would need to directly address these questions if we are to have hope of a BNF syntax, and that the current BNF syntax already biases us away from some of the options for handling RDF (not to mention OWL) which we haven't discussed (it is biased because radical changes to the syntax would be needed if we went with some of the approaches). In an abstract syntax, we say something like



etc., without committing to a particular decision on how RDF ground atoms are to be treated specifically. We all know rules will have atoms in them and that the atoms may contain variables, etc., and there is considerable work that can be done without dealing with the specific problem of rdf-ground-atoms now.

Note of course that there are already a slew of other issues like the RDF one I use here that could have the same impact on a concrete (e.g. BNF) syntax, but far less impact on an abstract syntax.


TBC (How do we interchange identifiers in application-specific vocabularies)

RIF will use URIs (IRIs) in the style of RDF and OWL, using them to identify at least: globally named predicates, functions, datatypes, constants (OWL individuals, not literal values), rules, and rulesets.

Concrete Syntaxes