r1 qualified Selected asymmetric formal reference: 2,502 contracts across nine families; bounded evidence and three separate teaching models Read the evidence scope

InspectionProceduresMC

Complete selected asymmetric reference profile. Definitions and supplied fixtures are distinct from the three teaching specializations; review and qualification are stated in the bound evidence and release.

Package reference-profile, input revision 2. Exact prepared source; CC0 1.0.

This is a definition inventory. Start with the learning chapters for the contract and its assumptions.

This model/fact module also contains 26 local fixture helpers outside the selected contract inventory. Their complete executable text remains in the exact module download and owning definition bodies. Listed dependencies include paths through those helpers. All selected contracts and frozen nested helpers retain their own entries.

AdvanceInspectionT7 · operator

reference-profile · input revision 2 · CC0 1.0

AdvanceInspectionT7 ==
 /\ q7.stage = "InspectionAdvance"
 /\ LET after == [q7.b EXCEPT !.step = NextInspectionStep7(@)]
    IN /\ IF q7.b.step = "ProcedureCode1404a82ab3ee" THEN AdvanceInspectionSelection7(q7.b,after,TRUE)
          ELSE AdvanceInspectionStep7(q7.b,after,TRUE,TRUE)
       /\ q7' = [q7 EXCEPT !.b = after,!.stage = "InspectionWork"]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: AdvanceInspectionSelection7, AdvanceInspectionStep7, NextInspectionStep7, q7

AdvanceItemInspectionT7 · operator

reference-profile · input revision 2 · CC0 1.0

AdvanceItemInspectionT7 ==
 /\ q7.stage = "ItemInspectionAdvance"
 /\ LET after == [q7.a EXCEPT !.step = NextItemInspectionStep7(@)]
    IN /\ AdvanceItemInspectionStep7(q7.a,after,q7.objects,TRUE,TRUE)
       /\ q7' = [q7 EXCEPT !.a = after,!.stage = "ItemInspectionWork"]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: AdvanceItemInspectionStep7, NextItemInspectionStep7, q7

CardT7 · operator

reference-profile · input revision 2 · CC0 1.0

CardT7(zone,targetSite,area) ==
 [form |-> "Card",side |-> "SideA",zone |-> zone,loc |-> <<zone,targetSite,area>>,
  kind |-> IF area = "Root" THEN "Attachment" ELSE "Facility",deployed |-> zone = "Play",
  face |-> "Down",targetSite |-> targetSite,area |-> area,host |-> 0]

Exact module download · Source bundle and reproduction instructions

DoneT7 · operator

reference-profile · input revision 2 · CC0 1.0

DoneT7 == q7.b.returned

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: q7

DrainInspectionEndT7 · operator

reference-profile · input revision 2 · CC0 1.0

DrainInspectionEndT7 ==
 /\ q7.stage = "InspectionEndCheckpoint"
 /\ q7' = [q7 EXCEPT !.stage = "InspectionReturn",!.checkpointDrains = @+1,!.endDrained = TRUE]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: q7

DrainInspectionT7 · operator

reference-profile · input revision 2 · CC0 1.0

DrainInspectionT7 ==
 /\ q7.stage = "InspectionCheckpoint"
 /\ q7' = [q7 EXCEPT !.stage = "InspectionAdvance",!.checkpointDrains = @+1]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: q7

DrainItemInspectionEndT7 · operator

reference-profile · input revision 2 · CC0 1.0

DrainItemInspectionEndT7 ==
 /\ q7.stage = "ItemInspectionEndCheckpoint"
 /\ q7' = [q7 EXCEPT !.stage = "ItemInspectionReturn",!.checkpointDrains = @+1]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: q7

DrainItemInspectionT7 · operator

reference-profile · input revision 2 · CC0 1.0

DrainItemInspectionT7 ==
 /\ q7.stage = "ItemInspectionCheckpoint"
 /\ q7' = [q7 EXCEPT !.stage = "ItemInspectionAdvance",!.checkpointDrains = @+1]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: q7

EmptyMapT7 · operator

reference-profile · input revision 2 · CC0 1.0

EmptyMapT7 == [i \in {} |-> i]

Exact module download · Source bundle and reproduction instructions

EventuallyReturns7 · operator

reference-profile · input revision 2 · CC0 1.0

EventuallyReturns7 == <>DoneT7

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: DoneT7

ExpectedChoicesT7 · operator

reference-profile · input revision 2 · CC0 1.0

ExpectedChoicesT7(plan) ==
 LET total == plan.n + (IF plan.root THEN 1 ELSE 0)
     central == IF plan.targetSite = "SchemaAtom018" THEN plan.n ELSE IF plan.n = 0 THEN 0 ELSE 1
     cap == IF plan.mode = "Cap1" THEN 1 ELSE 2
 IN IF plan.mode = "Normal" THEN central + (IF plan.root THEN 1 ELSE 0)
    ELSE IF total < cap THEN total ELSE cap

Exact module download · Source bundle and reproduction instructions

FinishInstructionT7 · operator

reference-profile · input revision 2 · CC0 1.0

FinishInstructionT7 ==
 /\ q7.stage = "FinishInstruction" /\ q7.a.returned
 /\ LET after == [q7.b EXCEPT !.selectionPending = FALSE,!.selectedObject = 0,!.selectedSource = "NoValue",!.currentItemInspectionId = 0]
    IN /\ FinishInspectionItemInspectionInstruction7(q7.b,after,TRUE)
       /\ q7' = [q7 EXCEPT !.b = after,!.stage = "InspectionCheckpoint",!.finishedChoices = @+1]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: FinishInspectionItemInspectionInstruction7, q7

InitInspectiones7 · operator

reference-profile · input revision 2 · CC0 1.0

InitInspectiones7 ==
 \E targetSite \in {"SchemaAtom082","SchemaAtom129","SchemaAtom018","auxiliarySite1"}:
 \E n \in (IF targetSite = "auxiliarySite1" THEN {0} ELSE 0..2),root \in BOOLEAN:
 \E mode \in {"Normal","Cap1","Cap2"}:
 \E perform \in SUBSET ((1..n) \cup (IF root THEN {3} ELSE {})):
  LET b == OpenInspection7(2,targetSite,InspectionTargetSiteCategory7(targetSite),1,"RulesTraversalInspection","traversal1",{},PolicyT7(mode))
      objects == ObjectsT7(targetSite,n,root)
  IN q7 = [b |-> b,capacity |-> OpenCandidateCapacity7(b,objects),objects |-> objects,
     deck |-> IF targetSite = "SchemaAtom129" THEN [i \in 1..n |-> i] ELSE <<>>,
     plan |-> [targetSite |-> targetSite,n |-> n,root |-> root,mode |-> mode,perform |-> perform],
     history |-> EmptyMapT7,a |-> OpenItemInspection7(1,1,CardT7("SideAHand","NoValue","NoValue"),1,2,InspectionItemInspectionCaller7(b),{}),
     stage |-> "InspectionWork",beginEvents |-> 0,endEvents |-> 0,itemInspectionEndEvents |-> 0,
     finishedChoices |-> 0,checkpointDrains |-> 0,endDrained |-> FALSE]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: InspectionItemInspectionCaller7, InspectionTargetSiteCategory7, OpenCandidateCapacity7, OpenInspection7, OpenItemInspection7, CardT7, EmptyMapT7, ObjectsT7, PolicyT7, q7

InspectionesInvariant7 · operator

reference-profile · input revision 2 · CC0 1.0

InspectionesInvariant7 ==
 /\ InspectionProcedureValid7(q7.b) /\ CandidateInputsValid7(q7.b,q7.capacity,q7.objects,q7.deck)
 /\ ItemInspectionProcedureValid7(q7.a,q7.objects)
 /\ q7.beginEvents = IF q7.b.beginMet THEN 1 ELSE 0
 /\ q7.endEvents = IF q7.b.complete THEN 1 ELSE 0
 /\ q7.b.usedItemInspectionIds = DOMAIN q7.history
 /\ \A id \in DOMAIN q7.history :
      id \in 1..Len(q7.b.choices) /\ q7.history[id].object = q7.b.choices[id].object /\ q7.history[id].object \in q7.plan.perform
 /\ RandomLimitApplies7(q7.b) => InspectionCentralChoices7(q7.b) <= q7.b.randomLimit
 /\ q7.b.policy.chosenCapEnabled => Len(q7.b.choices) <= q7.b.policy.chosenCap
 /\ q7.finishedChoices <= Len(q7.b.choices)
 /\ q7.b.returned => q7.endDrained /\ q7.finishedChoices = Len(q7.b.choices)
 /\ q7.b.returned => Len(q7.b.choices) = ExpectedChoicesT7(q7.plan)
 /\ q7.b.returned => q7.itemInspectionEndEvents = Cardinality(DOMAIN q7.history)
 /\ q7.b.returned => DOMAIN q7.history = {i \in 1..Len(q7.b.choices) : q7.b.choices[i].object \in q7.plan.perform}
 /\ q7.b.archivesPrepared => \A id \in SideAZoneCards7(q7.objects,"SideADiscard") : q7.objects[id].face = "Up"
 /\ \A id \in DOMAIN q7.objects :
       InspectionObjectVisible7(q7.b,q7.history,q7.objects,id) = (q7.b.active /\ id \in InspectionSeenObjects7(q7.b,q7.history))

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: CandidateInputsValid7, InspectionCentralChoices7, InspectionObjectVisible7, InspectionProcedureValid7, InspectionSeenObjects7, ItemInspectionProcedureValid7, RandomLimitApplies7, SideAZoneCards7, ExpectedChoicesT7, q7

NextInspectiones7 · operator

reference-profile · input revision 2 · CC0 1.0

NextInspectiones7 == WorkInspectionT7 \/ DrainInspectionT7 \/ AdvanceInspectionT7 \/ WorkItemInspectionT7 \/ DrainItemInspectionT7 \/
 AdvanceItemInspectionT7 \/ DrainItemInspectionEndT7 \/ ReturnItemInspectionT7 \/ FinishInstructionT7 \/ DrainInspectionEndT7 \/ ReturnInspectionT7 \/
 (DoneT7 /\ UNCHANGED q7)

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: AdvanceInspectionT7, AdvanceItemInspectionT7, DoneT7, DrainInspectionEndT7, DrainInspectionT7, DrainItemInspectionEndT7, DrainItemInspectionT7, FinishInstructionT7, ReturnInspectionT7, ReturnItemInspectionT7, WorkInspectionT7, WorkItemInspectionT7, q7

ObjectsT7 · operator

reference-profile · input revision 2 · CC0 1.0

ObjectsT7(targetSite,n,root) ==
 [id \in (1..n) \cup (IF root THEN {3} ELSE {}) |->
   IF id = 3 THEN CardT7("Play",targetSite,"Root")
   ELSE CardT7(CentralTargetSiteZone4(targetSite),"NoValue","NoValue")]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: CardT7, CentralTargetSiteZone4

PolicyT7 · operator

reference-profile · input revision 2 · CC0 1.0

PolicyT7(mode) ==
 IF mode = "Normal" THEN InspectionPolicy7("Normal",0)
 ELSE InspectionPolicy7("CounterExampleFamily064",IF mode = "Cap1" THEN 1 ELSE 2)

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: InspectionPolicy7

ReturnInspectionT7 · operator

reference-profile · input revision 2 · CC0 1.0

ReturnInspectionT7 ==
 /\ q7.stage = "InspectionReturn" /\ q7.endDrained
 /\ ReturnInspectionToCaller7(q7.b,[q7.b EXCEPT !.returned = TRUE],TRUE,"traversal1")
 /\ q7' = [q7 EXCEPT !.b.returned = TRUE,!.stage = "Done"]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: ReturnInspectionToCaller7, q7

ReturnItemInspectionT7 · operator

reference-profile · input revision 2 · CC0 1.0

ReturnItemInspectionT7 ==
 /\ q7.stage = "ItemInspectionReturn"
 /\ ReturnItemInspectionToCaller7(q7.a,[q7.a EXCEPT !.returned = TRUE],TRUE,InspectionItemInspectionCaller7(q7.b))
 /\ q7' = [q7 EXCEPT !.a.returned = TRUE,!.stage = "FinishInstruction"]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: InspectionItemInspectionCaller7, ReturnItemInspectionToCaller7, q7

SpecInspectiones7 · operator

reference-profile · input revision 2 · CC0 1.0

SpecInspectiones7 == InitInspectiones7 /\ [][NextInspectiones7]_q7 /\ WF_q7(NextInspectiones7)

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: InitInspectiones7, NextInspectiones7, q7

ViewT7 · operator

reference-profile · input revision 2 · CC0 1.0

ViewT7 == InspectionCandidates7(q7.b,q7.capacity,q7.objects,q7.deck,{})

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: InspectionCandidates7, q7

WorkInspectionT7 · operator

reference-profile · input revision 2 · CC0 1.0

WorkInspectionT7 ==
 /\ q7.stage = "InspectionWork" /\ ~q7.b.complete
 /\ LET b == q7.b
    IN CASE b.step = "ProcedureCode839b301bad95" ->
        LET after == [b EXCEPT !.active = TRUE,!.beginMet = TRUE]
        IN /\ BeginInspectionWithCandidates7(b,after,q7.capacity,q7.objects,0,{b.targetSite},TRUE,TRUE,{InspectionBeginEvent7(b)})
           /\ q7' = [q7 EXCEPT !.b = after,!.stage = "InspectionCheckpoint",!.beginEvents = @+1]
      [] b.step = "ProcedureCodeb6067693902e" ->
        LET after == IF b.kind = "SchemaAtom018" THEN [b EXCEPT !.archivesPrepared = TRUE] ELSE b
            objects == IF b.kind = "SchemaAtom018" THEN
              [id \in DOMAIN q7.objects |-> IF q7.objects[id].zone = "SideADiscard"
               THEN [q7.objects[id] EXCEPT !.face = "Up"] ELSE q7.objects[id]] ELSE q7.objects
        IN /\ IF b.kind = "SchemaAtom018" THEN PrepareDiscardSite7(b,after,q7.objects,objects) ELSE TRUE
           /\ q7' = [q7 EXCEPT !.b = after,!.objects = objects,!.stage = "InspectionCheckpoint"]
      [] b.step = "ProcedureCode91f3ee0da236" ->
        LET after == IF RandomLimitApplies7(b) THEN [b EXCEPT !.limitSet = TRUE] ELSE b
        IN /\ IF RandomLimitApplies7(b) THEN FreezeInspectionLimit7(b,after,TRUE) ELSE TRUE
           /\ q7' = [q7 EXCEPT !.b = after,!.stage = "InspectionCheckpoint"]
      [] b.step = "ProcedureCode1404a82ab3ee" ->
        IF InspectionPolicyComplete7(b.policy,Len(b.choices),ViewT7.roots \cup ViewT7.central = {}) THEN
          LET after == [b EXCEPT !.step = "ProcedureCode8c612115d469"]
          IN /\ SkipInspectionSelection7(b,after,q7.capacity,q7.objects,q7.deck,{},FALSE,TRUE)
             /\ q7' = [q7 EXCEPT !.b = after]
        ELSE \E object \in ViewT7.roots \cup ViewT7.central:
          LET source == IF object \in ViewT7.roots THEN "Root" ELSE "SchemaAtom033"
              after == [b EXCEPT !.choices = Append(@,[object |-> object,source |-> source,chooser |-> "SideB"]),
                   !.selectionPending = TRUE,!.selectedObject = object,!.selectedSource = source]
          IN /\ DeriveCandidateView7(b,q7.capacity,q7.objects,q7.deck,{},FALSE,ViewT7)
             /\ IF b.kind = "SchemaAtom082" /\ source = "SchemaAtom033" THEN ChooseCentralAInspectionCard7(b,after,ViewT7,object,0,FALSE,TRUE)
                ELSE ChooseSpecificInspectionCard7(b,after,object,ViewT7)
             /\ q7' = [q7 EXCEPT !.b = after,!.stage = "InspectionCheckpoint"]
      [] b.step = "ProcedureCodee35e7c8fc57b" ->
        LET planned == OpenItemInspection7(Len(b.choices),b.selectedObject,q7.objects[b.selectedObject],1,2,InspectionItemInspectionCaller7(b),{})
        IN IF b.selectedObject \in q7.plan.perform THEN
          LET a == [planned EXCEPT !.active = TRUE,!.beginMet = TRUE]
              attached == [b EXCEPT !.currentItemInspectionId = a.id,!.usedItemInspectionIds = @ \cup {a.id}]
              history == [id \in DOMAIN q7.history \cup {a.id} |-> IF id = a.id
                 THEN [object |-> a.object,traversalId |-> 1,siteInspectionId |-> 2,turnId |-> 1,hadRetireCost |-> TRUE] ELSE q7.history[id]]
          IN /\ BeginItemInspection7(planned,a,q7.objects,TRUE,TRUE,TRUE,{ItemInspectionBeginEvent7(a)})
             /\ RecordActualItemInspection7(q7.history,history,a,1,TRUE,ItemInspectionBeginEvent7(a))
             /\ AttachChosenItemInspection7(b,attached,a,ItemInspectionBeginEvent7(a))
             /\ q7' = [q7 EXCEPT !.a = a,!.b = attached,!.history = history,!.stage = "ItemInspectionCheckpoint"]
        ELSE LET cancelled == [planned EXCEPT !.complete = TRUE,!.step = "Complete",!.completionReason = "Replaced"]
             IN /\ CancelUnstartedItemInspection7(planned,cancelled,"Replaced",TRUE,{})
                /\ q7' = [q7 EXCEPT !.a = cancelled,!.stage = "ItemInspectionEndCheckpoint"]
      [] b.step = "ProcedureCodeb1fbc90c4ab0" -> q7' = [q7 EXCEPT !.stage = "InspectionCheckpoint"]
      [] b.step = "ProcedureCode8c612115d469" ->
        LET after == [b EXCEPT !.active = FALSE,!.complete = TRUE,!.step = "Complete",!.completionReason = "Normal"]
        IN /\ CompleteNormalInspection7(b,after,TRUE,{InspectionEndEvent7(b)})
           /\ q7' = [q7 EXCEPT !.b = after,!.endEvents = @+1,!.stage = "InspectionEndCheckpoint"]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: AttachChosenItemInspection7, BeginInspectionWithCandidates7, BeginItemInspection7, CancelUnstartedItemInspection7, ChooseCentralAInspectionCard7, ChooseSpecificInspectionCard7, CompleteNormalInspection7, DeriveCandidateView7, FreezeInspectionLimit7, InspectionBeginEvent7, InspectionEndEvent7, InspectionItemInspectionCaller7, InspectionPolicyComplete7, ItemInspectionBeginEvent7, OpenItemInspection7, PrepareDiscardSite7, RandomLimitApplies7, RecordActualItemInspection7, SkipInspectionSelection7, ViewT7, q7

WorkItemInspectionT7 · operator

reference-profile · input revision 2 · CC0 1.0

WorkItemInspectionT7 ==
 /\ q7.stage = "ItemInspectionWork"
 /\ LET a == q7.a
    IN CASE a.step = "ProcedureCode1dd0e8f05be2" ->
        LET after == [a EXCEPT !.midDone = TRUE]
        IN /\ DeclineMidItemInspection7(a,after,q7.objects,{},FALSE,FALSE,TRUE)
           /\ q7' = [q7 EXCEPT !.a = after,!.stage = "ItemInspectionCheckpoint"]
      [] a.step = "ProcedureCode546db7cc4546" ->
        LET after == [a EXCEPT !.claimObjectiveDone = TRUE]
        IN /\ ResolveItemInspectionClaimObjective7(a,after,q7.objects,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE)
           /\ q7' = [q7 EXCEPT !.a = after,!.stage = "ItemInspectionCheckpoint"]
      [] a.step = "ProcedureCode662478499367" ->
        LET after == [a EXCEPT !.active = FALSE,!.complete = TRUE,!.step = "Complete",!.completionReason = "Normal"]
        IN /\ CompleteNormalItemInspection7(a,after,q7.objects,TRUE,{ItemInspectionEndEvent7(a)})
           /\ q7' = [q7 EXCEPT !.a = after,!.stage = "ItemInspectionEndCheckpoint",!.itemInspectionEndEvents = @+1]

Exact module download · Source bundle and reproduction instructions

Resolved project definitions: CompleteNormalItemInspection7, DeclineMidItemInspection7, ItemInspectionEndEvent7, ResolveItemInspectionClaimObjective7, q7

q7 · variable

reference-profile · input revision 2 · CC0 1.0

q7

Exact module download · Source bundle and reproduction instructions