SlideShare une entreprise Scribd logo
1  sur  49
Télécharger pour lire hors ligne
Building A Hybrid
Reactive Rule Engine
For
Relational And Graph
Reasoning
Mark Proctor, Mario Fusco, István Ráth, Davide Sottara
RuleML2015 : Hybrid Relational and Graph Reasoning
The Problem
Student Plans
String name
Plan plan
Student
String code
Student owner
List<Exam> exams
Plan
Plan plan
String course
String code
List<Grade> exams
Exam
Exam exam
int attempt
String value
Grade
1
1
1
0..1
1 0..1
Student Plans
public class Student {

private String name;



private Plan plan;
}
public class Plan {

private String code;

private Student owner;


private List<Exam> exams;

}
public class Exam {
private String code;
private String course;


private Plan plan;


private List<Grade> grades;
}
public class Grade {

private String value;


private int attempt;
private Exam exam;
}
Student Plans
public static Student student(String studentName, String planCode, Exam... exams) {

Student student = new Student(studentName);

Plan plan = new Plan(student, planCode);

student.setPlan( plan );

plan.setOwner( student );

for ( Exam exam : exams ) {

exam.setPlan( plan );

plan.getExams().add ( exam );

}

return student;

}



public static Exam exam( String course, String... grades) {

Exam exam = new Exam( course );

int attempt = 1;

for ( String letter : grades) {

exam.getGrades().add(new Grade(exam, letter, attempt));

attempt++;

}

return exam;

}
Courses
•Communication
•Creed -The Jedi Code
•Force
•Jedi Studies
•Meditation
•Personal
•Situational Awareness
•Spirituality - Jedi Mythology
•Warrior
Student Plans
private static final String A = "A";

private static final String B = "B";

private static final String C = "C";

private static final String D = "D";

private static final String E = "E";

private static final String F = "F";
Student Plans
private static final String A = "A";

private static final String B = "B";

private static final String C = "C";

private static final String D = "D";

private static final String E = "E";

private static final String F = "F";
public void create(KieSession ksession) {

Student darth = student( "Darth", "dp2015",

exam( "dpe01", "Jedi Studies", A),

exam( "dpe02", "Force", B ),

exam( "dpe03", "Meditation", D, C) );

Student yoda = student( "Yoda", "yp2015",

exam( "ype01", "Jedi Studies", A),

exam( "ype02", "Force", A ),

exam( "ype03", "Meditation", A) );

Student luke = student( "Luke", "lp2015",

exam( "lpe01", "Jedi Studies", C, B),

exam( "lpe02", "Force", B ),

exam( "lpe03", "Meditation", F, C) );

}
Student Plans
private static final String A = "A";

private static final String B = "B";

private static final String C = "C";

private static final String D = "D";

private static final String E = "E";

private static final String F = "F";
public void create(KieSession ksession) {

Student darth = student( "Darth", "dp2015",

exam( "dpe01", "Jedi Studies", A),

exam( "dpe02", "Force", B ),

exam( "dpe03", "Meditation", D, C) );

Student yoda = student( "Yoda", "yp2015",

exam( "ype01", "Jedi Studies", A),

exam( "ype02", "Force", A ),

exam( "ype03", "Meditation", A) );

Student luke = student( "Luke", "lp2015",

exam( "lpe01", "Jedi Studies", C, B),

exam( "lpe02", "Force", B ),

exam( "lpe03", "Meditation", F, C) );



ksession.insert( darth );

ksession.insert( yoda );

ksession.insert( luke );

}
Student Plans
• Email all the “Big Data” people their grades.
The Problem
• The information provided is Object Oriented which is a form
of graph and uses references.
• Traditional Production Rule Systems are relational, they
cannot see or use references.
• Users must then map their model to a relational one.
Student Plans
public class Student {

private String name;


private String plan;

}
public class Plan {

private String code;
private String owner;
}
Student Plans
public class Student {

private String name;


private String plan;

}
public class Plan {

private String code;
private String owner;
}
public class Student {

private String name;



private Plan plan;
}
public class Plan {

private String code;

private Student owner;


private List<Exam> exams;

}
Student Plans
public class Grade {

private String value;


private int attempt;
private String exam;
}
public class Exam {
private String code;
private String course;

private String plan;
}
Student Plans
public class Grade {

private String value;


private int attempt;
private String exam;
}
public class Exam {
private String code;
private String course;

private String plan;
}
public class Exam {
private String code;
private String course;


private Plan plan;


private List<Grade> grades;
}
public class Grade {

private String value;


private int attempt;
private Exam exam;
}
Student Plans
• Email all the “Big Data” people their grades.
rule R1 when

$student : Student ()

$plan : Plan ( owner == $student.name )

$exam : Exam( plan == $plan.code, course == ”Big Data” ) 

$grade : Grade( exam == $exam.code )
then
// RHS
end
Rete
AND
AND
OTN OTN OTN OTN
Root
GradeExamPlanStudent
AND
RTN
Rete
public abstract class Node {

protected Node childNode;



public abstract void propagateLeft(Tuple tuple);



public abstract void propagateRight(Object object);

}
Rete
public abstract class Node {

protected Node childNode;



public abstract void propagateLeft(Tuple tuple);



public abstract void propagateRight(Object object);

}
public class AndNode extends Node {

private LeftMemory leftMemory;

private RightMemory rightMemory;

private CompiledExpression expr;



public void propagateLeftInsert(Tuple tuple) {

leftMemory.addTuple(tuple);



for ( Object object : rightMemory.getObjects() ) {

if ( expr.eval(tuple, object) ) {

childNode.propagateLeft(new Tuple(tuple, object));

}

}

}



public void propagateRightInsert(Object object) {

rightMemory.addObject(object);



for ( Tuple tuple : leftMemory.getTuples() ) {

if ( expr.eval(tuple, object) ) {

childNode.propagateLeft(new Tuple(tuple, object));

}

}

}

}
Rete
AND
OTN
Root
Student
[“dp2015”,
“yp2015”,
“lp2015”]
[“darth”,
“yoda”,
“luke”]
[“darth”,
“yoda”,
“luke”]
OTN
Plan
[“dp2015”,
“yp2015”,
“lp2015”]
AND
Exam
Rete
AND
OTN
Root
Student
[“dp2015”,
“yp2015”,
“lp2015”]
[“darth”,
“yoda”,
“luke”]
[“darth”,
“yoda”,
“luke”]
OTN
Plan
[“dp2015”,
“yp2015”,
“lp2015”]
ANDPartial Match
[[“darth”, “dp2015”],
[“yoda”, “yp2015”],
[“luke”, “yp2015”] ]
Exam
public class Tuple {

private Tuple parent;

private Object object;
private List<Tuple> children;




public Tuple(Tuple parent, Object object) {

parent = parent;

this.object = object;

}

}
Rete
AND
OTN
Root
Student
[“dp2015”,
“yp2015”,
“lp2015”]
[“darth”,
“yoda”,
“luke”]
[“darth”,
“yoda”,
“luke”]
OTN
Plan
[“dp2015”,
“yp2015”,
“lp2015”]
ANDPartial Match
[[“darth”, “dp2015”],
[“yoda”, “yp2015”],
[“luke”, “yp2015”] ]
OTN
Exam
[“dpe01”, “dpe02”, “dpe03”,
“ype01”, “ype02”, “ype03”,
“lpe01”, “lpe02”, “lpe03” ]
public class Tuple {

private Tuple parent;

private Object object;
private List<Tuple> children;




public Tuple(Tuple parent, Object object) {

parent = parent;

this.object = object;

}

}
Rete
AND
OTN
Root
Student
[“dp2015”,
“yp2015”,
“lp2015”]
[“darth”,
“yoda”,
“luke”]
[“darth”,
“yoda”,
“luke”]
OTN
Plan
[“dp2015”,
“yp2015”,
“lp2015”]
AND
[[“darth”, “dp2015”, “dpe01”], [“darth”, “dp2015”,“dpe02”],[“darth”, “dp2015”,“dpe03”],
[“yoda”, “yp2015”, “ype01”], [“yoda”, “yp2015”, “ype02”], [“yoda”, “yp2015”, “ype03”],
[“luke”, “lp2015”, “ype01”], [“luke”, “lp2015”, “ype02”], [“luke”, “lp2015”, “ype03”]]
Partial Match
[[“darth”, “dp2015”],
[“yoda”, “yp2015”],
[“luke”, “yp2015”] ]
OTN
Exam
[“dpe01”, “dpe02”, “dpe03”,
“ype01”, “ype02”, “ype03”,
“lpe01”, “lpe02”, “lpe03” ]
public class Tuple {

private Tuple parent;

private Object object;
private List<Tuple> children;




public Tuple(Tuple parent, Object object) {

parent = parent;

this.object = object;

}

}
Rete
[[“darth”, “dp2015”, “dpe01”], [“darth”, “dp2015”,“dpe02”],[“darth”, “dp2015”,“dpe03”],
[“yoda”, “yp2015”, “ype01”], [“yoda”, “yp2015”, “ype02”], [“yoda”, “yp2015”, “ype03”],
[“luke”, “lp2015”, “ype01”], [“luke”, “lp2015”, “ype02”], [“luke”, “lp2015”, “ype03”]]
Darth
dp2015
dpe01 dpe02 dpe03
t1 = new Tuple( null, “Darth” )
t2 = new Tuple( t1, “dp205” )
t3 = new Tuple( t2, “dpe01” )
t4 = new Tuple( t2, “dpe02” )
t5 = new Tuple( t2, “dpe03” )
Exam
Plan
Student
[t1, t2, t3],
[t1, t2, t4],
[t1, t2, t5]
Requirements
• Functionality
• Access child objects via references
• React to child objects
• List comprehension
• Iterate one to many relations
• Support reactive and passive operations
• Implementation
• Syntax Extensions
• Rete Extensions
• Object integration
From
• Implementation
• Introduces one new keyword “from”.
• Requires new Rete node.
• Requires expression evaluation sub system.
• Uses dot ‘.’ as reference accessor.
• with type safe javascript like syntax (MVEL).
• Functionality
• Allows access to nested objects.
• Dot ‘.’ accessor is access and return only.
• It does not provide list comprehension.
• List comprehension is performed by the node on the return result.
• Is passive only, no reactivity.
rule R2 when

$student : Student ( $plan : plan )

$exam: Exam( course == ”Big Data” ) from $plan.exams 

$grade: Grade() from $exam.grades
then

/∗ RHS ∗/ 

end
From
rule R2 when

$student : Student ( $plan : plan )

$exam: Exam( course == ”Big Data” ) from $plan.exams 

$grade: Grade() from $exam.grades
then

/∗ RHS ∗/ 

end
From
From
OTN
Root
Student
RTN
$student : Student ( $plan : plan ) // “from” the Working Memory
$exam: Exam( course == ”Big Data” ) from $plan.exams
$grade: Grade() from $exam.grades
From
public void propagateLeft(Tuple tuple) {

leftMemory.addTuple(tuple);

for ( Object object : rightMemory.getObjects() ) {

if ( expr.eval(tuple, object) ) {

childNode.propagateLeft(new Tuple(tuple, object));

}

}

}
From
public void propagateLeftInsert(Tuple tuple) {

leftMemory.addTuple(tuple);



Object result = expr.equals( tuple.get(index));



if ( result instanceof Collection) {

for ( Object o : ((Collection)result)) {

propagateLeftIfAllowed(tuple, o);

}

} else {

propagateLeftIfAllowed(tuple, result);

}

}



private void propagateLeftIfAllowed(Tuple tuple, Object o) {

if ( isAllowed( tuple, o ) ) {

childNode.propagateLeftInsert(new Tuple(tuple, o));

}

}
public void propagateLeftInsert(Tuple tuple) {

leftMemory.addTuple(tuple);

for ( Object object : rightMemory.getObjects() ) {

if ( expr.eval(tuple, object) ) {

childNode.propagateLeft(new Tuple(tuple, object));

}

}

}
From
public class FromNode extends Node {

private LeftMemory leftMemory;

private CompiledExpression expr;

private int index;



public void propagateLeftInsert(Tuple tuple) {

leftMemory.addTuple(tuple);



Object result = expr.equals( tuple.get(index));



if ( result instanceof Collection) {

for ( Object o : ((Collection)result)) {

propagateLeftIfAllowed(tuple, o);

}

} else {

propagateLeftIfAllowed(tuple, result);

}

}



private void propagateLeftIfAllowed(Tuple tuple, Object o) {

if ( isAllowed( tuple, o ) ) {

childNode.propagateLeftInsert(new Tuple(tuple, o));

}

}


public void propagateRightInsert(Object object) {

// From has no right propagation 

}

}
Passive OOPath
• Implementation
• Re-use ‘from’ node
• Introduces no Rete changes.
• Requires expression evaluation sub system.
• Uses forward slash ‘/’ as reference accessor.
• Introduce XPath inspired syntax
• Syntax change must be added to Patterns
• Functionality
• Allows access to nested objects.
• forward slash ‘/’ accessor performs list comprehension

for each visited reference.
• List comprehension is also performed by the node on the return result.
• Is passive only, no reactivity.
rule R3 when

Student( $grade: /plan/exams{course == ”Big Data”}/grades )
then
/∗ RHS ∗/
end
R1, R2, R3
rule R1 when

$student : Student ()

$plan : Plan ( owner == $student.name )

$exam : Exam( plan == $plan.code, course == ”Big Data” ) 

$grade : Grade( exam == $exam.code )
then
// RHS
end
rule R2 when

$student : Student ( $plan : plan )

$exam: Exam( course == ”Big Data” ) from $plan.exams 

$grade: Grade() from $exam.grades
then

/∗ RHS ∗/ 

end
rule R3 when

Student( $grade: /plan/exams{course == ”Big Data”}/grades )
then
/∗ RHS ∗/
end
OOPath Syntax
• Access by index
• Inline cast for type safety
• Indexed back reference
• Variable back reference
• Back tracking
• Out of Pattern use
Student( $grade : /plan/exams[0]{ course == ”Big Data”}/grades )
Student( $grade : /plan/exams{ #PracticalExam, lab == ”hazard safe”, 

course == ”Material Explosions”}/grades )
A( $var: /b/c/d{ f1 == ../../f2}/e ) // the ../../ back references to the ‘b’ field access
A( $var: /$b : b/c/d{ f1 == $b.f2}/e ) // the $b is inline bound for later use
A( $var: /$b : b/c/d{ f1 == $b.f2}/$b/f2 ) // $var is bound to results of the f2 access
$student : Student()

$grade : /$student/plan/exams{course == ”Big Data”}/grades;
Advanced OOPath Usage
• Use existing Drools syntax and functionality
• Colon ‘:’ provides Pattern and field binding
• Colon with equals ‘:=‘ provides unification
• POSL-like support for position and slotted
• Arguments can be named or positional.
• Positional arguments must come first and be delimited
with a semi colon ‘;’ at the end.
• Positional arguments are always unified, compared to
named arguments which can be bound ’:’ or unified ’:=’.
Advanced OOPath Usage
• Transitive closure
query isContainedIn ( Thing $x , Thing $y )

/$y/$x := children ;

or

/$y/$z := children; and isContainedIn($x, $z;) ) 

end
Advanced OOPath Usage
• Transitive closure
• Negation over transitive closure
query isContainedIn ( Thing $x , Thing $y )

/$y/$x := children ;

or

/$y/$z := children; and isContainedIn($x, $z;) ) 

end
query isNotContainedIn ( Thing $x , Thing $y ) 

not( isContainedIn( $x, $y; ) ) 

end
Advanced OOPath Usage
• Transitive closure
• Negation over transitive closure
• Accumulation
query isContainedIn ( Thing $x , Thing $y )

/$y/$x := children ;

or

/$y/$z := children; and isContainedIn($x, $z;) ) 

end
query isNotContainedIn ( Thing $x , Thing $y ) 

not( isContainedIn( $x, $y; ) ) 

end
query countItems ( Thing $y)

acc( isContainedIn( $x, $y; ); 

count( $x ); ) 

end
Advanced OOPath Usage
• Transitive closure
• Negation over transitive closure
• Accumulation
• Structural Control
query isContainedIn ( Thing $x , Thing $y )

/$y/$x := children ;

or

/$y/$z := children; and isContainedIn($x, $z;) ) 

end
query isNotContainedIn ( Thing $x , Thing $y ) 

not( isContainedIn( $x, $y; ) ) 

end
query countItems ( Thing $y)

acc( isContainedIn( $x, $y; ); 

count( $x ); ) 

end
query childrenOrderedByEdgeCount( Parent $x, Child $c0, int index ) 

/$x/$c1 : children[index]{children.size <= $c0.children. size }; 

childrenOrderedByEdgeCount ( $x , $c1 , index + 1; ) 

end
Advanced OOPath Usage
• Transitive closure
• Negation over transitive closure
• Accumulation
• Structural Control
• Combined Graph and Relational
query isContainedIn ( Thing $x , Thing $y )

/$y/$x := children ;

or

/$y/$z := children; and isContainedIn($x, $z;) ) 

end
query isNotContainedIn ( Thing $x , Thing $y ) 

not( isContainedIn( $x, $y; ) ) 

end
query countItems ( Thing $y)

acc( isContainedIn( $x, $y; ); 

count( $x ); ) 

end
query childrenOrderedByEdgeCount( Parent $x, Child $c0, int index ) 

/$x/$c1 : children[index]{children.size <= $c0.children. size }; 

childrenOrderedByEdgeCount ( $x , $c1 , index + 1; ) 

end
query findChildrenWithMatchingEdgeCounts( Parent $x, Child $c0, int index )

/$x/$c := children[index];

// relational search

exists( Thing( children . size == $c. children . size ) ) 

findChildrenWithMatchingEdgeCounts( $x , $c1 , index + 1;) 

end
Reactive OOPath
• Implementation
• New reactive ‘from’ node.
• ReactiveObject Object integration.
• List integration.
• Functionality
• Uses the OOPath syntax, but now all ‘/‘ are reactive.
Reactive OOPathpublic class ReactiveFromNode extends Node {

private LeftMemory leftMemory;

private CompiledExpression expr;

private int index;



public void propagateLeftInsert(Tuple tuple) {

leftMemory.addTuple(tuple);



Object result = expr.equals( tuple.get(index) );



if ( result instanceof ObservableList) {

ObservableList list = (ObservableList) result;

ListObserver observer = new ListObserver(tuple);

tuple.setObserver(observer);

list.addObserver( observer );



for ( Object o : list ) {

propagateLeftIfAllowed(tuple, o);

}

} else {

propagateLeftIfAllowed(tuple, result);

}

}



public void propagateLeftIfAllowed(Tuple tuple, Object o) {

ReactiveObject r = getReactiveObject(o);

r.addTuple(tuple);



if ( isAllowed( tuple, o ) ) {

childNode.propagateLeftInsert(new Tuple(tuple, o));

}

}



public void propagateChildLeftTupleDelete(Tuple tuple) {

tuple.unlink();

childNode.propagateLeftDelete(tuple);

}
ReactiveObject
public class ReactiveObject {

private List<Tuple> tuples = new ArrayList<Tuple>();

private Object object;



public ReactiveObject(Object object) {

this.object = object;

}





public void addTuple(Tuple tuple) {

tuples.add(tuple);

}



public void removeTuple(Tuple tuple) {

tuples.remove(tuple);

}



protected void notifyUpdate() {

for ( Tuple tuple : tuples ) {

ReactiveFromNode node = (ReactiveFromNode) tuple.getNode();

for ( Tuple childTuple : tuple.getChildren() ) {

if ( childTuple.getObject() == object ) {

node.propagateChildLeftTupleDelete(childTuple);

node.propagateLeftIfAllowed(tuple, object);

break;

}

}

}

}

}

ReactiveObject
public class MyClass {

private String name;
private ReactiveObject delegate = new ReactiveObject(this);



protected void setName(String name) {
this.name = name;
delegate.notifyUpdate()

}

}
public class MyClass extends ReactiveObject {

private String name;
public void MyClass() {
super(name);

}


protected void setName(String name) {
this.name = name;
notifyUpdate()

}

}
Benchmark
rule R1 when

$student : Student ()

$plan : Plan ( owner == $student.name )

$exam : Exam( plan == $plan.code, course == ”Big Data” ) 

$grade : Grade( exam == $exam.code )
then
// RHS
end
rule R2 when

$student : Student ( $plan : plan )

$exam: Exam( course == ”Big Data” ) from $plan.exams 

$grade: Grade() from $exam.grades
then

/∗ RHS ∗/ 

end
rule R3 when

Student( $grade: /plan/exams{course == ”Big Data”}/grades )
then
/∗ RHS ∗/
end
Benchmark
Benchmark
• Visiting a tree with a relational strategy
• Visiting a tree with an Object-Oriented strategy
query findNodesWithValue( Node $from, int $value , List list ) 

Edge( $n : to, $v : to.value ) from $from.outEdges

eval( $v != $value || ( $v == $value && list .add( $n ) ) ) 

findNodesWithValue ( $n , $value , list; ) 

end
query findNodesWithValue( int $id , int $value , List list ) $n: Node( id == $id, $v : value ) 

eval( $v != $value || ( $v == $value && list .add( $n ) ) ) 

Edge( fromId == $id , $toId : toId )

findNodesWithValue ( $toId , $value , list; ) 

end
Related Work
• EMF-IncQuery
• XPath
• SPARQL
• Gremlin
• JXPath
Conclusion and Future Work
• Integrated bytecode weavers for ReactiveObject
• Externalise ReactiveObject
• Use PropertyChangeListener
• Make work with PropertyReactive

Contenu connexe

Tendances

Tendances (17)

Introduction to java programming
Introduction to java programmingIntroduction to java programming
Introduction to java programming
 
Class or Object
Class or ObjectClass or Object
Class or Object
 
05 Java Language And OOP Part V
05 Java Language And OOP Part V05 Java Language And OOP Part V
05 Java Language And OOP Part V
 
C++ Programming Course
C++ Programming CourseC++ Programming Course
C++ Programming Course
 
Java basic
Java basicJava basic
Java basic
 
Oop
OopOop
Oop
 
Meta-Classes in Python
Meta-Classes in PythonMeta-Classes in Python
Meta-Classes in Python
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots
 
Access modifiers in java
Access modifiers in javaAccess modifiers in java
Access modifiers in java
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Java chapter 4
Java chapter 4Java chapter 4
Java chapter 4
 
Core java complete notes - Contact at +91-814-614-5674
Core java complete notes - Contact at +91-814-614-5674Core java complete notes - Contact at +91-814-614-5674
Core java complete notes - Contact at +91-814-614-5674
 
11 Using classes and objects
11 Using classes and objects11 Using classes and objects
11 Using classes and objects
 
6 class design
6 class design6 class design
6 class design
 
C++ And Object in lecture3
C++  And Object in lecture3C++  And Object in lecture3
C++ And Object in lecture3
 
DDD Modeling Workshop
DDD Modeling WorkshopDDD Modeling Workshop
DDD Modeling Workshop
 
Object-oriented Programming-with C#
Object-oriented Programming-with C#Object-oriented Programming-with C#
Object-oriented Programming-with C#
 

En vedette

Transformation and aggregation preprocessing for top-k recommendation GAP rul...
Transformation and aggregation preprocessing for top-k recommendation GAP rul...Transformation and aggregation preprocessing for top-k recommendation GAP rul...
Transformation and aggregation preprocessing for top-k recommendation GAP rul...vojtas
 
RuleML2015: Using PSL to Extend and Evaluate Event Ontologies
RuleML2015: Using PSL to Extend and Evaluate Event OntologiesRuleML2015: Using PSL to Extend and Evaluate Event Ontologies
RuleML2015: Using PSL to Extend and Evaluate Event OntologiesRuleML
 
RuleML2015: GRAAL - a toolkit for query answering with existential rules
RuleML2015:  GRAAL - a toolkit for query answering with existential rulesRuleML2015:  GRAAL - a toolkit for query answering with existential rules
RuleML2015: GRAAL - a toolkit for query answering with existential rulesRuleML
 
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...RuleML
 
RuleML2015: Rule Generalization Strategies in Incremental Learning of Disjunc...
RuleML2015: Rule Generalization Strategies in Incremental Learning of Disjunc...RuleML2015: Rule Generalization Strategies in Incremental Learning of Disjunc...
RuleML2015: Rule Generalization Strategies in Incremental Learning of Disjunc...RuleML
 
RuleML2015: Norwegian State of Estate: A Reporting Service for the State-Owne...
RuleML2015: Norwegian State of Estate: A Reporting Service for the State-Owne...RuleML2015: Norwegian State of Estate: A Reporting Service for the State-Owne...
RuleML2015: Norwegian State of Estate: A Reporting Service for the State-Owne...RuleML
 
RuleML2015: FOWLA, a federated architecture for ontologies
RuleML2015: FOWLA, a federated architecture for ontologiesRuleML2015: FOWLA, a federated architecture for ontologies
RuleML2015: FOWLA, a federated architecture for ontologiesRuleML
 
RuleML2015: Towards Formal Semantics for ODRL Policies
RuleML2015: Towards Formal Semantics for ODRL PoliciesRuleML2015: Towards Formal Semantics for ODRL Policies
RuleML2015: Towards Formal Semantics for ODRL PoliciesRuleML
 
RuleML2015: Ontology-Based Multidimensional Contexts with Applications to Qua...
RuleML2015: Ontology-Based Multidimensional Contexts with Applications to Qua...RuleML2015: Ontology-Based Multidimensional Contexts with Applications to Qua...
RuleML2015: Ontology-Based Multidimensional Contexts with Applications to Qua...RuleML
 
RuleML2015: Semantics of Notation3 Logic: A Solution for Implicit Quantifica...
RuleML2015:  Semantics of Notation3 Logic: A Solution for Implicit Quantifica...RuleML2015:  Semantics of Notation3 Logic: A Solution for Implicit Quantifica...
RuleML2015: Semantics of Notation3 Logic: A Solution for Implicit Quantifica...RuleML
 
RuleML2015 PSOA RuleML: Integrated Object-Relational Data and Rules
RuleML2015 PSOA RuleML: Integrated Object-Relational Data and RulesRuleML2015 PSOA RuleML: Integrated Object-Relational Data and Rules
RuleML2015 PSOA RuleML: Integrated Object-Relational Data and RulesRuleML
 
RuleML2015: Input-Output STIT Logic for Normative Systems
RuleML2015: Input-Output STIT Logic for Normative SystemsRuleML2015: Input-Output STIT Logic for Normative Systems
RuleML2015: Input-Output STIT Logic for Normative SystemsRuleML
 
RuleML2015: Rule-based data transformations in electricity smart grids
RuleML2015: Rule-based data transformations in electricity smart gridsRuleML2015: Rule-based data transformations in electricity smart grids
RuleML2015: Rule-based data transformations in electricity smart gridsRuleML
 
RuleML2015: How to combine event stream reasoning with transactions for the...
RuleML2015:   How to combine event stream reasoning with transactions for the...RuleML2015:   How to combine event stream reasoning with transactions for the...
RuleML2015: How to combine event stream reasoning with transactions for the...RuleML
 
RuleML2015 - Tutorial - Powerful Practical Semantic Rules in Rulelog - Funda...
RuleML2015 - Tutorial -  Powerful Practical Semantic Rules in Rulelog - Funda...RuleML2015 - Tutorial -  Powerful Practical Semantic Rules in Rulelog - Funda...
RuleML2015 - Tutorial - Powerful Practical Semantic Rules in Rulelog - Funda...RuleML
 
RuleML2015 The Herbrand Manifesto - Thinking Inside the Box
RuleML2015 The Herbrand Manifesto - Thinking Inside the Box RuleML2015 The Herbrand Manifesto - Thinking Inside the Box
RuleML2015 The Herbrand Manifesto - Thinking Inside the Box RuleML
 
RuleML 2015 Constraint Handling Rules - What Else?
RuleML 2015 Constraint Handling Rules - What Else?RuleML 2015 Constraint Handling Rules - What Else?
RuleML 2015 Constraint Handling Rules - What Else?RuleML
 
Games development with the Drools rule engine
Games development with the Drools rule engineGames development with the Drools rule engine
Games development with the Drools rule engineMark Proctor
 
Drools Happenings 7.0 - Devnation 2016
Drools Happenings 7.0 - Devnation 2016Drools Happenings 7.0 - Devnation 2016
Drools Happenings 7.0 - Devnation 2016Mark Proctor
 
Drivesploit: Circumventing Both Automated AND Manual Drive-By-Download Detection
Drivesploit: Circumventing Both Automated AND Manual Drive-By-Download DetectionDrivesploit: Circumventing Both Automated AND Manual Drive-By-Download Detection
Drivesploit: Circumventing Both Automated AND Manual Drive-By-Download DetectionWayne Huang
 

En vedette (20)

Transformation and aggregation preprocessing for top-k recommendation GAP rul...
Transformation and aggregation preprocessing for top-k recommendation GAP rul...Transformation and aggregation preprocessing for top-k recommendation GAP rul...
Transformation and aggregation preprocessing for top-k recommendation GAP rul...
 
RuleML2015: Using PSL to Extend and Evaluate Event Ontologies
RuleML2015: Using PSL to Extend and Evaluate Event OntologiesRuleML2015: Using PSL to Extend and Evaluate Event Ontologies
RuleML2015: Using PSL to Extend and Evaluate Event Ontologies
 
RuleML2015: GRAAL - a toolkit for query answering with existential rules
RuleML2015:  GRAAL - a toolkit for query answering with existential rulesRuleML2015:  GRAAL - a toolkit for query answering with existential rules
RuleML2015: GRAAL - a toolkit for query answering with existential rules
 
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
 
RuleML2015: Rule Generalization Strategies in Incremental Learning of Disjunc...
RuleML2015: Rule Generalization Strategies in Incremental Learning of Disjunc...RuleML2015: Rule Generalization Strategies in Incremental Learning of Disjunc...
RuleML2015: Rule Generalization Strategies in Incremental Learning of Disjunc...
 
RuleML2015: Norwegian State of Estate: A Reporting Service for the State-Owne...
RuleML2015: Norwegian State of Estate: A Reporting Service for the State-Owne...RuleML2015: Norwegian State of Estate: A Reporting Service for the State-Owne...
RuleML2015: Norwegian State of Estate: A Reporting Service for the State-Owne...
 
RuleML2015: FOWLA, a federated architecture for ontologies
RuleML2015: FOWLA, a federated architecture for ontologiesRuleML2015: FOWLA, a federated architecture for ontologies
RuleML2015: FOWLA, a federated architecture for ontologies
 
RuleML2015: Towards Formal Semantics for ODRL Policies
RuleML2015: Towards Formal Semantics for ODRL PoliciesRuleML2015: Towards Formal Semantics for ODRL Policies
RuleML2015: Towards Formal Semantics for ODRL Policies
 
RuleML2015: Ontology-Based Multidimensional Contexts with Applications to Qua...
RuleML2015: Ontology-Based Multidimensional Contexts with Applications to Qua...RuleML2015: Ontology-Based Multidimensional Contexts with Applications to Qua...
RuleML2015: Ontology-Based Multidimensional Contexts with Applications to Qua...
 
RuleML2015: Semantics of Notation3 Logic: A Solution for Implicit Quantifica...
RuleML2015:  Semantics of Notation3 Logic: A Solution for Implicit Quantifica...RuleML2015:  Semantics of Notation3 Logic: A Solution for Implicit Quantifica...
RuleML2015: Semantics of Notation3 Logic: A Solution for Implicit Quantifica...
 
RuleML2015 PSOA RuleML: Integrated Object-Relational Data and Rules
RuleML2015 PSOA RuleML: Integrated Object-Relational Data and RulesRuleML2015 PSOA RuleML: Integrated Object-Relational Data and Rules
RuleML2015 PSOA RuleML: Integrated Object-Relational Data and Rules
 
RuleML2015: Input-Output STIT Logic for Normative Systems
RuleML2015: Input-Output STIT Logic for Normative SystemsRuleML2015: Input-Output STIT Logic for Normative Systems
RuleML2015: Input-Output STIT Logic for Normative Systems
 
RuleML2015: Rule-based data transformations in electricity smart grids
RuleML2015: Rule-based data transformations in electricity smart gridsRuleML2015: Rule-based data transformations in electricity smart grids
RuleML2015: Rule-based data transformations in electricity smart grids
 
RuleML2015: How to combine event stream reasoning with transactions for the...
RuleML2015:   How to combine event stream reasoning with transactions for the...RuleML2015:   How to combine event stream reasoning with transactions for the...
RuleML2015: How to combine event stream reasoning with transactions for the...
 
RuleML2015 - Tutorial - Powerful Practical Semantic Rules in Rulelog - Funda...
RuleML2015 - Tutorial -  Powerful Practical Semantic Rules in Rulelog - Funda...RuleML2015 - Tutorial -  Powerful Practical Semantic Rules in Rulelog - Funda...
RuleML2015 - Tutorial - Powerful Practical Semantic Rules in Rulelog - Funda...
 
RuleML2015 The Herbrand Manifesto - Thinking Inside the Box
RuleML2015 The Herbrand Manifesto - Thinking Inside the Box RuleML2015 The Herbrand Manifesto - Thinking Inside the Box
RuleML2015 The Herbrand Manifesto - Thinking Inside the Box
 
RuleML 2015 Constraint Handling Rules - What Else?
RuleML 2015 Constraint Handling Rules - What Else?RuleML 2015 Constraint Handling Rules - What Else?
RuleML 2015 Constraint Handling Rules - What Else?
 
Games development with the Drools rule engine
Games development with the Drools rule engineGames development with the Drools rule engine
Games development with the Drools rule engine
 
Drools Happenings 7.0 - Devnation 2016
Drools Happenings 7.0 - Devnation 2016Drools Happenings 7.0 - Devnation 2016
Drools Happenings 7.0 - Devnation 2016
 
Drivesploit: Circumventing Both Automated AND Manual Drive-By-Download Detection
Drivesploit: Circumventing Both Automated AND Manual Drive-By-Download DetectionDrivesploit: Circumventing Both Automated AND Manual Drive-By-Download Detection
Drivesploit: Circumventing Both Automated AND Manual Drive-By-Download Detection
 

Similaire à RuleML2015 : Hybrid Relational and Graph Reasoning

11. Java Objects and classes
11. Java  Objects and classes11. Java  Objects and classes
11. Java Objects and classesIntro C# Book
 
[PL] O klasycznej, programistycznej elegancji
[PL] O klasycznej, programistycznej elegancji[PL] O klasycznej, programistycznej elegancji
[PL] O klasycznej, programistycznej elegancjiJakub Marchwicki
 
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015Codemotion
 
Modul Praktek Java OOP
Modul Praktek Java OOP Modul Praktek Java OOP
Modul Praktek Java OOP Zaenal Arifin
 
Java Foundations: Objects and Classes
Java Foundations: Objects and ClassesJava Foundations: Objects and Classes
Java Foundations: Objects and ClassesSvetlin Nakov
 
Assignment 7
Assignment 7Assignment 7
Assignment 7IIUM
 
Lecture 5: Functional Programming
Lecture 5: Functional ProgrammingLecture 5: Functional Programming
Lecture 5: Functional ProgrammingEelco Visser
 
Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...
Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...
Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo....NET Conf UY
 
.NET 2015: Будущее рядом
.NET 2015: Будущее рядом.NET 2015: Будущее рядом
.NET 2015: Будущее рядомAndrey Akinshin
 
Flink Forward Berlin 2018: Jared Stehler - "Streaming ETL with Flink and Elas...
Flink Forward Berlin 2018: Jared Stehler - "Streaming ETL with Flink and Elas...Flink Forward Berlin 2018: Jared Stehler - "Streaming ETL with Flink and Elas...
Flink Forward Berlin 2018: Jared Stehler - "Streaming ETL with Flink and Elas...Flink Forward
 
Club of anonimous developers "Refactoring: Legacy code"
Club of anonimous developers "Refactoring: Legacy code"Club of anonimous developers "Refactoring: Legacy code"
Club of anonimous developers "Refactoring: Legacy code"Victor_Cr
 
Static keyword ppt
Static keyword pptStatic keyword ppt
Static keyword pptVinod Kumar
 
Scala for Java Developers
Scala for Java DevelopersScala for Java Developers
Scala for Java DevelopersMartin Ockajak
 
Implementation of interface9 cm604.30
Implementation of interface9 cm604.30Implementation of interface9 cm604.30
Implementation of interface9 cm604.30myrajendra
 
Can I get some help creating a java method- These are the requirements.docx
Can I get some help creating a java method- These are the requirements.docxCan I get some help creating a java method- These are the requirements.docx
Can I get some help creating a java method- These are the requirements.docxCharlesCSZWhitei
 

Similaire à RuleML2015 : Hybrid Relational and Graph Reasoning (20)

11. Java Objects and classes
11. Java  Objects and classes11. Java  Objects and classes
11. Java Objects and classes
 
[PL] O klasycznej, programistycznej elegancji
[PL] O klasycznej, programistycznej elegancji[PL] O klasycznej, programistycznej elegancji
[PL] O klasycznej, programistycznej elegancji
 
00-review.ppt
00-review.ppt00-review.ppt
00-review.ppt
 
Oop objects_classes
Oop objects_classesOop objects_classes
Oop objects_classes
 
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
Functional Programming You Already Know - Kevlin Henney - Codemotion Rome 2015
 
Modul Praktek Java OOP
Modul Praktek Java OOP Modul Praktek Java OOP
Modul Praktek Java OOP
 
Java Foundations: Objects and Classes
Java Foundations: Objects and ClassesJava Foundations: Objects and Classes
Java Foundations: Objects and Classes
 
R language
R languageR language
R language
 
Java OO Revisited
Java OO RevisitedJava OO Revisited
Java OO Revisited
 
Assignment 7
Assignment 7Assignment 7
Assignment 7
 
Lecture 5: Functional Programming
Lecture 5: Functional ProgrammingLecture 5: Functional Programming
Lecture 5: Functional Programming
 
New C# features
New C# featuresNew C# features
New C# features
 
Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...
Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...
Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...
 
.NET 2015: Будущее рядом
.NET 2015: Будущее рядом.NET 2015: Будущее рядом
.NET 2015: Будущее рядом
 
Flink Forward Berlin 2018: Jared Stehler - "Streaming ETL with Flink and Elas...
Flink Forward Berlin 2018: Jared Stehler - "Streaming ETL with Flink and Elas...Flink Forward Berlin 2018: Jared Stehler - "Streaming ETL with Flink and Elas...
Flink Forward Berlin 2018: Jared Stehler - "Streaming ETL with Flink and Elas...
 
Club of anonimous developers "Refactoring: Legacy code"
Club of anonimous developers "Refactoring: Legacy code"Club of anonimous developers "Refactoring: Legacy code"
Club of anonimous developers "Refactoring: Legacy code"
 
Static keyword ppt
Static keyword pptStatic keyword ppt
Static keyword ppt
 
Scala for Java Developers
Scala for Java DevelopersScala for Java Developers
Scala for Java Developers
 
Implementation of interface9 cm604.30
Implementation of interface9 cm604.30Implementation of interface9 cm604.30
Implementation of interface9 cm604.30
 
Can I get some help creating a java method- These are the requirements.docx
Can I get some help creating a java method- These are the requirements.docxCan I get some help creating a java method- These are the requirements.docx
Can I get some help creating a java method- These are the requirements.docx
 

Plus de Mark Proctor

Rule Modularity and Execution Control
Rule Modularity and Execution ControlRule Modularity and Execution Control
Rule Modularity and Execution ControlMark Proctor
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationMark Proctor
 
Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...
Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...
Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...Mark Proctor
 
Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)
Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)
Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)Mark Proctor
 
Learning Rule Based Programming using Games @DecisionCamp 2016
Learning Rule Based Programming using Games @DecisionCamp 2016Learning Rule Based Programming using Games @DecisionCamp 2016
Learning Rule Based Programming using Games @DecisionCamp 2016Mark Proctor
 
Red Hat Summit 2015 : Drools, jBPM and UberFire Roadmaps
Red Hat Summit 2015 : Drools, jBPM and UberFire RoadmapsRed Hat Summit 2015 : Drools, jBPM and UberFire Roadmaps
Red Hat Summit 2015 : Drools, jBPM and UberFire RoadmapsMark Proctor
 
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client TechnologyRed Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client TechnologyMark Proctor
 
Classic Games Development with Drools
Classic Games Development with DroolsClassic Games Development with Drools
Classic Games Development with DroolsMark Proctor
 
Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Mark Proctor
 
Drools and jBPM 6 Overview
Drools and jBPM 6 OverviewDrools and jBPM 6 Overview
Drools and jBPM 6 OverviewMark Proctor
 
Drools and BRMS 6.0 (Dublin Aug 2013)
Drools and BRMS 6.0 (Dublin Aug 2013)Drools and BRMS 6.0 (Dublin Aug 2013)
Drools and BRMS 6.0 (Dublin Aug 2013)Mark Proctor
 
UberFire Quick Intro and Overview (early beta Aug 2013)
UberFire Quick Intro and Overview (early beta Aug 2013)UberFire Quick Intro and Overview (early beta Aug 2013)
UberFire Quick Intro and Overview (early beta Aug 2013)Mark Proctor
 
What's new in Drools 6 - London JBUG 2013
What's new in Drools 6 - London JBUG 2013What's new in Drools 6 - London JBUG 2013
What's new in Drools 6 - London JBUG 2013Mark Proctor
 
Property Reactive RuleML 2013
Property Reactive RuleML 2013Property Reactive RuleML 2013
Property Reactive RuleML 2013Mark Proctor
 
Reactive Transitive Closures with Drools (Backward Chaining)
Reactive Transitive Closures with Drools (Backward Chaining)Reactive Transitive Closures with Drools (Backward Chaining)
Reactive Transitive Closures with Drools (Backward Chaining)Mark Proctor
 
Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)Mark Proctor
 
Drools 6.0 (CamelOne 2013)
Drools 6.0 (CamelOne 2013)Drools 6.0 (CamelOne 2013)
Drools 6.0 (CamelOne 2013)Mark Proctor
 
UberFire Quick Intro and Overview (early beta Jul 2013)
UberFire Quick Intro and Overview (early beta Jul 2013)UberFire Quick Intro and Overview (early beta Jul 2013)
UberFire Quick Intro and Overview (early beta Jul 2013)Mark Proctor
 
UberFire (JudCon 2013)
UberFire (JudCon 2013)UberFire (JudCon 2013)
UberFire (JudCon 2013)Mark Proctor
 
Drools 6.0 (Red Hat Summit 2013)
Drools 6.0 (Red Hat Summit 2013)Drools 6.0 (Red Hat Summit 2013)
Drools 6.0 (Red Hat Summit 2013)Mark Proctor
 

Plus de Mark Proctor (20)

Rule Modularity and Execution Control
Rule Modularity and Execution ControlRule Modularity and Execution Control
Rule Modularity and Execution Control
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentation
 
Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...
Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...
Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...
 
Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)
Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)
Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)
 
Learning Rule Based Programming using Games @DecisionCamp 2016
Learning Rule Based Programming using Games @DecisionCamp 2016Learning Rule Based Programming using Games @DecisionCamp 2016
Learning Rule Based Programming using Games @DecisionCamp 2016
 
Red Hat Summit 2015 : Drools, jBPM and UberFire Roadmaps
Red Hat Summit 2015 : Drools, jBPM and UberFire RoadmapsRed Hat Summit 2015 : Drools, jBPM and UberFire Roadmaps
Red Hat Summit 2015 : Drools, jBPM and UberFire Roadmaps
 
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client TechnologyRed Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
 
Classic Games Development with Drools
Classic Games Development with DroolsClassic Games Development with Drools
Classic Games Development with Drools
 
Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)
 
Drools and jBPM 6 Overview
Drools and jBPM 6 OverviewDrools and jBPM 6 Overview
Drools and jBPM 6 Overview
 
Drools and BRMS 6.0 (Dublin Aug 2013)
Drools and BRMS 6.0 (Dublin Aug 2013)Drools and BRMS 6.0 (Dublin Aug 2013)
Drools and BRMS 6.0 (Dublin Aug 2013)
 
UberFire Quick Intro and Overview (early beta Aug 2013)
UberFire Quick Intro and Overview (early beta Aug 2013)UberFire Quick Intro and Overview (early beta Aug 2013)
UberFire Quick Intro and Overview (early beta Aug 2013)
 
What's new in Drools 6 - London JBUG 2013
What's new in Drools 6 - London JBUG 2013What's new in Drools 6 - London JBUG 2013
What's new in Drools 6 - London JBUG 2013
 
Property Reactive RuleML 2013
Property Reactive RuleML 2013Property Reactive RuleML 2013
Property Reactive RuleML 2013
 
Reactive Transitive Closures with Drools (Backward Chaining)
Reactive Transitive Closures with Drools (Backward Chaining)Reactive Transitive Closures with Drools (Backward Chaining)
Reactive Transitive Closures with Drools (Backward Chaining)
 
Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)
 
Drools 6.0 (CamelOne 2013)
Drools 6.0 (CamelOne 2013)Drools 6.0 (CamelOne 2013)
Drools 6.0 (CamelOne 2013)
 
UberFire Quick Intro and Overview (early beta Jul 2013)
UberFire Quick Intro and Overview (early beta Jul 2013)UberFire Quick Intro and Overview (early beta Jul 2013)
UberFire Quick Intro and Overview (early beta Jul 2013)
 
UberFire (JudCon 2013)
UberFire (JudCon 2013)UberFire (JudCon 2013)
UberFire (JudCon 2013)
 
Drools 6.0 (Red Hat Summit 2013)
Drools 6.0 (Red Hat Summit 2013)Drools 6.0 (Red Hat Summit 2013)
Drools 6.0 (Red Hat Summit 2013)
 

Dernier

OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 

Dernier (20)

OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 

RuleML2015 : Hybrid Relational and Graph Reasoning

  • 1. Building A Hybrid Reactive Rule Engine For Relational And Graph Reasoning Mark Proctor, Mario Fusco, István Ráth, Davide Sottara
  • 4. Student Plans String name Plan plan Student String code Student owner List<Exam> exams Plan Plan plan String course String code List<Grade> exams Exam Exam exam int attempt String value Grade 1 1 1 0..1 1 0..1
  • 5. Student Plans public class Student {
 private String name;
 
 private Plan plan; } public class Plan {
 private String code;
 private Student owner; 
 private List<Exam> exams;
 } public class Exam { private String code; private String course; 
 private Plan plan; 
 private List<Grade> grades; } public class Grade {
 private String value; 
 private int attempt; private Exam exam; }
  • 6. Student Plans public static Student student(String studentName, String planCode, Exam... exams) {
 Student student = new Student(studentName);
 Plan plan = new Plan(student, planCode);
 student.setPlan( plan );
 plan.setOwner( student );
 for ( Exam exam : exams ) {
 exam.setPlan( plan );
 plan.getExams().add ( exam );
 }
 return student;
 }
 
 public static Exam exam( String course, String... grades) {
 Exam exam = new Exam( course );
 int attempt = 1;
 for ( String letter : grades) {
 exam.getGrades().add(new Grade(exam, letter, attempt));
 attempt++;
 }
 return exam;
 }
  • 7. Courses •Communication •Creed -The Jedi Code •Force •Jedi Studies •Meditation •Personal •Situational Awareness •Spirituality - Jedi Mythology •Warrior
  • 8. Student Plans private static final String A = "A";
 private static final String B = "B";
 private static final String C = "C";
 private static final String D = "D";
 private static final String E = "E";
 private static final String F = "F";
  • 9. Student Plans private static final String A = "A";
 private static final String B = "B";
 private static final String C = "C";
 private static final String D = "D";
 private static final String E = "E";
 private static final String F = "F"; public void create(KieSession ksession) {
 Student darth = student( "Darth", "dp2015",
 exam( "dpe01", "Jedi Studies", A),
 exam( "dpe02", "Force", B ),
 exam( "dpe03", "Meditation", D, C) );
 Student yoda = student( "Yoda", "yp2015",
 exam( "ype01", "Jedi Studies", A),
 exam( "ype02", "Force", A ),
 exam( "ype03", "Meditation", A) );
 Student luke = student( "Luke", "lp2015",
 exam( "lpe01", "Jedi Studies", C, B),
 exam( "lpe02", "Force", B ),
 exam( "lpe03", "Meditation", F, C) );
 }
  • 10. Student Plans private static final String A = "A";
 private static final String B = "B";
 private static final String C = "C";
 private static final String D = "D";
 private static final String E = "E";
 private static final String F = "F"; public void create(KieSession ksession) {
 Student darth = student( "Darth", "dp2015",
 exam( "dpe01", "Jedi Studies", A),
 exam( "dpe02", "Force", B ),
 exam( "dpe03", "Meditation", D, C) );
 Student yoda = student( "Yoda", "yp2015",
 exam( "ype01", "Jedi Studies", A),
 exam( "ype02", "Force", A ),
 exam( "ype03", "Meditation", A) );
 Student luke = student( "Luke", "lp2015",
 exam( "lpe01", "Jedi Studies", C, B),
 exam( "lpe02", "Force", B ),
 exam( "lpe03", "Meditation", F, C) );
 
 ksession.insert( darth );
 ksession.insert( yoda );
 ksession.insert( luke );
 }
  • 11. Student Plans • Email all the “Big Data” people their grades.
  • 12. The Problem • The information provided is Object Oriented which is a form of graph and uses references. • Traditional Production Rule Systems are relational, they cannot see or use references. • Users must then map their model to a relational one.
  • 13. Student Plans public class Student {
 private String name; 
 private String plan;
 } public class Plan {
 private String code; private String owner; }
  • 14. Student Plans public class Student {
 private String name; 
 private String plan;
 } public class Plan {
 private String code; private String owner; } public class Student {
 private String name;
 
 private Plan plan; } public class Plan {
 private String code;
 private Student owner; 
 private List<Exam> exams;
 }
  • 15. Student Plans public class Grade {
 private String value; 
 private int attempt; private String exam; } public class Exam { private String code; private String course;
 private String plan; }
  • 16. Student Plans public class Grade {
 private String value; 
 private int attempt; private String exam; } public class Exam { private String code; private String course;
 private String plan; } public class Exam { private String code; private String course; 
 private Plan plan; 
 private List<Grade> grades; } public class Grade {
 private String value; 
 private int attempt; private Exam exam; }
  • 17. Student Plans • Email all the “Big Data” people their grades. rule R1 when
 $student : Student ()
 $plan : Plan ( owner == $student.name )
 $exam : Exam( plan == $plan.code, course == ”Big Data” ) 
 $grade : Grade( exam == $exam.code ) then // RHS end
  • 18. Rete AND AND OTN OTN OTN OTN Root GradeExamPlanStudent AND RTN
  • 19. Rete public abstract class Node {
 protected Node childNode;
 
 public abstract void propagateLeft(Tuple tuple);
 
 public abstract void propagateRight(Object object);
 }
  • 20. Rete public abstract class Node {
 protected Node childNode;
 
 public abstract void propagateLeft(Tuple tuple);
 
 public abstract void propagateRight(Object object);
 } public class AndNode extends Node {
 private LeftMemory leftMemory;
 private RightMemory rightMemory;
 private CompiledExpression expr;
 
 public void propagateLeftInsert(Tuple tuple) {
 leftMemory.addTuple(tuple);
 
 for ( Object object : rightMemory.getObjects() ) {
 if ( expr.eval(tuple, object) ) {
 childNode.propagateLeft(new Tuple(tuple, object));
 }
 }
 }
 
 public void propagateRightInsert(Object object) {
 rightMemory.addObject(object);
 
 for ( Tuple tuple : leftMemory.getTuples() ) {
 if ( expr.eval(tuple, object) ) {
 childNode.propagateLeft(new Tuple(tuple, object));
 }
 }
 }
 }
  • 22. Rete AND OTN Root Student [“dp2015”, “yp2015”, “lp2015”] [“darth”, “yoda”, “luke”] [“darth”, “yoda”, “luke”] OTN Plan [“dp2015”, “yp2015”, “lp2015”] ANDPartial Match [[“darth”, “dp2015”], [“yoda”, “yp2015”], [“luke”, “yp2015”] ] Exam public class Tuple {
 private Tuple parent;
 private Object object; private List<Tuple> children; 
 
 public Tuple(Tuple parent, Object object) {
 parent = parent;
 this.object = object;
 }
 }
  • 23. Rete AND OTN Root Student [“dp2015”, “yp2015”, “lp2015”] [“darth”, “yoda”, “luke”] [“darth”, “yoda”, “luke”] OTN Plan [“dp2015”, “yp2015”, “lp2015”] ANDPartial Match [[“darth”, “dp2015”], [“yoda”, “yp2015”], [“luke”, “yp2015”] ] OTN Exam [“dpe01”, “dpe02”, “dpe03”, “ype01”, “ype02”, “ype03”, “lpe01”, “lpe02”, “lpe03” ] public class Tuple {
 private Tuple parent;
 private Object object; private List<Tuple> children; 
 
 public Tuple(Tuple parent, Object object) {
 parent = parent;
 this.object = object;
 }
 }
  • 24. Rete AND OTN Root Student [“dp2015”, “yp2015”, “lp2015”] [“darth”, “yoda”, “luke”] [“darth”, “yoda”, “luke”] OTN Plan [“dp2015”, “yp2015”, “lp2015”] AND [[“darth”, “dp2015”, “dpe01”], [“darth”, “dp2015”,“dpe02”],[“darth”, “dp2015”,“dpe03”], [“yoda”, “yp2015”, “ype01”], [“yoda”, “yp2015”, “ype02”], [“yoda”, “yp2015”, “ype03”], [“luke”, “lp2015”, “ype01”], [“luke”, “lp2015”, “ype02”], [“luke”, “lp2015”, “ype03”]] Partial Match [[“darth”, “dp2015”], [“yoda”, “yp2015”], [“luke”, “yp2015”] ] OTN Exam [“dpe01”, “dpe02”, “dpe03”, “ype01”, “ype02”, “ype03”, “lpe01”, “lpe02”, “lpe03” ] public class Tuple {
 private Tuple parent;
 private Object object; private List<Tuple> children; 
 
 public Tuple(Tuple parent, Object object) {
 parent = parent;
 this.object = object;
 }
 }
  • 25. Rete [[“darth”, “dp2015”, “dpe01”], [“darth”, “dp2015”,“dpe02”],[“darth”, “dp2015”,“dpe03”], [“yoda”, “yp2015”, “ype01”], [“yoda”, “yp2015”, “ype02”], [“yoda”, “yp2015”, “ype03”], [“luke”, “lp2015”, “ype01”], [“luke”, “lp2015”, “ype02”], [“luke”, “lp2015”, “ype03”]] Darth dp2015 dpe01 dpe02 dpe03 t1 = new Tuple( null, “Darth” ) t2 = new Tuple( t1, “dp205” ) t3 = new Tuple( t2, “dpe01” ) t4 = new Tuple( t2, “dpe02” ) t5 = new Tuple( t2, “dpe03” ) Exam Plan Student [t1, t2, t3], [t1, t2, t4], [t1, t2, t5]
  • 26. Requirements • Functionality • Access child objects via references • React to child objects • List comprehension • Iterate one to many relations • Support reactive and passive operations • Implementation • Syntax Extensions • Rete Extensions • Object integration
  • 27. From • Implementation • Introduces one new keyword “from”. • Requires new Rete node. • Requires expression evaluation sub system. • Uses dot ‘.’ as reference accessor. • with type safe javascript like syntax (MVEL). • Functionality • Allows access to nested objects. • Dot ‘.’ accessor is access and return only. • It does not provide list comprehension. • List comprehension is performed by the node on the return result. • Is passive only, no reactivity. rule R2 when
 $student : Student ( $plan : plan )
 $exam: Exam( course == ”Big Data” ) from $plan.exams 
 $grade: Grade() from $exam.grades then
 /∗ RHS ∗/ 
 end
  • 28. From rule R2 when
 $student : Student ( $plan : plan )
 $exam: Exam( course == ”Big Data” ) from $plan.exams 
 $grade: Grade() from $exam.grades then
 /∗ RHS ∗/ 
 end From From OTN Root Student RTN $student : Student ( $plan : plan ) // “from” the Working Memory $exam: Exam( course == ”Big Data” ) from $plan.exams $grade: Grade() from $exam.grades
  • 29. From public void propagateLeft(Tuple tuple) {
 leftMemory.addTuple(tuple);
 for ( Object object : rightMemory.getObjects() ) {
 if ( expr.eval(tuple, object) ) {
 childNode.propagateLeft(new Tuple(tuple, object));
 }
 }
 }
  • 30. From public void propagateLeftInsert(Tuple tuple) {
 leftMemory.addTuple(tuple);
 
 Object result = expr.equals( tuple.get(index));
 
 if ( result instanceof Collection) {
 for ( Object o : ((Collection)result)) {
 propagateLeftIfAllowed(tuple, o);
 }
 } else {
 propagateLeftIfAllowed(tuple, result);
 }
 }
 
 private void propagateLeftIfAllowed(Tuple tuple, Object o) {
 if ( isAllowed( tuple, o ) ) {
 childNode.propagateLeftInsert(new Tuple(tuple, o));
 }
 } public void propagateLeftInsert(Tuple tuple) {
 leftMemory.addTuple(tuple);
 for ( Object object : rightMemory.getObjects() ) {
 if ( expr.eval(tuple, object) ) {
 childNode.propagateLeft(new Tuple(tuple, object));
 }
 }
 }
  • 31. From public class FromNode extends Node {
 private LeftMemory leftMemory;
 private CompiledExpression expr;
 private int index;
 
 public void propagateLeftInsert(Tuple tuple) {
 leftMemory.addTuple(tuple);
 
 Object result = expr.equals( tuple.get(index));
 
 if ( result instanceof Collection) {
 for ( Object o : ((Collection)result)) {
 propagateLeftIfAllowed(tuple, o);
 }
 } else {
 propagateLeftIfAllowed(tuple, result);
 }
 }
 
 private void propagateLeftIfAllowed(Tuple tuple, Object o) {
 if ( isAllowed( tuple, o ) ) {
 childNode.propagateLeftInsert(new Tuple(tuple, o));
 }
 } 
 public void propagateRightInsert(Object object) {
 // From has no right propagation 
 }
 }
  • 32. Passive OOPath • Implementation • Re-use ‘from’ node • Introduces no Rete changes. • Requires expression evaluation sub system. • Uses forward slash ‘/’ as reference accessor. • Introduce XPath inspired syntax • Syntax change must be added to Patterns • Functionality • Allows access to nested objects. • forward slash ‘/’ accessor performs list comprehension
 for each visited reference. • List comprehension is also performed by the node on the return result. • Is passive only, no reactivity. rule R3 when
 Student( $grade: /plan/exams{course == ”Big Data”}/grades ) then /∗ RHS ∗/ end
  • 33. R1, R2, R3 rule R1 when
 $student : Student ()
 $plan : Plan ( owner == $student.name )
 $exam : Exam( plan == $plan.code, course == ”Big Data” ) 
 $grade : Grade( exam == $exam.code ) then // RHS end rule R2 when
 $student : Student ( $plan : plan )
 $exam: Exam( course == ”Big Data” ) from $plan.exams 
 $grade: Grade() from $exam.grades then
 /∗ RHS ∗/ 
 end rule R3 when
 Student( $grade: /plan/exams{course == ”Big Data”}/grades ) then /∗ RHS ∗/ end
  • 34. OOPath Syntax • Access by index • Inline cast for type safety • Indexed back reference • Variable back reference • Back tracking • Out of Pattern use Student( $grade : /plan/exams[0]{ course == ”Big Data”}/grades ) Student( $grade : /plan/exams{ #PracticalExam, lab == ”hazard safe”, 
 course == ”Material Explosions”}/grades ) A( $var: /b/c/d{ f1 == ../../f2}/e ) // the ../../ back references to the ‘b’ field access A( $var: /$b : b/c/d{ f1 == $b.f2}/e ) // the $b is inline bound for later use A( $var: /$b : b/c/d{ f1 == $b.f2}/$b/f2 ) // $var is bound to results of the f2 access $student : Student()
 $grade : /$student/plan/exams{course == ”Big Data”}/grades;
  • 35. Advanced OOPath Usage • Use existing Drools syntax and functionality • Colon ‘:’ provides Pattern and field binding • Colon with equals ‘:=‘ provides unification • POSL-like support for position and slotted • Arguments can be named or positional. • Positional arguments must come first and be delimited with a semi colon ‘;’ at the end. • Positional arguments are always unified, compared to named arguments which can be bound ’:’ or unified ’:=’.
  • 36. Advanced OOPath Usage • Transitive closure query isContainedIn ( Thing $x , Thing $y )
 /$y/$x := children ;
 or
 /$y/$z := children; and isContainedIn($x, $z;) ) 
 end
  • 37. Advanced OOPath Usage • Transitive closure • Negation over transitive closure query isContainedIn ( Thing $x , Thing $y )
 /$y/$x := children ;
 or
 /$y/$z := children; and isContainedIn($x, $z;) ) 
 end query isNotContainedIn ( Thing $x , Thing $y ) 
 not( isContainedIn( $x, $y; ) ) 
 end
  • 38. Advanced OOPath Usage • Transitive closure • Negation over transitive closure • Accumulation query isContainedIn ( Thing $x , Thing $y )
 /$y/$x := children ;
 or
 /$y/$z := children; and isContainedIn($x, $z;) ) 
 end query isNotContainedIn ( Thing $x , Thing $y ) 
 not( isContainedIn( $x, $y; ) ) 
 end query countItems ( Thing $y)
 acc( isContainedIn( $x, $y; ); 
 count( $x ); ) 
 end
  • 39. Advanced OOPath Usage • Transitive closure • Negation over transitive closure • Accumulation • Structural Control query isContainedIn ( Thing $x , Thing $y )
 /$y/$x := children ;
 or
 /$y/$z := children; and isContainedIn($x, $z;) ) 
 end query isNotContainedIn ( Thing $x , Thing $y ) 
 not( isContainedIn( $x, $y; ) ) 
 end query countItems ( Thing $y)
 acc( isContainedIn( $x, $y; ); 
 count( $x ); ) 
 end query childrenOrderedByEdgeCount( Parent $x, Child $c0, int index ) 
 /$x/$c1 : children[index]{children.size <= $c0.children. size }; 
 childrenOrderedByEdgeCount ( $x , $c1 , index + 1; ) 
 end
  • 40. Advanced OOPath Usage • Transitive closure • Negation over transitive closure • Accumulation • Structural Control • Combined Graph and Relational query isContainedIn ( Thing $x , Thing $y )
 /$y/$x := children ;
 or
 /$y/$z := children; and isContainedIn($x, $z;) ) 
 end query isNotContainedIn ( Thing $x , Thing $y ) 
 not( isContainedIn( $x, $y; ) ) 
 end query countItems ( Thing $y)
 acc( isContainedIn( $x, $y; ); 
 count( $x ); ) 
 end query childrenOrderedByEdgeCount( Parent $x, Child $c0, int index ) 
 /$x/$c1 : children[index]{children.size <= $c0.children. size }; 
 childrenOrderedByEdgeCount ( $x , $c1 , index + 1; ) 
 end query findChildrenWithMatchingEdgeCounts( Parent $x, Child $c0, int index )
 /$x/$c := children[index];
 // relational search
 exists( Thing( children . size == $c. children . size ) ) 
 findChildrenWithMatchingEdgeCounts( $x , $c1 , index + 1;) 
 end
  • 41. Reactive OOPath • Implementation • New reactive ‘from’ node. • ReactiveObject Object integration. • List integration. • Functionality • Uses the OOPath syntax, but now all ‘/‘ are reactive.
  • 42. Reactive OOPathpublic class ReactiveFromNode extends Node {
 private LeftMemory leftMemory;
 private CompiledExpression expr;
 private int index;
 
 public void propagateLeftInsert(Tuple tuple) {
 leftMemory.addTuple(tuple);
 
 Object result = expr.equals( tuple.get(index) );
 
 if ( result instanceof ObservableList) {
 ObservableList list = (ObservableList) result;
 ListObserver observer = new ListObserver(tuple);
 tuple.setObserver(observer);
 list.addObserver( observer );
 
 for ( Object o : list ) {
 propagateLeftIfAllowed(tuple, o);
 }
 } else {
 propagateLeftIfAllowed(tuple, result);
 }
 }
 
 public void propagateLeftIfAllowed(Tuple tuple, Object o) {
 ReactiveObject r = getReactiveObject(o);
 r.addTuple(tuple);
 
 if ( isAllowed( tuple, o ) ) {
 childNode.propagateLeftInsert(new Tuple(tuple, o));
 }
 }
 
 public void propagateChildLeftTupleDelete(Tuple tuple) {
 tuple.unlink();
 childNode.propagateLeftDelete(tuple);
 }
  • 43. ReactiveObject public class ReactiveObject {
 private List<Tuple> tuples = new ArrayList<Tuple>();
 private Object object;
 
 public ReactiveObject(Object object) {
 this.object = object;
 }
 
 
 public void addTuple(Tuple tuple) {
 tuples.add(tuple);
 }
 
 public void removeTuple(Tuple tuple) {
 tuples.remove(tuple);
 }
 
 protected void notifyUpdate() {
 for ( Tuple tuple : tuples ) {
 ReactiveFromNode node = (ReactiveFromNode) tuple.getNode();
 for ( Tuple childTuple : tuple.getChildren() ) {
 if ( childTuple.getObject() == object ) {
 node.propagateChildLeftTupleDelete(childTuple);
 node.propagateLeftIfAllowed(tuple, object);
 break;
 }
 }
 }
 }
 }

  • 44. ReactiveObject public class MyClass {
 private String name; private ReactiveObject delegate = new ReactiveObject(this);
 
 protected void setName(String name) { this.name = name; delegate.notifyUpdate()
 }
 } public class MyClass extends ReactiveObject {
 private String name; public void MyClass() { super(name);
 } 
 protected void setName(String name) { this.name = name; notifyUpdate()
 }
 }
  • 45. Benchmark rule R1 when
 $student : Student ()
 $plan : Plan ( owner == $student.name )
 $exam : Exam( plan == $plan.code, course == ”Big Data” ) 
 $grade : Grade( exam == $exam.code ) then // RHS end rule R2 when
 $student : Student ( $plan : plan )
 $exam: Exam( course == ”Big Data” ) from $plan.exams 
 $grade: Grade() from $exam.grades then
 /∗ RHS ∗/ 
 end rule R3 when
 Student( $grade: /plan/exams{course == ”Big Data”}/grades ) then /∗ RHS ∗/ end
  • 47. Benchmark • Visiting a tree with a relational strategy • Visiting a tree with an Object-Oriented strategy query findNodesWithValue( Node $from, int $value , List list ) 
 Edge( $n : to, $v : to.value ) from $from.outEdges
 eval( $v != $value || ( $v == $value && list .add( $n ) ) ) 
 findNodesWithValue ( $n , $value , list; ) 
 end query findNodesWithValue( int $id , int $value , List list ) $n: Node( id == $id, $v : value ) 
 eval( $v != $value || ( $v == $value && list .add( $n ) ) ) 
 Edge( fromId == $id , $toId : toId )
 findNodesWithValue ( $toId , $value , list; ) 
 end
  • 48. Related Work • EMF-IncQuery • XPath • SPARQL • Gremlin • JXPath
  • 49. Conclusion and Future Work • Integrated bytecode weavers for ReactiveObject • Externalise ReactiveObject • Use PropertyChangeListener • Make work with PropertyReactive