Commands (vs. 4.0.0 and later)
As from version 4.0.0 Ampersand has a command structure that allows you to use Ampersand from the command line.
Commands without a script
ampersand --version
to find out which version of Ampersand you are using.ampersand --help
to summarize all level one commands
Commands with a script
In practice, run ampersand --help
instead of consulting the following list, just to be sure that the commands match the version you are using. The following list has been taken from version 4.0.0.
The general structure of commands is ampersand [options]* COMMAND
. The following commands are available:
ampersand [options]* check <filename>
Check your model for syntax errors and type errors.
ampersand [options]* daemon <filename>
Check your model continuously while editing it.
ampersand [options]* data-analysis <filename>
Export a data model as a plain Ampersand script, for analyzing Excel data.
ampersand [options]* dev-output <filename>
Generate some diagnostic files, intended for developers of Ampersand.
ampersand [options]* documentation <filename>
Generate a functional design document, to kick-start your functional specification.
ampersand [options]* population <filename>
Generate a .xmlx file containing the populations of your script.
ampersand [options]* proofs <filename>
Generate a report containing proofs.
ampersand [options]* proto <filename>
Generate a prototype from your specification.
ampersand [options]* export <filename>
Generate a single
.adl
-file of your script (prettyprinted)ampersand [options]* uml <filename>
Generate a data model in UML 2.0 style.
ampersand [options]* validate <filename>
Compare results of rule evaluation in Haskell and SQL, for testing expression semantics. This requires command line PHP with MySQL support.
ampersand [options]* test <filename>
Run test suites in a given directory. This is meant to do regression testing during automatic build (e.g. Travis-ci)
Filename
The filename
in a command typically has suffix .adl
(which stands for Ampersand Description Language). If you omit the suffix .adl
, Ampersand does NOT add it for you. The filename conventions of your operating system apply (whether you have Windows, macOS, or Linux).
Options
You may use one of the first three options to specify how verbose your output will be. The other options can be used at random and mixed freely.
--help
Show the help text. This is always up to date with the version of the compiler you are running. So considerampersand --help
to be authoritative.--verbosity VERBOSITY
Verbosity: silent, error, warn, info, debug
-V, --verbose
Enable verbose mode: verbosity level "debug"
--silent
Enable silent mode: verbosity level "silent"
--[no-]time-in-log
Enable/disable inclusion of timings in logs, for the purposes of using diff with logs (default: enabled)
--[no-]terminal
Enable/disable overriding terminal detection in the case of running in a false terminal
--terminal-width INT
Specify the width of the terminal, used for pretty-print messages
--outputDir DIR
Specify the directory where your output will be written to.
Options per command
Every command can have options of its own. Use the command and add --help
to see which command specific options there are.
Example:
Last updated