Non-Monotonic Model Completion in Web Application Engineering
Massey University Palmerston North New Zealand
Australian Software Engineering Conference (ASWEC) 2010 8 April 2010
j.m.wright@massey.ac.nz
Jevon Wright
j.b.dietrich@massey.ac.nz
Non-Monotonic Model Completion in Web Application Engineering - - PowerPoint PPT Presentation
Non-Monotonic Model Completion in Web Application Engineering Australian Software Engineering Conference (ASWEC) 2010 8 April 2010 Jevon Wright j.m.wright@massey.ac.nz Jens Dietrich j.b.dietrich@massey.ac.nz Massey University Palmerston
Massey University Palmerston North New Zealand
j.m.wright@massey.ac.nz
j.b.dietrich@massey.ac.nz
Define model completion as a rule program Many rule engines for implementation
Non existence of artefact Non existence of artefact Use factory functions to create new artefact Use factory functions to create new artefact Additional rules represent type reasoning Additional rules represent type reasoning Base model artefact Base model artefact
newCheckbox(x) creates a unique new element
Terms are associated with a rank ≥ 0 If x is term of rank N, then newCheckbox(x) has
Have rank 0
Apply rules in steps (parameterise rules with rank) Each step can only see elements with rank ≤ N New model elements are rank N+1 Existential quantifier only applies to rank ≤ N Only consider (logic) model generated from base
Safeguards application: rules applied later cannot
Create text fields: + 3 elements
Connect with synchronisation wires: + 3 elements
Domain Object LStudentM Form LEdit StudentM sync sync sync sync Attribute LmajorM Event LonChangeM Operation LupdateM Property LvalueM Attribute LnameM Event LonChangeM Operation LupdateM Property LvalueM Attribute LidM Operation LupdateM Property LvalueM Event LonChangeM TextField LidM Operation LupdateM Property LvalueM Event LonChangeM TextField LnameM Event LonChangeM Operation LupdateM Property LvalueM TextField LmajorM Event LonChangeM Operation LupdateM Property LvalueM
Add events, operations, and properties: + 18 elements
Domain Object LStudentM Form LEdit StudentM sync sync sync sync Attribute LmajorM Event LonChangeM Operation LupdateM Property LvalueM Attribute LnameM Event LonChangeM Operation LupdateM Property LvalueM Attribute LidM Operation LupdateM Property LvalueM Event LonChangeM TextField LidM Operation LupdateM Property LvalueM Event LonChangeM TextField LnameM Event LonChangeM Operation LupdateM Property LvalueM TextField LmajorM Event LonChangeM Operation LupdateM Property LvalueM run run run run run run
Connect events with operations, using actions: + 6 elements
Domain Object LStudentM Form LEdit StudentM sync sync sync sync Attribute LmajorM Event LonChangeM Operation LupdateM Property LvalueM Attribute LnameM Event LonChangeM Operation LupdateM Property LvalueM Attribute LidM Operation LupdateM Property LvalueM Event LonChangeM TextField LidM Operation LupdateM Property LvalueM Event LonChangeM TextField LnameM Event LonChangeM Operation LupdateM Property LvalueM TextField LmajorM Event LonChangeM Operation LupdateM Property LvalueM run run run run run run
Add parameters to actions: + 6 elements
Create contents of operations: + 84 elements
Domain Object LStudentM Form LEdit StudentM sync sync Attribute LidM Operation LupdateM Property LvalueM Event LonChangeM can cast? set Parameter (cast) y n TextField LidM Property LvalueM Event LonChangeM Operation LupdateM can cast? set Parameter (cast) y n run run sync Attribute LnameM Operation LupdateM Event LonChangeM can cast? Parameter (cast) y n TextField LnameM Event LonChangeM Operation LupdateM can cast? Parameter (cast) y n run run
rule "Example rule" when p : BooleanProperty ( ) not ( Editor ( for == p ) ) then Checkbox c = handler.generatedCheckbox(p); handler.setFor(c, p); cache.add(c, drools); end
1.
2.
3.
4.
At most, 9 steps required to complete model We conservatively limit k to 20
rule "Example rule" when ... eval ( handler.veto( p )) then Checkbox c = handler.generatedCheckbox(p); ...