making runtime monitoring of parametric properties
play

Making Runtime Monitoring of Parametric Properties Practical - PhD - PowerPoint PPT Presentation

Making Runtime Monitoring of Parametric Properties Practical - PhD Thesis Defense - Dongyun Jin Department of Computer Science University of Illinois at Urbana-Champaign Thesis Advisor Grigore Rosu Committee Members Klaus Havelund Gul Agha


  1. Making Runtime Monitoring of Parametric Properties Practical - PhD Thesis Defense - Dongyun Jin Department of Computer Science University of Illinois at Urbana-Champaign Thesis Advisor Grigore Rosu Committee Members Klaus Havelund Gul Agha Darko Marinov

  2. Outline Introduction • JavaMOP • Practical Parametric Monitoring • Efficient Parametric Monitoring o Scalable Parametric Monitoring o Expressive Parametric Monitoring o Evaluation • Multi-threaded Unit Testing • Conclusion • 2

  3. Introduction Background JavaMOP Challenges Practical Parametric Monitoring Thesis Evaluation Outline and Contribution Multi-threaded Unit Testing Reliable Software is Important 3

  4. Introduction Background JavaMOP Challenges Practical Parametric Monitoring Thesis Evaluation Outline and Contribution Multi-threaded Unit Testing Runtime Monitoring • Feasible technique for ensuring software reliability • Observe run of a program … Event 1 Execute & Analyze Observe ? Event 2 Program Event 3 Event 4 Execution Trace … • Analyze execution trace against desired properties • React/report using handlers (if needed) 4

  5. Introduction Background JavaMOP Challenges Practical Parametric Monitoring Thesis Evaluation Outline and Contribution Multi-threaded Unit Testing Parametric Monitoring • Runtime monitoring with parameterized events … Event 1(v 1 , e 1 ) Execute & Analyze Observe ? Event 2(e 1 ) Program Event 3(v 2 ) Event 4(e 1 ) Execution Trace … 5

  6. Introduction Background JavaMOP Challenges Practical Parametric Monitoring Thesis Evaluation Outline and Contribution Multi-threaded Unit Testing Applications of Parametric Monitoring • Development Debugging o Testing o • Deployment Security o Reliability o Runtime Verification o • There are many academic tools • However, there are not many real world applications There are many challenges to overcome o 6

  7. Introduction Background JavaMOP Challenges (Efficiency, Scalability, Expressiveness) Practical Parametric Monitoring Thesis Evaluation Outline and Contribution Multi-threaded Unit Testing Challenges 1) Efficiency o Overall, Reasonable Overhead [ASE’09], [PLDI’11] TM-07 – 15/44 cases generated ≥ 10% overhead MOP-07 – 9/66 cases generated ≥ 10% overhead o Excessive Overheads in Corner Cases TM-07: >1300% for bloat MOP-07: >400% for bloat o Static analysis is limited • Fomalism-Dependent • Only reduce the number of points to monitor TM-07: Tracematches ver.2007, MOP-07: JavaMOP ver.2007 7

  8. Introduction Background JavaMOP Challenges (Efficiency, Scalability, Expressiveness) Practical Parametric Monitoring Thesis Evaluation Outline and Contribution Multi-threaded Unit Testing Challenges 1) Efficiency 2) Scalability o All parametric monitoring systems focus on monitoring a single property o MOP-07 and TM-07 cannot monitor large numbers of properties simultaneously o In Real Usages  Multiple Properties 8

  9. Introduction Background JavaMOP Challenges (Efficiency, Scalability, Expressiveness) Practical Parametric Monitoring Thesis Evaluation Outline and Contribution Multi-threaded Unit Testing Challenges 1) Efficiency 2) Scalability 3) Expressiveness o For performance reasons, many parametric systems choose either: • Hardwired Logical Formalism (e.g. TM-07) • Limitations on Parameters (e.g. MOP-07) 9

  10. Introduction Background JavaMOP Challenges Practical Parametric Monitoring Thesis Evaluation Outline and Contribution Multi-threaded Unit Testing My PhD Thesis • Practical Parametric Monitoring Techniques Efficient Parametric Monitoring Techniques (Chap. 3) o Scalable Parametric Monitoring Techniques (Chap. 4) o Expressive Parametric Monitoring Techniques (Chap. 5) o  Integrated into JavaMOP • IMUnit: Improved Multi-threaded Unit Testing (Chap. 6) Framework for multi-threaded unit testing o Uses JavaMOP for monitoring/enforcing thread scheduling o 10

  11. Introduction Background JavaMOP Challenges Practical Parametric Monitoring Thesis Evaluation Outline and Contribution Multi-threaded Unit Testing Why JavaMOP? Approach Language Logic Scope Mode Handler Hawk Java Eagle global inline violation J-Lo Java ParamLTL global inline violation Jass Java assertions global inline violation JavaMaC Java PastLTL class outline violation jContractor Java contracts global inline violation JML Java contracts global inline violation JPaX Java LTL class offline violation validation/ P2V C, C++ PSL global inline violation PQL Java PQL global inline validation PTQL Java SQL global outline validation inline/ Spec# C# contracts global violation offline RuleR Java RuleR global inline violation Temporal Rover Several MiTL class inline violation Tracematches Java Reg. Exp global inline validation JavaMOP Java Several global/class inline several 11

  12. Introduction Background JavaMOP Challenges Practical Parametric Monitoring Thesis Evaluation Outline and Contribution Multi-threaded Unit Testing Outline and Contributions • JavaMOP I refactored and rewrote JavaMOP (about 80%) o Efficient o • Resulted in MOP-11 • See the next slide for results Scalable o • Resulted in MOP-12 • See the next slide for results Expressive o • More logical formalisms – PTCaRet, CFG • No limitation on parameters • IMUnit: Improved Multi-threaded Unit Testing 12

  13. Introduction Background JavaMOP Challenges Practical Parametric Monitoring Thesis Evaluation Outline and Contribution Multi-threaded Unit Testing Outline and Contributions • Monitoring 5 extreme specifications MOP-07 MOP-11 MOP-12 Average Runtime Overhead 54% 21% 17% Maximum Runtime Overhead 858% 251% 269% Relative Peak Memory Usage 1.00 0.35 0.29 • Monitoring 137 specifications, on average MOP-07 MOP-11 MOP-12 Runtime Overhead (Sum of Individual) >500% 243% 180% Runtime Overhead (Simultaneous) N/A 262% 123% Relative Peak Memory Usage (Sum) >3.00 1.00 0.72 Relative Peak Memory Usage (Simultaneous) N/A 1.34 0.69 13

  14. Introduction Background JavaMOP Challenges Practical Parametric Monitoring Thesis Evaluation Outline and Contribution Multi-threaded Unit Testing My Research • JavaMOP Collaborators: Feng Chen, Patrick Meredith, Choonghwan Lee, Dennis Griffith, o Soha Hussein, Grigore Rosu ICSE ‘12 Demo, PLDI ‘11 , J.STTT ‘11, J. of ASE ‘10, ASE ‘09 , ICICIS ‘09 , ASE ‘08 o • IMUnit Collaborators: Vilas Jagannath, Milos Gligoric, Qingzhou Luo, Darko Marinov, o Grigore Rosu FSE ‘11, IWMSE ‘10(ICSE Workshop) o 14

  15. Introduction JavaMOP JavaMOP Example Specification Practical Parametric Monitoring Parametric Monitoring in JavaMOP Evaluation Indexing Tree Multi-threaded Unit Testing JavaMOP Overview AspectJ Parametric Code for Properties JavaMOP Monitoring 39 secs 137 specs Program AspectJ Program with Compiler Monitor 26 mins DaCapo Benchmarks • All timings are measured on a Core 2 Duo E8500 (3.16GHz) machine with JavaMOP 2012 version, ajc and the DaCapo benchmark suite 15

  16. Introduction JavaMOP JavaMOP Example Specification Practical Parametric Monitoring Parametric Monitoring in JavaMOP Evaluation Indexing Tree Multi-threaded Unit Testing Parametric Properties • Properties Referring to Object Instances • The Following Property Describes a Bad Behavior between Each Vector v and Enumeration e : update( v ) next( e ) update( v ) create( v , e ) update( v ) next( e ) • Generalize Typestates Typestates are Parametric Properties with One Parameter o 16

  17. Introduction JavaMOP JavaMOP Example Specification Practical Parametric Monitoring Parametric Monitoring in JavaMOP Evaluation Indexing Tree Multi-threaded Unit Testing Parametric Specification in JavaMOP import java.util.*; SafeEnum(Vector v, Enumeration e) { event create after(Vector v) returning(Enumeration e) : call(Enumeration Vector+.elements()) && target(v) {} event update after(Vector v) : (call(* Vector+.remove*(..)) || call(* Vector+.add*(..)) || call(* Vector+.clear(..)) || call(* Vector+.insertElementAt(..)) || call(* Vector+.set*(..)) || call(* Vector+.retainAll(..))) && target(v) {} event next before(Enumeration e) : call(* Enumeration+.nextElement()) && target(e){} ere : update* create next* update+ next @match { System.out.println("improper Concurrent Modification found!"); } } 17

  18. Introduction JavaMOP JavaMOP Example Specification Practical Parametric Monitoring Parametric Monitoring in JavaMOP Evaluation Indexing Tree Multi-threaded Unit Testing Parametric Monitoring in JavaMOP • Keep One Monitor for Each Parameter Instance A parameter instance binds parameters to objects o E.g., (𝑤 ⟼ 𝑤 2 , 𝑓 ⟼ 𝑓 3 ) o • Each monitor knows nothing of parameters; operates exclusively on only one trace slice 18

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