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
When Unicode support was merged earlier this year these were kept out of the standard modules out of stability considerations. This means Unicode users must write specs like:
---- MODULEDemo ----
EXTENDSNaturalsℕ==Nat\* Rest of spec using ℕ
====
if they want to use ℕ in their specs without generating a symbol-not-found error. If Apalache is going to pull in SANY to support Unicode itself (see apalache-mc/apalache#2995) perhaps these definitions should be added to the standard modules.
There is one issue that complicates this beyond simply defining ℕ == Nat in Naturals.tla, and that is definition overrides. It is very, very common for users to override the definitions of Nat, Int, and Real with finite sets. I foresee the following issues:
The model configuration parser does not support Unicode so would have to be modified so users can define override values for ℕ, ℤ, and ℝ instead of having to use Nat, Int, and Real.
If users override the definitions of ℕ, ℤ, and ℝ, then we might also want to override the definitions of Nat, Int, and Real automatically so they don't have to do it twice.
Arguably we shouldn't actually do 2 since no other definitions in TLA+ work this way; operator synonyms like <= and \leqdo work this way, but Nat, Int, and Real are definitions, not operators. However, these definitions are being given special treatment with the unique symbols ℕ, ℤ, and ℝ so perhaps it makes sense to make the synonym official.
The text was updated successfully, but these errors were encountered:
When Unicode support was merged earlier this year these were kept out of the standard modules out of stability considerations. This means Unicode users must write specs like:
if they want to use ℕ in their specs without generating a symbol-not-found error. If Apalache is going to pull in SANY to support Unicode itself (see apalache-mc/apalache#2995) perhaps these definitions should be added to the standard modules.
There is one issue that complicates this beyond simply defining
ℕ == Nat
inNaturals.tla
, and that is definition overrides. It is very, very common for users to override the definitions of Nat, Int, and Real with finite sets. I foresee the following issues:Arguably we shouldn't actually do 2 since no other definitions in TLA+ work this way; operator synonyms like
<=
and\leq
do work this way, but Nat, Int, and Real are definitions, not operators. However, these definitions are being given special treatment with the unique symbols ℕ, ℤ, and ℝ so perhaps it makes sense to make the synonym official.The text was updated successfully, but these errors were encountered: