I didn't have much to report last week since I was mostly doing behind the scenes coding for OOA Tool. This week I returned to the Action Language. The first step was to revisit the syntax grammar for OAL since I want the Action Language for OOA09 to be backwards compatible where possible. The second step was to update the syntax grammar for the OOA09 Action Language. The third step is to update the overview documentation which hasn't been uploaded yet. Later steps include updating the parser in OOA Tool, implementing an interpreter and debugging interface, and updating the Action Language Subsystem for the OOA of OOA. Only the first two steps will be discussed here. The general overview should be uploaded in the coming week and the other work will completed later.
There are three documents that define the Object Action Language (OAL) from Mentor Graphics:
- BPAL97 which defines the Action Language in BridgePoint 4.2,
- OAL02 for later versions of BridgePoint,
- and OAL08 for the latest version of BridgePoint UML Suite.
send
statement relating to components and interfaces. The OAL syntax grammar is given below:
Syntax and Lexical Rules for Action Language
The OOA09 Action Language is currently captured as part of the OOA Tool Model. However, it will shortly be put under change control in the same way as the OOA of OOA and OOA Interchange Format are under change control. The OOA09 syntax grammar is given below:
Syntax and Lexical Rules for Action Language
OOA09 adds a small number of new statements:
- a
declare
statement, - a
switch
control structure statement, - a
reclassify object instance
statement, - and a
delete event instance
statement.
The declare
statement allows stronger and weaker type checking. Variables can still be implicitly declared using assignment statements etc. However, users can now declare variables explicitly using predefined types or user defined types from their model. New data types can't be (and don't need to be) defined within Action Language code. All implicit variable declarations can now be replaced with explicit declarations if needed. The declare statement also allows transient non-object instance sequences and sets to be specified since multiplicity is associated with data items (e.g. variables) in OOA09.
The switch
statement allows enumerated types to be used safely (including current_subtype
and current_state
information) since all legal values must be handled as cases. If new legal values are added or old ones are removed then all associated switch statements will need to be updated. Java and C++ switch statements cover up errors far too easily.
The reclassify object instance
statement enables users to drop explicit creation and deletion of non-leaf object instances and subtype-supertype relationships. Non-leaf object instance creation will be disabled by default in OOA Tool. However, for backwards compatibility with OAL, users will be able to create non-leaf object instances but if they do so they will need to create all non-leaf object instances and will need to relate and unrelate all subtype-supertype relationships.
The delete event instance
statement is part of the delayed event support added to OOA09. Event instances can be created and stored and later turned into generated event instances which may be given a delay when generated. Rather than add the cancel
statement (specified in xtUML02) which only cancels a single generated event instance. OOA09 cancels all generated but delayed event instances associated with a specific event instance when it is explicitly deleted. However, OOA Tool will also support the complete Timer interface defined in BridgePoint for backwards compatibility.
On a final note, I came across the ModelDriven.org Portal which includes a downloadable Foundational UML (fUML) Reference Implementation. Like OOA Tool, it's written in Java and requires Java SE 6 or later. I haven't explored it yet.
No comments:
Post a Comment