-
Notifications
You must be signed in to change notification settings - Fork 3
Command Line Scripts
There are three scripts available that may be used from the command line:
-
alf
to execute an Alf unit using the fUML Reference Implementation. -
alfc
to compile an Alf unit to an Eclipse UML2 file. -
fuml
to execute an Eclipse UML2 file using Moka.
A model can be executed from the command line using the alf
shell
script (for Unix) or the alf.bat
batch file (for Windows/DOS). The model is
compiled to an in-memory representation and executed using the fUML Reference
Implementation. Usage is
alf
[options] unitName
where unitName
is the fully qualified name of a unit to be executed.
The allowable options
are
-d
level
Sets the debug level for trace output from the fUML execution engine. Useful levels are:
-
OFF
turns off trace output. -
ERROR
reports only serious errors (such as when a primitive behavior implementation cannot be found during execution). -
INFO
outputs basic trace information on the execution of activities and actions. -
DEBUG
outputs detailed trace information on activity execution.
The default is as configured in the log4j.properties
file in the
installation directory.
-f
Treat the unitName
as a file name, rather than as a qualified
name. The named file is expected to be found directly in the model directory
and the unit must have the same name as the file name (with any .alf
extension removed).
-l
path
Sets the library directory location to path
. If this option is not
given and the ALF_LIB
environment variable is set, then the value of ALF_LIB
is
used as the library directory location. Otherwise, the default of Libraries
is used.
-m
path
Sets the model directory location to path
. Qualified name resolution to
unit file paths is relative to the root of the model directory. If this option
is not given, the default of Models
is used.
-p
Parse and constraint check the identified unit, but do not execute it. This is useful for syntactic and static semantic validation of units that are not executable by themselves.
-P
Parse and constraint check, as for the -p
option, and then print out the
resulting abstract syntax tree. Note that the print out will occur even if there
are constraint violations.
-v
Sets verbose mode, in which status messages are printed about parsing and other
processing steps leading up to execution. If this option is used alone without
specifying a unit name (i.e., alf -v
), then just version information is
printed.
A model can be compiled from the command line using the alfc
shell
script (for Unix) or the alfc.bat batch file (for Windows/DOS). The output is
an Eclipse UML2 file with the same name as the compiled unit and the extension
.uml
appended. All non-library imported units and subunits are resolved at
the source level, compiled and included in the output file. References to library units,
however, are linked to already compiled UML library files.
Usage is
alfc
[options] unitName
where unitName
is the fully qualified name of a unit to be compiled.
The allowable options
are
-f
Treat the unitName
as a file name, rather than as a qualified
name. The named file is expected to be found directly in the model directory
and the unit must have the same name as the file name (with any .alf
extension removed).
-l
path
Sets the library directory location to path
. If this option is not
given and the ALF_LIB
environment variable is set, then the value of ALF_LIB
is
used as the library directory location. Otherwise, the default of Libraries
is used.
-m
path
Sets the model directory location to path
. Qualified name resolution to
unit file paths is relative to the root of the model directory. If this option
is not given, the default of Models
is used.
-p
Parse and constraint check the identified unit, but do not generate output UML for it. This is useful for syntactic and static semantic validation of units that are not executable by themselves.
-P
Parse and constraint check, as for the -p
option, and then print out the
resulting abstract syntax tree. Note that the print out will occur even if there
are constraint violations.
-u
path
Sets the UML output directory location to path
. The output Eclipse UML2 file is
written to this directory. The file name is the unit name with .uml
appended. If this
option is not given, the default of UML
is used.
-v
Sets verbose mode, in which status messages are printed about parsing and other
steps in the compilation process. If this option is used alone without
specifying a unit name (i.e., alfc -v
), then just version information is
printed.
An Eclipse UML2 file can be executed from the command line using the fuml
shell
script (for Unix) or the fuml.bat
batch file (for Windows/DOS). The model is executed
using the Moka fUML execution engine. Usage is
fuml
[options] fileName
where fileName
is the name of an Eclipse UML2 file to be executed. If the given
file name does not have a .uml
extension, one is added.
The allowable options
are
-l
path
Sets the library directory location to path
. If this option is not
given and the ALF_LIB
environment variable is set, then the value of ALF_LIB
is
used as the library directory location. Otherwise, the default of Libraries
is used.
-u
path
Sets the UML input directory location to path
. The Eclipse UML2 file is
expected to be found in this directory. If this option is not given, the default of UML
is used.
-v
Sets verbose mode, in which status messages are printed about processing steps leading up to execution.
(Back to Home)