Fed2xml is a java utility for converting HLA (High Level
Architecture) FED files (federation object models) to XML.
It is the legacy import component of an advanced tools chain
for building highly composable (aka interoperable, interchangeable,
reusable) distributed simulations. Fed2xml is open
source and available for download here.
HLA is an operating system for running distributed simulations on networked commodity computers such as Linux or Windows. It is the main operating system used by the U.S. military for simulating weapon systems during development and for training at all levels.
Although HLA was explicitly designed to be a modern object-oriented run-time environment, HLA programs are quite different from conventional object-oriented programs. In conventional object-oriented languages such as C++ and Java, objects communicate synchronously: each object blocks until the receiving object computes its reply unless special library-based thread classes are used to let objects run in parallel.
HLA takes the opposite approach. Although HLA objects are typically written in C++ or Java, each HLA object runs on a separate machine (typically but not necessarily). By default, each HLA object runs independently of HLA objects on other machines. To interact, the interaction is manually hand-coded from HLA library functions.
Interactions are typically based on interaction diagrams such as the simple example in the figure. (realistic simulations can involve hundreds of HLA objects whereas this one only shows three). Each vertical line represents an asynchrnous HLA object, labeled A, B, and C. The horizontal arrows represents interactions between them. Each object is a conventional, single-threaded program written in C++ or Java. Each one (typically but not necessarily) runs on a different machine. Each interaction (horizontal arrow) is hand-composed from a set of subroutines that HLA provides to convey information between objects on independent machines.
Anyone who has used threads extensively will recognize the difficulty of getting large systems of concurrent objects to work as intended. This difficulty is intrinsic to simulation requirements and is not addressed by the fed2xml toolsuite. However the culture that built HLA also created several gratuitous and unnecessary obstacles to simulation component reuse. The goal of this project is to overcome these gratuitous obstacles.
In particular, notice the Federation Object Model (FOM) at the bottom of this figure (labeled as-is). The FOM is a text file written in FED, a declarative, lisp-like language, that declares all of the objects in each federation and the attributes (instance variables) of each one. The FOM is analogous to the C++ header files that declare the objects and attributes (variables and methods) in a C++ program. But gratuitously and needlessly, the FOM is global to the federation as a whole. It is as if C++ required each program have a single global header file rather than allowing each object to define its own header file. This is fatal to building composable (aka interoperable, interchangable, reusable) simulation components because components can only be reused within federations that have the same FOM.
The bottom row of the same figure shows the solution that fed2xml was developed to support. The three boxes, A.xml, B.xml, and C.xml, are analogous to the header files via which conventional C++ objects share declarations with each other. That is, A.xml declares the object (and its attributes) that is implemented by the vertical line labeled A in this figure. These files could be written in FED's lisp-like notation, but XML is preferred since XSLT and XQUERY can be used in developing them.
The fed2xml tool is the legacy import component of this tool suite. It converts (FED-based) FOMs to a single file in XML format from which separate XML files can be produced manually. The rest of the tool suite is not yet released. These use XSLT/XQUERY to build a tool chain capable of concatenating individual XML files into the global FOM in FED format that HLA requires. The individual XML files abide by much the same rules that C++ header files obey:
In other words, HLA's global FOM exists only transiently while each HLA object is being deployed. The individual XML files provide the persistent declarations from which HLA's global FOM is derived at deployment time.
Download fed2xml.tgz Expand this (tar zxf fed2xml.tgz) to create the fed2xml installation directory.
The lib directory contains the executable jar file, edu.virtualschool.fed2xml.jar, plus the libraries that it relies on. The etc directory contains a Unix shell file, fed2xml.sh, for launching the program with all required libraries in the classpath. The src directory contains the java source code.
| Last modified March 27, 2004 | © Copyright 2003 by Brad Cox |