Skip to content

Latest commit

 

History

History

README.md

This directory contains examples of protocol specifications written in Quint.

Note that some examples were written long time ago. All of our examples pass the parser and the type checker, but some of them are not runnable and testable yet. To set your expectations right, check the dashboard below first.

Categories

  • solidity. The most recent examples of Solidity smart contracts modeled in Quint. This is probably the easiest entry point, as we have been collecting relatively simple contracts so far.

  • cosmos. The examples from the Cosmos ecosystem, which we are most excited about. They may be a bit harder to understand though, as we have not polished them yet.

  • cosmwasm. Example specifications of CosmWasm smart contracts, another good start for beginners. You may also be interested in our solidity examples.

  • classic. These are examples of sequential and distributed algorithms, which stem from the TLA+ examples. These are probably the oldest examples in the repository, so they may use outdated features.

  • puzzles. These are logical puzzles. Some people find them nice for learning new languages. If you are one of these people, check the puzzles.

  • spells. These are nice small definitions that make specification writing easier. We collect them here. One day some of them will become the standard library. If you think you have invented a nice spell that would help others, contribute your spell.

  • language-features. These are examples that demonstrate some language features in isolation. They are mostly used for testing the tool.

Dashboard

This dashboard shows, how far we have checked the examples in the Quint-Apalache pipeline. The reported status reflects running the noted subcommand on the listed without any additional command line arguments.

Example Syntax (parse) Types (typecheck) Unit tests (test) Apalache (verify)
classic/distributed/Bakery/bakery.qnt
classic/distributed/ClockSync/clockSync6.qnt
classic/distributed/ConsensusAlgorithm/ConsensusAlg.qnt
classic/distributed/ConsensusAlgorithm/KSetAgreementConsensus.qnt
classic/distributed/DiningPhilosophers/DiningPhilosophers5.qnt
classic/distributed/ewd426/ewd426.qnt
classic/distributed/ewd426/ewd426_3.qnt
classic/distributed/ewd426/ewd426_4.qnt
classic/distributed/ewd840/ewd840.qnt
classic/distributed/LamportMutex/LamportMutex.qnt
classic/distributed/Paxos/Paxos.qnt #1284
classic/distributed/Paxos/Voting.qnt N/A1 N/A2
classic/distributed/ReadersWriters/ReadersWriters.qnt
classic/distributed/ReliableBroadcast/reliablebc.qnt
classic/distributed/TeachingConcurrency/mutex.qnt
classic/distributed/TeachingConcurrency/teaching.qnt
classic/distributed/TwoLayeredCache/two_layered_cache.qnt
classic/distributed/TwoPhaseCommit/two_phase_commit.qnt
classic/distributed/TwoPhaseCommit/two_phase_commit_modules.qnt #1299 #1299
classic/sequential/BinSearch/BinSearch.qnt
cosmos/bank/bank.qnt N/A2
cosmos/bank/bankTest.qnt https://github.com/informalsystems/quint/releases/tag/v0.31.0
cosmos/ics20/bank.qnt
cosmos/ics20/base.qnt N/A2
cosmos/ics20/denomTrace.qnt
cosmos/ics20/ics20.qnt https://github.com/informalsystems/quint/releases/tag/v0.31.0
cosmos/ics23/ics23.qnt
cosmos/lightclient/Blockchain.qnt N/A1 N/A2
cosmos/lightclient/LCVerificationApi.qnt N/A1 N/A2
cosmos/lightclient/Lightclient.qnt
cosmos/lightclient/typedefs.qnt N/A2
cosmos/tendermint/Tendermint.qnt N/A1 N/A2
cosmos/tendermint/TendermintModels.qnt
cosmos/tendermint/TendermintTest.qnt N/A1 N/A2
cosmwasm/zero-to-hero/vote.qnt
cryptography/hashes/hashes.qnt N/A2
cryptography/hashes/hashesTest.qnt N/A2
cryptography/utxo/utxo.qnt
games/mafia_werewolf/play_mafia.qnt
games/rock_paper_scissors/play_rock_paper_scissors.qnt
games/secret-santa/secret_santa.qnt
games/tictactoe/tictactoe.qnt
language-features/booleans.qnt
language-features/counters.qnt #1941
language-features/generate.qnt
language-features/importFrom.qnt
language-features/imports.qnt
language-features/instances.qnt
language-features/instancesFrom.qnt
language-features/integers.qnt
language-features/lists.qnt
language-features/maps.qnt
language-features/nondetEx.qnt
language-features/option.qnt
language-features/records.qnt
language-features/sets.qnt
language-features/tuples.qnt
puzzles/prisoners/prisoners.qnt
puzzles/river/river.qnt
solidity/ERC20/erc20.qnt https://github.com/informalsystems/quint/releases/tag/v0.31.0
solidity/GradualPonzi/gradualPonzi.qnt
solidity/icse23-fig7/lottery.qnt #1285
solidity/SimpleAuction/SimpleAuction.qnt https://github.com/informalsystems/quint/releases/tag/v0.31.0 N/A2
solidity/SimplePonzi/simplePonzi.qnt
spells/basicSpells.qnt N/A2
spells/BoundedUInt.qnt N/A2
spells/commonSpells.qnt N/A2
spells/rareSpells.qnt N/A2
tutorials/booleans.qnt N/A2
tutorials/coin.qnt https://github.com/informalsystems/quint/releases/tag/v0.31.0
tutorials/hello.qnt
tutorials/integers.qnt N/A2
tutorials/repl/kettle.qnt
tutorials/sets.qnt N/A2
verification/defaultOpNames.qnt

Footnotes

  1. This specification is parameterized, and instantiated in another module. 2 3 4 5

  2. This specification does not define a state machine. 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18