Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jaime Arias
helena
Commits
f3fee06b
Commit
f3fee06b
authored
Jul 02, 2021
by
Sami Evangelista
Browse files
benchmark script to geneerate state space graphs
parent
1f947e79
Changes
1
Hide whitespace changes
Inline
Side-by-side
benchs/scripts/stub/gen-graph
0 → 100755
View file @
f3fee06b
#!/bin/bash
TIMEOUT
=
600
OUT_DIR
=
out/stub/graphs
BASE_CMD
=
"helena -t=27 --action=POR-GRAPH --time-limit=
$TIMEOUT
"
mkdir
$OUT_DIR
&> /dev/null
cat
scripts/stub/instances |
grep
-v
^# |
while
IFS
=
';'
read
model instance
do
out_dir
=
$OUT_DIR
/
$model
/
$instance
mkdir
-p
$out_dir
&> /dev/null
done_file
=
$out_dir
/done
[
-e
$done_file
]
&&
continue
pnml
=
in
/pnml/
$model
/
$instance
.pnml
tmp_dir
=
$(
mktemp
-d
)
# generate the graph
cmd
=
$BASE_CMD
" --model-directory=
$tmp_dir
$pnml
"
echo
$cmd
rows
=
$(
$cmd
|
wc
-l
)
echo
$rows
" sec."
# generate por relations
if
[
$rows
-lt
$TIMEOUT
]
then
graph_file
=
$out_dir
/graph.dat
por_file
=
$out_dir
/por.dat
graph_file
=
$tmp_dir
/por-graph.dat
cmd
=
"helena-analyse-por-graph
$graph_file
$por_file
"
echo
$cmd
eval
$cmd
fi
touch
$done_file
rm
-rf
$tmp_dir
done
exit
0
Write
Preview
Markdown
is supported
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