Re: updated Requirements

From: Harold Boley (boley@informatik.uni-kl.de)
Date: 07/30/03

  • Next message: Benjamin Grosof: "proposal for initial Rules Lite and further phasing to Rules Full; your comments requested for 8/5 telecon"
    Hi Mike,
    
    I agree the discussion you brought up on binary vs. n-ary relations is important.
    To better understand some of the issues I went back to your rule test cases email
    (http://www.daml.org/listarchive/joint-committee/1389.html).
    
    Since you expect the most common uses will be like property chaining and translation
    I used these for the use case comparison below.
    
    Talk to you again,
    Harold
    
    PS: I put the dots of your N3 examples directly after the closing braces, since my
        vacation mailer apparently truncates emails with a "." in the 'first column'.
    
    
    Basic property chaining (relational product)
    ============================================
    
    N3
    --
    
    :mike :parent :joe.
    :joe :brother :leon.
    
    { ?child :parent ?p.
      ?p :brother ?u }
    =>
    { ?child :uncle ?u }.
    
    { :mike :uncle :leon }
    =>
    { <> test:successful "true" }.
    
    
    Prolog-like
    -----------
    
    :parent(:mike, :joe).
    :brother(:joe, :leon).
    
    :uncle(?child, ?u)
      :-
    :parent(?child, ?p),
    :brother(?p, ?u).
    
    true()
      :-
    :uncle(:mike, :leon).
    
    
    Notes:
    
    The prefix/URI declarations are omitted here and further on.
    
    We may also consider a rule with a conjunctive conclusion
    (all conjuncts sharing the 'subject' ?u)
    
    { ?p :brother ?u }
    =>
    { ?u :gender :male.
      ?u :sibling ?p }.
    
    to derive :gender and :sibling facts.
    
    For many purposes this rule could be split into
    
    { ?p :brother ?u }
    =>
    { ?u :gender :male }.
    
    and
    
    { ?p :brother ?u }
    =>
    { ?u :sibling ?p }.
    
    However, consider the query
    
    { :leon :gender :male.
      :leon :sibling :joe }
    =>
    { <> test:successful "true" }.
    
    In top-down computations, the conjunctive-conclusion
    rule would prove the common :brother premise once only,
    while the split rules would prove it separately, twice.
    (Such redundant proofs will become inefficient when
    duplicated premises require long subproofs.)
    
    Object-oriented modeling provides further examples where
    an object (or 'subject') description is better kept as one
    group rather than split into separate binary relations.
    
    For 'subject-centered' conjunctive groupings like
    
    :leon :gender :male.
    :leon :sibling :joe.
    
    N3 permits the compact shortcut
    
    :leon :gender :male;
          :sibling :joe.
    
    For similar purposes F-logic has developed an unordered
    'n-ary' notation, which in the presentation syntax
    (http://www.daml.org/listarchive/joint-committee/1406.html)
    lets us render the example as the single fact
    
    :leon(:gender->:male; :sibling->:joe).
    
    This can be derived from the fact
    
    joe(:brother->:leon).
    
    via the conjunctive-conclusion rule rewritten as
    
    ?u(:gender->:male; :sibling->?p)
      :-
    ?p(:brother->?u ! ?rest).
    
    with variables ?u and ?p occurring in both subject and
    object positions (the -- possibly anonymous -- variable
    ?rest being separated from the named roles by a "!").
    
    
    Ontology translation/rewriting (with arithmetic)
    ================================================
    
    N3
    --
    
    :yard :lengthInFeet "3".
    
    { ?x :lengthInFeet ?feet.
      ( ?feet "12" ) math:product ?inches }
    =>
    { ?x :lengthInInches ?inches }.
    
    { :yard :lengthInInches "36" }
    =>
    { <> test:successful "true" }.
    
    
    Prolog-like
    -----------
    
    :lengthInFeet(:yard, "3").
    
    lengthInInches(?x, ?inches)
      :-
    :lengthInFeet(?x, ?feet).
    math:product([?feet,"12"], ?inches).
    
    true()
      :-
    :lengthInInches(:yard, "36").
    
    
    Notes:
    
    The fact seems to make translation work for one yard only
    (invertible integer arithmetic would be conceivable).
    
    In the rule, instead of a binary-relation arithmetic premise
    a ternary-relation premise rule could be used as in
    
    lengthInInches(?x, ?inches)
      :-
    :lengthInFeet(?x, ?feet).
    math:product(?feet, "12", ?inches).
    
    omitting the [...]-list, hence keeping this test case in the
    Datalog expressive subset of FOL.
    


    This archive was generated by hypermail 2.1.4 : 07/30/03 EST