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

Feature/foundry to kontrol #17

Merged
merged 15 commits into from
Apr 3, 2024
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
submodules: recursive

- name: Install Kontrol
uses: runtimeverification/[email protected].0
uses: runtimeverification/[email protected].1
with:
version: latest

Expand Down
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,25 @@ However, they should be reproducible on Windows using the [Windows Subsystem for
<span style="color:red">Note that the instructions are for linux systems.</span>


# Table of Content
# Table of Contents
- [Highlights](#highlights)
- [Machine Setup](#machine-setup)
- [Installing Foundry](#installing-foundry)
- [Installing KONTROL](#installing-kontrol)
- [Repository contents](#repository-contents)
- [Test Breakdown](#test-breakdown)
- [Property Testing Using Foundry](#property-testing-using-foundry)



- [Contracts](#contracts)
- [Tests](#tests)
- [Property Testing Using Foundry ( Forge )](#property-testing-using-foundry--forge-)
- [Build with Forge](#build-with-forge)
- [Run Tests with Foundry](#run-tests-with-foundry)
- [Property Verification using KEVM ( Kontrol )](#property-verification-using-kevm--kontrol-)
- [Build with kontrol](#build-with-kontrol)
- [Run the Proofs](#run-the-proofs)
- [Insights by Kontrol](#insights-by-kontrol)
- [Kontrol List](#kontrol-list)
- [Kontrol View](#kontrol-view)

# Machine Setup

Installing Foundry
Expand Down Expand Up @@ -93,16 +105,13 @@ In the [`test`](./test) subdirectory, you will find tests of varying difficulty:
- `token.t.sol`: Tests of `token.sol`.
- `exclusiveToken.t.sol`: Tests of `exclusiveToken.t.sol`.

Property Testing Using Foundry
------------------------------
# Property Testing Using Foundry ( Forge )

We will use foundry for:

- Building the project (i.e. compiling the files), and
- Running the property tests on randomized inputs.

# Build the Project (Kontrol / Forge)

Build with Forge
----------------

Expand Down
10 changes: 5 additions & 5 deletions run-kontrol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ kontrol_section_edge() {
kontrol_build --require lemmas.k --module-import ERC20:DEMO-LEMMAS --verbose
kontrol_list
kontrol_prove -j8 \
--verbose \
--bug-report=BUGREPORT.bug \
--match-test Examples.test_assert_bool_failing
# --match-test Examples.test_assert_bool_passing\
--match-test Examples.test_assert_bool_failing \
--match-test Examples.test_assert_bool_passing
# --match-test Examples.test_wmul_increasing_overflow\
# --match-test Examples.test_wmul_increasing\
# --match-test Examples.test_wmul_increasing_positive\
Expand Down Expand Up @@ -92,8 +91,9 @@ kontrol_show --verbose
################
# Modify Nodes #
################
kontrol_remove_node 4b6c47..d6d6d3
kontrol_prove --reinit
# kontrol_remove_node 4b6c47..d6d6d3
# kontrol_prove --reinit


##############################
# Additional Reinit Examples #
Expand Down
Loading