Boolean Functional Synthesis via Self-Substitution

Similar documents
Factored Boolean Functional Synthesis

BDD-Based Boolean Functional Synthesis

A Scalable and Nearly Uniform Generator of SAT Witnesses

Case-Analysis for Rippling and Inductive Proof

Warm-Up Problem. Let L be the language consisting of as constant symbols, as a function symbol and as a predicate symbol. Give an interpretation where

Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis

Network Verification: Reflections from Electronic Design Automation (EDA)

Chapter 1 Divide and Conquer Algorithm Theory WS 2014/15 Fabian Kuhn

Provably Optimal Test Cube Generation using Quantified Boolean Formula Solving

Section 1.5. Finding Linear Equations

An Annotated Language

Mathematically Rigorous Software Design Review of mathematical prerequisites

Local Two-Level And-Inverter Graph Minimization without Blowup

4 Generating functions in two variables

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS

Chapter 1 Divide and Conquer Algorithm Theory WS 2013/14 Fabian Kuhn

Part II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs?

Satisfiability Modulo Theories: ABsolver

Abstract Path Planning for Multiple Robots: An Empirical Study

Introduction to Linear-Time Temporal Logic. CSE 814 Introduction to LTL

Chapter 1 Divide and Conquer Algorithm Theory WS 2015/16 Fabian Kuhn

LEARNING TO INSTANTIATE QUANTIFIERS

VS 3 : SMT Solvers for Program Verification

Scaling Up DPLL(T) String Solvers Using Context-Dependent Simplification

Lesson 4 Typed Arithmetic Typed Lambda Calculus

The Complexity of Relational Queries: A Personal Perspective

Semantic Subtyping. Alain Frisch (ENS Paris) Giuseppe Castagna (ENS Paris) Véronique Benzaken (LRI U Paris Sud)

Today. Types of graphs. Complete Graphs. Trees. Hypercubes.

CSE 20 DISCRETE MATH. Fall

Proof-Pattern Recognition and Lemma Discovery in ACL2

From Hoare Logic to Matching Logic Reachability. Grigore Rosu and Andrei Stefanescu University of Illinois, USA

The Formal Semantics of Programming Languages An Introduction. Glynn Winskel. The MIT Press Cambridge, Massachusetts London, England

Lecture 6: Arithmetic and Threshold Circuits

Preprocessing in Pseudo-Boolean Optimization: An Experimental Evaluation

Chapter 3: Propositional Languages

An Evolution of Mathematical Tools

LOGIC SYNTHESIS AND VERIFICATION ALGORITHMS. Gary D. Hachtel University of Colorado. Fabio Somenzi University of Colorado.

Analyzing Complexity of Lists

Chapter 1 Divide and Conquer Algorithm Theory WS 2013/14 Fabian Kuhn

Joint Shape Segmentation

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS

CSE 20 DISCRETE MATH. Winter

This chapter covers recursive definition, including finding closed forms.

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS

Logic synthesis and verification on fixed topology

Formal Verification of a Floating-Point Elementary Function

From Z3 to Lean, Efficient Verification

A Type System for Checking Applet Isolation in Java Card

Type Assisted Synthesis of Programs with Algebraic Data Types

Ensemble methods in machine learning. Example. Neural networks. Neural networks

DISCRETE MATHEMATICS

Summary of Course Coverage

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Magiclock: Scalable Detection of Potential Deadlocks in Large-Scale Multithreaded Programs

38050 Povo (Trento), Italy Tel.: Fax: e mail: url:

Formal Verification using Probabilistic Techniques

NO WARRANTY. Use of any trademarks in this presentation is not intended in any way to infringe on the rights of the trademark holder.

About the Author. Dependency Chart. Chapter 1: Logic and Sets 1. Chapter 2: Relations and Functions, Boolean Algebra, and Circuit Design

Introduction to Axiomatic Semantics

Database Theory VU , SS Codd s Theorem. Reinhard Pichler

Jaykov Foukzon. Israel Institute of Technology, Haifa, Israel.

EXTENSIONS OF FIRST ORDER LOGIC

WORKBOOK 10 ACTION GEOMETRY SQUARE AND PENTAGON

AXIOMS FOR THE INTEGERS

Bounded Model Checking with Parametric Data Structures

Sequential Dependency and Reliability Analysis of Embedded Systems. Yu Jiang Tsinghua university, Beijing, China

Modular Synthesis of Sketches Using Models

Covered Clause Elimination

Spark verification features

Structural characterizations of schema mapping languages

Efficiently Solving Bit-Vector Problems Using Model Checkers

arxiv: v1 [math.co] 20 Aug 2012

Towards More Effective Unsatisfiability-Based Maximum Satisfiability Algorithms

ENEE x Digital Logic Design. Lecture 3

In = number of words appearing exactly n times N = number of words in the collection of words A = a constant. For example, if N=100 and the most

Pouya Kousha Fall 2018 CSE 5194 Prof. DK Panda

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Formal study of plane Delaunay triangulation

Relational Algebra 1

Counterexample Guided Inductive Optimization Applied to Mobile Robot Path Planning SBR/LARS 2017

Chapter 1 An Introduction to Computer Science. INVITATION TO Computer Science 1

Did you ever think that a four hundred year-old spider may be why we study linear relationships today?

Counting the number of spanning tree. Pied Piper Department of Computer Science and Engineering Shanghai Jiao Tong University

SECTION 5.1. Sequences

Graph Algorithms. Chromatic Polynomials. Graph Algorithms

Use of Symbolic Performance Models in Layout-Inclusive Synthesis of RF Low-Noise Amplifiers

What does this print?

Handling Loops in Bounded Model Checking of C Programs via k-induction

Binary Decision Diagrams

Chapter 3. Describing Syntax and Semantics ISBN

Short-Term Audio-Visual Atoms for Generic Video Concept Classification

Optimal Partition with Block-Level Parallelization in C-to-RTL Synthesis for Streaming Applications

Giovanni De Micheli. Integrated Systems Centre EPF Lausanne

Formal Verification. Lecture 7: Introduction to Binary Decision Diagrams (BDDs)

An Algorithm for Face-Constrained Encoding of Symbols Using Minimum Code Length

Disjoint Support Decompositions

Connecting Statements. Today. First there was logic jumping forward.. ..and then proofs and then induction...

Iterative Learning of Single Individual Haplotypes from High-Throughput DNA Sequencing Data

CHAPTER 4 OPTIMIZATION OF WEB CACHING PERFORMANCE BY CLUSTERING-BASED PRE-FETCHING TECHNIQUE USING MODIFIED ART1 (MART1)

Transcription:

Boolean Functional Synthesis via Self-Substitution Lucas M. Tabajara Rice University lucasmt@rice.edu May 9, 2016 Joint work with Dror Fried and Moshe Vardi Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 1 / 14

Motivation x 1 y 1. g : Bm Bn. x m y n Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 2 / 14

Motivation x 1 y 1. g : Bm Bn. x m y n f : B m B n f ( x, y) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 2 / 14

Motivation x 1 y 1. g : Bm Bn. x m y n f : B m B n f ( x, y) g : B m B n y = g( x) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 2 / 14

Motivation x 1 y 1. g : Bm Bn. x m y n f : B m B n f ( x, y) g : B m B n y = g( x) Given f ( x, y), how to obtain g( x)? Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 2 / 14

Motivation x 1 y 1. g : Bm Bn. x m y n f : B m B n f ( x, y) g : B m B n y = g( x) Given f ( x, y), how to obtain g( x)? How to identify when an input x has no corresponding output? Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 2 / 14

Overview 1 Problem formulation 2 Framework Introducing Self-Substitution Synthesis in two phases 3 Experimental evaluation Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 3 / 14

Problem formulation Given: Specification: Boolean formula f ( x, y) Input variables: x 1,..., x m Output variables: y 1,..., y n Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 4 / 14

Problem formulation Given: Specification: Boolean formula f ( x, y) Input variables: x 1,..., x m Output variables: y 1,..., y n Obtain: Precondition: Boolean formula p( x) p( x) is true exactly for those inputs for which there is a valid output Formally, p( x) y.f ( x, y) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 4 / 14

Problem formulation Given: Specification: Boolean formula f ( x, y) Input variables: x 1,..., x m Output variables: y 1,..., y n Obtain: Precondition: Boolean formula p( x) p( x) is true exactly for those inputs for which there is a valid output Formally, p( x) y.f ( x, y) Implementation: Boolean function g( x) = (g 1 ( x),..., g n ( x)) for every input that satisfies the precondition, g satisfies f Formally, p( x) f ( x, g( x)) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 4 / 14

Self-Substitution Lemma (Self-Substitution) Let f ( x, y) be a Boolean formula. Then, y.f ( x, y) f ( x, f ( x, 1)) y.f ( x, y) f ( x, f ( x, 0)) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 5 / 14

Self-Substitution Lemma (Self-Substitution) Let f ( x, y) be a Boolean formula. Then, y.f ( x, y) f ( x, f ( x, 1)) y.f ( x, y) f ( x, f ( x, 0)) Self-Substitution provides a novel way to perform Quantifier Elimination. Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 5 / 14

Self-Substitution for Synthesis For a specification f ( x, y) of a single output variable, Self-Substitution directly defines an implementation for y: Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 6 / 14

Self-Substitution for Synthesis For a specification f ( x, y) of a single output variable, Self-Substitution directly defines an implementation for y: y.f ( x, y) f ( x, f ( x, 1)) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 6 / 14

Self-Substitution for Synthesis For a specification f ( x, y) of a single output variable, Self-Substitution directly defines an implementation for y: y.f ( x, y) f ( x, f ( x, 1)) g( x) = f ( x, 1) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 6 / 14

Self-Substitution for Synthesis For a specification f ( x, y) of a single output variable, Self-Substitution directly defines an implementation for y: y.f ( x, y) f ( x, f ( x, 1)) g( x) = f ( x, 1) f ( x, 1) is a default 1 implementation of y. Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 6 / 14

General framework Given a specification f ( x, y), we perform synthesis in two phases: Phase 1: Quantifier elimination Phase 2: Function construction Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 7 / 14

Phase 1: Quantifier Elimination Using Self-Substitution, eliminate each y i in sequence. At each step of this process we obtain: f i ( x, y 1,..., y i ) y i+1... y n.f ( x, y 1,..., y n ) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 8 / 14

Phase 1: Quantifier Elimination Using Self-Substitution, eliminate each y i in sequence. At each step of this process we obtain: f i ( x, y 1,..., y i ) y i+1... y n.f ( x, y 1,..., y n ) In the final step, we have: f 0 ( x) y 1... y n.f ( x, y 1,..., y n ) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 8 / 14

Phase 1: Quantifier Elimination Using Self-Substitution, eliminate each y i in sequence. At each step of this process we obtain: f i ( x, y 1,..., y i ) y i+1... y n.f ( x, y 1,..., y n ) In the final step, we have: f 0 ( x) y 1... y n.f ( x, y 1,..., y n ) f 0 ( x) is exactly the precondition p( x). Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 8 / 14

Phase 2: Function construction For each output y i, use f i ( x, y 1,..., y i ) to construct g i ( x). Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 9 / 14

Phase 2: Function construction For each output y i, use f i ( x, y 1,..., y i ) to construct g i ( x). Base case: f 1 ( x, y 1 ) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 9 / 14

Phase 2: Function construction For each output y i, use f i ( x, y 1,..., y i ) to construct g i ( x). Base case: f 1 ( x, y 1 ) g 1 ( x) = f 1 ( x, 1) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 9 / 14

Phase 2: Function construction For each output y i, use f i ( x, y 1,..., y i ) to construct g i ( x). Base case: f 1 ( x, y 1 ) g 1 ( x) = f 1 ( x, 1) Induction step: f i ( x, y 1,..., y i 1, y i ) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 9 / 14

Phase 2: Function construction For each output y i, use f i ( x, y 1,..., y i ) to construct g i ( x). Base case: f 1 ( x, y 1 ) g 1 ( x) = f 1 ( x, 1) Induction step: f i ( x, y 1,..., y i 1, y i ) g i ( x) = f i ( x, g 1 ( x),..., g i 1 ( x), 1) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 9 / 14

Phase 2: Function construction For each output y i, use f i ( x, y 1,..., y i ) to construct g i ( x). Base case: f 1 ( x, y 1 ) g 1 ( x) = f 1 ( x, 1) Induction step: f i ( x, y 1,..., y i 1, y i ) g i ( x) = f i ( x, g 1 ( x),..., g i 1 ( x), 1) g( x) = (g 1 ( x),..., g n ( x)) is a correct implementation of f ( x, y). Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 9 / 14

Experiments RSynth: implementation of the framework using Binary Decision Diagrams Comparison with MonoSkolem tool based on (Jiang et al., 2009) Evaluation on scalable benchmarks Function Specification Subtraction y = x x y + x = x Maximum y = max( x, x ) ( y x) ( y x ) (( y = x) ( y = x )) Ceiling of Average x + x y = 2 (2 y = x + x ) (2 y + 1 = x + x ) Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 10 / 14

Results 10000 1000 100 T (s) 10 1 Subtraction (RSynth) 0.1 Maximum (RSynth) Ceiling of Average (RSynth) 0.01 Subtraction (MonoSkolem) Maximum (MonoSkolem) Ceiling of Average (MonoSkolem) 0.001 0 200 400 600 800 1000 1200 n Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 11 / 14

Conclusions When problem has an efficient variable ordering, performance scales well even for a large number of variables. RSynth outperforms previous approaches, even using a naive strategy for selecting implementations. Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 12 / 14

Future work Factored representation as a way to control formula size. More elaborate strategies for selecting the implementation for each variable. Alternative representations Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 13 / 14

Thank you! Questions? Lucas M. Tabajara (Rice University) Boolean Functional Synthesis May 9, 2016 14 / 14