The GOAL command-line mode can be either single mode or batch mode. In the
single mode, only one command can be executed each time. In the batch mode
a sequence of commands can be executed. A single command is an instr while
a sequence of command is a block in the grammar rules (see the GRAMMAR
section).
To execute a single command, the command should be preceded by
"java -jar goal_????_??_??.jar " (with ????_??_?? replaced by an appropriate
release date). An input automaton must be in the .gff format. A .gff file
contains type information of the automaton it describes.
To execute a sequence of commands, you can write GOAL scripts. For example,
suppose the file SCRIPT contains a sequence of commands. You can run these
commands by executing "java -jar goal_????_??_??.jar batch SCRIPT". Unlike
the execution of a single command, in a GOAL script, variables can be used
to capture the result of commands.
block := ( stmt )*
stmt := instr ";" | for_stmt | if_stmt
instr :=
"echo" ( -n )? ( expr )?
| "save" lval file_or_lval
| "load" lval file_or_lval
| "batch" file_or_lval
| "interactive"
| "exit"
| "break" ( expr )?
| "continue" ( expr )?
| lval "=" ( expr | cmd_expr )
| "(" lval ( "," lval )* ")" "=" ( expr | cmd_expr )
| cmd_expr
for_stmt := "for" lval "in" expr "do" block "done"
if_stmt := ( "if" expr "then" block ) ( "elif" expr "then" block )* ( "else" block )? "fi"
cmd_expr :=
emptiness_expr
| containment_expr
| equivalence_expr()
| convert_expr()
| intersection_expr()
| union_expr()
| complement_expr()
| determinable_expr()
| determinization_expr()
| minimization_expr()
| simplify_expr()
| reduce_expr()
| prunefairset_expr()
| promela_expr()
| stat_expr()
| import_expr()
| genautomaton_expr()
| translate_expr()
| validity_expr()
| satisfiability_expr()
| genformula_expr()
| hierarchy_expr()
| readline_expr()
| open_expr()
| close_expr()
| split_expr()
| seq_expr()
emptiness_expr := "emptiness" file_or_lval
containment_expr := "containment" ( -m containment_alg )* file_or_lval file_or_lval
equivalence_expr := "equivalence" file_or_lval file_or_lval
convert_expr := "convert" ( -t automaton_type | -o file_or_lval )* file_or_lval
intersection_expr := "intersection" ( -o file_or_lval )? file_or_lval file_or_lval
union_expr := "union" ( -o file_or_lval )? file_or_lval file_or_lval
complement_expr :=
"complement" ( -m complement_alg | -o file_or_lval | -s expr | -t expr |
-eq | -r | -tt | -bfs | -madj | -eg | -cp | -tr | -ro | -macc )* file_or_lval
determinable_expr :=
"determinable" file_or_lval
determinization_expr :=
"determinization" ( -m determinization_alg | -o file_or_lval )* file_or_lval
minimization_expr := "minimization" ( -o file_or_lval )? file_or_lval
simplify_expr := "simplify" ( -o file_or_lval )? file_or_lval
reduce_expr := "reduce" ( -o file_or_lval )? file_or_lval
prunefairset_expr := "prunefairset" ( -o file_or_lval )? file_or_lval
promela_expr := "promela" ( -o file_or_lval )? file_or_lval
stat_expr := "stat" ( -s | -t )? file_or_lval
import_expr := "import" ( -p external_program )? file_or_lval
genautomaton_expr :=
"genautomaton" ( -t automaton_type | -s expr | -n expr | -pt expr |
-ps expr | -pa expr | -r | -S )*
hierarchy_expr :=
"hierarchy" formula_or_lval
translate_expr :=
"translate" ( -m translate_alg | -t automaton_type | -o file_or_lval )*
formula_or_lval
validity_expr := "validity" formula_or_lval
satisfiability_expr := "satisfiability" formula_or_lval
genformula_expr :=
"genformula" ( -l expr | -n expr | -w int_or_lval int_or_lval int_or_lval |
-r | -of | -mcp | int_or_lval )*
readline_expr := "readline" file_or_lval
open_expr := "open" file_or_lval
close_expr := "close" int_or_lval
split_expr := "split" ( -d string_or_lval )? ( expr | cmd_expr )
seq_expr := "seq" expr ( expr )? ( expr )?
complement_alg :=
"ramsey" | "safra" | "wapa" | "waa" | "piterman" | "ms"
| "modifiedsafra" | "modsafra" | "kurshan" | "rank" | "slice" | lval
containment_alg :=
"default" | "rank"
determinization_alg :=
"classic" | "safra" | "modifiedsafra" | "ms" | "piterman" | lval
translate_alg :=
"tableau" | "temporaltester" | "tester" | "inctableau" | "gpvw"
| "gpvw+" | "ltl2aut" | "ltl2aut+" | "ltl2ba" | "pltl2ba" | "couvruer"
| "ltl2buchi" | "ltl2buchiplus" | "modella" | lval
automaton_type :=
"nbw" | "ngbw" | "nmw" | "nrw" | "nsw" | "npw"
| "ntbw" | "ntgbw" | "ntmw" | "ntrw" | "ntsw" | "ntpw" | "classic"
| "vwaa" | lval
external_program := "modella" | "ltl2buchi" | lval
expr :=
expr ( "\/" | "|" ) expr
| expr ( "/\" | "&" ) expr
| expr "==" expr
| expr "!=" expr
| expr "<" expr
| expr ">" expr
| expr "<=" expr
| expr ">=" expr
| expr "+" expr
| expr "-" expr
| expr "*" expr
| expr "/" expr
| expr "%" expr
| "-" expr
| "!" expr
| number
| bool
| string
| lval
| "time"
| "(" expr ")"
| "`" shell_cmd "`"
number := int | float
formula_or_lval := string | lval
file_or_lval := file | string
int_or_lval := int | lval
string_or_lval := string | lval
bool := "true" | "false"
lval := "$" id
int := (["0"-"9"])+
float := (["0"-"9"])+ "." (["0"-"9"])+
file := (["a"-"z","A"-"Z","0"-"9","_","-",".","/"])+
id := ["a"-"z","A"-"Z"] ( ["a"-"z","A"-"Z","0"-"9","_"] )*
shell_cmd := ( ~["`","\n","\r"] )*
In GOAL scripts, every variable name should start with "$". You don't
need to declare the type of a variable before using it. For example,
below are some acceptable variable names:
$var
$v0
$v_0
The only way to create a list is to execute the readline command which
reads a file line by line. Each element in the list is a line in the
file. For example, the following statement will read the file "input"
and put each line as an element in the list variable $list.
$list = readline "input";
An array is a map from an object convertible to a string to an object.
Basically, you can use any object as the index of an array. For example,
the following commands are acceptable.
$arr[0] = 0;
$arr["number"] = 10;
A multiple assignment tries to split an object and assign the results
to a set of variables. Note that the number of left elements should be
less than or equal to the number of right elements.
A string can be split by spaces, tabs, and newlines. For example, the
following statement will split the string into "1" and "2". If you want
to use delimiters rather than spaces, tabs, and newlines, you can use
the split command.
($x, $y) = "1 2";
The values of elements of a list can be assigned to a set of variables
by the following statement.
($elm_1, $elm_2, ..., $elm_n) = $list
The key set of an array can be assigned to a set of variables by the
following statement.
($key_1, $key_2, ..., $key_n) = $arr
$arr[$key_1] = 0;
$arr[$key_2] = 1;
...
A statement can be an instruction (command) with a trailing ";", a
for-statement, or an if-statement. A for-statement iterates on the
elements of a list or the key set of an array. For examples, below is
a for-statements which iterates on a list.
$list = readline "input";
for $elm in $list do
echo $elm;
done
Below is a for-statements which iterates on aan array.
for $key in $arr do
echo $arr[$key];
done
A shell command can be invoked by putting the command between two `.
For example, the following command will invoke the shell command
"seq 1 10" and the variable $x will capture both the standard output
and the error output of this shell command.
$x = `seq 1 10`;
Below is another example that prints numbers from 1 to 10 on the
screen.
for $x in `seq 1 10` do
echo $x;
done
- NAME
- emptiness - Check emptiness of an automaton.
- SYNOPSIS
- emptiness FILE_OR_LVAL
- DESCRIPTION
- Return "true" if the input automaton is empty, and "false" otherwise.
- EXAMPLE
emptiness abc.gff
- NAME
- containment - Check whether an automaton is contained in another.
- SYNOPSIS
- containment [-m CONTAINMENT_ALG] FILE_OR_LVAL FILE_OR_LVAL
- DESCRIPTION
- Check whether the first input automaton is contained in the second one.
Return "true" if it is the case, and "false" otherwise. (Note: the
direction of containment was the opposite in earlier versions.)
| -m | Specify the algorithm used for checking containment. |
- EXAMPLE
containment a.gff b.gff
containment -m rank a.gff b.gff
- NAME
- convert - Convert an omega automaton into another type of omega automaton.
- SYNOPSIS
- convert [-t AUTOMATON_TYPE | -o FILE_OR_LVAL] FILE_OR_LVAL
- DESCRIPTION
- Convert an omega automaton into another type of omega automaton.
| -t | Specify the target type of omega automaton. |
| -o | Write the converted omega automaton to the specified file. |
- EXAMPLE
convert -t nbw -o output.gff input.gff
- NAME
- equivalence - Check whether two automata accept the same language.
- SYNOPSIS
- equivalence FILE_OR_LVAL FILE_OR_LVAL
- DESCRIPTION
- Check whether the first input automaton and the second one accept the same
language. Return "true" if it is the case, and "false" otherwise.
- EXAMPLE
equivalence a.gff b.gff
- NAME
- intersection - Compute the intersection of the two input automata.
- SYNOPSIS
- intersection [-o FILE_OR_LVAL] FILE_OR_LVAL FILE_OR_LVAL
- DESCRIPTION
- Compute the intersection (synchronous product) of the two input automata
and output the resulting automaton.
| -o | Output to a designated file. By default, the result will show on the
screen. |
- EXAMPLE
intersection -o c.gff a.gff b.gff
- NAME
- union - Compute the union of the two input automata.
- SYNOPSIS
- union [-o FILE_OR_LVAL] FILE_OR_LVAL FILE_OR_LVAL
- DESCRIPTION
- Compute the union of the two input automata and output the resulting
automaton.
| -o | Output to a designated file. By default, the result will show on the
screen. |
- EXAMPLE
union -o c.gff a.gff b.gff
- NAME
- complement - Complement an automaton.
- SYNOPSIS
- complement [-m COMPLEMENT_ALG | -o FILE_OR_LVAL | -s EXPR | -t EXPR |
-eq | -r | -tr | -cp | -ro | -macc | -tt | --bfs | -madj | -eg | -cp]
FILE_OR_LVAL
- DESCRIPTION
- Compute the complement of the input automaton and return the resulting
automaton of the same type.
| -m | Choose the complementation algorithm. Below is a list of available
parameters and their corresponding complementation algorithms:
- ramsey: Ramsey-Based Construction
- kurshan: Kurshan's Construction (for DBW)
- safra: Safra's Construction
- modsafra: Modified Safra's Construction
- modifiedsafra: same as modsafra
- ms: Muller-Schupp Construction
- wapa: Via Weak Alternating Parity Automaton
- waa: Via Weak Alternating Automaton
- piterman: Safra-Piterman Construction
- rank: Rank-Based Construction
- slice: Slice-Based Construction
By default, Safra's construction will be used. |
| -o | Output to a designated file. By default, the result will show on the
screen. |
| -s | Stop the complementation algorithm at a given stage and output the
intermediate result. If the stage is 0, the complementation algorthm
will be performed completely. Kurshan's construction does not have
middle stage. |
| -t | Give the timeout (second). By default, the timeout is 0, i.e., no
timeout. |
| -eq | Apply local optimization of merging equivalent states.
This option is only applicable to Safra-Piterman construction.
By default, this option is off. |
| -r | Remove unreachable and dead states from the resulting automaton.
This option is only applicable to rank-based and slice-based
complementation. By default, this option is off. |
| -p | Use the prelimnary version of the slice-based construction.
This option is only applicable to the slice-based construction.
By default, this option is off. |
| -tr | Apply tight rank construction. This option is only applicable
to rank-based complementation. By default, this option is off. |
| -cp | Apply turn wise cut-point construction.
This option is only applicable to rank-based and slice-based
complementation. By default, this option is off. |
| -ro | Apply the option of reducing outdegree. In rank-based
complementation, this implies tight rank. This option is only
applicable to rank-based and slice-based complementation. By default,
this option is off. |
| -macc | Maximize the accepting set of the target automaton.
This option is only applicable to Safra-Piterman construction,
rank-based, and slice-based complementation. By default, this
option is off. |
| -tt | Make the transition relation of the input automaton total. This
option is only applicable to slice-based complementation.
By default, this option is off. |
| -bfs | Use breadth-first search when expanding the complement automaton.
This option is only applicable to slice-based complementation.
By default, depth-first search will be used. |
| -madj | Merge adjacent 0-sets or *-sets. This option is only applicable
to slice-based complementation. By default, this option is off. |
| -eg | Apply the enhanced guessing. This option is only applicable to
slice-based complementation. By default, this option is off. |
| -cp | Apply the enhanced cut-point construction. This option is only
applicable to slice-based complementation. By default, this option
is off. |
- EXAMPLE
complement -m safra -o b.gff -t 30 a.gff
complement -m slice -r -eg a.gff
- NAME
- determinable - Test if an automaton is semantically deterministic.
- SYNOPSIS
- determinable FILE_OR_LVAL
- DESCRIPTION
- Return "true" if the input automaton is semantically deterministic, or
"false" otherwise.
- EXAMPLE
determinable a.gff
- NAME
- determinization - Compute the determinization of the input automaton.
- SYNOPSIS
- determinization [-m DETERMINIZATION_ALG | -o FILE_OR_LVAL] FILE_OR_LVAL
- DESCRIPTION
- Compute the determinization of the input automaton.
The type of the resulting automaton would depends on the algorithm you choose.
| -m | Choose the determinization algorithm. Below is a list of available
parameters and their corresponding determinization algorithms:
- classic: a determinization algorithm for detemining a calssic automaton to a deterministic classic automaton.
- safra: Safra's Construction for determing NBW to DRW.
- modifiedsafra: Modified Safra's Construction for determing NBW to DRW.
- ms: Muller-Schupp Construction for determing NBW to DRW.
- piterman: Safra-Piterman Construction for determing NBW to DPW.
By default, classic will be used for classic automaton and Safra's
construction will be used for Büchi automaton. |
| -o | Output to a designated file. By default, the result will show on the
screen. |
- EXAMPLE
determinization -m classic -o b.gff a.gff
determinization -m safra -o b.gff a.gff
- NAME
- minimization - Compute the minimization of the input classic automaton.
- SYNOPSIS
- minimization [-o FILE_OR_LVAL] FILE_OR_LVAL
- DESCRIPTION
- Compute the minimization of the input classic automaton.
| -o | Output to a designated file. By default, the result will show on the
screen. |
- EXAMPLE
minimization -o b.gff a.gff
- NAME
- simplify - Simplify an automaton.
- SYNOPSIS
- simplify [-o FILE_OR_LVAL ] FILE_OR_LVAL
- DESCRIPTION
- Simplify the input automaton and return the resulting equivalent automaton
of the same type.
| -o | Output to a designated file. By default, the result will show on the
screen. |
- EXAMPLE
simplify -o b.gff a.gff
- NAME
- reduce - Remove unreachable and dead states from an automaton.
- SYNOPSIS
- reduce [-o FILE_OR_LVAL ] FILE_OR_LVAL
- DESCRIPTION
- Given an automaton, remove the unreachable and dead states.
| -o | Output to a designated file. By default, the result will show on the
screen. |
- EXAMPLE
reduce -o b.gff a.gff
- NAME
- prunefairset - Prune the acceptance sets of a GBA.
- SYNOPSIS
- prunefairset [-o FILE_OR_LVAL ] FILE_OR_LVAL
- DESCRIPTION
- Prune the acceptance sets of the input generalized Buchi automaton and
return the resulting equivalent generalized Buchi automaton.
| -o | Output to a designated file. By default, the result will show on the
screen. |
- EXAMPLE
prunefairset -o b.gff a.gff
- NAME
- promela - Convert a Buchi automaton into Promela code.
- SYNOPSIS
- promela [-o FILE_OR_LVAL] FILE_OR_LVAL
- DESCRIPTION
- Convert a Buchi automaton into Promela code.
| -o | Output the Promela code to a file. By default, the Promela
code will be displayed on the screen. |
- EXAMPLE
- promela -o output input.gff
- NAME
- stat - Get the number of states or the number of transitions of the input
automaton.
- SYNOPSIS
- stat [-s | -t ] FILE_OR_LVAL
- DESCRIPTION
- Get the number of states or the number of transitions of the input
automaton.
| -s | Get the number of states only. |
| -t | Get the number of transitions only. |
- EXAMPLE
stat -s a.gff
stat -t a.gff
stat a.gff
- NAME
- import - Import a file produced by external tools.
- SYNOPSIS
- import [-p EXTERNAL_PROGRAM] FILE_OR_LVAL
- DESCRIPTION
- Import a file produced by external tools and output it in the GFF format.
Currently, Modella and LTL2Buchi are supported.
| EXTERNAL_PROGRAM | Specify the format of the input file. The format can be
either "modella" or "ltl2buchi". If this argument is
missing, GOAL will guess the file format automatically. |
- EXAMPLE
import modella automaton.modella
import ltl2buchi automaton.ltl2buchi
- NAME
- genautomaton - Generate an omega automaton randomly.
- SYNOPSIS
- genautomaton [-t AUTOMATON_TYPE | -s EXPR | -n EXPR | -pt EXPR
-ps EXPR | -pa EXPR | -r | -S]
- DESCRIPTION
- Randomly generate an omega automaton.
| -t | Specify the type of the omega automaton. TYPE can be "nbw"
(non-deterministic Buchi word automaton) or "ngbw" (non-deterministic
generalized Buchi word automaton). |
| -s | Specify the desired number of states in the generated omega automaton.
The default value is 5. |
| -n | Specify the number of atomic propositions, which then determines the
desired alphabet size of the generated omega automaton. The default
value is 2 (atomic propositions). |
| -pt | Specify the probability of whether there should be transitions
from one state to another state. The value of the probability should
be in the range from 0 to 1. By default, the probability is decided
randomly every time. |
| -ps | Specify the probability of labeling a symbol on a transition.
Assume there n states, the alphabet size is m, the probability
specified by -pt is p1, and the probability specified by -ps is p2.
The expected number of transitions is (n * n * p1) * (m * p2). |
| -pa | Specify the probability of adding a state to an acceptance set. |
| -r | Count the number of states after removing unreachable and dead
states. Note that if this option is on, it will take longer to
generate an automaton. |
| -S | Count the number of states after applying simulation simplification.
Note that if this option is on, it will take longer to generate an
automaton. |
- EXAMPLE
genautomaton -s 10 -n 3 -p 0.2
genautomaton -t nbw -s 5 -n 2
- NAME
- translate - Translate a temporal formula into an automaton.
- SYNOPSIS
- translate [-m TRANSLATE_ALG | -o FILE_OR_LVAL | -t AUTOMATON_TYPE ]
FORMULA_OR_LVAL
- DESCRIPTION
- Translate a temporal formula into an automaton. By default, this command
translates a temporal logic formula into a non-deterministic Buchi word
automaton.
| -m | Choose the translation algorithm (tableau, inctableau, temporaltester,
gpvw, gpvw+, ltl2aut, ltl2aut+, ltl2ba, pltl2ba, couvreur, ltl2buchi, ltl2buchiplus, or modella).
By default, the tableau algorithm will be used. |
| -o | Output to a designated file. By default, the result will show on the
screen. |
| -t | Choose the type of the target automaton (ngbw or nbw). By default, it
will be a non-deterministic Buchi word automaton. |
- EXAMPLE
translate -m gpvw -t nbw -o Fp.gff "<>p"
- NAME
- validity - Check whether a formula is valid.
- SYNOPSIS
- validity FORMULA_OR_LVAL
- DESCRIPTION
- Check whether the input formula is valid. Return "true" if it is the case,
and "false" otherwise.
- EXAMPLE
validity "[](pUq)Uq <--> pUq"
- NAME
- satisfiability - Check whether a formula is satisfiable.
- SYNOPSIS
- satisfiability FORMULA_OR_LVAL
- DESCRIPTION
- Check whether the input formula is satisfiable. Return "true" if it is the
case, and "false" otherwise.
- EXAMPLE
satisfiability "(pUq)U~q"
- NAME
- hierarchy - Test the temporal hierarchy of a temporal formula.
- SYNOPSIS
- hierarchy FORMULA_OR_LVAL
- DESCRIPTION
- Output the temporal hierarchy of a temporal formula.
- EXAMPLE
hierarchy "[] p"
- NAME
- echo - Output a string, an integer, an automaton etc on the screen.
- SYNOPSIS
- echo [ -n ] [ EXPR ]
- DESCRIPTION
- Output an expression on the screen.
| -n | Do not output the trailing newline. |
- EXAMPLE
echo "Hello World!"
- NAME
- save - Save an object to a file.
- SYNOPSIS
- save LVAL FILE_OR_LVAL
- DESCRIPTION
- Save an object to a file. If the object is an automaton, the format of the
outputted file will be in the .gff format.
- EXAMPLE
save $omega output.gff
- NAME
- load - Load a GFF into a variable.
- SYNOPSIS
- load LVAL FILE_OR_LVAL
- DESCRIPTION
- Load a GFF into a variable.
- EXAMPLE
load $omega input.gff
- NAME
- batch - Execute a script.
- SYNOPSIS
- batch FILE_OR_LVAL
- DESCRIPTION
- Execute the commands in a script.
- EXAMPLE
batch script
- NAME
- interactive - Open the interactive mode.
- SYNOPSIS
- interactive
- DESCRIPTION
- Open the interactive mode. Use "exit;" to quit GOAL.
- EXAMPLE
interactive
- NAME
- exit - Quit GOAL.
- SYNOPSIS
- exit
- DESCRIPTION
- Quit GOAL.
- EXAMPLE
exit
- NAME
- break - Break a for-loop or a while-loop.
- SYNOPSIS
- break [ EXPR ]
- DESCRIPTION
- Break a for-loop or a while-loop.
- EXAMPLE
break
break 2
- NAME
- continue - Continue a for-loop or a while-loop.
- SYNOPSIS
- continue [ EXPR ]
- DESCRIPTION
- continue a for-loop or a while-loop.
- EXAMPLE
continue
continue 2
- NAME
- split - Split an object into a set of elements.
- SYNOPSIS
- split [-d STRING_OR_LVAL] [EXPR | CMD_EXPR]
- DESCRIPTION
- If the object is a list, this command will return a set of list
elements. If the object is an array, this command will return the
key set of the array. Otherwise, this command will convert the object
into a string and split the string according the delimiter. The default
delimiter is spaces, tabs, and newlines.
| -d | Specify the delimiter. |
- EXAMPLE
$keys = split $arr;
$elements = split -d ":" "1:2:3";
- NAME
- seq - Generate a sequence of numbers.
- SYNOPSIS
- seq LAST
- seq FIRST LAST
- seq FIRST INCREMENT LAST
- DESCRIPTION
- Generate a sequence of numbers. The LAST, FIRST, and INCREMENT
in SYNOPSIS are all expressions.
- EXAMPLE
$numbers = seq 1 10;
- NAME
- time - Returns the current time in milliseconds.
- SYNOPSIS
- time
- DESCRIPTION
- Returns the current time in milliseconds.
- EXAMPLE
time
- NAME
- readline - Read the input file line by line and put the results in a list.
- SYNOPSIS
- readline FILE_OR_LVAL
- DESCRIPTION
- Read the input file line by line and put the results in a list.
- EXAMPLE
readline input.gff
- NAME
- open - Open an automaton in a GUI editor.
- SYNOPSIS
- open FILE_OR_LVAL
- DESCRIPTION
- Open an automaton in a GUI editor. The return value is the unique index of
the editor.
- EXAMPLE
open input.gff
- NAME
- close - Close a GUI editor.
- SYNOPSIS
- close INT_OR_LVAL
- DESCRIPTION
- Close a GUI editor according the index.
- EXAMPLE
close 1
- NAME
- help - Display the help page.
- SYNOPSIS
- help [ COMMAND_NAME ]
- DESCRIPTION
- Display the whole help page or a section describing the usage of a
command in the help page.
- EXAMPLE
help
help complement
Below is a script that translates 10 randomly generated formulae by various
translation algorithms.
#!./goal batch
echo "Translate random generated formulae by various translation algorithms.";
echo;
$algorithms = "tester inctableau gpvw ltl2aut+ ltl2ba";
$formulae = genformula -n 2 -l 5 -w 1 1 0 10;
$count = 1;
for $formula in $formulae do
echo "#" + $count + ": Translating " + $formula;
for $alg in $algorithms do
echo " by " + $alg;
$ti = time;
$o = translate -m $alg $formula;
$ti = time - $ti;
($s, $t) = stat $o;
echo " # of states: " + $s;
echo " # of transitions: " + $t;
echo " time: " + $ti;
$ret_st[$alg] = $ret_st[$alg] + $s;
$ret_tr[$alg] = $ret_tr[$alg] + $t;
$ret_ti[$alg] = $ret_ti[$alg] + $ti;
done
$count = $count + 1;
done
echo;
echo "========== Statistics ==========";
for $alg in $algorithms do
echo $alg + ":";
echo " # of states: " + $ret_st[$alg];
echo " # of transitions: " + $ret_tr[$alg];
echo " time: " + $ret_ti[$alg];
done
|
Below is the list of commands.
- Commands for automata:
- Commands for formulae:
- Other commands: