Closed jinxinglim closed 1 month ago
@jinxinglim
-O2 --heuristic pbaL
are for performance reasons.ISUNISWAP
is the name of a configuration variable (boolean) specific to the solidity demo semantics. Here you see a run of krun
with that configuration variable being passed the value false
. This configuration variable indicates whether to do summarization (true
) or not (false
). Please keep in mind that at the moment we only do summarization for the the test UniswapV2SwapRenamed.sol, this is the only test for which you may use the value true
.bin/krun-sol
instead of krun
. It is a wrapper around krun
for the solidity demo semantics. It accepts
true
of false
, used to initialize the ISUNISWAP
configuration variable mentioned above. If no 3rd argument is provided, the default is false.krun
.krun
as follows:
krun -d location_of_compiled_definition contract.sol -cTXN=transactions.txn -pTXN=path-to/kparse-txn -cISUNISWAP="false"/"true" --no-expand-macros
plus any other flags you need.
Thank you @mariaKt for the detailed answers for point 5, 6 and 7.
Regarding the -pTXN
option, can I check with you if it must be on a separate standalone bash script as seen for bin/kparse-txn
? Can the kparse
command be on the same script with the krun
command? If yes, how can we make the kparse
command within the same script as the one running krun
?
Thank you!
Thanks to @theo25 for addressing this issue. I have tested the change made in this PR https://github.com/runtimeverification/llvm-backend/pull/1154 and I am able to generate proof hints for solidity-demo-semantics. Thank you once again!
I followed the above steps, everything worked OK except the kore-proof-trace
commands that displays
zsh: killed kore-proof-trace --expand-terms --verbose hints/UniswapV2Swap.header >
The used command is:
% kore-proof-trace --expand-terms --verbose hints/UniswapV2Swap.header hints/UniswapV2Swap.hints solidity-kompiled/definition.kore > hints/UniswapV2Swap.hints.txt
The file hints/UniswapV2Swap.hints.txt
is empty.
During proof generation (from MPG), here are the commands that we usually run to generate the proof hints from the semantics:
kompile
with just the following flags--backend llvm --llvm-proof-hint-instrumentation
Generate the
header
file from thedefinition.kore
of the kompiled definition, e.g.,kore-rich-header solidity-kompiled/definition.kore > solidity.header
krun
with just the--proof-hint
flagPretty printing the hints file via
kore-proof-trace --verbose --streaming-parser --expand-terms [header_file] ...
Issues/Questions/Feedback
I tried to add the appropriate flags in the commands in the
Makefile
from this repo and tested them locally. Here are what I found and also some questions and feedback regarding them:Adding the 2 flags
--backend llvm --llvm-proof-hint-instrumentation
on line 26 has no issue, which is great!Generating the
header
file from thedefinition.kore
of the kompiled definition, e.g.,kore-rich-header solidity-kompiled/definition.kore > solidity.header
terminated with the following output and I also attached the incomplete header file output:Incomplete header file: solidity.header.zip
Adding
--proof-hint
flag on line 14 and runmake test-regression
but terminated due to the following error:Incomplete hint file: addliquidity.zip
kore-proof-trace
cannot be run as we do not have tehheader
file.For kompiling definitions, the MPG team usually kompile with just the following flags:
--backend llvm --llvm-proof-hint-instrumentation
. However, for the kompile command in the Makefile of the repo, it is run with flags:--gen-glr-bison-parser -O2 --heuristic pbaL
. Just want to check if they are necessary.For krun-ing programs, we use
krun
with some flags as seen here:krun temp.pgm --definition $4 --proof-hint --output-file $2/$filename.kwasm.hints
. However, on this repo,krun
is run with these additional flags:-pTXN="$(dirname "$0")/kparse-txn" -cISUNISWAP="false" --no-expand-macros
. Just want to check if they are necessary. And what does ISUNISWAP actually do?It would be good to have some guide on running
kompile/krun
with appropriate flags.