Development of Tools for Object-Oriented Programs - CAMP-TUM

UniMod
Development of Tools for Object Oriented Programs
with Explicit State
Emphasis Engineering
Maxim Mazine
March 31st, 2004
1
UniMod
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
UniMod
Problem Statement (2)
Methodology
design
Framework
25%
+
+
OO Design
+
Tool
+
Framework
25%
Model
development
Manual Programming
65%
50%
+
Auto Generation
10%
25%
Product
3
UniMod
Approach
1. Analyze problem domain, create conceptual model.
2. Extract controlled objects and state machines.
3. Design class diagram using free UML modeling tool ArgoUML.
 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
UniMod
UniMod 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 UniMod integration with ArgoUML.
5
UniMod
Design (UniMod plug-in)
UniMod 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.
State
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
UniMod
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
UniMod
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
UniMod
Hosting
 The project is supported by eVelopers Corp.
http://www.evelopers.com/
 UniMod is an open source project located at
SourceForge
http://unimod.sourceforge.net/
 Foundation for Open Project Documentation
http://is.ifmo.ru/
9
UniMod
Thank You!
10