Open virgil-serbanuta opened 6 months ago
How about:
kasmer.json
to the test contract root
kasmerx [-C TEST-PATH] {build|prove|fuzz}
I started implementing kasmerx build
: #126
It assumes a file kasmerx.json
in the test contract root, e.g. in mx-semantics/tests/contracts/foundrylike/kasmerx.json
:
{
"contract_path": "../../../deps/mx-sdk-rs/contracts/examples/adder"
}
Based on this information, the test and main contracts can be compiled with sc-meta
. The next step I guess is to run kasmer --gen-claims
.
@virgil-serbanuta, does this make sense so far?
Yes.
I think it might be better if it accepts multiple contracts, so instead of contract_path
, it should be contract_paths
. The test might require interaction between multiple contracts.
{
"contract_paths": [
"../../../deps/mx-sdk-rs/contracts/examples/adder"
]
}
Current workflow with examples:
foundry.json
file pointing to the main contract ( https://github.com/runtimeverification/mx-semantics/blob/master/tests/contracts/foundrylike/foundry.json )poetry -C kmultiversx run -- kasmer --directory "tests/contracts/foundrylike"
)poetry run python3 -m src.kmxwasm.property --claim $CLAIM --kcfg=$KCFG --booster
)This workflow also needs various things to be kompiled and
poetry install
commands.Desired workflow:
kasmer build --main=deps/mx-sdk-rs/contracts/examples/adder --test=tests/contracts/foundrylike
kasmer fuzz tests/contracts/foundrylike
kasmer verify tests/contracts/foundrylike
The desired workflow could also look something like this (we're skipping the
foundry.json
file):kasmer build --main=deps/mx-sdk-rs/contracts/examples/adder --test=tests/contracts/foundrylike
kasmer fuzz --main=deps/mx-sdk-rs/contracts/examples/adder --test=tests/contracts/foundrylike
kasmer verify --main=deps/mx-sdk-rs/contracts/examples/adder --test=tests/contracts/foundrylike
I'm not that good with user experience, so the following may or may not be a good idea. The
verify
command should allow users to debug:verify --restart
andverify --restart <N>
)verify --tree
andverify --show-node <n>
).verify --remove <n>
).verify --step <m> --iterations <n>
).verify --job-name=<name>
)