RE: simple rule examples and RuleML Datalog impl

From: stabet@attbi.com
Date: 05/13/03

  • Next message: pat hayes: "(no subject)"
    Hi Mike and all:
    
    I did a quick implementation of the examples 1 and 2 in RuleML datalog. I 
    attached the RuleML file and a trace of execution of the first example in Jess.
    
    Examples 2 and 3 are already implemented in RuleML by Mike Dean (GEDCOM) and 
    ported to 0.8:
    http://www.daml.org/2001/02/gedcom-ruleml/ 
    
    Regards,
    
    Said
    
    
    
    
    -----Original Message-----
    From: owner-joint-committee@wrath.daml.org [mailto:owner-joint-
    committee@wrath.daml.org] On Behalf Of Mike Dean
    Sent: Monday, May 12, 2003 12:36 PM
    To: joint-committee@daml.org
    Subject: simple rule examples
    
    I promised to suggest several examples to help us compare
    the Horn clause subsets of RuleML and SCL:
    
    1) An employee of a (subsidiary) Company is also an employee
    of its parent Company.
    
    2) The uncle of a Person is either the brother of their
    parent, or the husband of their aunt.
    
    3) 2 *distinct* children in the same Family are siblings.
    
    	Mike
    
    

    D:\ruleml\demos\datalog>rulemltransform simplerules.ruleml
    
    D:\ruleml\demos\datalog>java org.apache.xalan.xslt.Process -IN simplerules.ruleml.xm
    l -XSL 0.8-RuleMLTransformToJESS.xsl -OUT simplerules.ruleml.output.clp
    
    
    D:\ruleml\demos\datalog>java jess.Main
    
    Jess, the Java Expert System Shell
    Copyright (C) 1998 E.J. Friedman Hill and the Sandia Corporation
    Jess Version 6.0 12/7/2001
    
    Jess> (batch simplerules.ruleml.output.clp)
    <Fact-1>
    Jess> (facts)
    f-0   (MAIN::subsidiaryof "BBN" "Verizon")
    f-1   (MAIN::employeeof "Mike Dean" "BBN")
    For a total of 2 facts.
    Jess> (rules)
    MAIN::unclerule2
    MAIN::unclerule1
    MAIN::employeerule1
    For a total of 3 rules.
    Jess> (watch all)
    TRUE
    Jess> (run)
    FIRE 1 MAIN::employeerule1 f-1, f-0
     ==> f-2 (MAIN::employeeof "Mike Dean" "Verizon")
    1
    Jess>
    


    This archive was generated by hypermail 2.1.4 : 05/13/03 EST