# A general formal memory framework in Coq for verifying the properties of   programs based on higher-order logic theorem proving with increased   automation, consistency, and reusability

**Authors:** Zheng Yang, Hang Lei

arXiv: 1803.00403 · 2018-03-28

## TL;DR

This paper introduces a flexible formal memory framework in Coq that enhances the verification of program properties across different languages, combining symbolic execution and theorem proving for increased automation and reusability.

## Contribution

A novel, extensible formal memory framework in Coq supporting multiple verification specifications and an extension of Curry-Howard isomorphism called EVI for automation.

## Key findings

- Successfully implemented a formal interpreter in Coq using GERM
- Demonstrated application of EVI on a simple code segment
- Framework supports diverse formal verification tasks

## Abstract

In recent years, a number of lightweight programs have been deployed in critical domains, such as in smart contracts based on blockchain technology. Therefore, the security and reliability of such programs should be guaranteed by the most credible technology. Higher-order logic theorem proving is one of the most reliable technologies for verifying the properties of programs. However, programs may be developed by different high-level programming languages, and a general, extensible, and reusable formal memory (GERM) framework that can simultaneously support different formal verification specifications, particularly at the code level, is presently unavailable for verifying the properties of programs. Therefore, the present work proposes a GERM framework to fill this gap. The framework simulates physical memory hardware structure, including a low-level formal memory space, and provides a set of simple, nonintrusive application programming interfaces and assistant tools using Coq that can support different formal verification specifications simultaneously. The proposed GERM framework is independent and customizable, and was verified entirely in Coq. We also present an extension of Curry-Howard isomorphism, denoted as execution-verification isomorphism (EVI), which combines symbolic execution and theorem proving for increasing the degree of automation in higher-order logic theorem proving assistant tools. We also implement a toy functional programming language in a generalized algebraic datatypes style and a formal interpreter in Coq based on the GERM framework. These implementations are then employed to demonstrate the application of EVI to a simple code segment.

---
Source: https://tomesphere.com/paper/1803.00403