Interactive theorem prover for FV of smart contracts
eth-isabelle
Semantic in Lem, translated to Isabelle
Mario Alvarez (@Consensys) developing Elle, verified compiler with eth-isabelle
Sidney Amani (NSW, Australia) et. al.
CPP18
EVM semantic in F*
TU Wien
small step semantics of the EVM
Based on Oyente's EtherLite
adding contract calls and call creation
This includes an abstract security definition of smart contracts in section 4.
I think this forms a basis for properties you want to verify and then, additionally, you have functional requirements that are specific to your protocol.
discuss the semantics of CALL and CREATE in section 3.4.
Solidity to F*, F* to EVM bytecode
Translate Solidity to F*, decompile EVM bytecode to F*
Formal verification with F*'s type system
A subset of Solidity, removing loops, etc.
Why3 for Solidity
Why3, a tool for program verification
Write a spec with the DSL called WhyML
verofy with automated solver like Z3 or interactive prover like Coq
Coq
Hoare logic in Coq
SECBIT
DSL in Coq whose syntax is similar to Solidity
Lolisa & GERM Framework
University of Electronic Science and Technology of China
GERM framwork based on Coq
Lolisa
A subset of Solidity + strong type system
Formal syntax & semantic
Based on GERM Framework
Papers
Zheng Yanga, Hang Leia, Weizhong Qiana
Hoare logics for EVM
A variant of Hoare Logic for EVM
code: ADD
lemma add_triple :
"triple {}
(*precond*) (⟨ h ≤ 1023 ∧ g ≥ Gverylow ⟩ **
stack_height (h + 2) **
stack (h + 1) v ** (* ONE NUMBER *)
stack h w ** (* ANOTHER NUMBER *)
program_counter k **
gas_pred g **
continuing
)
(* code *) {(k, Arith ADD)}
(*postcond*)(stack_height (h + 1) **
stack h (v + w) ** (* SUM *)
program_counter (k + 1) **
gas_pred (g - Gverylow) **
continuing
)"
Detecting Reentrancy
Introduce a concept of "Effective Callback Free"
Compared to Oyente
Implementing contracts in Idris
Idris (pure functional language, dependent types)
Translated to EVM bytecode but it's not efficient
Smart contract language for Zilliqa
formal verification with Coq
Michelson & Liquidity
Tezos
Michelson
Low leverl pure functional language
Liquidity
Compiled to Michelson
OCaml
Tezos foundation is not supporting it
Ref