====== MANET Command Line Interface ====== This section explains how MANET can be used from the command line. At this time, this is the only possible way of invoking MANET. We plan to add a graphical user interface in the future. ==== Using Java Directly ==== MANET is distributed as an executable JAR file. As such, it can be executed in a terminal using the following command: java -jar manet.jar Where is the path input file with the LARA strategies and are the command line options for MANET, which are described below. In the default value column, ''.'' indicates the current working directory. == MANET-specific Options == ^ Symbol ^ Option Name ^ Parameter ^ Description ^ Default Value ^ Format ^ | -F | format | n.a. | Formats the the output code using AStyle. Assumes AStyle is installed. | false | ''-F'' | | -O | output | path to directory | Provides the path to the directory where the output files will be stored. | ./cetus_output | ''-O '' | | -I | include | path to directory | Provides the path to a directory that should be scanned by the C pre-processor when looking for header files. This option can be used several times to specify multiple include directories. | . | ''-I '' | | -D | define | macro definition | Provides a macro definition that will be passed to the C pre-processor. This has the same format expected by //cpp//. This option can be used several times. | n.a. | ''-D '' \\ ''-D ='' | | -U | undefine | macro name | Cancels a previous definition of a macro. This is passed to the C pro-processor and can be used several times. | n.a. |''-U '' | == LARA Engine Options == ^ Symbol ^ Option Name ^ Parameter ^ Description ^ Default Value ^ Format ^ | -p | input | path to directory | Provides the path to the directory where the input files are found (C files in this case). | . | ''-p '' | | -o | LARA output | path to directory | Provides the path to the directory where the LARA engine output files are stored. | . | ''-o '' | | -b | verbosity level | 0-3 | Sets the verbosity level of the LARA engine. **0** - no outputs, **1** - print errors, **2** - print warnings and errors, **3** - print warnings, errors and normal outputs from the tools. | 3 | ''-b '' | | -av | main aspect arguments | path to directory | Defines the arguments that are passed to the main aspect that is called. These can be a list of space-separated values or a JavaScript object, e.g., ''{i:2,j:5}''. If the list of separated values is used, then it is not necessary to provide all the arguments but they still need to be in order. The JavaScript object notation is useful to pass named arguments. | n.a. | ''-av '' | | -m | main aspect | string | Indicates the name of the main aspect in the provided LARA file. | the first aspect found | ''-m '' | ==== Using Scripts ==== It is possible to wrap the call to the Java virtual machine in a script for a more convenient usage. == Bash Script for Linux == #!/bin/bash java -jar manet.jar "$@" This script can be used using the command: ./run.sh It assumes that manet.jar is in the same directory as the script. All the arguments that would be passed when calling Java directly should also be passed to this script. This script may need the correct permissions to be executed, which can be accomplished by using ''chmod''. == Batch Script for Windows == java -jar manet.jar %* This script can be used using the command: run.bat It assumes that manet.jar is in the same directory as the script. All the arguments that would be passed when calling Java directly should also be passed to this script.