numerical static analysis with soot
play

Numerical static analysis with Soot Gianluca Amato Universit` a G. - PowerPoint PPT Presentation

Numerical static analysis with Soot Gianluca Amato Universit` a G. dAnnunzio di ChietiPescara ACM SIGPLAN International Workshop on the State Of the Art in Java Program Analysis SOAP 2013 (joint work with Francesca Scozzari and


  1. Numerical static analysis with Soot Gianluca Amato Universit` a “G. d’Annunzio” di Chieti–Pescara ACM SIGPLAN International Workshop on the State Of the Art in Java Program Analysis SOAP 2013 (joint work with Francesca Scozzari and Simone Di Nardo Di Maio) Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 1 / 26

  2. Jandom JVM-based Analyzer for Numerical DOMains forward intra-procedural analyses numerical properties different target languages a simple C -style imperative language linear transition systems Baf , Jimple (sort of. . . ) written in Scala (JVM-based comes from here) NEW features inter-procedural summary-based analysis pair sharing analyses Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 2 / 26

  3. Jandom JVM-based Analyzer for Numerical DOMains forward intra-procedural analyses numerical properties different target languages a simple C -style imperative language linear transition systems Baf , Jimple (sort of. . . ) written in Scala (JVM-based comes from here) NEW features inter-procedural summary-based analysis pair sharing analyses Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 2 / 26

  4. Jandom JVM-based Analyzer for Numerical DOMains forward intra-procedural analyses numerical properties different target languages a simple C -style imperative language linear transition systems Baf , Jimple (sort of. . . ) written in Scala (JVM-based comes from here) NEW features inter-procedural summary-based analysis pair sharing analyses HELP! looking for new acronym Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 2 / 26

  5. Jandom architecture Interpretation Interprocedural analyzer Flow graph analyzer Basic block analyzer ASM Jimple Baf Abstract environment Basic domains native PPL APRON Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 3 / 26

  6. Jandom architecture Interpretation Interprocedural analyzer Flow graph analyzer Basic block analyzer ASM Jimple Baf Abstract environment Basic domains native PPL APRON Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 3 / 26

  7. Basic domains Basic domains describe general properties of program executions and are not tied to a specific target language. several families of basic domains numerical domains sharing domains each family has its own API all basic domains support: lattice operations widening (upper bound which guarantees termination) similar to a FlowSet in Soot but immutable type safe no collection-style methods such as add , iterator , etc. . . Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 4 / 26

  8. Basic domains Basic domains describe general properties of program executions and are not tied to a specific target language. several families of basic domains numerical domains sharing domains each family has its own API all basic domains support: lattice operations widening (upper bound which guarantees termination) similar to a FlowSet in Soot but immutable type safe no collection-style methods such as add , iterator , etc. . . Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 4 / 26

  9. Basic domains Basic domains describe general properties of program executions and are not tied to a specific target language. several families of basic domains numerical domains sharing domains each family has its own API all basic domains support: lattice operations widening (upper bound which guarantees termination) similar to a FlowSet in Soot but immutable type safe no collection-style methods such as add , iterator , etc. . . Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 4 / 26

  10. Basic domains Basic domains describe general properties of program executions and are not tied to a specific target language. several families of basic domains numerical domains sharing domains each family has its own API all basic domains support: lattice operations widening (upper bound which guarantees termination) similar to a FlowSet in Soot but immutable type safe no collection-style methods such as add , iterator , etc. . . Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 4 / 26

  11. Basic domains Basic domains describe general properties of program executions and are not tied to a specific target language. several families of basic domains numerical domains sharing domains each family has its own API all basic domains support: lattice operations widening (upper bound which guarantees termination) similar to a FlowSet in Soot but immutable type safe no collection-style methods such as add , iterator , etc. . . Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 4 / 26

  12. Numerical domains Represent the values of numerical variables. Example (Nested loop) for (x = 0; x < 10; x++) for (y = x; y < 10; y++) // do something here Example (Invariant inside the nested loop) y  0 ≤ x ≤ 9    y ≥ 9   y − x ≤ 0  x Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 5 / 26

  13. Numerical domains Represent the values of numerical variables. Example (Nested loop) for (x = 0; x < 10; x++) for (y = x; y < 10; y++) // do something here Example (Invariant inside the nested loop) y  0 ≤ x ≤ 9    y ≥ 9   y − x ≤ 0  x Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 5 / 26

  14. Numerical domains Represent the values of numerical variables. Example (Nested loop) for (x = 0; x < 10; x++) for (y = x; y < 10; y++) // do something here Example (Invariant inside the nested loop) y  0 ≤ x ≤ 9    y ≥ 9   y − x ≤ 0  x Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 5 / 26

  15. Numerical domains API The API for numerical domains is well understood: linear assignment x = 3*x + 2*y non-deterministic assignment x = ? intersection with half-planes if (x <= y - z) then projection over a lower dimensional space istore 3 embedding onto a higher dimension space iload 3 and other. . . Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 6 / 26

  16. Implementations of numerical domains Three different sources for numerical domains: 1 Jandom native implementations interval and parallelotope domains JVM not well suited to the purpose, see W. Kahan and Joseph D. Darcy How Java’s Floating-Point Hurts Everyone Everywhere 2 Parma Polyehdra Library (PPL) based domains many domains: polyehdra, octagons, congruences, etc. . . need wrappers to expose a common interface 3 in the future. . . add support for the APRON library Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 7 / 26

  17. Implementations of numerical domains Three different sources for numerical domains: 1 Jandom native implementations interval and parallelotope domains JVM not well suited to the purpose, see W. Kahan and Joseph D. Darcy How Java’s Floating-Point Hurts Everyone Everywhere 2 Parma Polyehdra Library (PPL) based domains many domains: polyehdra, octagons, congruences, etc. . . need wrappers to expose a common interface 3 in the future. . . add support for the APRON library Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 7 / 26

  18. Implementations of numerical domains Three different sources for numerical domains: 1 Jandom native implementations interval and parallelotope domains JVM not well suited to the purpose, see W. Kahan and Joseph D. Darcy How Java’s Floating-Point Hurts Everyone Everywhere 2 Parma Polyehdra Library (PPL) based domains many domains: polyehdra, octagons, congruences, etc. . . need wrappers to expose a common interface 3 in the future. . . add support for the APRON library Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 7 / 26

  19. Implementations of numerical domains Three different sources for numerical domains: 1 Jandom native implementations interval and parallelotope domains JVM not well suited to the purpose, see W. Kahan and Joseph D. Darcy How Java’s Floating-Point Hurts Everyone Everywhere 2 Parma Polyehdra Library (PPL) based domains many domains: polyehdra, octagons, congruences, etc. . . need wrappers to expose a common interface 3 in the future. . . add support for the APRON library Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 7 / 26

  20. Jandom architecture Interpretation Interprocedural analyzer Flow graph analyzer Basic block analyzer ASM Jimple Baf Abstract environment Basic domains native PPL APRON Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 8 / 26

  21. Abstract environments An abstract environment is the glue between the basic domains and the language we want to analyze maps operations in the language into operations on the domains locals this abstract environment x 0 i 0 = 10 x 1 s 1 = 20 x 1 ≤ 100 x 2 x 3 + x 4 ≤ 1 x 4 ≤ 2 stack x 3 x 4 0 numerical domain 1 JVM Gianluca Amato (Chieti–Pescara) Numerical static analysis with Soot SOAP 2013 9 / 26

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend