Generic State Machine engine GSMe L Andolfato 10














- Slides: 14
Generic State Machine engine (GSMe) L. Andolfato | 10. 05. 2010
Generic State Machine engine WSF Experience • PRIMA project for the VLT Interferometer • VLT SW Platform (Linux, GNU C/C++, CCS/EVH) • Workstation Software Framework (WSF): State Machine framework for the development of workstation applications L. Andolfato | 10. 05. 2010
Generic State Machine engine WSF Model Dependent Engine • In a model dependent engine the SM is embedded in the engine. • Examples: State Pattern, switch, etc. • Changing the model -> recompile the application • Application size depends on the model size L. Andolfato | 10. 05. 2010
Generic State Machine engine WSF Model Representation L. Andolfato | 10. 05. 2010
Generic State Machine engine WSF Example L. Andolfato | 10. 05. 2010
Generic State Machine engine Statechart Features • UML Tools -> Statecharts • Statecharts reduce the visual complexity of a SM • Important features: • Composite (Compound) States • Orthogonal Regions • Initial/Final pseudo-states • History State • Entry/Exit/Trans/Do Actions • State Pattern architecture supports very few of them L. Andolfato | 10. 05. 2010
Generic State Machine engine Statecharts Semantic Is there a standard semantic for Statecharts? Is UML Statecharts semantic completely defined? • No, Statecharts syntax was defined in the famous paper by D. Harel “Statecharts: A Visual Formalist For Complex Systems” • The semantic was not completely specified. • Different tools/standards introduced different semantics: Statemate, Rhapsody, UML. • UML Statecharts semantic is NOT completely specified. • SCXML semantic is specified (the algorithm is provided with the standard). L. Andolfato | 10. 05. 2010
Generic State Machine engine WSF based Applications Despite all these architectural issues, WSF helped in the development of several control applications: Project Number of Applications PRIMA 12 APE 12 NGC 6 DL 1 AO Instrument(s) In progress E-ELT Enclosure prototype for VLT In progress > 31 L. Andolfato | 10. 05. 2010
Generic State Machine engine Others SM based tools • ACS State Machine generator • Based on Linux, Java, ACS • Generates from Rational ROSE/Magic. Draw models using o. AW • Supports limited number of Statecharts features • Only one application generated • SPARTA State Machine framework • Based on Linux, C++, SPARTA • Supports limited number of Statecharts features • Supports inheritance • Does not generate from SM model L. Andolfato | 10. 05. 2010
Generic State Machine engine Comparison Engine WSF ACS SPARTA GSMe Model Independent Engine No No Yes Statecharts Features 60% 40% 30% 90% Standard Semantic ~~UML SCXML Inheritance No No Yes Graphical/Text model Yes/Yes representation ROSE, EA, MD/txt Yes/No ROSE, MD No/No Yes/Yes MD/SCXML Multiplatform No ACS No SPARTA Yes VLT, ACS L. Andolfato | 10. 05. 2010 No VLT
Generic State Machine engine Data Flow L. Andolfato | 10. 05. 2010
Generic State Machine engine Model Independent Engine Interpreted or compiled programming language? Both! Examples: • VLT: TCL and C/C++ • ACS: Python and Java/C++ • Qt: ECMAScript and C++ SCXML Engines: • Fully interpreted: SM logic (states, transitions) and actions/data • Partially interpreted: SM logic only, actions/data are compiled L. Andolfato | 10. 05. 2010
Generic State Machine engine Current Status / Planning • At the moment we are iterating on • Requirements analysis • Design • Java Prototype for the SCXML Engine and Parser • Planning for this year • UML to SCXML transformation (definition and implementation) • Development of Java adapters for ACS • Finalize the Java Engine and Parser • Code Generator for ACS L. Andolfato | 10. 05. 2010
Generic State Machine engine Questions? More info: • https: //websqa. hq. eso. org/sdd/bin/view/MDD/Mdd. Ge neric. State. Machine. Engine • https: //websqa. hq. eso. org/sdd/bin/view/VLTSW/Wsf Thank you! L. Andolfato | 10. 05. 2010