arXiv Science⌕ Search

arXiv subjects

Nicolas Koh

Publications and source records attributed to Nicolas Koh.

3 recordsLinked to original sources

Closed Convex Hulls for Linear Integer-Real Arithmetic

This paper tackles a foundational problem at the intersection of logic and geometry: given an existential formula $F$ in linear integer-real arithmetic, compute the closed convex hull of the set of models of $F$. We introduce an algorithm that learns the convex hull of a formula from models sampled by a satisfiability-modulo-theories solver. The key idea is the notion of a local abstraction operator, which generalizes a model relative to the input formula, enabling the algorithm to learn the convex hull from finitely many samples. We design local abstractions for linear real arithmetic (LRA), linear integer arithmetic (LIA), and linear integer-real arithmetic (LIRA), and thus obtain convex hull algorithms for each of these theories. Our approach is the first that is capable of computing convex hulls for LIRA formulas, and experimental results show that our algorithms for LRA and LIA are superior to baseline algorithms.

cs.PL↗

When Less Is More: Consequence-Finding in a Weak Theory of Arithmetic

This paper presents a theory of non-linear integer/real arithmetic and algorithms for reasoning about this theory. The theory can be conceived as an extension of linear integer/real arithmetic with a weakly-axiomatized multiplication symbol, which retains many of the desirable algorithmic properties of linear arithmetic. In particular, we show that the conjunctive fragment of the theory can be effectively manipulated (analogously to the usual operations on convex polyhedra, the conjunctive fragment of linear arithmetic). As a result, we can solve the following consequence-finding problem: given a ground formula F, find the strongest conjunctive formula that is entailed by F. As an application of consequence-finding, we give a loop invariant generation algorithm that is monotone with respect to the theory and (in a sense) complete. Experiments show that the invariants generated from the consequences are effective for proving safety properties of programs that require non-linear reasoning.

cs.LO↗

From C to Interaction Trees: Specifying, Verifying, and Testing a Networked Server

We present the first formal verification of a networked server implemented in C. Interaction trees, a general structure for representing reactive computations, are used to tie together disparate verification and testing tools (Coq, VST, and QuickChick) and to axiomatize the behavior of the operating system on which the server runs (CertiKOS). The main theorem connects a specification of acceptable server behaviors, written in a straightforward "one client at a time" style, with the CompCert semantics of the C program. The variability introduced by low-level buffering of messages and interleaving of multiple TCP connections is captured using network refinement, a variant of observational refinement.

cs.PL↗