Object Action Language
xtUML supports modeling data, processing and control. Data and control are modeled with graphical diagrams such as component, class, and state machine diagrams. Processing is modeled with an action language called Object Action Language (OAL).
OAL is similar in many ways to target programming languages such as Java, C++, Python or VHDL. However, it attempts to be:
- simple
- abstract
- model-aware
- translatable
OAL is simpler than most programming languages. It is meant to be somewhat minimal in its notation, while being rich enough to model all necessary processing. Object Action Language is abstract and works at the level of detail of the model in which is operates. The instructions in the action language are aware of the model of which it is a part in both its syntax and its meaning. The names of model elements such as classes, attributes, events, messages, ports and parameters are parsed in the action language. Finally, the action language is target independent and can be translated into target-specific languages by a model compiler.
Below are a series of short videos that include examples of the various action language statements and their usage. These videos are meant to be self-contained references for each OAL statement and to collectively form a comprehensive tutorial. So, we recommend that while you are watching each segment that you frequently pause the video and repeat the steps in your own workspace using BridgePoint. The familiar GPS Watch example model is the context for each exercise.
Object Action Language Tutorial Overview
Step 1: Setting Up the Workspace
Step 2: Creating an Action Language Function
Step 3: Editing Hello World
Step 4: Running Hello World
Step 5: OAL Data Types
Step 6: Simple Arithmetic
Step 7: If Statements
Step 8: While Loops
Step 9: Calling Functions
Step 10: Creating Instances of Classes and initializing attributes
Step 11: Deleting Instances of Classes
Step 12: Selecting Any Instances and Checking for Empty References
Step 13: Selecting Instances using the Where clause
Step 14: Relating Instances across associations using Relate Statement
Step 15: Selecting One Instances and Unrelate statement
Step 16: Selecting Many Instances and Iterating using for each
Step 17: Action Language Homes
Step 18: Generating State Machine Events
Step 19: Generating Events to Class State Machines