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
Christian Müller
NIWO
Commits
3c6a3ab1
Commit
3c6a3ab1
authored
May 16, 2017
by
Christian Müller
Browse files
rename examples, add metrics file per case
parent
86f84f77
Changes
22
Hide whitespace changes
Inline
Side-by-side
examples/
easychair3
.spec
→
examples/
conference-acceptance
.spec
View file @
3c6a3ab1
File moved
examples/
easychair
.spec
→
examples/
conference
.spec
View file @
3c6a3ab1
File moved
examples/
easychair
_linear.spec
→
examples/
conference
_linear.spec
View file @
3c6a3ab1
File moved
examples/
linear
10.spec
→
examples/
fixedarity
10.spec
View file @
3c6a3ab1
File moved
examples/
linear
10safe.spec
→
examples/
fixedarity
10safe.spec
View file @
3c6a3ab1
File moved
examples/
linear
15.spec
→
examples/
fixedarity
15.spec
View file @
3c6a3ab1
File moved
examples/
linear
15safe.spec
→
examples/
fixedarity
15safe.spec
View file @
3c6a3ab1
File moved
examples/
linear
20.spec
→
examples/
fixedarity
20.spec
View file @
3c6a3ab1
File moved
examples/
linear
20safe.spec
→
examples/
fixedarity
20safe.spec
View file @
3c6a3ab1
File moved
examples/
tree
2.spec
→
examples/
incarity
2.spec
View file @
3c6a3ab1
File moved
examples/
tree
3.spec
→
examples/
incarity
3.spec
View file @
3c6a3ab1
File moved
examples/
tree
4.spec
→
examples/
incarity
4.spec
View file @
3c6a3ab1
File moved
examples/
tree
5.spec
→
examples/
incarity
5.spec
View file @
3c6a3ab1
File moved
examples/typed
tree
2.spec
→
examples/typed
incarity
2.spec
View file @
3c6a3ab1
File moved
examples/typed
tree
3.spec
→
examples/typed
incarity
3.spec
View file @
3c6a3ab1
File moved
examples/typed
tree
4.spec
→
examples/typed
incarity
4.spec
View file @
3c6a3ab1
File moved
examples/typed
tree
5.spec
→
examples/typed
incarity
5.spec
View file @
3c6a3ab1
File moved
longmeasure.sh
View file @
3c6a3ab1
# /bin/bash
RESULT
=
results/measure.txt
TIMEOUT
=
15m
touch
${
RESULT
}
echo
"Measurement
$(
date
)
"
>>
${
RESULT
}
echo
""
>>
${
RESULT
}
TIMEOUT
=
20m
for
FILE
in
results/
*
.ltl
do
NAME
=
$(
basename
${
FILE
}
.ltl
)
METRICS
=
"results/
${
NAME
}
.metrics"
echo
"Measuring
${
FILE
}
"
echo
"
${
FILE
}
:"
>>
${
RESULT
}
echo
" FOLTL length:
$(
wc
-m
< results/
${
NAME
}
.foltl
)
"
>>
${
RESULT
}
echo
" LTL length:
$(
wc
-m
<
${
FILE
}
)
"
>>
${
RESULT
}
echo
"Metrics File:
${
METRICS
}
"
echo
""
>>
${
METRICS
}
echo
"Measuring on
$(
date
)
:"
>>
${
METRICS
}
# echo " FOLTL length: $(wc -m < results/${NAME}.foltl)" >> ${RESULT}
# echo " LTL length: $(wc -m < ${FILE})" >> ${RESULT}
if
timeout
${
TIMEOUT
}
time
-p
aalta/Aalta_v2.0/aalta <
${
FILE
}
>>
${
RESULT
}
2>&1
timeout
${
TIMEOUT
}
time
-p
aalta/Aalta_v2.0/aalta <
${
FILE
}
>>
${
METRICS
}
2>&1
then
echo
"Finished successfully"
echo
"
Finished successfully"
>>
${
RESULT
}
echo
"Finished successfully"
>>
${
METRICS
}
else
echo
"Timeout after
${
TIMEOUT
}
"
echo
"
Timeout after
${
TIMEOUT
}
"
>>
${
RESULT
}
echo
"Timeout after
${
TIMEOUT
}
"
>>
${
METRICS
}
fi
echo
""
>>
${
RESULT
}
done
measure.sh
View file @
3c6a3ab1
# /bin/bash
RESULT
=
results/measure.txt
TIMEOUT
=
10s
touch
${
RESULT
}
echo
"Measurement
$(
date
)
"
>>
${
RESULT
}
echo
""
>>
${
RESULT
}
TIMEOUT
=
1s
for
FILE
in
results/
*
.ltl
do
NAME
=
$(
basename
${
FILE
}
.ltl
)
METRICS
=
"results/
${
NAME
}
.metrics"
echo
"Measuring
${
FILE
}
"
echo
"
${
FILE
}
:"
>>
${
RESULT
}
echo
" FOLTL length:
$(
wc
-m
< results/
${
NAME
}
.foltl
)
"
>>
${
RESULT
}
echo
" LTL length:
$(
wc
-m
<
${
FILE
}
)
"
>>
${
RESULT
}
echo
"Metrics File:
${
METRICS
}
"
echo
""
>>
${
METRICS
}
echo
"Measuring on
$(
date
)
:"
>>
${
METRICS
}
# echo " FOLTL length: $(wc -m < results/${NAME}.foltl)" >> ${RESULT}
# echo " LTL length: $(wc -m < ${FILE})" >> ${RESULT}
if
timeout
${
TIMEOUT
}
time
-p
aalta/Aalta_v2.0/aalta <
${
FILE
}
>>
${
RESULT
}
2>&1
timeout
${
TIMEOUT
}
time
-p
aalta/Aalta_v2.0/aalta <
${
FILE
}
>>
${
METRICS
}
2>&1
then
echo
"Finished successfully"
echo
"
Finished successfully"
>>
${
RESULT
}
echo
"Finished successfully"
>>
${
METRICS
}
else
echo
"Timeout after
${
TIMEOUT
}
"
echo
"
Timeout after
${
TIMEOUT
}
"
>>
${
RESULT
}
echo
"Timeout after
${
TIMEOUT
}
"
>>
${
METRICS
}
fi
echo
""
>>
${
RESULT
}
done
src/main/scala/de/tum/workflows/Main.scala
View file @
3c6a3ab1
...
...
@@ -34,8 +34,11 @@ object Main extends App with LazyLogging {
}
def
writeExample
(
name
:
String
,
prop
:
Term
)
{
var
metrics
=
List
[
String
]()
write
(
s
"${name}.foltl"
,
prop
.
pretty
())
metrics
:+=
s
"${name}.foltl: ${prop.opsize()}"
if
(!
TermFunctions
.
checkSanity
(
prop
))
{
logger
.
error
(
"Property didn't pass sanity check"
)
...
...
@@ -44,7 +47,8 @@ object Main extends App with LazyLogging {
val
(
agents
,
res
)
=
LTL
.
eliminateExistentials
(
prop
)
logger
.
info
(
s
"Using universe ${agents.map(_.withType())}"
)
val
universe
=
agents
.
map
(
_
.
withType
()).
mkString
(
", "
)
logger
.
info
(
s
"Using universe $universe"
)
if
(
agents
.
groupBy
(
_
.
typ
).
exists
(
_
.
_2
.
size
>
MAXAGENTS
))
{
logger
.
error
(
s
"Universe has more than $MAXAGENTS agents for a single type. Aborting."
)
...
...
@@ -53,10 +57,15 @@ object Main extends App with LazyLogging {
val
quantfree
=
LTL
.
eliminateUniversals
(
res
,
agents
)
val
ltlprop
=
LTL
.
eliminatePredicates
(
quantfree
)
metrics
:+=
s
"${name}.ltl: ${ltlprop.opsize()}"
metrics
:+=
s
"Universe: $universe"
write
(
s
"${name}.ltl"
,
ltlprop
.
toString
())
write
(
s
"${name}.ppltl"
,
ltlprop
.
pretty
())
write
(
s
"${name}.metrics"
,
metrics
.
mkString
(
""
,
"\n"
,
"\n"
))
logger
.
info
(
s
"Written all files for $name"
)
}
...
...
@@ -74,6 +83,7 @@ object Main extends App with LazyLogging {
val
cprop
=
Properties
.
noninterCausal
(
spec
)
writeExample
(
s
"$FOLDER/${name}_causal"
,
cprop
)
}
}
// Clear results folder
...
...
Prev
1
2
Next
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