arXiv.itsnick.co

an independent field guide to 23 million papers from arXiv & OpenAlex — not affiliated with arXiv.org

Computer Science · Artificial Intelligence

A formalization of JML in the Coq proof system

Hermann Lehner

See on the map

Abstract

JML is a complex specification language for Java. Its large scale and manifold features make it hard to precisely define its semantics in a reference manual. It is thus desirable to formally specify the syntax and semantics of JML. There are many good reasons for a formalized semantics of JML in a theorem prover: It can be used to develop a sound verification condition generator for JML constructs. By formally defining the semantics in a theorem prover, we can detect and eliminate ambiguousities in the language. When using the semantics with an operational semantics for Java source code, we can define a runtime assertion checker and prove it’s soundness with respect to the semantics in Coq. We divide the problem of defining JML in Coq into several steps. Firstly, we define a basic JML subset that has the full expressiveness of JML, but without syntactic sugar. We define the semantics for this subset in Coq. We introduce an extended (full) JML Syntax and a syntactic rewriting function from the extended syntax into the basic syntax. Finally, we built a translation frontend that transforms a JML-annotated Java program into it’s equivalent in Coq. We managed to define the full JML and Java syntax in Coq, minus some very rare and not clearly

More like this