DeepAI AI Chat
Log In Sign Up

Natural Hoare Logic: Towards formal verification of programs from logical forms of natural language specifications

by   Jayaraj Poroor, et al.

Formal verification provides strong guarantees of correctness of software, which are especially important in safety or security critical systems. Hoare logic is a widely used formalism for rigorous verification of software against specifications in the form of pre-condition/post-condition assertions. The advancement of semantic parsing techniques and higher computational capabilities enable us to extract semantic content from natural language text as formal logical forms, with increasing accuracy and coverage. This paper proposes a formal framework for Hoare logic-based formal verification of imperative programs using logical forms generated from compositional semantic parsing of natural language assertions. We call our reasoning approach Natural Hoare Logic. This enables formal verification of software directly against safety requirements specified by a domain expert in natural language. We consider both declarative assertions of program invariants and state change as well as imperative assertions that specify commands which alter the program state. We discuss how the reasoning approach can be extended using domain knowledge and a practical approach for guarding against semantic parser errors.


page 1

page 2

page 3

page 4


A Compositional Proof Framework for FRETish Requirements

Structured natural languages provide a trade space between ambiguous nat...

Formal Specifications from Natural Language

We study the generalization abilities of language models when translatin...

Natural Language Specifications in Proof Assistants

Interactive proof assistants are computer programs carefully constructed...

A Domain-Specific Language for Verifying Software Requirement Constraints

Software requirement analysis can certainly benefit from prevention and ...

Morpheus: Automated Safety Verification of Data-dependent Parser Combinator Programs

Parser combinators are a well-known mechanism used for the compositional...

ReLo: a Dynamic Logic to Reason About Reo Circuits

Critical systems require high reliability and are present in many domain...

Applying the Isabelle Insider Framework to Airplane Security

Avionics is one of the fields in which verification methods have been pi...