pirapira / eth-isabelle

A Lem formalization of EVM and some Isabelle/HOL proofs
Other
237 stars 42 forks source link

Verify programs with loops #16

Open pirapira opened 8 years ago

pirapira commented 8 years ago

The current approaches do not work for programs that contain loops. For verifying programs with loops we need

  1. a framework that composes Hoare triples
  2. the rule for loops in that Hoare logic
  3. proof of soundness of the Hoare logic with respect to the operational semantics
  4. an example verification of a program with loops
pirapira commented 8 years ago

This one looks relevant https://www.cs.princeton.edu/~appel/papers/controllogic.pdf but I still need to think how to deal with jumps into dynamically determined locations.

Maybe we can accumulate "if we reach this label with this condition, we are fine" conditions in many places, until we reach the entrypoint of the whole program with a good enough condition.

pirapira commented 8 years ago

The natural continuation of the current efforts would lead somewhere close to http://www.hpl.hp.com/techreports/Compaq-DEC/SRC-RR-114.pdf

pirapira commented 8 years ago

Or Myreen's decompilation of machine code to functional programs.

pirapira commented 8 years ago

Maybe first I try to verify a simple program with loops by brute-force, run into problems, and use the above ideas.