tlaplus / CommunityModules

TLA+ snippets, operators, and modules contributed and curated by the TLA+ community
MIT License
273 stars 36 forks source link

`Functions.tla` here clashes with `Functions.tla` in TLAPM #60

Open lemmy opened 2 years ago

lemmy commented 2 years ago

There is a name clash between the Functions.tla in CommunityModules and Functions.tla in TLAPM, with the Functions.tla in CommunityModules (CM!Functions.tla) having a superset of operators compared to the version in TLAPM. Users who open specs that depend on CM!Functions.tla but who have PM!Functions.tla on the library path (first) end up with an unparsable spec.

/cc @muenchnerkindl @xxyzzn

Likely related: https://github.com/tlaplus/tlapm/issues/3

lemmy commented 2 years ago

To continue the discussion about moving modules out of TLAPS:

/cc @johnyf @damiendoligez @quicquid

muenchnerkindl commented 2 years ago

I think the *_theorems(_proofs) modules should also be moved to the CommunityModules so that everything is in one place and that they get better visibility. Obviously, they only need to be imported by users who write proofs.

lemmy commented 2 years ago

We could move *_theorems(_proofs) into a subdirectory to reduce clutter. Also, to catch regressions, the CM Github action can check the proofs with the latest TLAPS release (https://github.com/lemmy/BlockingQueue/blob/4fa409b020725631d8fa0fa99ea9c813c3cd40dc/.github/workflows/main.yml#L18-L29 for inspiration).

lemmy commented 10 months ago

/cc @kape1395 for visibility

kape1395 commented 10 months ago

From the build perspective. The current tests in TLAPS depend on the files in the standard library, including the Functions.tla. E.g.

./test/fast/regression/consensus/consensus_test.tla -> FiniteSetTheorems -> Functions.

But I haven't checked if the backends (Isabelle, ...) are tied to these modules. If the relations exist there, the related modules should be kept in the TLAPM repo, IMO.

Considering the tests. Maybe these dependencies should be reorganized somehow to avoid loops across the repositories. The tests could be split to

The core test suite could be run without dependencies from the community modules. These should be enough to build/install/release the TLAPS.

And the regression/integration" test suite would not be tied to the build/install/release procedures. They

While trying to check this, I found that test/fast/regression/MiniProducerConsumer_test.tla depends on Sequences, but there is no Sequences.tla file in the repository. I wonder how it works.

damiendoligez commented 9 months ago

While trying to check this, I found that test/fast/regression/MiniProducerConsumer_test.tla depends on Sequences, but there is no Sequences.tla file in the repository. I wonder how it works.

It is, like most of the standard modules, implemented internally within tlapm in src/module/m_standard.ml. This is important because tlapm has to implement special treatment of some of the operators defined in these modules (to translate them into the corresponding back-end provers' features).