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

Use Isabelle202x #109

Merged
merged 180 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
8b90d20
migration of Isabelle theories up to NatOrderings
muenchnerkindl Oct 23, 2020
95fc3d2
STY: rm trailing whitespace
johnyf Dec 20, 2020
06290b7
MAI: update `NatArith` to Isabelle2020
johnyf Dec 21, 2020
bf2edac
MAI: port sectioning and text of theory `NatDivision` to Isabelle2020
johnyf Dec 23, 2020
25b04f0
API: change numerals to definitions in theory `Peano`
johnyf Dec 23, 2020
9fc6c08
ENH: add theory `NewIntegers`
johnyf Dec 23, 2020
9992e76
API: add TLA+ syntax for bounded quantifiers
johnyf Dec 23, 2020
42b1979
MAI: update theory `NewIntegers` to Isabelle2020
johnyf Dec 23, 2020
bc17079
MAI: update sectioning and text of theory `Tuples` to Isabelle2020
johnyf Dec 23, 2020
b7727e6
MAI: port comments `--` in theory `Tuples` to Isabelle2020
johnyf Dec 23, 2020
17da587
MAI: rm attribute `standard` from `lemmas`
johnyf Dec 23, 2020
c8bafae
MAI: update `def` to `define ... where` for Isabelle2020
johnyf Dec 23, 2020
0ea8015
MAI: update ML section delimiters in theory `Tuples` to Isabelle2020
johnyf Dec 23, 2020
7c573ff
DRAFT: comment `parse_ast_translation` and `print_ast_translation`
johnyf Dec 23, 2020
72eebdd
MAI: update `lemmas` of theory `Tuples` to Isabelle2020
johnyf Dec 23, 2020
f6253d6
MAI: update theory `Tuples` to Isabelle2020
johnyf Dec 25, 2020
232fc19
STY: shorter lines
johnyf Dec 25, 2020
a763bf2
DRAFT: comment attribute `intro!` in `lemmas compEqualI`
johnyf Dec 26, 2020
174fc6d
MAI: update theory `NatDivision` after change of numerals to definitions
johnyf Dec 26, 2020
4070b97
MAI: update theory `NatDivision` to Isabelle2020
johnyf Dec 26, 2020
c366717
STY: shorter lines
johnyf Dec 26, 2020
ccc8a87
MAI: update delimiters in theory `CaseExpressions` to Isabelle2020
johnyf Dec 26, 2020
c251804
MAI: update `--` comments in theory `CaseExpressions` to Isabelle2020
johnyf Dec 26, 2020
1cce60a
DRAFT: comment `parse_ast_translation` and `print_ast_translation`
johnyf Dec 26, 2020
f4774bd
MAI: update delimiters in theory `Strings` to Isabelle2020
johnyf Dec 26, 2020
ceb1718
MAI: update `--` comments in theory `Strings` to Isabelle2020
johnyf Dec 26, 2020
a088bc5
MAI: update `xstr` to `str_token` for Isabelle2020
johnyf Dec 26, 2020
c79245f
DRAFT: comment `parse_ast_translation` and `print_ast_translation`
johnyf Dec 26, 2020
88b6431
DRAFT: comment two `lemma`s that are for debugging
johnyf Dec 26, 2020
ab4ef57
MAI: update delimiters in theory `Constant` to Isabelle2020
johnyf Dec 26, 2020
c4c53ff
MAI: update delimiters in theory `Integers` to Isabelle2020
johnyf Dec 26, 2020
f496b75
MAI: update `--` comments in theory `Integers` to Isabelle2020
johnyf Dec 26, 2020
5f5927c
MAI: update to `lemmas` for Isabelle2020 in theory `Integers`
johnyf Dec 26, 2020
86de338
MAI: rm nonexistent `assms` (raises error in Isabelle2020)
johnyf Dec 26, 2020
c372950
ENH: add theorem `leq_adiff_left_add_right_equiv`
johnyf Dec 27, 2020
397644c
MAI: partially update theory `Integers` to Isabelle2020
johnyf Dec 27, 2020
fbfb3cf
STY: shorter lines
johnyf Dec 27, 2020
eb6e909
DEV: ignore directory `isabelle/output/`
johnyf Dec 27, 2020
1279bdd
MAI: update theory `Integers` to Isabelle2020
johnyf Dec 28, 2020
b6ee305
MAI: update delimiters in theory `Zenon` to Isabelle2020
johnyf Dec 28, 2020
6d12905
DRAFT: define abbreviations `\\cup` and `\\cap` in theory `Zenon`
johnyf Dec 28, 2020
71fc7ec
MAI: partially update theory `Zenon` to Isabelle2020
johnyf Dec 28, 2020
0309414
DRAFT: use `EnumFuncSet` instead of `[... : ...]` syntax
johnyf Dec 28, 2020
2daf474
MAI: update definition syntax in theory `Zenon` to Isabelle2020
johnyf Dec 28, 2020
0c872e0
pass (mainly) over NatArith
muenchnerkindl Jan 3, 2021
ac7cd26
API: update to keywords of Isabelle 2021
johnyf Jan 22, 2021
a3b7e9b
ENH: add script for Isabelle 2021 logic keywords
Jan 23, 2021
e1f3bdf
DOC: how to install and use `outer_keywords.scala`
johnyf Jan 23, 2021
f66dd30
MAI: use theories `Constant` and `Zenon` in `ROOT`
johnyf Jan 23, 2021
8fe2b12
DRAFT: comment document generation for Isabelle theories
johnyf Jan 23, 2021
33c4da7
MAI: add theorem `leq_adiff_right_imp_0` to theory `Integers`
johnyf Jan 23, 2021
bcd431f
REL: update `isabelle/Makefile` for Isabelle2020
johnyf Jan 23, 2021
27f6ae6
MAI: update theory `Zenon` to use `\\A i \\in` syntax
johnyf Jan 23, 2021
2bf7442
DRAFT: comment auto-generated proof rules for `CASE` expressions
johnyf Jan 23, 2021
b21f4df
MAI: update `tlapm` to call `isabelle process` of Isabelle2020
johnyf Jan 23, 2021
f95915f
MAI: include `using assms` only if there exist assumptions
johnyf Jan 23, 2021
9ef3683
fixed syntax translations for Isa2020
muenchnerkindl Jan 23, 2021
8c82ca5
remaining syntax translations for Isabelle-2020
muenchnerkindl Jan 29, 2021
2c9211d
restored document preparation
muenchnerkindl Feb 7, 2021
4a5bf2d
lemmas for SMT axioms
muenchnerkindl Dec 23, 2021
d15857b
refactoring of integer theories, update to Isabelle 2021-1
muenchnerkindl Mar 16, 2022
4d6cfc2
fixed Zenon.thy and examples, cleanup of old theory files
muenchnerkindl Mar 18, 2022
3556e1d
migration of Isabelle theories up to NatOrderings
muenchnerkindl Oct 23, 2020
5e4070c
STY: rm trailing whitespace
johnyf Dec 20, 2020
b2acbd7
MAI: update `NatArith` to Isabelle2020
johnyf Dec 21, 2020
e360a99
MAI: port sectioning and text of theory `NatDivision` to Isabelle2020
johnyf Dec 23, 2020
771a44f
API: change numerals to definitions in theory `Peano`
johnyf Dec 23, 2020
b99dbcc
ENH: add theory `NewIntegers`
johnyf Dec 23, 2020
797ba38
API: add TLA+ syntax for bounded quantifiers
johnyf Dec 23, 2020
3e6b8e9
MAI: update theory `NewIntegers` to Isabelle2020
johnyf Dec 23, 2020
93a14b9
MAI: update sectioning and text of theory `Tuples` to Isabelle2020
johnyf Dec 23, 2020
d208966
MAI: port comments `--` in theory `Tuples` to Isabelle2020
johnyf Dec 23, 2020
519db6e
MAI: rm attribute `standard` from `lemmas`
johnyf Dec 23, 2020
c65f420
MAI: update `def` to `define ... where` for Isabelle2020
johnyf Dec 23, 2020
6691c32
MAI: update ML section delimiters in theory `Tuples` to Isabelle2020
johnyf Dec 23, 2020
403a5fd
DRAFT: comment `parse_ast_translation` and `print_ast_translation`
johnyf Dec 23, 2020
84c010e
MAI: update `lemmas` of theory `Tuples` to Isabelle2020
johnyf Dec 23, 2020
a2881a3
MAI: update theory `Tuples` to Isabelle2020
johnyf Dec 25, 2020
9dc91a8
STY: shorter lines
johnyf Dec 25, 2020
8bbc5b8
DRAFT: comment attribute `intro!` in `lemmas compEqualI`
johnyf Dec 26, 2020
7b66160
MAI: update theory `NatDivision` after change of numerals to definitions
johnyf Dec 26, 2020
3b44804
MAI: update theory `NatDivision` to Isabelle2020
johnyf Dec 26, 2020
e71c6d1
STY: shorter lines
johnyf Dec 26, 2020
6e3be13
MAI: update delimiters in theory `CaseExpressions` to Isabelle2020
johnyf Dec 26, 2020
a781b25
MAI: update `--` comments in theory `CaseExpressions` to Isabelle2020
johnyf Dec 26, 2020
e98574f
DRAFT: comment `parse_ast_translation` and `print_ast_translation`
johnyf Dec 26, 2020
9934f53
MAI: update delimiters in theory `Strings` to Isabelle2020
johnyf Dec 26, 2020
4500d00
MAI: update `--` comments in theory `Strings` to Isabelle2020
johnyf Dec 26, 2020
0b7258b
MAI: update `xstr` to `str_token` for Isabelle2020
johnyf Dec 26, 2020
76faf9f
DRAFT: comment `parse_ast_translation` and `print_ast_translation`
johnyf Dec 26, 2020
905d884
DRAFT: comment two `lemma`s that are for debugging
johnyf Dec 26, 2020
e75014c
MAI: update delimiters in theory `Constant` to Isabelle2020
johnyf Dec 26, 2020
f01de6b
MAI: update delimiters in theory `Integers` to Isabelle2020
johnyf Dec 26, 2020
4df449a
MAI: update `--` comments in theory `Integers` to Isabelle2020
johnyf Dec 26, 2020
dea11d6
MAI: update to `lemmas` for Isabelle2020 in theory `Integers`
johnyf Dec 26, 2020
445c711
MAI: rm nonexistent `assms` (raises error in Isabelle2020)
johnyf Dec 26, 2020
9822c72
ENH: add theorem `leq_adiff_left_add_right_equiv`
johnyf Dec 27, 2020
bedb5d5
MAI: partially update theory `Integers` to Isabelle2020
johnyf Dec 27, 2020
4f2a1fa
STY: shorter lines
johnyf Dec 27, 2020
2e154e0
DEV: ignore directory `isabelle/output/`
johnyf Dec 27, 2020
3de7a35
MAI: update theory `Integers` to Isabelle2020
johnyf Dec 28, 2020
313af1c
MAI: update delimiters in theory `Zenon` to Isabelle2020
johnyf Dec 28, 2020
384fc98
DRAFT: define abbreviations `\\cup` and `\\cap` in theory `Zenon`
johnyf Dec 28, 2020
62d9d8c
MAI: partially update theory `Zenon` to Isabelle2020
johnyf Dec 28, 2020
6aba81a
DRAFT: use `EnumFuncSet` instead of `[... : ...]` syntax
johnyf Dec 28, 2020
56c65bd
MAI: update definition syntax in theory `Zenon` to Isabelle2020
johnyf Dec 28, 2020
7aeb681
pass (mainly) over NatArith
muenchnerkindl Jan 3, 2021
f0ac8cc
API: update to keywords of Isabelle 2021
johnyf Jan 22, 2021
80d213f
ENH: add script for Isabelle 2021 logic keywords
Jan 23, 2021
71942c5
DOC: how to install and use `outer_keywords.scala`
johnyf Jan 23, 2021
c8c6d78
MAI: use theories `Constant` and `Zenon` in `ROOT`
johnyf Jan 23, 2021
f30c5cb
DRAFT: comment document generation for Isabelle theories
johnyf Jan 23, 2021
df2034b
MAI: add theorem `leq_adiff_right_imp_0` to theory `Integers`
johnyf Jan 23, 2021
0c2833c
REL: update `isabelle/Makefile` for Isabelle2020
johnyf Jan 23, 2021
7fa2eba
MAI: update theory `Zenon` to use `\\A i \\in` syntax
johnyf Jan 23, 2021
d7dd0c1
DRAFT: comment auto-generated proof rules for `CASE` expressions
johnyf Jan 23, 2021
ea5575c
MAI: update `tlapm` to call `isabelle process` of Isabelle2020
johnyf Jan 23, 2021
1e11d3d
MAI: include `using assms` only if there exist assumptions
johnyf Jan 23, 2021
6ddeccb
fixed syntax translations for Isa2020
muenchnerkindl Jan 23, 2021
e6605ae
remaining syntax translations for Isabelle-2020
muenchnerkindl Jan 29, 2021
fdcd7a5
restored document preparation
muenchnerkindl Feb 7, 2021
c267698
lemmas for SMT axioms
muenchnerkindl Dec 23, 2021
bbd123b
refactoring of integer theories, update to Isabelle 2021-1
muenchnerkindl Mar 16, 2022
7841cd8
fixed Zenon.thy and examples, cleanup of old theory files
muenchnerkindl Mar 18, 2022
2c3d011
merging .gitignore file
muenchnerkindl Apr 13, 2022
6a63614
Merge remote-tracking branch 'origin/main' into isabelle2020
kape1395 Dec 21, 2023
21bbf9f
Make the new isabelle to work with the dune-based build.
kape1395 Dec 23, 2023
66d4195
Merge remote-tracking branch 'origin/main' into isabelle2020-dune
kape1395 Dec 23, 2023
f270dd4
Use tar.gz archive of Isabelle on MacOS.
kape1395 Dec 23, 2023
2c5b99d
It works with Isabelle2023, except 1 test.
kape1395 Dec 23, 2023
37ba312
`lualatex` is needed to build isabelle theory.
kape1395 Dec 23, 2023
13bf0e3
Attempt to fix the macos build.
kape1395 Dec 23, 2023
280559e
Add missing latex packages.
kape1395 Dec 23, 2023
ce9a64b
Do not build the Isabelle document when building heaps.
kape1395 Dec 23, 2023
512d89d
Try to fix the MacOS build.
kape1395 Dec 23, 2023
4a881d2
Make build more portable.
kape1395 Dec 23, 2023
4159f54
Make macos build work again
DogAndHerDude Dec 28, 2023
4c4fc8f
Use HTTPS to download the Isabelle/HOL.
kape1395 Jan 13, 2024
f535384
Merge remote-tracking branch 'origin/main' into isabelle2020-dune
kape1395 Feb 26, 2024
90e9cd5
Merge remote-tracking branch 'origin/main' into isabelle2020-dune
kape1395 Apr 27, 2024
dcab4e9
Try use Isabelle2024-RC2. (#124)
kape1395 May 14, 2024
2e2bbff
Reorganize Isabelle sessions.
kape1395 May 18, 2024
71b228c
Adapt to Isabelle2024.
kape1395 May 29, 2024
0f40bb1
Cleanup Isabelle build a bit; run Isabelle examples/tests during dune…
kape1395 May 29, 2024
972a394
Rewrite Nat to {x ∈ Int : 0 ≤ x} instead of n ∈ Nat to (n ∈ Int ∧ 0 ≤…
kape1395 May 31, 2024
2b0aa19
Also build on arm64 macos (M1).
lemmy Jun 7, 2024
5f12cc3
Merge branch 'main' into isabelle2020-dune-m1
lemmy Jun 7, 2024
2bf4bf3
Merge remote-tracking branch 'origin/main' into isabelle2020-dune
kape1395 Jun 8, 2024
d62bcb2
Merge remote-tracking branch 'origin/main' into isabelle2020-dune
kape1395 Jun 8, 2024
379a756
Merge remote-tracking branch 'origin/isabelle2020-dune' into isabelle…
kape1395 Jun 8, 2024
7658bfb
Merge pull request #137 from tlaplus/isabelle2020-dune-m1
kape1395 Jun 8, 2024
70db8d0
changes to Isabelle setup and fixed AtomicBakeryG example
muenchnerkindl Jun 10, 2024
932c682
A cleanup.
kape1395 Jun 11, 2024
6e0ab8d
Make examples/AtomicBakeryG.thy proof a bit faster.
kape1395 Aug 17, 2024
04996b1
Run Isabelle THY tests on a clear Isabelle installation.
kape1395 Aug 18, 2024
c28594c
Tweaking the build system.
kape1395 Aug 18, 2024
29a3bba
Merge pull request #134 from tlaplus/isabelle2020-dune-cleanup-ex
kape1395 Aug 18, 2024
b8a6899
Merge pull request #131 from tlaplus/isabelle2020-dune-cleanup
kape1395 Aug 18, 2024
56bcdc7
Merge branch 'main' into isabelle2020-dune
kape1395 Aug 18, 2024
3eb56fb
Trying to make CI run again.
kape1395 Aug 18, 2024
2cb14c2
Fixing the CI.
kape1395 Aug 18, 2024
85ea35a
Fixing the CI.
kape1395 Aug 18, 2024
7121523
Fixing the CI.
kape1395 Aug 18, 2024
a720627
Fixing the CI.
kape1395 Aug 18, 2024
4f601e5
Fixing the CI.
kape1395 Aug 18, 2024
c12628a
Try to fix macos as well.
kape1395 Aug 18, 2024
0c79fd7
Try to fix macos as well.
kape1395 Aug 18, 2024
b251818
Unify CI scripts.
kape1395 Aug 20, 2024
c175852
Build/install instructions updated.
kape1395 Aug 20, 2024
b67ce91
Install instructions for macOS, not tested.
kape1395 Aug 21, 2024
31cfa09
Mistype.
kape1395 Aug 21, 2024
f790a5f
Don't force Isabelle document build in the ROOT file.
kape1395 Aug 21, 2024
1154124
Don't depend on latex during the build.
kape1395 Aug 21, 2024
aaf5a15
Try to make `wget` less quiet.
kape1395 Aug 21, 2024
7be1269
Tweaking wget options.
kape1395 Aug 21, 2024
2c0566b
Try to use a cache for Isabelle downloads, doublecheck the checksums.
kape1395 Aug 21, 2024
72ce8ef
try make shasum working on macos.
kape1395 Aug 21, 2024
d594011
Try make build more portable.
kape1395 Aug 22, 2024
0792653
Add upgrade to the build instructions.
kape1395 Aug 22, 2024
9e75ea9
Remove compile outputs from gitignore. They are all in `_build/` now.
kape1395 Aug 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13]
ocaml-compiler: ['4.13.1', '5.1.0']
os:
- ubuntu-latest
- macos-13
- macos-14
ocaml-compiler:
- '4.13.1'
- '5.1.0'
env:
EXAMPLES_DIR: "tlaplus-examples"
SCRIPT_DIR: "tlaplus-examples/.github/scripts"
Expand All @@ -21,19 +26,19 @@ jobs:
steps:
- name: Clone repo
uses: actions/checkout@v4
- name: Install deps
- name: Install deps (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install --yes time
- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
# - uses: actions/cache@v3
# id: cache
# with:
# path: _build_cache
# key: ${{ runner.os }}_build_cache
- uses: actions/cache@v4
id: cache
with:
path: _build_cache
key: ${{ runner.os }}_build_cache
- name: Build TLAPM
run: |
eval $(opam env)
Expand Down Expand Up @@ -65,9 +70,6 @@ jobs:
rm "$DEPS_DIR/tlaps.tar.gz"
mv $DEPS_DIR/tlaps* "$DEPS_DIR/tlapm-install"
SKIP=(
# Missing operator ENABLEDrules; will be fixed after
# updated_enabled_cdot branch is merged.
"specifications/ewd998/AsyncTerminationDetection.tla"
# General proof failure
"specifications/Bakery-Boulangerie/Bakery.tla"
"specifications/Bakery-Boulangerie/Boulanger.tla"
Expand All @@ -80,12 +82,9 @@ jobs:
"specifications/LoopInvariance/BinarySearch.tla"
"specifications/LoopInvariance/Quicksort.tla"
"specifications/LoopInvariance/SumSequence.tla"
"specifications/MisraReachability/ReachabilityProofs.tla"
"specifications/Paxos/Consensus.tla"
"specifications/PaxosHowToWinATuringAward/Consensus.tla"
"specifications/lamport_mutex/LamportMutex_proofs.tla"
"specifications/TeachingConcurrency/SimpleRegular.tla"
# Long-running
# Failing and long-running
"specifications/byzpaxos/BPConProof.tla" # Takes about 30 minutes
)
python "$SCRIPT_DIR/check_proofs.py" \
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,17 @@ jobs:
name: Create TLAPS installer, and upload it to GitHub release
# fast testing *does* commence below
needs: [release]
runs-on: ${{ matrix.operating-system }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
operating-system: [
macos-13,
ubuntu-latest]
ocaml-compiler: [
'4.13.1',
]
os:
- macos-13
- ubuntu-latest
ocaml-compiler:
- '5.1.0'
steps:
- name: Install deps
if: matrix.operating-system == 'ubuntu-latest'
- name: Install deps (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install --yes time
Expand All @@ -93,11 +92,11 @@ jobs:
- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
# - uses: actions/cache@v3
# id: cache
# with:
# path: _build_cache
# key: ${{ runner.os }}_build_cache
- uses: actions/cache@v4
id: cache
with:
path: _build_cache
key: ${{ runner.os }}_build_cache
- name: Build installer of TLAPS
run: |
eval $(opam env)
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
*.o
*.cmi
*.cmx
*.annot
*.exe
*.err
*.out
Expand Down
22 changes: 13 additions & 9 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,20 @@ Copyright (C) 2008-2010 INRIA and Microsoft Corporation

## 1. Installation

### 1.1. Linux

#### 1.1.1. Setup the environment
### 1.1. Setup the environment

Setup required OS packages; Debian/Ubuntu:
```{bash}
sudo apt install opam zlib1g-dev gawk time
```
Arch Linux:
```{bash}
sudo pacman -S ocaml opam dune zlib time
sudo pacman -Sy time git make gcc patch diffutils ocaml opam dune zlib wget fontconfig gnu-free-fonts
```

macOS:
```{bash}
# No additional packages needed.
```

Initialize the OPAM. Add `--disable-sandboxing` option if running this on the docker or sandboxing is not supported for other reasons.
Expand All @@ -53,7 +56,7 @@ opam switch create 5.1.0
eval $(opam env --switch=5.1.0)
```

#### 1.1.2. Build and install TLAPM
### 1.2. Build and install TLAPM

Clone the TLAPM source code

Expand All @@ -65,6 +68,7 @@ cd tlapm
Install the dependencies via OPAM. A helper `make` target is present for that:

```{bash}
make opam-update
make opam-deps
```

Expand All @@ -86,13 +90,13 @@ Now you can invoke `tlapm` in either way:
- `~/.opam/5.1.0/bin/tlapm --help`.


#### 1.1.3. Running the tests
### 1.3. Running the tests
To run the test suite, invoke:
```{bash}
make test
```

#### 1.1.4. Development environment
### 1.4. Development environment

To setup the development environment, run the following in addition to the above steps:

Expand All @@ -103,9 +107,9 @@ make opam-deps-dev
Then view/edit the code e.g. using VSCode with the `OCaml Platform` extension installed.


#### 1.1.5. Testing the build/install procedures
## Appendix: Testing the build/install procedures

The above instructions were tested with
The above instructions were tested for Debian as follows:

```{bash}
docker run -it --rm debian bash
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ PREFIX=$(OPAM_SWITCH_PREFIX)

all: build

opam-update: # Update the package lists and install updates.
opam update
opam upgrade

opam-deps:
opam install ./ --deps-only --yes --working-dir

Expand Down
2 changes: 1 addition & 1 deletion deps/Makefile.post-install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
all:
chmod +x backends/bin/*
make -C backends -f Isabelle.post-install
cd backends && cat Isabelle.exec-files | xargs chmod +x
3 changes: 3 additions & 0 deletions deps/isabelle/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/Isabelle.exec-files
/Isabelle/
/Isabelle-test/
96 changes: 0 additions & 96 deletions deps/isabelle/Makefile

This file was deleted.

13 changes: 13 additions & 0 deletions deps/isabelle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Debugging Isabelle prover

Run the `tlapm` with the `--debug=tempfiles` option, e.g.:

(cd ../tlaplus-examples/specifications/MisraReachability/ \
&& rm -rf .tlacache/ && tlapm --toolbox 228 228 --debug=tempfiles ReachabilityProofs.tla)

Then look for the corresponding `*.thy` files and open them with Isabelle, e.g.

./_build/default/deps/isabelle/Isabelle/bin/isabelle jedit \
-d ./_build/default/deps/isabelle/Isabelle/src/TLA+/ \
../tlaplus-examples/specifications/MisraReachability/.tlacache/ReachabilityProofs.tlaps/tlapm_624cb2.thy

15 changes: 11 additions & 4 deletions deps/isabelle/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@
; The source code for the TLA+ theory is in the $PROJECT_ROOT/isabelle directory.
; The generated heaps (Pure and TLA+) are in Isabelle/heaps/polyml-*/.
(rule
(deps "Makefile" (source_tree theories))
(targets (dir Isabelle) "Isabelle.no-links" "Isabelle.post-install")
(action (run "make" "-C" "." "PROJECT_ROOT=%{project_root}" "Isabelle.no-links" "Isabelle.post-install")))
(alias default)
(deps
"dune.mk"
(source_tree ../../isabelle)
(sandbox none))
(targets
(dir "Isabelle")
(dir "Isabelle-test")
"Isabelle.exec-files")
(action (run "make" "-f" "dune.mk")))

(install
(section (site (tlapm backends)))
(dirs Isabelle))

(install
(section (site (tlapm backends)))
(files ("Isabelle.post-install" as "Isabelle.post-install")))
(files ("Isabelle.exec-files" as "Isabelle.exec-files")))
Loading