Closed danwt closed 2 years ago
The following changes produce a type correct spec:
---- MODULE main ----
EXTENDS Integers, FiniteSets, Sequences, TLC, Apalache
(*
@typeAlias: x = Str;
*)
TypeAliases == TRUE
CONSTANTS
\* @type: Set($x);
XS
VARIABLES
\* @type: Int;
a
CInit == XS = {"k", "u", "v"}
Init == a = 42
Go == a' = 42
Next == Go
Inv == TRUE
====
The needed changes:
$
These finicky details are recorded in the manual https://apalache.informal.systems/docs/adr/002adr-types.html?highlight=type%20aliase#12-type-aliases
We discussed a it with @danwt in a different context, and all agreed that better error messages would help users with this kind of thing. See #955 and #943.
Description
Type aliases do not work (intuitively).
Impact
Yes, this is blocking .
Input specification
The command line parameters used to run the tool
apalache typecheck main.tla
Expected behavior
It to typecheck.
Log files
System information
apalache-mc version
]: 0.29.1 | build: 146de56Additional context
Triage checklist (for maintainers)