[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tlaplus] Beginner question: EXCEPT construct
Suppose the next state relation for the function "state" is:
state' = [state EXCEPT ![A] = "newState"]
where A is some argument of the function "state". This obviously works when A is a single argument.
What about when A is a "set of arguments" (i.e., A = {"A1", "A2", "A3"})? Then the expression:
state' = [state EXCEPT ![A] = "newState"]
is not correct: TLC gives an error message:
"TLC threw an unexpected exception.
This was probably caused by an error in the spec or model. See the User Output or TLC Console for clues to what happened. The exception was a java.lang.RuntimeException: Attempted to check equality of string "A1" with non-string: {"A1"}
The error occurred when TLC was evaluating the nested
expressions at the following positions:"
Clearly, I am missing something obvious. How could it be possible to resolve this?
--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to tlaplus@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/tlaplus.
For more options, visit https://groups.google.com/d/optout.