Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify proofs in examples/ directory as part of PR workflow #136

Open
lemmy opened this issue Jun 6, 2024 · 6 comments
Open

Verify proofs in examples/ directory as part of PR workflow #136

lemmy opened this issue Jun 6, 2024 · 6 comments
Labels
enhancement A new feature, an improvement, or other addition. testing Related to tests of code, continuous integration, and related topics.

Comments

@lemmy
Copy link
Member

lemmy commented Jun 6, 2024

The prover's build checks a set of tests, and the PR verifies proofs from tlaplus/examples. However, the proofs in examples/ are not verified.

Related: #135

@lemmy lemmy added enhancement A new feature, an improvement, or other addition. testing Related to tests of code, continuous integration, and related topics. labels Jun 6, 2024
@kape1395
Copy link
Collaborator

kape1395 commented Jun 6, 2024

I thought we would move these examples to the https://github.com/tlaplus/Examples/ repo. If not, I can add them to the test cases.

@lemmy
Copy link
Member Author

lemmy commented Jun 6, 2024

I don't have an opinion, except that some examples are perhaps too basic for the example repo?!

@muenchnerkindl
Copy link
Contributor

I suggest we do this on a case-by-case basis. In particular, I think that Allocator, Euclid, Peterson, and perhaps GraphTheorem could go to the GitHub Examples repo. Bakery, Byzantine and standard Paxos, EWD 840, and LamportMutex are in there already, but we should check if there is anything in tlapm/examples that is worth merging into the existing modules. The other examples look too basic to me, but should probably be added to the tests if they aren't there already.

If you agree, I can take care of that reshuffle.

@kape1395
Copy link
Collaborator

kape1395 commented Jun 7, 2024

Sounds like a good way to go.

@lemmy
Copy link
Member Author

lemmy commented Jun 7, 2024

GraphTheorem could be aligned with a moved next to https://github.com/tlaplus/CommunityModules/blob/master/modules/Graphs.tla, like FiniteSetExtTheorem is next to FiniteSetExt in the CommunityModules?

@ahelwer
Copy link
Collaborator

ahelwer commented Jul 10, 2024

I've been taking a look at this to compare the examples here with those in the tlaplus/examples repo using kdiff3. Here's what I found:

Example Most-similar tlaplus/examples spec How is tlaplus/examples version different?
ByzPaxos/BPConProof.tla specifications/byzpaxos/BPConProof.tla Minor changes; newer
ByzPaxos/Consensus.tla specifications/byzpaxos/Consensus.tla Identical except for some additional trailing whitespace
ByzPaxos/PConProof.tla specifications/byzpaxos/PConProof.tla Identical except for some additional trailing whitespace
ByzPaxos/VoteProof.tla specifications/byzpaxos/VoteProof.tla Identical except for some additional trailing whitespace
Cantor/Cantor*.tla N/A N/A
Dekker/Dekker.tla N/A N/A
paxos/Paxos.tla specifications/paxos/Paxos.tla Many differences, also lacking a proof
paxos/Consensus.tla specifications/paxos/Consensus.tla Additional comments and proofs
two_phase/TwoPhase.tla specifications/TwoPhase/TwoPhase.tla Lacking comments
two_phase/Alternate.tla specifications/TwoPhase/Alternate.tla Identical
Allocator.tla specifications/Allocator/SimpleAllocator.tla Seems older, lacks proofs
AtomicBakery.tla specifications/Bakery-Boulangerie/Bakery.tla Barely comparable; many differences
AtomicBakeryWithoutSMT.tla specifications/Bakery-Boulangerie/Bakery.tla Barely comparable; many differences
Bakery.tla specifications/Bakery-Boulangerie/Bakery.tla Barely comparable; many differences
BubbleSort.tla N/A N/A
Euclid.tla N/A N/A
EWD840.tla specifications/EWD840/EWD840.tla Numerous differences; proof was split out into EWD840_proof.tla; seems newer?
GraphTheorem.tla N/A N/A
LamportMutex.tla specifications/lamport_mutex/LamportMutex.tla Proof was split into LamportMutex_Proofs.tla; seems newer?
Peterson.tla N/A N/A
SimpleEventually.tla N/A N/A
SimpleEventuallyInt.tla N/A N/A
SimpleMutex.tla N/A N/A
SumAndMax.tla N/A N/A

I propose the following to integrate the specs into tlaplus/examples then delete the examples directory here:

Specs not in tlaplus/examples that should be added

  • Cantor/Cantor*.tla
  • Dekker/Dekker.tla
  • BubbleSort.tla
  • Euclid.tla
  • GraphTheorem.tla
  • Peterson.tla
  • SimpleEventually.tla & SimpleEventuallyInt.tla (could go in specifications/LearnProofs)
  • SimpleMutex.tla
  • SumAndMax.tla (could go in specifications/LearnProofs)

Specs that should overwrite those in tlaplus/examples

  • ByzPaxos/ Consensus.tla, PConProof.tla, VoteProof.tla (get rid of trailing whitespace)
  • two_phase/TwoPhase.tla
  • Allocator.tla

Specs that should just be deleted in favor of their tlaplus/examples counterparts

  • ByzPaxos/BPConProof.tla
  • paxos/Consensus.tla
  • EWD840.tla
  • LamportMutex.tla

Unsure how to integrate

  • Bakery.tla, AtomicBakery.tla, AtomicBakeryWithoutSMT.tla
  • paxos/Paxos.tla

Thoughts? Also, what's the deal with the examples_draft directory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature, an improvement, or other addition. testing Related to tests of code, continuous integration, and related topics.
Development

No branches or pull requests

4 participants