apalache-mc / apalache

APALACHE: symbolic model checker for TLA+ and Quint
https://apalache-mc.org/
Apache License 2.0
440 stars 40 forks source link

[BUG] Type annotations in MC_*.tla files #758

Closed istoilkovska closed 3 years ago

istoilkovska commented 3 years ago

Description

I have a module, let's call it Spec.tla and a module MC_Spec.tla which instantiates Spec.tla. I would like to use MC_Spec.tla to run model checking with Apalache. The variables in both modules are annotated, and so are the constants in Spec.tla. Most of the annotations use type aliases, which are defined in a third module, Spec_Definitions.tla. Running the type checker on Spec.tla says that the types are great, but on MC_Spec.tla, it complains that an already annotated operator is undefined.

Input specification

IBCCore.tla MC_IBCCore.tla

The command line parameters used to run the tool

 apalache-mc typecheck IBCCore.tla

and

 apalache-mc typecheck MC_IBCCore.tla

Expected behavior

No errors for MC_IBCCore.tla.

Log files

apalache-mc typecheck IBCCore.tla

apalache-mc typecheck MC_IBCCore.tla

System information

Additional context

konnov commented 3 years ago

This seems to be related to #645. The declarations sorter has a bug.

konnov commented 3 years ago

Fixed that in #777.