Military Communications and Information Technology: A Trusted ...

Military Communications and Information Technology: A Trusted ... Military Communications and Information Technology: A Trusted ...

22.01.2015 Views

214 Military Communications and Information Technology... Figure 2. Component architecture of the CL subsystem III. Example of utilization of abstract and concrete syntax and semantics To demonstrate the concepts of DSLs with multilingual support in the environment of C2 systems, let us consider a simple DSL, in which we want to express the following (abstract) concepts: • Sequence of commands, where each command could be either move or destroy command; • Move command – instructing a particular object to move its location to particular coordinates; • Destroy command – instructing a particular weapon system to destroy a target at particular coordinates; • An object could be either a weapon system or a (military) unit; • Unit, weapon system and coordinates could be lexical elements (depicted in bold). The domain model of the language (Fig. 3) can be expressed using a UML class diagram with generalization and aggregation relationships. Consecutively the abstract syntax of the language can be expressed with a CFG with the following productions (including semantic action symbols – their identifiers start with #): 1. → 2. → ε 3. → 4. → 5. → #process_move 6. → #process_destroy 7. → 8. → 9. → unit #process_unit

Chapter 3: Information Technology for Interoperability and Decision... 215 10. → weapon_system #process_weapon_system 11. → coordinates #process_coordinates Figure 3. Domain model of the DSL (Source: Author) Now let us turn to the concrete syntaxes. In Language Representation 1 (e.g. U.S.) we require: • Commands finished with semicolons (;); • Concrete syntax of the move command is move to ; • Concrete syntax of the destroy command is destroy by . These concrete language requirements can be fulfilled using the following productions: 1. → ; 5. → move to #process_move 6. → destroy by #process_destroy

Chapter 3: <strong>Information</strong> <strong>Technology</strong> for Interoperability <strong>and</strong> Decision...<br />

215<br />

10. → weapon_system #process_weapon_system<br />

11. → coordinates #process_coordinates<br />

Figure 3. Domain model of the DSL (Source: Author)<br />

Now let us turn to the concrete syntaxes. In Language Representation 1<br />

(e.g. U.S.) we require:<br />

• Comm<strong>and</strong>s finished with semicolons (;);<br />

• Concrete syntax of the move comm<strong>and</strong> is move to ;<br />

• Concrete syntax of the destroy comm<strong>and</strong> is destroy by<br />

.<br />

These concrete language requirements can be fulfilled using the following<br />

productions:<br />

1. → ; <br />

5. → move to #process_move<br />

6. → destroy by <br />

#process_destroy

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!