Search arXiv⌕ Search

arXiv subjects

Mark R. Greenstreet

Publications and source records attributed to Mark R. Greenstreet.

5 recordsLinked to original sources

Smtlink 3: Rewrite-driven Compilation to SMT-LIB

There is a long history of integration between the ACL2 theorem prover and satisfiability modulo theories (SMT) solvers. While both systems operate over first-order logic, translating between their languages requires careful consideration of their differing semantics and typing disciplines. Many projects have taken an ad hoc approach to translation, validating the results through proof reconstruction. Another approach is to write a compiler and verify it, but this poses a substantial proof burden. In this paper, we present Smtlink 3, which uses the ACL2 rewriter to infer types and translate proof terms by applying known theorems. We show a substantial reduction in complexity and trusted code compared to previous versions of Smtlink.

cs.LO↗

Erlang in ACL2: A Continuation-Passing Style Evaluator

We present an evaluator in ACL2 for Erlang, a functional language for concurrent programming. The evaluator is written in two parts: an AST evaluator and a scheduler. The AST evaluator uses continuation-passing style. At each point in an execution, each process has a current continuation that holds all state needed for further execution of the process. Thus, the global state of an Erlang program is a mapping from Erlang process identifiers to their continuations. The scheduler provides a non-deterministic interleaving of processes between globally visible actions such as process spawns and message sends and receives. We demonstrate the evaluator by proving some properties of a few simple Erlang programs.

cs.PL↗

Convex Functions in ACL2(r)

This paper builds upon our prior formalisation of R^n in ACL2(r) by presenting a set of theorems for reasoning about convex functions. This is a demonstration of the higher-dimensional analytical reasoning possible in our metric space formalisation of R^n. Among the introduced theorems is a set of equivalent conditions for convex functions with Lipschitz continuous gradients from Yurii Nesterov's classic text on convex optimisation. To the best of our knowledge a full proof of the theorem has yet to be published in a single piece of literature. We also explore "proof engineering" issues, such as how to state Nesterov's theorem in a manner that is both clear and useful.

cs.LO↗

Smtlink 2.0

Smtlink is an extension of ACL2 with Satisfiability Modulo Theories (SMT) solvers. We presented an earlier version at ACL2'2015. Smtlink 2.0 makes major improvements over the initial version with respect to soundness, extensibility, ease-of-use, and the range of types and associated theory-solvers supported. Most theorems that one would want to prove using an SMT solver must first be translated to use only the primitive operations supported by the SMT solver -- this translation includes function expansion and type inference. Smtlink 2.0 performs this translation using a sequence of steps performed by verified clause processors and computed hints. These steps are ensured to be sound. The final transliteration from ACL2 to Z3's Python interface requires a trusted clause processor. This is a great improvement in soundness and extensibility over the original Smtlink which was implemented as a single, monolithic, trusted clause processor. Smtlink 2.0 provides support for FTY defprod, deflist, defalist, and defoption types by using Z3's arrays and user-defined data types. We have identified common usage patterns and simplified the configuration and hint information needed to use Smtlink.

cs.LO↗

Real Vector Spaces and the Cauchy-Schwarz Inequality in ACL2(r)

We present a mechanical proof of the Cauchy-Schwarz inequality in ACL2(r) and a formalisation of the necessary mathematics to undertake such a proof. This includes the formalisation of $\mathbb{R}^n$ as an inner product space. We also provide an application of Cauchy-Schwarz by formalising $\mathbb R^n$ as a metric space and exhibiting continuity for some simple functions $\mathbb R^n\to\mathbb R$. The Cauchy-Schwarz inequality relates the magnitude of a vector to its projection (or inner product) with another: \[|\langle u,v\rangle| \leq \|u\| \|v\|\] with equality iff the vectors are linearly dependent. It finds frequent use in many branches of mathematics including linear algebra, real analysis, functional analysis, probability, etc. Indeed, the inequality is considered to be among "The Hundred Greatest Theorems" and is listed in the "Formalizing 100 Theorems" project. To the best of our knowledge, our formalisation is the first published proof using ACL2(r) or any other first-order theorem prover.

cs.LO↗