User Tools

Site Tools


Sidebar

<menu col=1,align=center>

<item>Documentation||[[lara:documentation]]|{{:lara:img:dictionary.png?25}}</item>
<item>Downloads||[[lara:downloads]]| {{:lara:img:projects.png?25}}</item>
<item>Tutorials||[[lara:tutorial]]|{{:lara:img:books.png?25}}</item>
<item>Other uses of LARA||[[lara:other]]|{{:lara:img:globe.png?25}}</item>
<item>About Us||[[https://sites.google.com/site/specsfeup/]]| {{:lara:img:specslogo.png?25}}</item>
<item>Projects||[[lara:usage]]| {{:lara:img:math.png?25}}</item>

</menu>

/* They are empty */ /* <item>FAQ||faq|</item> */ /* <item>Dev. Team||team| </item> */ /* <item>About LARA||about|</item> */

manet:docs:cli

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 <lara file> <options>

Where <lara file> is the path input file with the LARA strategies and <options> 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 <path>
-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 <path>
-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 <name>
-D <name>=<value>
-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 <name>
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 <path>
-o LARA output path to directory Provides the path to the directory where the LARA engine output files are stored. . -o <path>
-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 <level>
-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 <arguments>
-m main aspect string Indicates the name of the main aspect in the provided LARA file. the first aspect found -m <name>

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
run.sh
#!/bin/bash
java -jar manet.jar "$@"

This script can be used using the command:

./run.sh <lara file> <options>

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
run.bat
java -jar manet.jar %*

This script can be used using the command:

run.bat <lara file> <options>

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.

manet/docs/cli.txt · Last modified: 2019/09/22 15:47 (external edit)