-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
Hello! I learned printing a TLC error trace in #json format and tried the EWD840_json example:
sed -i '/^SendMsg/{n;d;}' EWD840.tla # delete '/\ active[i]' below SendMsg
wget -q https://nightly.tlapl.us/dist/tla2tools.jar \
https://modules.tlapl.us/releases/latest/download/CommunityModules-deps.jar
java -jar tla2tools.jar EWD840_jsonTLC prints Error: Evaluating invariant JsonInv failed. and the traces. The trace.json file content is:
[
Is there something I made a mistake?
It seems JsonInv should not be violated since TLCSet("exit", TRUE). I replaced JsonSerialize("trace.json", Trace) with TRUE and TLC shows that JsonInv is not violated.
I tried another example DieHard, which violates the Inv big /= 4. TLC prints no trace and there is a trace.json file. I think this should be the expected behavior?
But after repeatedly running DieHard, I found the trace.json can be bad formatted:
[
{"big":0,"small":0},
{"big":5,"small":0},
{"big":2,"small":3},
{"big":2,"small":0},
{"big":0,"small":2},
{"big":5,"small":2},
{"big":4,"small":3}
]
"big":1,"small":3},
{"big":4,"small":0}
]
After trying the above, I think Json.tla might has a bug if my operations are correct.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels