Bitcoin blockchain in the interactive theorem prover Agda. Theorem proving gives an extremely flexible verification method that may be utilized to numerous forms of programs together with good contracts. We exhibit the feasibility of our approaches by carrying them out in Agda for concrete sensible contract, together with P2PKH and P2MS. The weakest-precondition calculus. Their main contributions are proofs of soundness and relative completeness, as well as purposes of their machinery to confirm some sensible contracts including modelling of smart contract vulnerabilities. They supply a compiler to convert sensible contracts into Bitcoin transactions, and show the correctness of their compiler wrt. Two methodologies for acquiring human-readable weakest preconditions are mentioned so as to shut the validation hole between person requirements and formal specification of sensible contracts: (1) a step-by-step strategy, which works backwards instruction by instruction by a script, typically stepping over several instructions in one go; (2) symbolic execution of the code and translation into a nested case distinction, which permits to read off weakest preconditions because the disjunction of accepting paths. |
|