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
ce65cda4
Commit
ce65cda4
authored
Mar 11, 2019
by
Christian Müller
Browse files
example
parent
ade38ae1
Changes
3
Hide whitespace changes
Inline
Side-by-side
examples/tests/leaderelection_withB.spec
View file @
ce65cda4
Workflow
forall a,b,i
(Inext(a,b) ∧ B(
i,
a,b)) -> msg += (i,b)
(Inext(a,b) ∧ B(a,b
,i
)) -> msg += (i,b)
loop {
forall a
msg(a,a) -> leader += (a)
...
...
src/main/scala/de/tum/workflows/Preconditions.scala
View file @
ce65cda4
...
...
@@ -100,7 +100,7 @@ object Preconditions extends LazyLogging {
val
(
repname
,
(
vars
,
form
))
=
update
val
fixupdate
=
FormulaFunctions
.
fixBinding
(
form
,
boundvars
--
vars
)
f
everywhere
{
val
res
=
f
everywhere
{
case
Fun
(
name
,
ind
,
params
)
if
name
==
repname
=>
{
val
renamed
=
fixupdate
.
parallelRename
(
vars
,
params
)
...
...
@@ -112,6 +112,7 @@ object Preconditions extends LazyLogging {
}
}
}
res
})
}
...
...
src/test/scala/de/tum/workflows/tests/papertests/LeaderElectionTest.scala
View file @
ce65cda4
...
...
@@ -90,6 +90,13 @@ class LeaderElectionTest extends FlatSpec {
val
inv
=
And
.
make
(
inductive_inv
)
val
emptyinv
=
inv
.
assumeEmpty
(
List
(
"msg"
,
"leader"
))
val
impl
=
Z3BSFO
.
debugmodelBS
(
knowledge
land
emptyinv
)
// println(impl)
// knowledge /\ !emptyinv is unsat
// knowledge /\ emptyinv is sat
// !emptyinv is unsat
assert
(
check
(
name
,
inv
,
knowledge
,
properties
))
}
...
...
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