Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
516350dd
Commit
516350dd
authored
Feb 01, 2005
by
Alexandre Duret-Lutz
Browse files
* src/tgbatest/randtgba.cc (main): Skip empty lines.
(syntax): Categorize options.
parent
42cd2e05
Changes
2
Show whitespace changes
Inline
Side-by-side
ChangeLog
View file @
516350dd
2005-02-01 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/tgbatest/randtgba.cc (main): Skip empty lines.
(syntax): Categorize options.
2005-01-31 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/tgbatest/explicit.test, src/tgbatest/explpro2.test,
...
...
src/tgbatest/randtgba.cc
View file @
516350dd
...
...
@@ -152,48 +152,53 @@ syntax(char* prog)
{
std
::
cerr
<<
"Usage: "
<<
prog
<<
" [OPTIONS...] PROPS..."
<<
std
::
endl
<<
std
::
endl
<<
"Options:"
<<
std
::
endl
<<
"
General
Options:"
<<
std
::
endl
<<
" -0 suppress default output, just generate the graph"
<<
" in memory"
<<
std
::
endl
<<
" -1 produce minimal output (for our paper)"
<<
" -1 produce minimal output (for our paper)"
<<
std
::
endl
<<
" -g output graph in dot format"
<<
std
::
endl
<<
" -s N seed for the random number generator"
<<
std
::
endl
<<
" -z display statistics about emptiness-check algorithms"
<<
std
::
endl
<<
" -Z like -z, but print extra statistics after the run"
<<
" of each algorithm"
<<
std
::
endl
<<
std
::
endl
<<
"Graph Generation Options:"
<<
std
::
endl
<<
" -a N F number of acceptance conditions and probability that"
<<
" one is true"
<<
std
::
endl
<<
" [0 0.0]"
<<
std
::
endl
<<
" -d F density of the graph [0.2]"
<<
std
::
endl
<<
" -n N number of nodes of the graph [20]"
<<
std
::
endl
<<
" -t F probability of the atomic propositions to be true"
<<
" [0.5]"
<<
std
::
endl
<<
std
::
endl
<<
"LTL Formula Generation Options:"
<<
std
::
endl
<<
" -dp dump priorities, do not generate any formula"
<<
std
::
endl
<<
" -f N size of the formula [15]"
<<
std
::
endl
<<
" -F N number of formulae to generate [0]"
<<
std
::
endl
<<
" -l N simplify formulae using all available reductions"
<<
" and reject those"
<<
std
::
endl
<<
" strictly smaller than N"
<<
std
::
endl
<<
" -i FILE do not generate formulae, read them from FILE"
<<
std
::
endl
<<
" -p S priorities to use"
<<
std
::
endl
<<
" -u generate unique formulae"
<<
std
::
endl
<<
std
::
endl
<<
"Emptiness-Check Options:"
<<
std
::
endl
<<
" -D degeneralize TGBA for emptiness-check algorithms that"
<<
" would"
<<
std
::
endl
<<
" otherwise be skipped (implies -e)"
<<
std
::
endl
<<
" -e N compare result of all "
<<
"emptiness checks on N randomly generated graphs"
<<
std
::
endl
<<
" -f N the size of the formula [15]"
<<
std
::
endl
<<
" -F N number of formulae to generate [0]"
<<
std
::
endl
<<
" -g output in dot format"
<<
std
::
endl
<<
" -i FILE do not generate formulae, read them from FILE"
<<
std
::
endl
<<
" -l N simplify formulae using all available reductions"
<<
" and reject those"
<<
std
::
endl
<<
" strictly smaller than N"
<<
std
::
endl
<<
" -m try to reduce runs, in a second pass (implies -r)"
<<
std
::
endl
<<
" -n N number of nodes of the graph [20]"
<<
std
::
endl
<<
" -O ALGO run Only ALGO"
<<
std
::
endl
<<
" -p S priorities to use"
<<
std
::
endl
<<
" -r compute and replay acceptance runs (implies -e)"
<<
std
::
endl
<<
" -R N repeat each emptiness-check and accepting run "
<<
"computation N times"
<<
std
::
endl
<<
" -s N seed for the random number generator"
<<
std
::
endl
<<
" -t F probability of the atomic propositions to be true"
<<
" [0.5]"
<<
std
::
endl
<<
" -u generate unique formulae"
<<
" -r compute and replay acceptance runs (implies -e)"
<<
std
::
endl
<<
" -z display statistics about computed accepting runs"
<<
std
::
endl
<<
" -Z like -z, but print extra statistics after the run"
<<
" of each algorithm"
<<
std
::
endl
<<
"Where:"
<<
std
::
endl
<<
" F are floats between 0.0 and 1.0 inclusive"
<<
std
::
endl
<<
" E are floating values"
<<
std
::
endl
...
...
@@ -201,7 +206,11 @@ syntax(char* prog)
<<
" N are positive integers"
<<
std
::
endl
<<
" PROPS are the atomic properties to use on transitions"
<<
std
::
endl
<<
"Use -dp to see the list of KEYs."
<<
std
::
endl
;
<<
"Use -dp to see the list of KEYs."
<<
std
::
endl
<<
std
::
endl
<<
"When -F or -i is used, a random graph a synchronized with"
<<
" each formula."
<<
std
::
endl
<<
"If -e N is additionally used"
<<
" N random graphs are generated for each formula."
<<
std
::
endl
;
exit
(
2
);
}
...
...
@@ -1117,7 +1126,7 @@ main(int argc, char** argv)
if
(
strcmp
(
opt_i
,
"-"
))
{
formula_file
=
new
std
::
ifstream
(
opt_i
);
if
(
!
(
*
formula_file
)
)
if
(
!*
formula_file
)
{
delete
formula_file
;
std
::
cerr
<<
"Failed to open "
<<
opt_i
<<
std
::
endl
;
...
...
@@ -1268,18 +1277,23 @@ main(int argc, char** argv)
if
(
formula_file
->
good
())
{
std
::
string
input
;
std
::
getline
(
*
formula_file
,
input
,
'\n'
);
if
(
std
::
getline
(
*
formula_file
,
input
,
'\n'
).
fail
())
break
;
else
if
(
input
==
""
)
break
;
spot
::
ltl
::
parse_error_list
pel
;
spot
::
ltl
::
formula
*
f
=
spot
::
ltl
::
parse
(
input
,
pel
,
env
);
if
(
spot
::
ltl
::
format_parse_errors
(
std
::
cerr
,
input
,
pel
))
{
exit_code
=
1
;
break
;
}
formula
=
spot
::
ltl_to_tgba_fm
(
f
,
dict
,
true
);
spot
::
ltl
::
atomic_prop_set
*
tmp
=
spot
::
ltl
::
atomic_prop_collect
(
f
);
for
(
spot
::
ltl
::
atomic_prop_set
::
iterator
i
=
tmp
->
begin
();
i
!=
tmp
->
end
();
++
i
)
apf
->
insert
(
dynamic_cast
<
spot
::
ltl
::
atomic_prop
*>
((
*
i
)
->
ref
()));
apf
->
insert
(
dynamic_cast
<
spot
::
ltl
::
atomic_prop
*>
((
*
i
)
->
ref
()));
spot
::
ltl
::
destroy
(
f
);
delete
tmp
;
}
...
...
@@ -1442,10 +1456,12 @@ main(int argc, char** argv)
spot
::
tgba_run
*
redrun
=
spot
::
reduce_run
(
res
->
automaton
(),
run
);
if
(
!
spot
::
replay_tgba_run
(
s
,
res
->
automaton
(),
redrun
))
res
->
automaton
(),
redrun
))
{
if
(
!
opt_paper
)
std
::
cout
<<
", but could not replay "
std
::
cout
<<
", but could not replay "
<<
"its minimization (ERROR!)"
;
failed_seeds
.
insert
(
opt_ec_seed
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment