
978be2442c314b19abed6f42993a51de.ppt
- Количество слайдов: 10
Uni. Mod Development of Tools for Object Oriented Programs with Explicit State Emphasis Engineering Maxim Mazine March 31 st, 2004 1
Uni. Mod Problem Statement (1) In UML there are means to model both static program structure (class diagrams) and dynamic (state diagrams, collaboration diagrams, sequence diagrams). A number of methodologies for static program structure modeling and automated code creation. Description of behavioral is generally informal æ No semantic link with code. æ Diagrams are used only for object domain disclosing. No methodology to design complex logic æ Collaboration and sequence diagrams are useless in this case. æ State diagrams as proposed by UML authors could hardly be used because of identifiers flood on diagrams. Moreover there are limits on state machines nesting. 2
Uni. Mod Problem Statement (2) Methodology design Framework 25% + + OO Design + Tool + Framework 25% Model development Manual Programming 65% 50% + Auto Generation 10% 25% Product 3
Uni. Mod Approach 1. Analyze problem domain, create conceptual model. 2. Extract controlled objects and state machines. 3. Design class diagram using free UML modeling tool Argo. UML. æ Put controlled objects on the right hand. æ Put state machines on the left. 4. Assign names to links between state machines and controlled objects using identifiers like Oi. 5. Define methods of two main types for every controlled object: æ Incoming effects (Xj). æ Outcoming effects (Zk). 6. Implement incoming effects and outcoming effects manually. 7. Create state-transition (Moore-Mealy) graphs on state diagrams. æ Specify events on transitions (Em) in addition. 8. Automatically convert class diagram and state-transition graphs to XML state-machine description or target language code. 4
Uni. Mod consists of Core æ State machine meta-model. æ Algorithms for parsing and translation of guard conditions. æ Algorithms for state machines validation. æ Framework for runtime XML description interpreting. æ Target language code creating tools. Plug-in æ Common module for all UML design tools. æ Module for Uni. Mod integration with Argo. UML. 5
Uni. Mod Design (Uni. Mod plug-in) Uni. Mod helps to design state machines using UML design tools. 1. Gives comfortable state machine tree view. 2. Validates state-machine on the fly and highlights errors. æ æ æ 3. Statemachine State machine structure transition structure graph State attainability check. Consistency of transition set. Completeness of transition set. Generates state machine code æ æ State Machine XML description for further interpreting or Code for target programming language to compile. Logs Validatio n messages 6
Uni. Mod Development (runtime) There are two approaches for runtime state machine execution Interpreting æ Java XML interpreting framework. æ XML description is converted into internal object presentation once and completely. Resulting system consists of runtime environment and object representation of state machine. æ To handle event this system: æ Analyzes the event and incoming effects to chooses the transition; æ Executes outcoming effects; æ Invokes internal state machines. æ The system is able to produce logs: æ verbose (reflects state machine activities); æ non-verbose (only dumps effects invokes). Compilation æ State machines are hard coded. æ Events handling accomplished using SWITCH technology. 7
Uni. Mod Benefits Based on proven standards (UML) Removes gap between design and implementation æ Consistent and valid model based on finite-state machine theory æ Leads to consistent code Accelerates application development æ Supports the methodology with the tool æ Errors on diagrams highlighting æ Use forward engineering for æ XML State Machine Description (interpreting) æ Target language code (compiling) Mandatory documentation æ Redundant artifacts are removed because diagrams are project documents and part of programs simultaneously. 8
Uni. Mod Hosting The project is supported by e. Velopers Corp. http: //www. evelopers. com/ Uni. Mod is an open source project located at Source. Forge http: //unimod. sourceforge. net/ Foundation for Open Project Documentation http: //is. ifmo. ru/ 9
Uni. Mod Thank You! 10
978be2442c314b19abed6f42993a51de.ppt