Term Algebras with Length Function and Bounded Quantifier Elimination

Size: px
Start display at page:

Transcription

1 with Length Function and Bounded Ting Zhang, Henny B Sipma, Zohar Manna Stanford University STeP Group, September 3, 2004 TPHOLs p 1/37

2 Motivation: Program Verification Motivation BQE Outline with Integers Term algebras can model a wide range of tree-like data structures To verify programs we need to reason about these data structures Programming languages often involve multiple data domains, resulting in verification conditions that span multiple theories Common mixed constraints are combinations of data structures with integer constraints on the size of those structures STeP Group, September 3, 2004 TPHOLs p 2/37

3 Bounded Motivation BQE Outline with Integers In Theory: Term algebras have nonelementary time complexity [FR79] The complexity lower bound remains the same for any sub-theories of term algebras [CL89, Vor96] In Practice: We rarely deal with formulae with a large quantifier alternation depth Therefore it is worthwhile to investigate the bounded class of formulae Previous Work: We gave a quantifier-elimination procedure for the extended theory [ZSM04b] But no complexity upper bound is established STeP Group, September 3, 2004 TPHOLs p 3/37

4 Outline Motivation BQE Outline with Integers A Procedure for with Length Function A Procedure for with Length Function Future work STeP Group, September 3, 2004 TPHOLs p 4/37

5 Definitions and Notations Axiomatization Example: LISP lists with Integers Definition 1 A term algebra : The term domain : A finite set of constants: : A finite set of constructors:,,,,,, : A finite set of selectors For a constructor there are selectors in : A finite set of testers For each constructor corresponding tester Two Properties: consists of with arity there is a The data domain is the set of data objects generated exclusively by applying constructors Each data object is uniquely generated, STeP Group, September 3, 2004 TPHOLs p 5/37

6 Definitions and Notations Definitions and Notations Axiomatization Example: LISP lists with Integers and means that is a constructor with are the corresponding selectors of A term is a constructor term ( -term) if the outmost function symbol of is a constructor A term is a selector term ( symbol of is a selector -term) if the outmost function We assume that no constructor term appears inside selectors as simplification can always be done For example, simplifies to denote selector sequences For stands for, A selector term is called proper if holds STeP Group, September 3, 2004 TPHOLs p 6/37

7 Axiomatization of Definitions and Notations Axiomatization Example: LISP lists with Integers Construction vs selection Unification closure Acyclicity properly contains, if Uniqueness, and are distinct atoms and if constructors Domain closure is built solely by constructors and and, and are distinct, if STeP Group, September 3, 2004 TPHOLs p 7/37

8 Example: LISP lists Signature: Definitions and Notations Axiomatization Axioms: Example: LISP lists with Integers Formulas: (valid) (valid) STeP Group, September 3, 2004 TPHOLs p 8/37

9 Preliminary QE Preliminary Solved Form It is well-known that eliminating arbitrary quantifiers reduces to eliminating existential quantifiers from formulae in the form (1) with Integers where ( We can also assume that ) are literals [Hod93] are not of the form as simplifies to, if, if, if does not occur in ; is a constructor term properly containing ; STeP Group, September 3, 2004 TPHOLs p 9/37

10 Solved Form QE Preliminary Solved Form with Integers Definition 2 (Solved Form) We say solved form (with respect to ), is in the if are not in equalities, not asserted to be constants and not inside selector terms General Idea: An existential formula in solved form has solutions under any instantiation of parameters Procedure Outline: A sequence of equivalence-preserving transformations will bring the input formula into a disjunction of formulae in the solved form The whole block of existential quantifiers can be eliminated by removing all literals containing in the matrix STeP Group, September 3, 2004 TPHOLs p 10/37

11 for Algorithm 1 Input: Type Completion Eliminate -terms Decompose Relations Solve Equalities Eliminate Atoms Final Elimination with Integers Guess a type completion of Eliminate selector terms containing Decompose relations between constructor terms Solve equalities of the form Eliminate variables asserted to be constants Eliminate quantifiers and all literals containing STeP Group, September 3, 2004 TPHOLs p 11/37

12 Type Completion Type Completion Eliminate -terms Decompose Relations Solve Equalities Eliminate Atoms Final Elimination Definition 3 is a type completion of if from by adding tester predicates such that for any term either is present in Example 1 A possible type completion for is obtained (for some constructor ) or is with Integers With this type information, simplifies to Guess a type completion of selector term to a proper one and simplify every STeP Group, September 3, 2004 TPHOLs p 12/37

13 Eliminate -terms Containing s Type Completion Eliminate -terms Decompose Relations Solve Equalities Eliminate Atoms Final Elimination with Integers Replace all selector terms containing equivalent constructor terms Example 2 Let Similarly, can be rewritten as by the corresponding becomes It may increase the number of existential quantifiers, but leaves parameters unchanged In the following transformations, selector terms never appear inside STeP Group, September 3, 2004 TPHOLs p 13/37

14 Decompose Relations between -Terms Replace (2) Type Completion Eliminate -terms Decompose Relations Solve Equalities Eliminate Atoms Final Elimination with Integers by Repeat until no equality of the form (2) appears Replace by (3) Repeat until no equality of the form (3) appears STeP Group, September 3, 2004 TPHOLs p 14/37

15 Solve Equalities of the Form Type Completion Eliminate -terms Decompose Relations Solve Equalities Eliminate Atoms Final Elimination with Integers Solve equations of the form 1 2 is a block of selectors, is a constructor term containing, where The result is a set of equations in terms of selector language Example 3 Suppose that in the The solution set of is STeP Group, September 3, 2004 TPHOLs p 15/37

16 Eliminate Variables Asserted to Be Constant Instantiate to each constant to eliminate be an atom Ie, if is asserted to Type Completion Eliminate -terms Decompose Relations Solve Equalities Eliminate Atoms Final Elimination with Integers STeP Group, September 3, 2004 TPHOLs p 16/37

17 Eliminate Literals Containing s Now we can assume formulae are in the form Type Completion Eliminate -terms Decompose Relations Solve Equalities Eliminate Atoms Final Elimination Since (4) with Integers (5) is in solved form and hence valid, (4) is equivalent to (6) STeP Group, September 3, 2004 TPHOLs p 17/37

18 Language and Structure with Integers Language and Structure Presburger arithmetic (PA): Two-sorted language 1 2 3, : signature of term algebras : signature of Presburger arithmetic, the length function defined by : if if is an atom : generalized integer terms STeP Group, September 3, 2004 TPHOLs p 18/37

19 Counting Constraints with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) Definition 4 (Counting Constraint) A counting constraint is a predicate ( ) that is true if and only if there are at least constants -terms replaced by with Example 4 For where number different -terms is -terms of length in is similarly defined with with one constant, is the least number such that the is greater than Reason: gives the number of binary trees with (that tree has nodes) -th Catalan leaves STeP Group, September 3, 2004 TPHOLs p 19/37

20 Equality Completion with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) In order to construct counting constraints, we need equality information between terms and equality information between lengths of terms Definition 5 (Equality Completion) Let -terms An equality completion of consisting of the following literals: for any of and, and exactly one of in Example 5 Let and be A possible equality completion of is be a set of is a formula, exactly one and are (7) STeP Group, September 3, 2004 TPHOLs p 20/37

21 Clusters with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) Definition 6 (Clusters) Let denote the equivalence class containing with respect to term equality We say that is a cluster if length are pairwise unequal terms of the same A cluster is maximal if no superset of it is a cluster A cluster is closed if is maximal and for any maximal Two distinct closed clusters are said to be mutually independent The rank of a cluster terms, written, is the length of its, STeP Group, September 3, 2004 TPHOLs p 21/37

22 Clusters: Examples with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) Example 6 In Ex 5, formula (7) induces two mutually independent clusters with Example 7 The formula gives two maximal clusters However, neither incomparable nor and and is closed and their ranks are Any equality completion induces a set of mutually independent clusters STeP Group, September 3, 2004 TPHOLs p 22/37

23 Length Constraint Completion For the construction of accurate length constraints for need to make complete Definition 7 (Length Constraint Completion) Let, we with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) We say a formula with respect to is a completion of if the following formulae are valid: in (8) (9) STeP Group, September 3, 2004 TPHOLs p 23/37

24 Length Constraint Completion: Example with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) Example 8 Let Consider the following formulae: is a completion of satisfies (8), it does not satisfies (9) Reason: Reason: satisfies (9), but not (8) STeP Group, September 3, 2004 TPHOLs p 24/37

25 Strong Solved Form with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) For the construction of length constraint completion, we require that be in strong normal form Definition 8 We say form (with respect to if where containing ) is in strong solved is in solved form and all literals of the form and is a constructor term (properly), are redundant Example 9 In Ex 5, formula (7) is not in strong solved form However, it can be made into strong solved form by adding or STeP Group, September 3, 2004 TPHOLs p 25/37

26 Notations The following predicates are needed to describe the construction algorithm: with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) where stands for, are the distinct arities of constructors STeP Group, September 3, 2004 TPHOLs p 26/37

27 Compute Length Constraint Completion Algorithm 2 (Length Constraint Completion) Input: with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) Initially set in, if and has, if, if, add the following to is a constant, if is untyped is, if, if has -typed is For each term -typed with children occurs in an untyped clusters of size constants, if occurs in an constants -cluster of size occurring and STeP Group, September 3, 2004 TPHOLs p 27/37

28 Quantifiers Elimination on Integer Variables Algorithm 3 (Integer ) We assume that formulae with quantifiers on integer variables are in the form (10) with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) where, are integer variables and Since is in, obtaining, we can move are term variables out of the scope of Now is essentially a Presburger formula and we can proceed to remove the block of existential quantifiers In fact, we can defer the elimination of integer quantifiers until all term quantifiers have been eliminated (11) STeP Group, September 3, 2004 TPHOLs p 28/37

29 Quantifiers Elimination on Term Variables with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) Algorithm 4 We assume that formulae with quantifiers on term variables are in the form where are term variables, are integer variables, and is an arbitrary Presburger formula Run Alg 1 up to the last step Apply the following subprocedures successively unless noted otherwise 1 Equality Completion (Alg 5) 2 Elimination of Equalities Containing 3 Propagation of Disequalities of the Form (Alg 6) (Alg 7) 4 Reduction of Term Quantifiers to Integer Quantifiers (Alg8) (12) STeP Group, September 3, 2004 TPHOLs p 29/37

30 Compute Equality Completion Algorithm 5 (Equality Completion) We assume the input formula is in the form (renaming the first part of (5)) (13) with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) Let be all terms including subterms which appear in (13) Guess an equality completion of and we obtain (14) STeP Group, September 3, 2004 TPHOLs p 30/37

31 Eliminate Equalities Containing s with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) Algorithm 6 (Elimination of Equalities Containing ) Let denote the set of equalities containing Exhaustively apply the following subprocedures until is empty Pick an is Then we know does not occur in and hence we can remove by substituting for all occurrences of is is Then replace by Then replace by STeP Group, September 3, 2004 TPHOLs p 31/37

32 Propagate Disequalities with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) Algorithm 7 (Propagation of Disequalities) Let of disequalities of the form Exhaustively apply the following subprocedures until empty Pick Disequality Splitting Remove Return if we take from and add to denote the set ; continue otherwise is STeP Group, September 3, 2004 TPHOLs p 32/37

33 Propagate Disequalities (2) Length Splitting Suppose we take Split on ( ) with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) Return if we take Equality Splitting Suppose the cluster of Split on If we choose any properly contains If we choose ; ; continue otherwise contains, rerun Alg 6 in case that, rerun this algorithm STeP Group, September 3, 2004 TPHOLs p 33/37

34 Reduction of Term Quantifiers with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) Algorithm 8 (Reduction of Term Quantifiers to Integer Quantifiers) Omitting the redundant disequalities of the form, we may assume the resulting formula be where and simplicity is of the form does not contain, is the integer constraint obtained from Algs 5, 7, is the PA formula not listed before for, (15) STeP Group, September 3, 2004 TPHOLs p 34/37

35 Reduction of Term Quantifiers (2) with Integers Counting Constraints Equality Completion Clusters Clusters: Examples Length Constraint Completion Example Strong Solved Form Notations Compute Length Completion QE on Integers QE on Terms Compute Equality Completion Eliminate Equalities Propagate Disequalities Propagate Disequalities (2) Reduction of TQ Reduction of TQ (2) Let denote Call Alg 2 to get the completion with respect to Now we claim that (15) is equivalent to which in turn is equivalent to of in (16) (17) STeP Group, September 3, 2004 TPHOLs p 35/37

36 with Integers Theorem 1 Alg 1 eliminates a block of quantifiers in time Theorem 2 is decidable in Theorem 3 Alg 4 eliminates a block of quantifiers in time Theorem 4 is decidable in STeP Group, September 3, 2004 TPHOLs p 36/37

37 with Integers Refine length constraint construction to reduce double-exponential blowup to one exponential Apply bounded elimination to improve the decision procedure of the first-order theory of Knuth-Bendix order [ZSM04a] STeP Group, September 3, 2004 TPHOLs p 37/37

38 [CL89] Hubert Comon and Pierre Lescanne Equational problems and disunification Journal of Symbolic Computation, 7: , 1989 [FR79] [Hod93] [Vor96] J Ferrante and C W Rackoff The Computational of Logical Theories Springer-Verlag, 1979 Wilfrid Hodges Model Theory Cambridge University Press, Cambridge, UK, 1993 Sergei Vorobyov An improved lower bound for the elementary theories of trees In Proc of the Intl Conference on Automated Deduction, volume 1104 of LNCS, pages Springer-Verlag, 1996 [ZSM04a] Ting Zhang, Henny Sipma, and Zohar Manna The decidability of the first-order theory of term algebras with Knuth-Bendix order, 2004 Submitted [ZSM04b] Ting Zhang, Henny Sipma, and Zohar Manna Decision procedures for recursive data structures with integer constraints, 2004 To appear in the Proceedings of the International Joint Conference on Automated Reasoning 37-1

Decision Procedures for Recursive Data Structures with Integer Constraints

Decision Procedures for Recursive Data Structures with Ting Zhang, Henny B Sipma, Zohar Manna Stanford University tingz,sipma,zm@csstanfordedu STeP Group, June 29, 2004 IJCAR 2004 - p 1/31 Outline Outline

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Foundations of AI 9. Predicate Logic Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller 09/1 Contents Motivation

Data Analytics and Boolean Algebras

Data Analytics and Boolean Algebras Hans van Thiel November 28, 2012 c Muitovar 2012 KvK Amsterdam 34350608 Passeerdersstraat 76 1016 XZ Amsterdam The Netherlands T: + 31 20 6247137 E: hthiel@muitovar.com

Safe Stratified Datalog With Integer Order Does not Have Syntax

Safe Stratified Datalog With Integer Order Does not Have Syntax Alexei P. Stolboushkin Department of Mathematics UCLA Los Angeles, CA 90024-1555 aps@math.ucla.edu Michael A. Taitslin Department of Computer

The Typed λ Calculus and Type Inferencing in ML

Notes on Types S. Arun-Kumar Department of Computer Science and Engineering Indian Institute of Technology New Delhi, 110016 email: sak@cse.iitd.ernet.in April 14, 2002 2 Chapter 1 The Typed λ Calculus

A Knowledge Compilation Technique for ALC Tboxes

A Knowledge Compilation Technique for ALC Tboxes Ulrich Furbach and Heiko Günther and Claudia Obermaier University of Koblenz Abstract Knowledge compilation is a common technique for propositional logic

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

Overview CS389L: Automated Logical Reasoning Lecture 6: First Order Logic Syntax and Semantics Işıl Dillig So far: Automated reasoning in propositional logic. Propositional logic is simple and easy to

An Evolution of Mathematical Tools

An Evolution of Mathematical Tools From Conceptualization to Formalization Here's what we do when we build a formal model (or do a computation): 0. Identify a collection of objects/events in the real world.

Recursion and Structural Induction

Recursion and Structural Induction Mukulika Ghosh Fall 2018 Based on slides by Dr. Hyunyoung Lee Recursively Defined Functions Recursively Defined Functions Suppose we have a function with the set of non-negative

The Encoding Complexity of Network Coding

The Encoding Complexity of Network Coding Michael Langberg Alexander Sprintson Jehoshua Bruck California Institute of Technology Email: mikel,spalex,bruck @caltech.edu Abstract In the multicast network

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE A Modern Approach to Discrete Mathematics SIXTH EDITION Judith L. Gersting University of Hawaii at Hilo W. H. Freeman and Company New York Preface Note to the

Action Language Verifier, Extended

Action Language Verifier, Extended Tuba Yavuz-Kahveci 1, Constantinos Bartzis 2, and Tevfik Bultan 3 1 University of Florida 2 Carnegie Mellon University 3 UC, Santa Barbara 1 Introduction Action Language

Formal Predicate Calculus. Michael Meyling

Formal Predicate Calculus Michael Meyling May 24, 2013 2 The source for this document can be found here: http://www.qedeq.org/0_04_07/doc/math/qedeq_formal_logic_v1.xml Copyright by the authors. All rights

Relational Database: The Relational Data Model; Operations on Database Relations

Relational Database: The Relational Data Model; Operations on Database Relations Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin Overview

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

Trees 1 Introduction Trees are very special kind of (undirected) graphs. Formally speaking, a tree is a connected graph that is acyclic. 1 This definition has some drawbacks: given a graph it is not trivial

[Draft. Please do not distribute] Online Proof-Producing Decision Procedure for Mixed-Integer Linear Arithmetic

[Draft Please do not distribute] Online Proof-Producing Decision Procedure for Mixed-Integer Linear Arithmetic Sergey Berezin, Vijay Ganesh, and David L Dill Stanford University {berezin,vganesh,dill}@stanfordedu

EXTENSIONS OF FIRST ORDER LOGIC

EXTENSIONS OF FIRST ORDER LOGIC Maria Manzano University of Barcelona CAMBRIDGE UNIVERSITY PRESS Table of contents PREFACE xv CHAPTER I: STANDARD SECOND ORDER LOGIC. 1 1.- Introduction. 1 1.1. General

Integrating SysML and OWL

Integrating SysML and OWL Henson Graves Lockheed Martin Aeronautics Company Fort Worth Texas, USA henson.graves@lmco.com Abstract. To use OWL2 for modeling a system design one must be able to construct

LOGIC AND DISCRETE MATHEMATICS

LOGIC AND DISCRETE MATHEMATICS A Computer Science Perspective WINFRIED KARL GRASSMANN Department of Computer Science University of Saskatchewan JEAN-PAUL TREMBLAY Department of Computer Science University

Proving the Correctness of Distributed Algorithms using TLA

Proving the Correctness of Distributed Algorithms using TLA Khushboo Kanjani, khush@cs.tamu.edu, Texas A & M University 11 May 2007 Abstract This work is a summary of the Temporal Logic of Actions(TLA)

Yices 1.0: An Efficient SMT Solver

Yices 1.0: An Efficient SMT Solver SMT-COMP 06 Leonardo de Moura (joint work with Bruno Dutertre) {demoura, bruno}@csl.sri.com. Computer Science Laboratory SRI International Menlo Park, CA Yices: An Efficient

Contents. Chapter 1 SPECIFYING SYNTAX 1

Contents Chapter 1 SPECIFYING SYNTAX 1 1.1 GRAMMARS AND BNF 2 Context-Free Grammars 4 Context-Sensitive Grammars 8 Exercises 8 1.2 THE PROGRAMMING LANGUAGE WREN 10 Ambiguity 12 Context Constraints in Wren

15-819M: Data, Code, Decisions

15-819M: Data, Code, Decisions 08: First-Order Logic André Platzer aplatzer@cs.cmu.edu Carnegie Mellon University, Pittsburgh, PA André Platzer (CMU) 15-819M/08: Data, Code, Decisions 1 / 40 Outline 1

Programming Languages Third Edition

Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic

3.4 Deduction and Evaluation: Tools 3.4.1 Conditional-Equational Logic The general definition of a formal specification from above was based on the existence of a precisely defined semantics for the syntax

Cuts from Proofs: A Complete and Practical Technique for Solving Linear Inequalities over Integers

Cuts from Proofs: A Complete and Practical Technique for Solving Linear Inequalities over Integers Isil Dillig, Thomas Dillig, and Alex Aiken Computer Science Department Stanford University Linear Arithmetic

Software Engineering Lecture Notes

Software Engineering Lecture Notes Paul C. Attie August 30, 2013 c Paul C. Attie. All rights reserved. 2 Contents I Hoare Logic 11 1 Propositional Logic 13 1.1 Introduction and Overview..............................

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter 2.1-2.7 p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer

Lecture Notes on Real-world SMT

15-414: Bug Catching: Automated Program Verification Lecture Notes on Real-world SMT Matt Fredrikson Ruben Martins Carnegie Mellon University Lecture 15 1 Introduction In the previous lecture we studied

VS 3 : SMT Solvers for Program Verification

VS 3 : SMT Solvers for Program Verification Saurabh Srivastava 1,, Sumit Gulwani 2, and Jeffrey S. Foster 1 1 University of Maryland, College Park, {saurabhs,jfoster}@cs.umd.edu 2 Microsoft Research, Redmond,

3 No-Wait Job Shops with Variable Processing Times

3 No-Wait Job Shops with Variable Processing Times In this chapter we assume that, on top of the classical no-wait job shop setting, we are given a set of processing times for each operation. We may select

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

is another way of showing that an argument is correct. Definitions: Literal: A variable or a negation of a variable is called a literal. Sum and Product: A disjunction of literals is called a sum and a

Essential Gringo (Draft)

Essential Gringo (Draft) Vladimir Lifschitz, University of Texas 1 Introduction The designers of the Abstract Gringo language AG [Gebser et al., 2015a] aimed at creating a relatively simple mathematical

A Survey of Mathematics with Applications 8 th Edition, 2009

A Correlation of A Survey of Mathematics with Applications 8 th Edition, 2009 South Carolina Discrete Mathematics Sample Course Outline including Alternate Topics and Related Objectives INTRODUCTION This

Treewidth and graph minors

Treewidth and graph minors Lectures 9 and 10, December 29, 2011, January 5, 2012 We shall touch upon the theory of Graph Minors by Robertson and Seymour. This theory gives a very general condition under

Paths, Flowers and Vertex Cover

Paths, Flowers and Vertex Cover Venkatesh Raman, M.S. Ramanujan, and Saket Saurabh Presenting: Hen Sender 1 Introduction 2 Abstract. It is well known that in a bipartite (and more generally in a Konig)

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Module 6 Knowledge Representation and Logic (First Order Logic) 6.1 Instructional Objective Students should understand the advantages of first order logic as a knowledge representation language Students

Introduction to Sets and Logic (MATH 1190)

Introduction to Sets and Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics and Statistics York University Dec 4, 2014 Outline 1 2 3 4 Definition A relation R from a set A to a set

The Structure of Bull-Free Perfect Graphs

The Structure of Bull-Free Perfect Graphs Maria Chudnovsky and Irena Penev Columbia University, New York, NY 10027 USA May 18, 2012 Abstract The bull is a graph consisting of a triangle and two vertex-disjoint

Losp for Predicate Calculus

Losp for Predicate Calculus William Bricken June 1985 Contents 1 Extension to Predicate Calculus 1 1.1 Representation of Terms....................... 1 1.2 The Theory of Equality.......................

DISTINGUISHING NUMBER AND ADJACENCY PROPERTIES ANTHONY BONATO AND DEJAN DELIĆ Dedicated to the memory of Roland Fraïssé. Abstract. The distinguishing number of countably infinite graphs and relational

Unification in Maude. Steven Eker

Unification in Maude Steven Eker 1 Unification Unification is essentially solving equations in an abstract setting. Given a signature Σ, variables X and terms t 1, t 2 T (Σ) we want to find substitutions

Unlabeled equivalence for matroids representable over finite fields

Unlabeled equivalence for matroids representable over finite fields November 16, 2012 S. R. Kingan Department of Mathematics Brooklyn College, City University of New York 2900 Bedford Avenue Brooklyn,

arxiv:submit/ [math.co] 9 May 2011

arxiv:submit/0243374 [math.co] 9 May 2011 Connectivity and tree structure in finite graphs J. Carmesin R. Diestel F. Hundertmark M. Stein 6 May, 2011 Abstract We prove that, for every integer k 0, every

Framework for Design of Dynamic Programming Algorithms

CSE 441T/541T Advanced Algorithms September 22, 2010 Framework for Design of Dynamic Programming Algorithms Dynamic programming algorithms for combinatorial optimization generalize the strategy we studied

Sorting and Selection

Sorting and Selection Introduction Divide and Conquer Merge-Sort Quick-Sort Radix-Sort Bucket-Sort 10-1 Introduction Assuming we have a sequence S storing a list of keyelement entries. The key of the element

Deciding Extensions of the Theory of Arrays by Integrating Decision Procedures and Instantiation Strategies

Deciding Extensions of the Theory of Arrays by Integrating Decision Procedures and Instantiation Strategies Silvio Ghilardi 1, Enrica Nicolini 2, Silvio Ranise 13, and Daniele Zucchelli 13 1 Dipartimento

AND-OR GRAPHS APPLIED TO RUE RESOLUTION

AND-OR GRAPHS APPLIED TO RUE RESOLUTION Vincent J. Digricoli Dept. of Computer Science Fordham University Bronx, New York 104-58 James J, Lu, V. S. Subrahmanian Dept. of Computer Science Syracuse University-

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections p.

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections 10.1-10.3 p. 1/106 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer

Consistency and Set Intersection

Consistency and Set Intersection Yuanlin Zhang and Roland H.C. Yap National University of Singapore 3 Science Drive 2, Singapore {zhangyl,ryap}@comp.nus.edu.sg Abstract We propose a new framework to study

A Reduction of Conway s Thrackle Conjecture

A Reduction of Conway s Thrackle Conjecture Wei Li, Karen Daniels, and Konstantin Rybnikov Department of Computer Science and Department of Mathematical Sciences University of Massachusetts, Lowell 01854

Reasoning About Set Comprehensions Edmund S L Lam 1 and Iliano Cervesato 1 Carnegie Mellon University sllam@qatarcmuedu, iliano@cmuedu Abstract Set comprehension is a mathematical notation for defining

Interleaving Schemes on Circulant Graphs with Two Offsets

Interleaving Schemes on Circulant raphs with Two Offsets Aleksandrs Slivkins Department of Computer Science Cornell University Ithaca, NY 14853 slivkins@cs.cornell.edu Jehoshua Bruck Department of Electrical

DISTINGUISHING NUMBER AND ADJACENCY PROPERTIES ANTHONY BONATO AND DEJAN DELIĆ Dedicated to the memory of Roland Fraïssé. Abstract. The distinguishing number of countably infinite graphs and relational

Higher-Order Logic. Specification and Verification with Higher-Order Logic

Higher-Order Logic Specification and Verification with Higher-Order Logic Arnd Poetzsch-Heffter (Slides by Jens Brandt) Software Technology Group Fachbereich Informatik Technische Universität Kaiserslautern

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings Fatemeh Alinaghipour Taklimi, Shaun Fallat 1,, Karen Meagher 2 Department of Mathematics and Statistics, University of Regina,

1.3. Conditional expressions To express case distinctions like

Introduction Much of the theory developed in the underlying course Logic II can be implemented in a proof assistant. In the present setting this is interesting, since we can then machine extract from a

Automata Theory for Reasoning about Actions

Automata Theory for Reasoning about Actions Eugenia Ternovskaia Department of Computer Science, University of Toronto Toronto, ON, Canada, M5S 3G4 eugenia@cs.toronto.edu Abstract In this paper, we show

DPLL(Γ+T): a new style of reasoning for program checking

DPLL(Γ+T ): a new style of reasoning for program checking Dipartimento di Informatica Università degli Studi di Verona Verona, Italy June, 2011 Motivation: reasoning for program checking Program checking

Decision Procedures in the Theory of Bit-Vectors

Decision Procedures in the Theory of Bit-Vectors Sukanya Basu Guided by: Prof. Supratik Chakraborty Department of Computer Science and Engineering, Indian Institute of Technology, Bombay May 1, 2010 Sukanya

Syntactic Measures of Complexity

A thesis submitted to the University of Manchester for the degree of Doctor of Philosophy in the Faculty of Arts 1999 Bruce Edmonds Department of Philosophy Table of Contents Table of Contents - page 2

An Experimental CLP Platform for Integrity Constraints and Abduction

An Experimental CLP Platform for Integrity Constraints and Abduction Slim Abdennadher and Henning Christiansen Computer Science Department, University of Munich Oettingenstr. 67, 80538 München, Germany

Chapter 3: Propositional Languages

Chapter 3: Propositional Languages We define here a general notion of a propositional language. We show how to obtain, as specific cases, various languages for propositional classical logic and some non-classical

RAISE in Perspective

RAISE in Perspective Klaus Havelund NASA s Jet Propulsion Laboratory, Pasadena, USA Klaus.Havelund@jpl.nasa.gov 1 The Contribution of RAISE The RAISE [6] Specification Language, RSL, originated as a development

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

The Formal Semantics of Programming Languages An Introduction Glynn Winskel The MIT Press Cambridge, Massachusetts London, England Series foreword Preface xiii xv 1 Basic set theory 1 1.1 Logical notation

Rigidity, connectivity and graph decompositions

First Prev Next Last Rigidity, connectivity and graph decompositions Brigitte Servatius Herman Servatius Worcester Polytechnic Institute Page 1 of 100 First Prev Next Last Page 2 of 100 We say that a framework

Module 3. Requirements Analysis and Specification. Version 2 CSE IIT, Kharagpur

Module 3 Requirements Analysis and Specification Lesson 6 Formal Requirements Specification Specific Instructional Objectives At the end of this lesson the student will be able to: Explain what a formal

Z Notation. June 21, 2018

Z Notation June 21, 2018 1 Definitions There are many different ways to introduce an object in a Z specification: declarations, abbreviations, axiomatic definitions, and free types. Keep in mind that the

SAT-CNF Is N P-complete

SAT-CNF Is N P-complete Rod Howell Kansas State University November 9, 2000 The purpose of this paper is to give a detailed presentation of an N P- completeness proof using the definition of N P given

Chapter 10 Part 1: Reduction

//06 Polynomial-Time Reduction Suppose we could solve Y in polynomial-time. What else could we solve in polynomial time? don't confuse with reduces from Chapter 0 Part : Reduction Reduction. Problem X

Unifying and extending hybrid tractable classes of CSPs

Journal of Experimental & Theoretical Artificial Intelligence Vol. 00, No. 00, Month-Month 200x, 1 16 Unifying and extending hybrid tractable classes of CSPs Wady Naanaa Faculty of sciences, University

Relational Databases

Relational Databases Jan Chomicki University at Buffalo Jan Chomicki () Relational databases 1 / 49 Plan of the course 1 Relational databases 2 Relational database design 3 Conceptual database design 4

Tree Decompositions Why Matroids are Useful

Petr Hliněný, W. Graph Decompositions, Vienna, 2004 Tree Decompositions Why Matroids are Useful Petr Hliněný Tree Decompositions Why Matroids are Useful Department of Computer Science FEI, VŠB Technical

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 2. true / false ML can be compiled. 3. true / false FORTRAN can reasonably be considered

Proof-Pattern Recognition and Lemma Discovery in ACL2

Proof-Pattern Recognition and Lemma Discovery in ACL2 Jónathan Heras (joint work with K. Komendantskaya, M. Johansson and E. Maclean) University of Dundee http://staff.computing.dundee.ac.uk/jheras/acl2ml/

Distributed minimum spanning tree problem

Distributed minimum spanning tree problem Juho-Kustaa Kangas 24th November 2012 Abstract Given a connected weighted undirected graph, the minimum spanning tree problem asks for a spanning subtree with

Extremal Graph Theory: Turán s Theorem

Bridgewater State University Virtual Commons - Bridgewater State University Honors Program Theses and Projects Undergraduate Honors Program 5-9-07 Extremal Graph Theory: Turán s Theorem Vincent Vascimini

Faster parameterized algorithms for Minimum Fill-In

Faster parameterized algorithms for Minimum Fill-In Hans L. Bodlaender Pinar Heggernes Yngve Villanger Abstract We present two parameterized algorithms for the Minimum Fill-In problem, also known as Chordal

Substitution in Structural Operational Semantics and value-passing process calculi

Substitution in Structural Operational Semantics and value-passing process calculi Sam Staton Computer Laboratory University of Cambridge Abstract Consider a process calculus that allows agents to communicate

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

NO WARRANTY THIS MATERIAL OF CARNEGIE MELLON UNIVERSITY AND ITS SOFTWARE ENGINEERING INSTITUTE IS FURNISHED ON AN AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED

Discrete Mathematics Lecture 4. Harper Langston New York University

Discrete Mathematics Lecture 4 Harper Langston New York University Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2,, a n, Each individual element a k is called a

A Method for Construction of Orthogonal Arrays 1

Eighth International Workshop on Optimal Codes and Related Topics July 10-14, 2017, Sofia, Bulgaria pp. 49-54 A Method for Construction of Orthogonal Arrays 1 Iliya Bouyukliev iliyab@math.bas.bg Institute

ON WEIGHTED RECTANGLE PACKING WITH LARGE RESOURCES*

ON WEIGHTED RECTANGLE PACKING WITH LARGE RESOURCES* Aleksei V. Fishkin, 1 Olga Gerber, 1 Klaus Jansen 1 1 University of Kiel Olshausenstr. 40, 24118 Kiel, Germany {avf,oge,kj}@informatik.uni-kiel.de Abstract

Typed Scheme: Scheme with Static Types

Typed Scheme: Scheme with Static Types Version 4.1.1 Sam Tobin-Hochstadt October 5, 2008 Typed Scheme is a Scheme-like language, with a type system that supports common Scheme programming idioms. Explicit

Boolean Representations and Combinatorial Equivalence

Chapter 2 Boolean Representations and Combinatorial Equivalence This chapter introduces different representations of Boolean functions. It then discusses the applications of these representations for proving

Lecture 7 February 26, 2010

6.85: Advanced Data Structures Spring Prof. Andre Schulz Lecture 7 February 6, Scribe: Mark Chen Overview In this lecture, we consider the string matching problem - finding all places in a text where some

ON SWELL COLORED COMPLETE GRAPHS

Acta Math. Univ. Comenianae Vol. LXIII, (1994), pp. 303 308 303 ON SWELL COLORED COMPLETE GRAPHS C. WARD and S. SZABÓ Abstract. An edge-colored graph is said to be swell-colored if each triangle contains

Introductory logic and sets for Computer scientists

Introductory logic and sets for Computer scientists Nimal Nissanke University of Reading ADDISON WESLEY LONGMAN Harlow, England II Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario

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

Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis Isil Dillig, Thomas Dillig, Alex Aiken Stanford University Scalability and Formula Size Many program analysis

Tutorial: Computable Model Theory and Differential Algebra

Tutorial: Computable Model Theory and Differential Algebra Russell Miller, Queens College & Graduate Center C.U.N.Y. April 12, 2007 Workshop in Differential Algebra and Related Topics Rutgers University,

Definition of Graphs and Trees. Representation of Trees.

Definition of Graphs and Trees. Representation of Trees. Chapter 6 Definition of graphs (I) A directed graph or digraph is a pair G = (V,E) s.t.: V is a finite set called the set of vertices of G. E V

Abstract Interpretation Using Laziness: Proving Conway s Lost Cosmological Theorem

Abstract Interpretation Using Laziness: Proving Conway s Lost Cosmological Theorem Kevin Watkins CMU CSD POP Seminar December 8, 2006 In partial fulfillment of the speaking skills requirement ? 2111 1231

2386 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 52, NO. 6, JUNE 2006

2386 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 52, NO. 6, JUNE 2006 The Encoding Complexity of Network Coding Michael Langberg, Member, IEEE, Alexander Sprintson, Member, IEEE, and Jehoshua Bruck,

Dr. Amotz Bar-Noy s Compendium of Algorithms Problems. Problems, Hints, and Solutions

Dr. Amotz Bar-Noy s Compendium of Algorithms Problems Problems, Hints, and Solutions Chapter 1 Searching and Sorting Problems 1 1.1 Array with One Missing 1.1.1 Problem Let A = A[1],..., A[n] be an array

Logic and Computation

Logic and Computation From Conceptualization to Formalization Here's what we do when we build a formal model (or do a computation): 0. Identify a collection of objects/events in the real world. This is

Operational Semantics

15-819K: Logic Programming Lecture 4 Operational Semantics Frank Pfenning September 7, 2006 In this lecture we begin in the quest to formally capture the operational semantics in order to prove properties

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS

1 THE FORMALIZATION OF MATHEMATICS by Harvey M. Friedman Ohio State University Department of Mathematics friedman@math.ohio-state.edu www.math.ohio-state.edu/~friedman/ May 21, 1997 Can mathematics be

Parameterized graph separation problems

Parameterized graph separation problems Dániel Marx Department of Computer Science and Information Theory, Budapest University of Technology and Economics Budapest, H-1521, Hungary, dmarx@cs.bme.hu Abstract.