Quantifiers, Arithmetic and Fixed-points

20
Quantifiers, Arithmetic and Fixed-points Quantifier Elimination Procedures in Z3 Support for Non-linear arithmetic Fixed-points – features and a preview

description

Quantifiers, Arithmetic and Fixed-points. Quantifier Elimination Procedures in Z3 Support for Non-linear arithmetic Fixed-points – features and a preview. Quantifier Elimination. O ption: ELIM_QUANTIFIERS=true LRA – Linear real arithmetic LIA – Linear integer arithemtic - PowerPoint PPT Presentation

Transcript of Quantifiers, Arithmetic and Fixed-points

Page 1: Quantifiers, Arithmetic and Fixed-points

Quantifiers, Arithmetic and Fixed-points

Quantifier Elimination Procedures in Z3

Support for Non-linear arithmetic

Fixed-points – features and a preview

Page 2: Quantifiers, Arithmetic and Fixed-points

Quantifier EliminationOption: ELIM_QUANTIFIERS=true

LRA – Linear real arithmeticLIA – Linear integer arithemticD – Algebraic DatatypesBooleans & Bit-vectors – (All-SAT)NRA2 – Quadratic (using virtual substitutions)Arrays – ad hoc

Page 3: Quantifiers, Arithmetic and Fixed-points

LRA

Terms

Atoms

Formulas

Page 4: Quantifiers, Arithmetic and Fixed-points

Quantifier Elimination Samples

Page 5: Quantifiers, Arithmetic and Fixed-points

LIATerms

Atoms

Formulas

Page 6: Quantifiers, Arithmetic and Fixed-points

D – algebraic data-types

Domain Closure:

Eliminate accessors:

Solve equalities:

Virtual substitution:

∃𝑥 .𝜑 [ 𝑥 ]≡¿ 𝑖∃𝑥 . 𝐼𝑠𝐶𝑖 (𝑥 )∧𝜑 [𝑥 ]∃𝑥𝐼𝑠𝐶 (𝑥 )∧𝜑 [𝑎𝑐𝑐 𝑗 (𝑥 ) ,𝑥 ]≡∃𝑦𝜑 ¿

∃𝑥 . 𝐼𝑠𝐶𝑖 (𝑥 )∧𝜑 [ 𝐼𝑠𝐶 𝑗 (𝑥 ) ]≡∃𝑥 . 𝐼𝑠𝐶𝑖 (𝑥 )∧𝜑 [ 𝑓𝑎𝑙𝑠𝑒 ] 𝑓𝑜𝑟 𝐶𝑖≠𝐶 𝑗

Page 7: Quantifiers, Arithmetic and Fixed-points

NRAVirtual substitutions for second-degree polynomials

Method by Weispfenning et.al. (Redlog)Used both as quantifier elimination (all SAT) and ground decision procedure (first SAT)

….

Page 8: Quantifiers, Arithmetic and Fixed-points

Analysis Tool

LogicEngine Z3

𝜇𝑍

Page 9: Quantifiers, Arithmetic and Fixed-points

Tool EncodingsSLAyer

SAGE

Predicate Based MC

Sep. Logic

Interpolating MC

BDD MC

Fixed-PointMethodology

Abstract Interpretatio

n

SimulationRelation

Logic Programmin

g

HavocHoudini

Datalog

GateKeeper

Summaries

Abstraction

Refinement

Page 10: Quantifiers, Arithmetic and Fixed-points

The Z ToolShips with Z3

Online demo

BDD tablesample in distribution

Mostly developed by Krystof Hoder

Page 11: Quantifiers, Arithmetic and Fixed-points

Why fixed-pointsRecall the basic sausage* rule: Variant for Connoisseurs:

In a nutshell:

Aim of Satisfiability Modulo Fixed-points and Theories.

Is valid?

Is satisfiable?

* “sausage” terminology by Andrey Rybalchenko

Page 12: Quantifiers, Arithmetic and Fixed-points

Portfolio approach to fix-points

Efficient Datalog EngineFinite TablesSymbolic Tables

Composable Abstract Relations:Use abstract interpretation domains.Use SMT as a domain.Reduced product operators for sharing

Efficient Algorithms from Symbolic MC Modulo Theories

I will give a taste of this later.

Is satisfiable?

BDD packages

Abstract Domains

Interpolation Tools

Page 13: Quantifiers, Arithmetic and Fixed-points

Core Engine

Results

Execution

Compilation

Rule transformationsEarly

preprocessingRule

normalizationLate

preprocessing

Parser

Rest

arts

Compilation

RelationalAlgebraAbstractMachine

Page 14: Quantifiers, Arithmetic and Fixed-points

Core Engine

Results

Execution

Compilation

Rule transformationsEarly

preprocessingRule

normalizationLate

preprocessing

Parser

Rest

arts

Plugin architecture:

New domains added using plugins implementing

Relational Algebra

operations.

Page 15: Quantifiers, Arithmetic and Fixed-points

Relation representation

Tables

Hash-table

BDD

Bit-vectors

Relations

SMT

Explanations

External

Abstractions

Intervals

Bounds

Compositions

Finiteproduct

Relation product

xy

z10

10

+ =

Intervals Bounds

Pentagons = +

Page 16: Quantifiers, Arithmetic and Fixed-points

Relation representation

Tables

Hash-table

BDD

Bit-vectors

Relations

SMT

Explanations

External

Abstractions

Intervals

Bounds

Compositions

Finiteproduct

Relation product

xy

z10

10

Intervals Bounds

Product: Table x TableIndexed Relation: Table x RelationReduced Product: Relation x Relation

Page 17: Quantifiers, Arithmetic and Fixed-points

Preview – Generalized PDRIs valid?

Is satisfiable?

PDR: Property Directed ReachabilityA new Algorithm For Symbolic Model Checking of Hardwareby Aaron Bradley.

In - Lift it to procedures multiple operators, non-linear- Lift beyond propositional logic Theories, non-ground

Page 18: Quantifiers, Arithmetic and Fixed-points

Simple sample demo

Page 19: Quantifiers, Arithmetic and Fixed-points

GeneralizationsPDR works for linear Transformers

Generalize to non-linear

PDR works with a single TransformerWork with multiple transformers. A Solver for Datalog/Boolean Programs

PDR is for propositional logicSearch Modulo Theories

(with McMillan’s FociZ3 and other methods)

Page 20: Quantifiers, Arithmetic and Fixed-points