[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlaplus] Sets with mixed type elements



TLA+ leaves the truth value of formulas such as 1 = "a" or 1 = {} unspecified, and therefore we cannot know if, say,

"a" \in {1, "b"}

holds or not. This explains the error message that TLC produces.

Stephan

On 7 Feb 2020, at 11:45, Leroy van Engelen <leroy.vanengelen@xxxxxxxxx> wrote:

Hi,

It seems that TLC does not support sets of mixed 'types': evaluating `{1, "a"}`,  `{1, {}}`, `"a" \in {1}` result in errors like "Attempted to compare string "a" with non-string".

I thought sets would allow any mixed types of elements. Or is this a TLC optimization. I am trying to use to improve on the Json module to support arbitrary inputs, not just sequences.

Regards,

-Leroy van Engelen

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/1fb74ada-56d2-486e-8476-0c097236ed1b%40googlegroups.com.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/44482723-759A-4AA0-B3B8-3BC97828C61D%40gmail.com.