Skip to content

Commit b8b4353

Browse files
Merge branch 'master' into raoul/is-valid-jump-dest
2 parents cc119bb + 2412870 commit b8b4353

File tree

271 files changed

+2923
-67522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+2923
-67522
lines changed

.github/workflows/Dockerfile

+2-13
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,19 @@ ARG K_VERSION
33
ARG BASE_DISTRO
44
ARG LLVM_VERSION
55

6-
FROM ghcr.io/foundry-rs/foundry:nightly-ca67d15f4abd46394b324c50e21e66f306a1162d as FOUNDRY
7-
86
ARG Z3_VERSION
97
FROM runtimeverificationinc/z3:ubuntu-jammy-${Z3_VERSION} as Z3
108

119
ARG K_VERSION
1210
FROM runtimeverificationinc/kframework-k:ubuntu-jammy-${K_VERSION}
1311

14-
COPY --from=FOUNDRY /usr/local/bin/forge /usr/local/bin/forge
15-
COPY --from=FOUNDRY /usr/local/bin/anvil /usr/local/bin/anvil
16-
COPY --from=FOUNDRY /usr/local/bin/cast /usr/local/bin/cast
17-
1812
COPY --from=Z3 /usr/bin/z3 /usr/bin/z3
1913

2014
ARG LLVM_VERSION
2115

2216
RUN apt-get update \
2317
&& apt-get upgrade --yes \
2418
&& apt-get install --yes \
25-
cargo \
2619
clang-${LLVM_VERSION} \
2720
cmake \
2821
curl \
@@ -48,11 +41,7 @@ USER ${USER}:${GROUP}
4841
RUN mkdir /home/${USER}/workspace
4942
WORKDIR /home/${USER}/workspace
5043

51-
ENV PATH=/home/${USER}/.cargo/bin:/home/${USER}/.local/bin:/usr/local/bin/:${PATH}
44+
ENV PATH=/home/${USER}/.local/bin:${PATH}
5245

53-
RUN curl -sSL https://install.python-poetry.org | python3 - \
46+
RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.6.1 \
5447
&& poetry --version
55-
56-
RUN cargo install svm-rs --version 0.3.0 --locked \
57-
&& svm install 0.8.13 \
58-
&& solc --version

.github/workflows/test-pr.yml

+22-60
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
version-bump:
1313
name: 'Version Bump'
14-
runs-on: ubuntu-latest
14+
runs-on: [self-hosted, linux, flyweight-ephemeral]
1515
steps:
1616
- name: 'Check out code'
1717
uses: actions/checkout@v3
@@ -36,12 +36,14 @@ jobs:
3636
run: git push origin HEAD:${GITHUB_HEAD_REF}
3737

3838
kevm-pyk-code-quality-checks:
39-
needs: version-bump
4039
name: 'Code Quality Checks'
41-
runs-on: ubuntu-latest
40+
runs-on: [self-hosted, linux, flyweight-ephemeral]
4241
steps:
4342
- name: 'Check out code'
4443
uses: actions/checkout@v3
44+
- uses: actions/setup-python@v4
45+
with:
46+
python-version: "3.10"
4547
- name: 'Install Poetry'
4648
uses: Gr1N/setup-poetry@v8
4749
- name: 'Run code quality checks'
@@ -52,13 +54,16 @@ jobs:
5254
kevm-pyk-unit-tests:
5355
needs: kevm-pyk-code-quality-checks
5456
name: 'Unit Tests'
55-
runs-on: ubuntu-latest
57+
runs-on: [self-hosted, linux, normal-ephemeral]
5658
steps:
5759
- name: 'Check out code'
5860
uses: actions/checkout@v3
5961
with:
6062
submodules: true
6163
fetch-depth: 0
64+
- uses: actions/setup-python@v4
65+
with:
66+
python-version: "3.10"
6267
- name: 'Install Poetry'
6368
uses: Gr1N/setup-poetry@v8
6469
- name: 'Run unit tests'
@@ -68,29 +73,22 @@ jobs:
6873
kevm-pyk-profile:
6974
needs: kevm-pyk-code-quality-checks
7075
name: 'Profiling'
71-
runs-on: [self-hosted, linux, normal]
72-
timeout-minutes: 15
76+
runs-on: [self-hosted, linux, normal-ephemeral]
7377
steps:
7478
- name: 'Check out code'
7579
uses: actions/checkout@v3
7680
with:
7781
submodules: recursive
7882
fetch-depth: 0
79-
- name: 'Set up Docker'
80-
uses: ./.github/actions/with-docker
83+
- name: Setup Python
84+
uses: actions/setup-python@v4
8185
with:
82-
container-name: kevm-ci-profile-${{ github.sha }}
83-
- name: 'Build kevm-pyk'
84-
run: docker exec -u github-user kevm-ci-profile-${{ github.sha }} /bin/bash -c 'make poetry'
85-
- name: 'Build targets'
86-
run: docker exec -u github-user kevm-ci-profile-${{ github.sha }} /bin/bash -c 'CXX=clang++-14 poetry -C kevm-pyk run kevm-dist --verbose build -j`nproc` plugin foundry'
86+
python-version: '3.10'
87+
- name: 'Install Poetry'
88+
uses: Gr1N/setup-poetry@v8
8789
- name: 'Run profiling'
8890
run: |
89-
docker exec -u github-user kevm-ci-profile-${{ github.sha }} /bin/bash -c 'make profile'
90-
- name: 'Tear down Docker'
91-
if: always()
92-
run: |
93-
docker stop --time=0 kevm-ci-profile-${{ github.sha }}
91+
make -C kevm-pyk profile
9492
9593
test-concrete-execution:
9694
name: 'Build and Test KEVM concrete execution'
@@ -110,7 +108,7 @@ jobs:
110108
- name: 'Build kevm-pyk'
111109
run: docker exec -u github-user kevm-ci-concrete-${{ github.sha }} /bin/bash -c 'make poetry'
112110
- name: 'Build targets'
113-
run: docker exec -u github-user kevm-ci-concrete-${{ github.sha }} /bin/bash -c 'CXX=clang++-14 poetry -C kevm-pyk run kevm-dist --verbose build -j`nproc` plugin llvm haskell'
111+
run: docker exec -u github-user kevm-ci-concrete-${{ github.sha }} /bin/bash -c 'CXX=clang++-14 poetry -C kevm-pyk run kdist --verbose build -j`nproc` evm-semantics.llvm evm-semantics.haskell'
114112
- name: 'Test integration'
115113
run: docker exec -u github-user kevm-ci-concrete-${{ github.sha }} /bin/bash -c 'make test-integration'
116114
- name: 'Test conformance'
@@ -125,7 +123,7 @@ jobs:
125123
test-prove:
126124
name: 'Build and Test KEVM proofs'
127125
needs: kevm-pyk-code-quality-checks
128-
runs-on: [self-hosted, linux, normal, fast]
126+
runs-on: [self-hosted, linux, fast]
129127
strategy:
130128
fail-fast: false
131129
matrix:
@@ -135,10 +133,10 @@ jobs:
135133
timeout: 45
136134
- test-suite: 'test-prove-pyk'
137135
test-args:
138-
timeout: 120
136+
timeout: 180
139137
- test-suite: 'test-prove-pyk'
140138
test-args: '--use-booster'
141-
timeout: 90
139+
timeout: 150
142140
timeout-minutes: ${{ matrix.timeout }}
143141
steps:
144142
- name: 'Check out code'
@@ -152,50 +150,14 @@ jobs:
152150
- name: 'Build kevm-pyk'
153151
run: docker exec -u github-user kevm-ci-haskell-${{ matrix.test-suite }}-${{ github.sha }} /bin/bash -c 'make poetry'
154152
- name: 'Build distribution'
155-
run: docker exec -u github-user kevm-ci-haskell-${{ matrix.test-suite }}-${{ github.sha }} /bin/bash -c 'CXX=clang++-14 poetry -C kevm-pyk run kevm-dist --verbose build -j`nproc` plugin haskell'
153+
run: docker exec -u github-user kevm-ci-haskell-${{ matrix.test-suite }}-${{ github.sha }} /bin/bash -c 'CXX=clang++-14 poetry -C kevm-pyk run kdist --verbose build -j`nproc` evm-semantics.plugin evm-semantics.haskell'
156154
- name: 'Prove Haskell'
157-
run: docker exec -u github-user kevm-ci-haskell-${{ matrix.test-suite }}-${{ github.sha }} /bin/bash -c "make ${{ matrix.test-suite }} PYTEST_ARGS='-vv ${{ matrix.test-args }}' PYTEST_PARALLEL=7"
155+
run: docker exec -u github-user kevm-ci-haskell-${{ matrix.test-suite }}-${{ github.sha }} /bin/bash -c "make ${{ matrix.test-suite }} PYTEST_ARGS='-vv ${{ matrix.test-args }}' PYTEST_PARALLEL=4"
158156
- name: 'Tear down Docker'
159157
if: always()
160158
run: |
161159
docker stop --time=0 kevm-ci-haskell-${{ matrix.test-suite }}-${{ github.sha }}
162160
163-
test-prove-foundry:
164-
name: 'Build and Test KEVM Foundry proofs'
165-
needs: kevm-pyk-code-quality-checks
166-
runs-on: [self-hosted, linux, normal, fast]
167-
strategy:
168-
fail-fast: false
169-
matrix:
170-
include:
171-
- test-suite: 'legacy'
172-
test-args:
173-
timeout: 180
174-
- test-suite: 'booster'
175-
test-args: '--use-booster'
176-
timeout: 90
177-
timeout-minutes: ${{ matrix.timeout }}
178-
steps:
179-
- name: 'Check out code'
180-
uses: actions/checkout@v3
181-
with:
182-
submodules: recursive
183-
fetch-depth: 0
184-
- name: 'Set up Docker'
185-
uses: ./.github/actions/with-docker
186-
with:
187-
container-name: kevm-ci-foundry-${{ matrix.test-suite }}-${{ github.sha }}
188-
- name: 'Build kevm-pyk'
189-
run: docker exec -u github-user kevm-ci-foundry-${{ matrix.test-suite }}-${{ github.sha }} /bin/bash -c 'make poetry'
190-
- name: 'Build targets'
191-
run: docker exec -u github-user kevm-ci-foundry-${{ matrix.test-suite }}-${{ github.sha }} /bin/bash -c 'CXX=clang++-14 poetry -C kevm-pyk run kevm-dist --verbose build -j`nproc` plugin foundry'
192-
- name: 'Foundry Prove'
193-
run: docker exec -u github-user kevm-ci-foundry-${{ matrix.test-suite }}-${{ github.sha }} /bin/bash -c "make test-foundry-prove PYTEST_ARGS='-vv ${{ matrix.test-args }}'"
194-
- name: 'Tear down Docker'
195-
if: always()
196-
run: |
197-
docker stop --time=0 kevm-ci-foundry-${{ matrix.test-suite }}-${{ github.sha }}
198-
199161
nix:
200162
name: 'Nix'
201163
strategy:

.github/workflows/update-foundry-prove.yml

-58
This file was deleted.

.gitignore

-12
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,7 @@
1010
/package/src
1111
/pkg
1212
/tests/**/*.debug-log
13-
/tests/foundry/cache
14-
/tests/foundry/foundry.k
15-
/tests/foundry/foundry.k.check.stripped
16-
/tests/foundry/contracts.k.check.stripped
17-
/tests/foundry/foundry-list.check.stripped
18-
/tests/foundry/golden/*.out
19-
/tests/foundry/*.out
20-
/tests/foundry/out
21-
/tests/foundry/test/filecopy2.txt
22-
/tests/foundry/test/filecopy.txt
23-
/tests/foundry/test/fileline.txt
2413
/tests/**/*.rule-profile
25-
/tests/specs/**/*-bin-runtime.k
2614
/tests/specs/foundry/*.out
2715
/tests/specs/**/haskell
2816
/tests/specs/**/java

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,3 @@
1414
[submodule "web/k-web-theme"]
1515
path = web/k-web-theme
1616
url = https://github.com/runtimeverification/k-web-theme
17-
[submodule "tests/foundry/lib/forge-std"]
18-
path = tests/foundry/lib/forge-std
19-
url = https://github.com/foundry-rs/forge-std

Makefile

+2-7
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ kevm-pyk: poetry-env
3030
test: test-integration test-conformance test-prove test-prove-pyk test-prove-kprove test-interactive
3131

3232

33-
# Foundry Tests
34-
35-
test-foundry-prove: poetry
36-
$(MAKE) -C kevm-pyk/ test-integration PYTEST_ARGS+="-k test_foundry_prove.py"
37-
3833
# Conformance Tests
3934

4035
test-conformance: poetry
@@ -64,7 +59,7 @@ test-prove-kprove: tests/specs/opcodes/evm-optimizations-spec.md poetry
6459
$(MAKE) -C kevm-pyk/ test-integration PYTEST_ARGS+="-k test_kprove_prove"
6560

6661
# to generate optimizations.md, run: ./optimizer/optimize.sh &> output
67-
tests/specs/opcodes/evm-optimizations-spec.md:
62+
tests/specs/opcodes/evm-optimizations-spec.md: kevm-pyk/src/kevm_pyk/kproj/evm-semantics/optimizations.md
6863
cat kevm-pyk/src/kevm_pyk/kproj/evm-semantics/optimizations.md | sed 's/^rule/claim/' | sed 's/EVM-OPTIMIZATIONS/EVM-OPTIMIZATIONS-SPEC/' | grep -v 'priority(40)' > $@
6964

7065

@@ -113,7 +108,7 @@ tests/specs/%.prove: tests/specs/% tests/specs/$$(firstword $$(subst /, ,$$*))/$
113108
--definition tests/specs/$(firstword $(subst /, ,$*))/$(KPROVE_FILE)/$(TEST_SYMBOLIC_BACKEND)
114109

115110
tests/specs/%/timestamp: tests/specs/$$(firstword $$(subst /, ,$$*))/$$(KPROVE_FILE).$$(KPROVE_EXT)
116-
$(POETRY_RUN) kevm-pyk kompile \
111+
$(POETRY_RUN) kevm-pyk kompile-spec \
117112
$< \
118113
--target $(word 3, $(subst /, , $*)) \
119114
--output-definition tests/specs/$(firstword $(subst /, ,$*))/$(KPROVE_FILE)/$(word 3, $(subst /, , $*)) \

0 commit comments

Comments
 (0)