Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lamport-modeling-and-verification
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jloew2
lamport-modeling-and-verification
Commits
79c9bb91
Commit
79c9bb91
authored
7 years ago
by
Justin Loew
Browse files
Options
Downloads
Patches
Plain Diff
Add check for fairness which passes but maybe shouldn't be passing
parent
1920021f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
node-preds.maude
+10
-6
10 additions, 6 deletions
node-preds.maude
test-node-preds.maude
+1
-2
1 addition, 2 deletions
test-node-preds.maude
with
11 additions
and
8 deletions
node-preds.maude
+
10
−
6
View file @
79c9bb91
...
@@ -58,12 +58,16 @@ omod CHECK-NODE-SYSTEM{N :: NZNAT#} is
...
@@ -58,12 +58,16 @@ omod CHECK-NODE-SYSTEM{N :: NZNAT#} is
op isUnfairPair : Oid Oid -> Formula .
op isUnfairPair : Oid Oid -> Formula .
op isUnfairPre : Oid Oid -> Prop .
op isUnfairPre : Oid Oid -> Prop .
eq isUnfair = isUnfairAux(#, #) .
--- TODO: Why does this work? Shouldn't it break if M and N transition to Queued at the same timestamp if N < M?
eq isUnfairAux([0], [0]) = False .
eq isUnfair = isUnfairAux([0], [0]) .
eq isUnfairAux([s(I)], [0]) = isUnfairPair([s(I)], [0]) \/ isUnfairAux([I], [#]) .
ceq isUnfairAux([I], [J]) =
eq isUnfairAux([I], [s(J)]) = isUnfairPair([I], [s(J)]) \/ isUnfairAux([I], [J]) .
isUnfairPair([I], [J]) \/ isUnfairAux([I], [s(J)])
eq isUnfairPair(M, N) =
if I < # /\ J < # .
isUnfairPre(M, N) -> ~ ((~ inCritSec(N)) U inCritSec(M)) [owise] .
ceq isUnfairAux([I], [J]) =
isUnfairAux([s(I)], [0])
if I < # /\ J >= # .
ceq isUnfairAux([I], [J]) = False if I >= # .
eq isUnfairPair(M, N) = isUnfairPre(M, N) /\ (isQueued(M) U inCritSec(N)) .
eq < M : Node | mode : Queued, A >
eq < M : Node | mode : Queued, A >
< N : Node | mode : Idle, B > C
< N : Node | mode : Idle, B > C
|= isUnfairPre(M, N) = true .
|= isUnfairPre(M, N) = true .
...
...
This diff is collapsed.
Click to expand it.
test-node-preds.maude
+
1
−
2
View file @
79c9bb91
...
@@ -19,6 +19,5 @@ red modelCheck(init, <>[]~ hasUnsentMessages) .
...
@@ -19,6 +19,5 @@ red modelCheck(init, <>[]~ hasUnsentMessages) .
--- Expected: true
--- Expected: true
--- Check for fairness.
--- Check for fairness.
red modelCheck(init, (<> isExhausted) -> [] ~ isUnfair) .
red modelCheck(init, [] ~ isUnfair) .
---red modelCheck(init, (isUnfair_Pre(N:Oid, I:Nat, M:Oid, J:Nat) -> <> isUnfair_Post(N:Oid, I:Nat, M:Oid, J:Nat))) .
--- Expected: true
--- Expected: true
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment