90 likes | 223 Views
Object-Orientation in Action Systems. From UML/OCL to Action Systems Willibald Krenn. Outline. UML/OCL versus Action Systems OO-Action Systems Example TRSS Model provided by ARC. UML/OCL versus Action Systems. Excerpt TRSS UML/OCL. Action System. |[ var X:T = <expression>; do
E N D
Object-Orientation in Action Systems From UML/OCL to Action Systems Willibald Krenn
Outline • UML/OCL versus Action Systems • OO-Action Systems • Example TRSS Model provided by ARC
UML/OCL versus Action Systems Excerpt TRSS UML/OCL Action System |[ var X:T = <expression>; do <guard1> <body1> [] <guard2> <body2> od ]| : <imported var> “How to turn water into wine?”
Bridging gap using OO-Action Systems “An Approach to Object-Orientation in Action Systems”, Bonsangue, Kok, and Sere, 1998 • Closer to UML! • Features: • Classes (finite set) • Object Creation/Deletion (bounded) • References to Objects • callable “Methods” • without return values;(instead: direct access to exported variables) • Map to Action Systems
Translation to Action Systems (Sketch) • OO-Action System maps to parallel composition of (infinitely many) Action Systems • Three Basic Steps • Translate action of class into action of Action System • Associate to each class an Action System (~ Parallel composition of all objects and a root node) • Result := parallel composition of all Action Systems generated in Step 2
MOGENTES Proposed Syntax • “Internal Language”: • Front-End: UML • “External Language”: • Can be directly used. Master’s Thesis open for UML to OO-Action System conversion MOdel-based GENeration of Tests for Embedded Systems #216679 FP7-ICT-2007-1-3.3 Embedded Systems Design
Example – Switch Interlock State (set) References
Example (2) Switch_Interlock refinesnone = |[ attr rightposition: Bool = false;attr state: {idle, checkk,checko,intrl, reqp}=idle;obj switch: set of SW_Switch = {};obj trainrouteelem: TrainrouteElem = none; methods public Operation_0() = (...) .... do state=idle & trainrouteelem.tr.setupphase -> state := checkk; [] state=checkk & ((rightPos & switch.inright) | (!rightPos & switch.inleft)) -> state := interl;od ]|
Conclusion • UML to Action System translation • OO-Action Systems • TUG will provide • Tool for converting OO-Action Systems to Action Systems • Tool to Generate Test-Cases from Action Systems • For Hybrid Models, see Harald’s talk.