Integrating Proxy Theories and Numeric Model Lifting for - - PowerPoint PPT Presentation

integrating proxy theories and numeric model lifting for
SMART_READER_LITE
LIVE PREVIEW

Integrating Proxy Theories and Numeric Model Lifting for - - PowerPoint PPT Presentation

Motivation Architecture Experimental Evaluation and Future directions Integrating Proxy Theories and Numeric Model Lifting for Floating-Point Arithmetic FMCAD 2016 Jaideep Ramachandran and Thomas Wahl Northeastern University Oct 4, 2016


slide-1
SLIDE 1

Motivation Architecture Experimental Evaluation and Future directions

Integrating Proxy Theories and Numeric Model Lifting for Floating-Point Arithmetic FMCAD 2016

Jaideep Ramachandran and Thomas Wahl Northeastern University Oct 4, 2016

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-2
SLIDE 2

Motivation Architecture Experimental Evaluation and Future directions Floating-point basics

Why Floating-Point Arithmetic?

Floating-point (FP) = practical approximation of real numbers Finite representation on computers Dynamic range Speed, implementation in hardware

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-3
SLIDE 3

Motivation Architecture Experimental Evaluation and Future directions Floating-point basics

FP arithmetic different from Real arithmetic

IEEE 754 (2008) Standard says: x opF y = round(x opR y) Standard describes 5 rounding modes

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-4
SLIDE 4

Motivation Architecture Experimental Evaluation and Future directions Floating-point basics

FP arithmetic different from Real arithmetic

IEEE 754 (2008) Standard says: x opF y = round(x opR y) Standard describes 5 rounding modes Examples of formulas satisfiable in FP: x y = x ∧ y > 0 x (y z) > (x y) z x (y z) > (x y x z)

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-5
SLIDE 5

Motivation Architecture Experimental Evaluation and Future directions Floating-point basics

Floating-point reasoning: approaches

Traditionally: theorem proving, abstract domains More recently: decision procedures

Examples: Mathsat, z3 Big win: witness generation Technique: bit-blasting, bit-vectors Limitation: leads to huge boolean encodings

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-6
SLIDE 6

Motivation Architecture Experimental Evaluation and Future directions Floating-point basics

Using Real Arithmetic Solver [POPL13]

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-7
SLIDE 7

Motivation Architecture Experimental Evaluation and Future directions Floating-point basics

Using Reduced Precision FP [IJCAR14]

Solving FP formula f f ′ = reduce precision(f ) while(f ′ = f ) if ∃σ : σ | = f ′ if σ | = f return σ else increase precision of f ′

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-8
SLIDE 8

Motivation Architecture Experimental Evaluation and Future directions Floating-point basics

Example

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-9
SLIDE 9

Motivation Architecture Experimental Evaluation and Future directions Floating-point basics

Proxy solution

Proxy solution gets discarded[IJCAR14] if it does not work as is:

effort wasted

Can we use the proxy solution in some way? Can the proxy solution be lifted to an actual satisfying solution?

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-10
SLIDE 10

Motivation Architecture Experimental Evaluation and Future directions Floating-point basics

Lifting a proxy solution

Solving FP formula f f ′ = reduce precision(f ) while(f ′ = f ) if ∃σ : σ | = f ′ if σ | = f return σ else do something(σ) else increase precision of f ′

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-11
SLIDE 11

Motivation Architecture Experimental Evaluation and Future directions

Framework: Overview

fT := f mapped to T ∃σT. σT | =T fT? σ := ToFloat(σT) fT := Refine(fT) σ | = f ? σ := ModelLift(σ, σT, fT) f yes no σ yes no σ exception success failure UNSAT

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-12
SLIDE 12

Motivation Architecture Experimental Evaluation and Future directions

Proxy theories for floating-point: Conditions

  • ffer a mapping from FP formulas

easier to reason about than FP

  • ffer a mapping to FP models

gradually refinable back to FP

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-13
SLIDE 13

Motivation Architecture Experimental Evaluation and Future directions

Proxy theories for floating-point: Candidates

Reduced precision (reduced exponent + mantissa) FP “easier” map solutions to original precision FP by padding bits refine by gradually increasing exponent, mantissa Real arithmetic sometimes easier map solutions to FP by rounding refine by interpreting some real operators as FP [DATE14]

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-14
SLIDE 14

Motivation Architecture Experimental Evaluation and Future directions

Numeric Model Lifting

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-15
SLIDE 15

Motivation Architecture Experimental Evaluation and Future directions

Framework: overview

fT := f mapped to T ∃σT. σT | =T fT? σ := ToFloat(σT) fT := Refine(fT) σ | = f ? σ := ModelLift(σ, σT, fT) f yes no σ yes no σ exception success failure UNSAT

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-16
SLIDE 16

Motivation Architecture Experimental Evaluation and Future directions

Numeric Model Lifting

Assumption: proxy theory T delivers satisfying T assignment such that an FP solution is nearby Idea for lifting proxy soln to FP soln: T assgn. gives satisfying Boolean skeleton fix constraints where T and FP disagree pick small subset Vars(f ) to do so, keep others constant

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-17
SLIDE 17

Motivation Architecture Experimental Evaluation and Future directions

Numeric Model Lifting: Example

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-18
SLIDE 18

Motivation Architecture Experimental Evaluation and Future directions

Numeric Model Lifting: Summary

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-19
SLIDE 19

Motivation Architecture Experimental Evaluation and Future directions

Framework: On Soundness, Termination, Completeness

fT := f mapped to T ∃σT. σT | =T fT? σ := ToFloat(σT) fT := Refine(fT) σ | = f ? σ := ModelLift(σ, σT, fT) f yes no σ yes no σ exception success failure UNSAT

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-20
SLIDE 20

Motivation Architecture Experimental Evaluation and Future directions Experimental evaluation Future Directions

Experimental Evaluation

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-21
SLIDE 21

Motivation Architecture Experimental Evaluation and Future directions Experimental evaluation Future Directions

Experimental Setup

Set I: Non-linear benchmarks [FMSD14] Ignored casts (single precision), ignored special values Benchmarks are satisfiable or status is unknown Set II: False identity non-linear benchmarks, E − E > ǫ e.g., (a2 b2) − (a b)(a b) > ǫ is of interest in compiler optimization single precision Timeout : 20 min

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-22
SLIDE 22

Motivation Architecture Experimental Evaluation and Future directions Experimental evaluation Future Directions

Experimental Evaluation (Set II)

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-23
SLIDE 23

Motivation Architecture Experimental Evaluation and Future directions Experimental evaluation Future Directions

Experimental Evaluation (Results)

Set I: total 22, Set II: total 15 Molly Approx Mathsat I # Solved 14(9) 13 15 Total Time(s) 3067 1650 6656

  • Avg. Time(s)

219 127 443 # TO 8 9 7 II # Solved 15(10) 13 15 Total Time(s) 1287 1161 2237

  • Avg. Time(s)

86 89 149 # TO 2

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-24
SLIDE 24

Motivation Architecture Experimental Evaluation and Future directions Experimental evaluation Future Directions

Future Directions

Non-symbolic model lifting Numeric solvers for approximate solutions Handling other combinations of proxy ↔ actual solutions

UNSAT ↔ UNSAT UNSAT ↔ SAT SAT ↔ UNSAT

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-25
SLIDE 25

Motivation Architecture Experimental Evaluation and Future directions

Thank You!

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-26
SLIDE 26

Motivation Architecture Experimental Evaluation and Future directions

Backup Slides

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-27
SLIDE 27

Motivation Architecture Experimental Evaluation and Future directions

Experimental Evaluation (Set I)

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-28
SLIDE 28

Motivation Architecture Experimental Evaluation and Future directions

Experimental setup

Instantiation with Real Arithmetic Proxy Theory Set III: E > E (((a1a2)(a3a4))a5) > ((((a1a2)a3)a4)a5) (0, 1024.0] single precision, RoundToNearestEven Offset O is singleton (gradient analysis)

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic

slide-29
SLIDE 29

Motivation Architecture Experimental Evaluation and Future directions

Experimental Evaluation

Set III benchmarks Molly Approx Mathsat #Vars It Lifted? Time (s) It Time (s) Time (s) 35 6

  • 30.5

15 153 81.6 40 3

  • 11.9

7 34 278.2 45 8

  • 448.6

33 TO 457.1 50 5

  • 25.1

20 344 164.5 55 5

  • 28.3

16 210 754.8 60 3

  • 17.2

34 TO TO 65 7

  • 42.0

11 88 TO

Jaideep Ramachandran and Thomas Wahl Proxy Theories and Model Lifting for Floating-Point Arithmetic