Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions specs/GraphProcessing.tla
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,15 @@ FinalizeTasks(T) ==
IF t \in T THEN TASK_FINALIZED ELSE taskState[t]]
/\ UNCHANGED << agentTaskAlloc, deps, objectState, objectTargets >>

(**
* TERMINAL STATE
* Action representing the terminal state of the system, reached once all
* targeted objects have been finalized.
*)
Terminating ==
/\ OP!Terminating
/\ UNCHANGED << agentTaskAlloc, deps, taskState >>

-------------------------------------------------------------------------------

(*****************************************************************************)
Expand All @@ -283,6 +292,7 @@ Next ==
\/ ReleaseTasks(a, T)
\/ ProcessTasks(a, T)
\/ FinalizeTasks(T)
\/ Terminating

(**
* Returns TRUE iff task 't' is upstream on an open (i.e., fully unexecuted)
Expand Down
4 changes: 2 additions & 2 deletions specs/GraphProcessing_mc.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ CONSTANTS
ObjectId = {o, p, q}

\* Task identifiers (model values)
TaskId = {t, u, v}
TaskId = {t, u}

\* Override the Graphs operator with ACGraphs operator
Graphs <- MCGraphs

SPECIFICATION
MCSpec
Spec

INVARIANTS
TypeInv
Expand Down
27 changes: 0 additions & 27 deletions specs/GraphProcessing_mc.tla
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,6 @@ MCGraphs(Nodes) ==

--------------------------------------------------------------------------------

(**
* Dummy action representing the terminal state of the system, reached once all
* targeted objects have been finalized.
*)
Terminating ==
/\ objectTargets \subseteq FinalizedObject
/\ UNCHANGED vars

(**
* Modified next-state action. Extends the original system behavior with the
* Terminating action to avoid artificial deadlocks due to the bounded task
* and object sets.
*)
MCNext ==
\/ Next
\/ Terminating

(**
* Modified full system specification.
*)
MCSpec ==
/\ Init
/\ [][MCNext]_vars
/\ Fairness

--------------------------------------------------------------------------------

(**
* Symmetry relation between task, object and agent identifiers.
*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CONSTANTS
ObjectId = {o, p, q}

SPECIFICATION
MCSpec
Spec

INVARIANTS
TypeInv
Expand Down
12 changes: 11 additions & 1 deletion specs/ObjectProcessing.tla
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ FinalizeObjects(O) ==
[o \in ObjectId |-> IF o \in O THEN OBJECT_FINALIZED ELSE objectState[o]]
/\ UNCHANGED objectTargets

(**
* TERMINAL STATE
* Action representing the terminal state of the system, reached once all
* targeted objects have been finalized.
*)
Terminating ==
/\ objectTargets \subseteq FinalizedObject
/\ UNCHANGED vars

-------------------------------------------------------------------------------

(*****************************************************************************)
Expand All @@ -105,11 +114,12 @@ FinalizeObjects(O) ==
* Defines all possible atomic transitions of the system.
*)
Next ==
\E O \in SUBSET ObjectId:
\/ \E O \in SUBSET ObjectId:
\/ RegisterObjects(O)
\/ TargetObjects(O)
\/ UntargetObjects(O)
\/ FinalizeObjects(O)
\/ Terminating

(**
* FAIRNESS CONDITIONS
Expand Down
46 changes: 0 additions & 46 deletions specs/ObjectProcessing_mc.tla

This file was deleted.

2 changes: 1 addition & 1 deletion specs/TaskProcessing_mc.cfg → specs/TaskProcessing.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CONSTANTS
TaskId = {t, u, v}

SPECIFICATION
MCSpec
Spec

INVARIANTS
TypeInv
Expand Down
13 changes: 12 additions & 1 deletion specs/TaskProcessing.tla
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ FinalizeTasks(T) ==
[t \in TaskId |-> IF t \in T THEN TASK_FINALIZED ELSE taskState[t]]
/\ UNCHANGED agentTaskAlloc

(**
* TERMINAL STATE
* Action representing the terminal state of the system, reached when
* there are no more tasks being processed (i.e., assigned to an agent or not
* yet finalized).
*)
Terminating ==
/\ TaskId = UnknownTask \union StagedTask \union FinalizedTask
/\ UNCHANGED vars

-------------------------------------------------------------------------------

(*****************************************************************************)
Expand All @@ -123,13 +133,14 @@ FinalizeTasks(T) ==
* Defines all possible atomic transitions of the system.
*)
Next ==
\E T \in SUBSET TaskId:
\/ \E T \in SUBSET TaskId:
\/ StageTasks(T)
\/ \E a \in AgentId:
\/ AssignTasks(a, T)
\/ ReleaseTasks(a, T)
\/ ProcessTasks(a, T)
\/ FinalizeTasks(T)
\/ Terminating

(**
* FAIRNESS CONDITIONS
Expand Down
47 changes: 0 additions & 47 deletions specs/TaskProcessing_mc.tla

This file was deleted.