Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christian Müller
NIWO
Commits
cb231255
Commit
cb231255
authored
Oct 17, 2017
by
Christian Müller
Browse files
example
parent
305343f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/tests/simpleNoChoice2.spec
0 → 100644
View file @
cb231255
Workflow
forall x,s
P(s) -> Q += (x,s)
forall x,s
Q(s) -> R += (x,s)
Target
R(x,s)
src/test/scala/de/tum/workflows/ltl/tests/InvariantFilesTest.scala
0 → 100644
View file @
cb231255
package
de.tum.workflows.ltl.tests
import
org.scalatest.FlatSpec
import
org.scalatest.Matchers._
import
org.scalatest.Inspectors._
import
de.tum.workflows.foltl.FOLTL._
import
de.tum.workflows.Implicits._
import
de.tum.workflows.blocks._
import
de.tum.workflows.Preconditions
import
de.tum.workflows.foltl.FormulaFunctions
import
de.tum.workflows.ExampleWorkflows
import
de.tum.workflows.toz3.InvariantChecker
class
InvariantFilesTest
extends
FlatSpec
{
"InvariantChecker"
should
"prove simple things safe"
in
{
val
spec
=
ExampleWorkflows
.
parseExample
(
"tests/simpleNoChoice2"
).
get
val
inv
=
Forall
(
List
(
"x"
,
"s"
),
genEq
(
"R"
,
List
(
"x"
,
"s"
)))
val
(
safe
,
msg
)
=
InvariantChecker
.
checkInvariantFP
(
spec
.
w
,
inv
,
true
)
println
(
msg
.
toString
())
safe
should
be
(
true
)
}
def
genEq
(
name
:
String
,
params
:
List
[
Var
])
=
{
val
o1
=
Fun
(
name
,
Some
(
"t1"
),
params
)
val
o2
=
Fun
(
name
,
Some
(
"t2"
),
params
)
Eq
(
o1
,
o2
)
}
}
\ No newline at end of file
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