apalache-mc / apalache

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

`parse` command adds superfluous `EXTENDS` statement #2796

Open lemmy opened 9 months ago

lemmy commented 9 months ago
-> % cat EWD840AP.tla                                                            
------------------------------- MODULE EWD840AP -------------------------------

CONSTANT
    N

VARIABLES
    active,
    color,
    tpos,
    tcolor
=============================================================================
-> % ../../apalache/bin/apalache-mc parse --output=EWD840APparse.tla EWD840AP.tla
10:44:26.684 [main] INFO at.forsyte.apalache.tla.tooling.opt.ParseCmd -- Loading configuration
Output directory: _apalache-out/EWD840AP.tla/2023-12-13T10-44-26_4479875307421951542
# APALACHE version: 0.44.2 | build: 3360796                       I@10:44:26.888
Parse EWD840AP.tla                                                I@10:44:26.899
PASS #0: SanyParser                                               I@10:44:27.010
Parsing file specifications/ewd840/EWD840AP.tla
Parsed successfully
Root module: EWD840AP with 5 declarations.    I@10:44:27.141
It took me 0 days  0 hours  0 min  0 sec                          I@10:44:27.142
Total time: 0.252 sec                                             I@10:44:27.142
EXITCODE: OK
-> % cat EWD840APparse.tla                                                       
----------------------------- MODULE EWD840APparse -----------------------------

EXTENDS Integers, Sequences, FiniteSets, TLC, Apalache   \*  <- Where does this come from?

CONSTANT N

VARIABLE tpos

VARIABLE active

VARIABLE tcolor

VARIABLE color

================================================================================
shonfeder commented 9 months ago

Hy, @lemmy. Thanks for the issue.

We add those extends by automatically.

Could you describe what kind of negative impact this is having for to help us triage?

lemmy commented 9 months ago

The EXTENDS introduces a dependency on Apalache where there was no dependency on any specific tool before. For example, TLAPS won't parse the spec unless the Apalache and TLC module are on its library path.