Successfully reported this slideshow.
Your SlideShare is downloading. ×

Towards Object-centric Time-traveling Debuggers

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
ShowUs: Improved DoIt
ShowUs: Improved DoIt
Loading in …3
×

Check these out next

1 of 44 Ad

Towards Object-centric Time-traveling Debuggers

Download to read offline

Towards Object-centric Time-traveling Debuggers

Maximilian Ignacio Willembrinck Santander Steven Costiou
Adrien Vanègue
Anne Etien

IWST 2022

Towards Object-centric Time-traveling Debuggers

Maximilian Ignacio Willembrinck Santander Steven Costiou
Adrien Vanègue
Anne Etien

IWST 2022

Advertisement
Advertisement

More Related Content

Recently uploaded (20)

Advertisement

Towards Object-centric Time-traveling Debuggers

  1. 1. 1 Towards Object-centric Time-traveling Debuggers Maximilian Ignacio Willembrinck Santander Steven Costiou Adrien Vanègue Anne Etien
  2. 2. 2 Agenda I. Context II. Proposition III. Our Work Towards Object-centric Time-traveling Debuggers
  3. 3. ● Debugging is a time-consuming task. ● Involves repetitive and tedious manual operations. 3 New debugging tools… Why?
  4. 4. ● Debugging is a time-consuming task. ● Involves repetitive and tedious manual operations. 4 New debugging tools… Why? Debugging Valuable Activities
  5. 5. ● Debugging is a time-consuming task. ● Involves repetitive and tedious manual operations. Debugging Valuable Activities 5 New debugging tools… Why?
  6. 6. ● Debugging is a time-consuming task. ● Involves repetitive and tedious manual operations. 6 New debugging tools… Why? StepInto StepOver Breakpoints Repeat Debugging Valuable Activities
  7. 7. 7 New debugging tools… Why? Debugging is hard. We saw an opportunity to improve the debugging experience.
  8. 8. 8 Debugging Objects is Challenging: An Example assert: splitOn: equals: Produces 3 OrderedCollection
  9. 9. 9 Debugging Objects is Challenging: An Example There is an OrderedCollection instantiated somewhere during that call. “I want to see how its instance variables evolve”
  10. 10. 10 Debugging Objects is Challenging: An Example There is an OrderedCollection instantiated somewhere during that call. “I want to see how its instance variables evolve” 1. Find the object 2. Specific object debugging operations To instantiation instruction Conventional Debugging Many steps / uncomfortable conditional breakpoints
  11. 11. 11 Debugging Objects is Challenging: An Example 1. Find the object 2. Specific object debugging operations Are there special tools to make these task easier?
  12. 12. ● What is Object-centric debugging [1]? ○ Makes objects the focus of debugging operations. ○ Debugging operations are defined to answer developer questions related to runtime behavior of objects. ○ Object-centric Debugging operators examples: ■ Halt on read ■ Halt on write ■ Halt on call 12 Object-centric debugging?... [1] J. Ressia, A. Bergel, O. Nierstrasz, Object-centric debugging, in: Proceeding of the 34rd international conference on Software engineering, ICSE ’12, 2012.
  13. 13. ● It helps debugging when: ○ Developers debugging questions are closer to the objects which model the domain. ○ Developers wants to follow an object behavior, avoiding traditional breakpoint management tediousness. e.g: “I want to see how its instance variables evolve” ● A prototype was presented and shown to be more effective supporting typical debugging tasks than traditional stack-oriented debugger. 13 Object-centric A promising debugging approach for OOP[1] [1] J. Ressia, A. Bergel, O. Nierstrasz, Object-centric debugging, in: Proceeding of the 34rd international conference on Software engineering, ICSE ’12, 2012.
  14. 14. ● Scoping debugging operations (such as breakpoints) on specific object is difficult! ○ Devs must initially find such object identity first. ○ Manually step to the object of interest, or step through breakpoints hits to find it. 14 The problem...
  15. 15. ● Scoping debugging operations (such as breakpoints) on specific object is difficult! ○ Devs must initially find such object identity first. ○ Manually step to the object of interest, or step through breakpoints hits to find it. 15 The problem... TEDIOUS AND ERROR-PRONE MANUAL WORK!
  16. 16. ● Scoping debugging operations (such as breakpoints) on specific object is difficult! ○ Devs must initially find such object identity first. ○ Manually step to the object of interest, or step through breakpoints hits to find it. If only there was a way to fix this ... 16 The problem... TEDIOUS AND ERROR-PRONE MANUAL WORK!
  17. 17. ● Main features: reverse a program execution and deterministic replay. ○ With these debuggers, any stepping error can be amended by stepping back. (Stepped too far? No need to restart, just take a step back). ○ Developers want to check a past state of the program? No need to restart, just reverse it. e.g: reverse to an object instantiation. 17 Time-traveling debuggers
  18. 18. ● To the best of our knowledge, time-traveling solutions don't provide object-centric debugging operators. 18 There is another problem…
  19. 19. ● Improves debugging experience in OOP. 19 Context summary Object Centric Debuggers Time-Traveling Debuggers ● Sill tedious and error prone. ● Improves tediousness, and debugging/stepping mistakes are less costly. ● So far, no support for object-centric debugging.
  20. 20. ● Improves debugging experience in OOP. 20 Context summary Object Centric Debuggers ● Sill tedious and error prone. ? Time-Traveling Debuggers ● Improves tediousness, and debugging/stepping mistakes are less costly. ● So far, no support for object-centric debugging.
  21. 21. 21 Agenda I. Context II. Proposition III. Our Work Towards Object-centric Time-traveling Debuggers
  22. 22. 22 Our proposition ? ? ? 1. New debugging tools for OOP
  23. 23. 23 Our proposition ? ? ? 1. New debugging tools for OOP 2. How to combine them? Second general question: How to combine them?
  24. 24. 24 How to combine them? Our answer: Time-Traveling Queries How?
  25. 25. 25 Combining both techniques Time-Traveling Queries* (*) M. Willembrinck, S. Costiou, A. Etien, S. Ducasse. Time-Traveling Debugging Queries: Faster Program Exploration. International Conference on Software Quality, Reliability, and Security, Dec 2021, Hainan Island, China. What is the value of this variable during execution? On step 1 value changed from nil to 100 On step 4 value changed from 100 to 200 On step 40 value changed from 200 to 0 …
  26. 26. 26 Combining both techniques Time-Traveling Queries* Find execution data and explore your execution conveniently from the Query Results (*) M. Willembrinck, S. Costiou, A. Etien, S. Ducasse. Time-Traveling Debugging Queries: Faster Program Exploration. International Conference on Software Quality, Reliability, and Security, Dec 2021, Hainan Island, China.
  27. 27. We developed SeekerOC and an Enhanced Pharo Inspector to improve the debugging experience. Made for Pharo 10. 27 Combining both techniques With Time-Traveling Queries
  28. 28. 28 Agenda I. Context II. Proposition III. Our Work Towards Object-centric Time-traveling Debuggers
  29. 29. 29 Improving Debugging Challenges: Back to the example 1. Find the object There is an OrderedCollection instantiated somewhere during that call. “I want to see how its instance variables evolve” 2. Specific object debugging operations assert: splitOn: equals: Produces 3 OrderedCollection
  30. 30. 30 Improving Debugging Challenges: Back to the example We made tools to make this easier! assert: splitOn: equals: Produces 3 OrderedCollection 1. Find the object 2. Specific object debugging operations
  31. 31. 31 NEW OOP DEBUGGING TOOL I. SeekerOC 1. Easy objects finding and identification using TTQs Lists all OrderedCollection objects instantiated during the test
  32. 32. 32 NEW OOP DEBUGGING TOOL I. SeekerOC 1. Easy objects finding and identification using TTQs The listed objects can be directly inspected.
  33. 33. 33 NEW OOP DEBUGGING TOOL II. Enhanced Pharo Inspector 2. Easy object and variables tracking, using Object-Centric TTQs.
  34. 34. 34 NEW OOP DEBUGGING TOOL II. Enhanced Pharo Inspector 2. Easy object and variables tracking, using Object-Centric TTQs.
  35. 35. For SeekerOC and Enhanced Pharo Inspector. ○ Time-traveling back end providing deterministic reverse and replay. ○ Support for Time-Traveling Queries. ○ Express (new) Time-Traveling Queries. 35 Implementation, Requirements Repository url: https:/ /github.com/Willembrinck/SeekerOC-2022
  36. 36. 36 Implementation SeekerOC Finding objects with TTQs How it works? Queries Menu Query Results
  37. 37. 37 Implementation SeekerOC Finding objects with TTQs #OrderedCollection Time-traveling debugger Queries Context Menu Iterable collection of ProgramState The command executes a Time-Traveling Query
  38. 38. 38 #OrderedCollection Implementation SeekerOC Finding objects with TTQs Time-traveling debugger Queries Context Menu “Iterable” collection of ProgramState What program states are relevant? What should be included in the results? From where to extract the data?
  39. 39. 39 #OrderedCollection Implementation SeekerOC Finding objects with TTQs Time-traveling debugger Queries Context Menu “Iterable” collection of ProgramState What program states are relevant? What should be included in the results? From where to extract the data? ProgramState: API to access execution data. API Example: Method Returns context Context isMessageSend Boolean messageReceiver Object
  40. 40. 40 Collected results are displayed in the Query Results table Implementation SeekerOC Finding objects with TTQs
  41. 41. 41 Implementation Enhanced Pharo Inspector Bound to an “OID”, not an object OID to write Object centric Time-Traveling Queries
  42. 42. 42 Implementation Enhanced Pharo Inspector Object-centric TTQs, example Bound to an “OID”, not an object Queries uses OID for selection predicate #lastIndex 67
  43. 43. Our work What other TTQs can boost object-centric debugging? Open research subjects What are TTQs limits to express object-centric debugging operators? Benefits of using such debuggers? (Empirical experiments) 43 Perspective
  44. 44. 44 1. New OOP Debugging Tools SeekerOC Time-Traveling Queries Enhanced Pharo Inspector & 2. How to join both techniques Our work Other TTQs for OC debugging? Open research subjects TTQs limitations? Benefits? (Experiments) Contribution Perspective Towards Object-centric Time-traveling debuggers

×