You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
markus@avocado:~/Desktop/ewd998$ apalache check EWD998Chan
# Tool home: /home/markus/src/TLA/_community/apalache# Package: /home/markus/src/TLA/_community/apalache/mod-distribution/target/apalache-pkg-0.8.2-SNAPSHOT-full.jar# JVM args: -Xmx4096m -DTLA-Library=/home/markus/src/TLA/_community/apalache/src/tla## APALACHE version 0.8.2-SNAPSHOT build v0.7.2-163-gde4505d## WARNING: This tool is in the experimental stage.# Please report bugs at: [https://github.com/informalsystems/apalache/issues]## Usage statistics is ON. Thank you!# If you have changed your mind, disable the statistics with config --enable-stats=false.
Checker options: filename=EWD998Chan, init=, next=, inv= I@11:15:52.937
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/home/markus/src/TLA/_community/apalache/mod-distribution/target/apalache-pkg-0.8.2-SNAPSHOT-full.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
PASS #0: SanyParser I@11:15:53.480
Parsing file /home/markus/Desktop/ewd998/EWD998Chan.tla
Parsing file /tmp/Integers.tla
Parsing file /tmp/Sequences.tla
Parsing file /tmp/FiniteSets.tla
Parsing file /tmp/Naturals.tla
PASS #1: ConfigurationPass I@11:15:54.201> EWD998Chan: Loading TLC configuration I@11:15:54.204
> No TLC configuration found. Skipping. I@11:15:54.215
> Command line option --init is not set. Using Init I@11:15:54.216
> Command line option --next is not set. Using Next I@11:15:54.216
> Set the initialization predicate to Init I@11:15:54.216
> Set the transition predicate to Next I@11:15:54.217
PASS #2: UnrollPass I@11:15:54.298> Unroller I@11:15:54.376
PASS #3: PrimingPass I@11:15:54.427> Introducing InitPrimed for Init' I@11:15:54.433PASS #4: CoverAnalysisPass I@11:15:54.499PASS #5: InlinePass I@11:15:54.506 > InlinerOfUserOper I@11:15:54.515 > LetInExpander I@11:15:54.568 > InlinerOfUserOper I@11:15:54.583Leaving only relevant operators: CInitPrimed, Init, InitPrimed, Next I@11:15:54.591PASS #6: VCGen I@11:15:54.630 > No invariant given. Only deadlocks will be checked I@11:15:54.631PASS #7: PreprocessingPass I@11:15:54.647 > Before preprocessing: unique renaming I@11:15:54.647 > Applying standard transformations: I@11:15:54.660 > Desugarer I@11:15:54.663(Please report an issue at: [https://github.com/informalsystems/apalache/issues],java.lang.UnsupportedOperationException: empty.reduceLeft)Unhandled exception E@11:15:54.702java.lang.UnsupportedOperationException: empty.reduceLeft at scala.collection.TraversableOnce.reduceLeft(TraversableOnce.scala:212) at scala.collection.TraversableOnce.reduceLeft$(TraversableOnce.scala:210) at scala.collection.mutable.ArrayBuffer.scala$collection$IndexedSeqOptimized$$super$reduceLeft(ArrayBuffer.scala:49) at scala.collection.IndexedSeqOptimized.reduceLeft(IndexedSeqOptimized.scala:77) at scala.collection.IndexedSeqOptimized.reduceLeft$(IndexedSeqOptimized.scala:76) at scala.collection.mutable.ArrayBuffer.reduceLeft(ArrayBuffer.scala:49) at scala.collection.TraversableOnce.reduce(TraversableOnce.scala:242) at scala.collection.TraversableOnce.reduce$(TraversableOnce.scala:242) at scala.collection.AbstractTraversable.reduce(Traversable.scala:108) at at.forsyte.apalache.tla.pp.Desugarer.flattenTuples(Desugarer.scala:86) at at.forsyte.apalache.tla.pp.Desugarer.$anonfun$flattenTuples$1(Desugarer.scala:86) at scala.collection.immutable.List.map(List.scala:293) at at.forsyte.apalache.tla.pp.Desugarer.flattenTuples(Desugarer.scala:86) at at.forsyte.apalache.tla.pp.Desugarer.$anonfun$transform$1(Desugarer.scala:48) at at.forsyte.apalache.tla.lir.transformations.impl.TrackerWithListeners.$anonfun$track$1(TrackerWithListeners.scala:15) at scala.collection.immutable.List.map(List.scala:297) at at.forsyte.apalache.tla.pp.Desugarer.$anonfun$transform$1(Desugarer.scala:78) at at.forsyte.apalache.tla.lir.transformations.impl.TrackerWithListeners.$anonfun$track$1(TrackerWithListeners.scala:15) at at.forsyte.apalache.tla.pp.Desugarer.$anonfun$transform$3(Desugarer.scala:81) at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:285) at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62) at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49) at scala.collection.TraversableLike.map(TraversableLike.scala:285) at scala.collection.TraversableLike.map$(TraversableLike.scala:278) at scala.collection.AbstractTraversable.map(Traversable.scala:108) at at.forsyte.apalache.tla.pp.Desugarer.$anonfun$transform$1(Desugarer.scala:81) at at.forsyte.apalache.tla.lir.transformations.impl.TrackerWithListeners.$anonfun$track$1(TrackerWithListeners.scala:15) at scala.collection.immutable.List.map(List.scala:297) at at.forsyte.apalache.tla.pp.Desugarer.$anonfun$transform$1(Desugarer.scala:78) at at.forsyte.apalache.tla.lir.transformations.impl.TrackerWithListeners.$anonfun$track$1(TrackerWithListeners.scala:15) at scala.collection.immutable.List.map(List.scala:293) at at.forsyte.apalache.tla.pp.Desugarer.$anonfun$transform$1(Desugarer.scala:78) at at.forsyte.apalache.tla.lir.transformations.impl.TrackerWithListeners.$anonfun$track$1(TrackerWithListeners.scala:15) at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:285) at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62) at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49) at scala.collection.TraversableLike.map(TraversableLike.scala:285) at scala.collection.TraversableLike.map$(TraversableLike.scala:278) at scala.collection.AbstractTraversable.map(Traversable.scala:108) at at.forsyte.apalache.tla.pp.Desugarer.$anonfun$transform$1(Desugarer.scala:78) at at.forsyte.apalache.tla.lir.transformations.impl.TrackerWithListeners.$anonfun$track$1(TrackerWithListeners.scala:15) at scala.collection.immutable.List.map(List.scala:297) at at.forsyte.apalache.tla.pp.Desugarer.$anonfun$transform$1(Desugarer.scala:78) at at.forsyte.apalache.tla.lir.transformations.impl.TrackerWithListeners.$anonfun$track$1(TrackerWithListeners.scala:15) at at.forsyte.apalache.tla.pp.Desugarer.apply(Desugarer.scala:26) at at.forsyte.apalache.tla.pp.Desugarer.apply(Desugarer.scala:22) at at.forsyte.apalache.tla.lir.transformations.standard.ModuleByExTransformer.$anonfun$apply$1(ModuleByExTransformer.scala:15) at scala.collection.immutable.List.map(List.scala:297) at at.forsyte.apalache.tla.lir.transformations.standard.ModuleByExTransformer.apply(ModuleByExTransformer.scala:23) at at.forsyte.apalache.tla.lir.transformations.standard.ModuleByExTransformer.apply(ModuleByExTransformer.scala:11) at at.forsyte.apalache.tla.pp.passes.PreproPassImpl.$anonfun$execute$1(PreproPassImpl.scala:66) at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126) at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122) at scala.collection.immutable.List.foldLeft(List.scala:91) at at.forsyte.apalache.tla.pp.passes.PreproPassImpl.execute(PreproPassImpl.scala:63) at at.forsyte.apalache.infra.passes.PassChainExecutor.exec$1(PassChainExecutor.scala:23) at at.forsyte.apalache.infra.passes.PassChainExecutor.run(PassChainExecutor.scala:38) at at.forsyte.apalache.tla.Tool$.runCheck(Tool.scala:172) at at.forsyte.apalache.tla.Tool$.$anonfun$run$2(Tool.scala:94) at at.forsyte.apalache.tla.Tool$.$anonfun$run$2$adapted(Tool.scala:94) at at.forsyte.apalache.tla.Tool$.handleExceptions(Tool.scala:234) at at.forsyte.apalache.tla.Tool$.run(Tool.scala:94) at at.forsyte.apalache.tla.Tool$.main(Tool.scala:46) at at.forsyte.apalache.tla.Tool.main(Tool.scala)It took me 0 days 0 hours 0 min 1 sec I@11:15:54.705Total time: 1.771 sec I@11:15:54.707EXITCODE: ERROR (99)
----------------------------- MODULEEWD998Chan -----------------------------
EXTENDSIntegers,Sequences,FiniteSetsRemoveAt(s,i)==SubSeq(s,1,i-1)\oSubSeq(s,i+1,Len(s))\* CONSTANT N\* ASSUME NAssumption == N \in Nat \ {0} \* At least one node.N==3\* igor: this is the apalache idiom to deal with dynamic rangesrng(a,b)=={i\in0..N:a<=i/\i<=b}sum(a,b)==a+b\* old apalache type annotations, will change soona<:b==a\* a type specification for the recursive function reducedreducedT==[Int->Int]Reduce(op(_,_),fun,from,to,base)==(**************************************************************************) (* Reduce the elements in the range from..to of the function's co-domain. *) (**************************************************************************)LETreduced[i\inrng(from,to)]==IFi=fromTHENop(base,fun[i])ELSEop((reduced<:reducedT)[i-1],fun[i])INreduced[to]Node==0..N-1Color=={"white","black"}VARIABLESactive,color,counter,inboxvars==<<active,color,counter,inbox>>TokenMsg==[type:{"tok"},q:Int,color:Color]BasicMsg==[type:{"pl"}]Message==TokenMsg\cupBasicMsgTypeOK==/\counter\in[Node->Int]/\active\in[Node->BOOLEAN]/\color\in[Node->Color]/\inbox\in[Node->Seq(Message)]\* There is always exactly one token (singleton-type)./\\Ei\inNode:\Ej\in1..Len(inbox[i]):inbox[i][j].type="tok"/\\Ai,j\inNode:\Ak\in1..Len(inbox[i]):\Al\in1..Len(inbox[j]):inbox[i][k].type="tok"/\inbox[j][l].type="tok"=>i=j/\k=l------------------------------------------------------------------------------Init==(* Rule 0 *)/\counter=[i\inNode|->0]\* c properly initialized/\inbox=[i\inNode|->IFi=0THEN<<[type|->"tok",q|->0,color|->"black"]>>ELSE<<>>]\* with empty channels.(* EWD840 *)/\active\in[Node->BOOLEAN]/\color\in[Node->Color]InitiateProbe==(* Rule 1 *)/\\Ej\in1..Len(inbox[0]):\* Token is at node 0./\inbox[0][j].type="tok"/\\* Previous round inconsistent, if:\/inbox[0][j].color="black"\/color[0]="black"\* Implicit stated in EWD998 as c0 + q > 0 means that termination has not \* been achieved: Initiate a probe if the token's color is white but the\* number of in-flight messages is not zero.\/counter[0]+inbox[0][j].q#0/\inbox'=[inboxEXCEPT![N-1] = Append(@,[type|->"tok",q|->0,(* Rule 6 *)color|->"white"]),![0] = RemoveAt(@,j)]\* consume token message from inbox[0]. (* Rule 6 *)/\color'=[colorEXCEPT![0] = "white"]\* The state of the nodes remains unchanged by token-related actions./\UNCHANGED<<active,counter>>PassToken(i)==(* Rule 2 *)/\~active[i]\* If machine i is active, keep the token./\\Ej\in1..Len(inbox[i]):/\inbox[i][j].type="tok"\* the machine nr.i+1 transmits the token to machine nr.i under q := q + c[i+1]/\LETtkn==inbox[i][j]INinbox'=[inboxEXCEPT![i-1] =
Append(@,[tknEXCEPT!.q = tkn.q+counter[i],!.color = IFcolor[i]="black"THEN"black"ELSEtkn.color]),![i] = RemoveAt(@,j)]\* pass on the token.(* Rule 7 *)/\color'=[colorEXCEPT![i] = "white"]\* The state of the nodes remains unchanged by token-related actions./\UNCHANGED<<active,counter>>System==\/InitiateProbe\/\Ei\inNode\{0}:PassToken(i)-----------------------------------------------------------------------------SendMsg(i)==\* Only allowed to send msgs if node i is active./\active[i](* Rule 0 *)/\counter'=[counterEXCEPT![i] = @+1]\* Non-deterministically choose a receiver node./\\Ej\inNode\{i}:\* Send a message (not the token) to j./\inbox'=[inboxEXCEPT![j] = Append(@,[type|->"pl"])]\* Note that we don't blacken node i as in EWD840 if node i\* sends a message to node j with j > i/\UNCHANGED<<active,color>>RecvMsg(i)==(* Rule 0 *)/\counter'=[counterEXCEPT![i] = @-1](* Rule 3 *)/\color'=[colorEXCEPT![i] = "black"]\* Receipt of a message activates i./\active'=[activeEXCEPT![i] = TRUE]\* Consume a message (not the token!)./\\Ej\in1..Len(inbox[i]):/\inbox[i][j].type="pl"/\inbox'=[inboxEXCEPT![i] = RemoveAt(@,j)]/\UNCHANGED<<>>Deactivate(i)==/\active[i]/\active'=[activeEXCEPT![i] = FALSE]/\UNCHANGED<<color,inbox,counter>>Environment==\Ei\inNode:SendMsg(i)\/RecvMsg(i)\/Deactivate(i)-----------------------------------------------------------------------------Next==System\/Environment
========
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: