35
Object-Centric Debugging: a preview Steven Costiou [email protected] RMoD Inria Lille - Nord Europe 2019

Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou [email protected]

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Object-Centric Debugging: a preview

Steven Costiou [email protected] RMoDInria Lille - Nord Europe

2019

Page 2: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

2

Page 3: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Part I Object-Centric Debugging

3

Page 4: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Demo

4

Page 5: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

What is object-centric debugging?

5

Page 6: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Object-centric debugging

• Debugging operations at the level of objects

• Only target objects are affected

• Examples:

• A breakpoint active for one object only

• A method available for one object only

6

Page 7: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Why object-centric debugging?

7

Page 8: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Why Object-centric debugging?

• Debugging one object among many:

• Collections (Hinkle, Jones, Johnson, 1993)

• Events

• Graphical objects

8

Page 9: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Object-Centric Features (preview)

9

Page 10: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Object-centric breakpoints

• Break when a message is received

• haltOnCall => on every method call

• haltOnCall: #selector => for given selector only

• haltOnNextCall => on next method call

• haltOnceOnCall: #selector => only once for given selector

• haltOnCallWhen: condition => if condition is met

10

Page 11: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Object-centric breakpoints

• Break on state access

• haltOnWriteTo: #instVarName => when instVarName is written

• haltOnRead: #instVarName => when instVarName is read

• haltOnWrite => when any instance variable is written

• haltOnRead => when any instance variable is read

11

Page 12: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Object-centric behavior

• Object-centric methods

• compile: sourceCode => compiles and add new methods

• uses: aTrait => acquires behavior from Trait

• acquire: aCompiledMethod => acquire the method

12

Page 13: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Object-centric debugging, how is it implemented?

13

Page 14: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Implementation

14

Object-centric breakpoints

Object-centricbehavior

Page 15: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Implementation

15

Reflectivity

Proxies

Object-centric breakpoints

Object-centricbehavior

Page 16: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Implementation

16

Reflectivity

Proxies

Talents

Object-centric breakpoints

Object-centricbehavior

Page 17: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Implementation

17

Reflectivity

Proxies

Talents

AnonymousClasses

Object-centric breakpoints

Object-centricbehavior

Page 18: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Implementation

18

Reflectivity

Proxies

Talents

AnonymousClasses

Object-centric breakpoints

Object-centricbehavior

Object-centric … ???

Page 19: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Implementation goal

19

Reflectivity Proxies Talents

AnonymousClasses

Object-centric breakpoints

Object-centricbehavior

Object-centric layer

Object-centric…

Page 20: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Current problems

• Implementation is mixing up different techniques without any clear interaction model

• Requires to migrate the object to an anonymous subclass

• Installation of object-centric instrumentation is not thread-safe

• Sometimes make tools unstable

• Obtaining objects to debug (but work has been done on that…)

20

Page 21: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Part II Object-Centric Reverse Debugging

21

Page 22: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Demo

22

Page 23: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Reverse object-centric debugger

23

Page 24: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Reverse object-centric debugger

24

Page 25: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Reverse object-centric debugger

25

Page 26: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Reverse object-centric debugger

26

Page 27: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Reverse object-centric debugger

27

Page 28: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Reverse object-centric debugger

28

Page 29: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Reverse object-centric debugger

29

Page 30: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Reverse object-centric debugger

30

Page 31: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Reverse object-centric debugger

31

Page 32: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Reverse object-centric debugger

32

Page 33: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Reverse object-centric debugger

33

WIP

Page 34: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Reverse object-centric debugger

• AST interpreter - Carolina Hernandez Phillips

• Reverse-execution - Vincent Aranega, Steven Costiou

• Object-centric debugger - Steven Costiou

• Scriptable debugger - Thomas Dupriez

34

Who’s working on it?

Page 35: Object-Centric Debugging: a preview - Pharofiles.pharo.org/conferences/2019PharoDays/11 object... · 2019. 5. 2. · Object-Centric Debugging: a preview Steven Costiou steven.costiou@inria.fr

Thanks! Questions?

35

Object-Centric Reverse Debugging

Object-Centric Debugging

• haltOnCall • haltOnCall: #selector • haltOnNextCall • haltOnceOnCall: #selector • haltOnCallWhen: condition • haltOnWriteTo: #instVarName • haltOnRead: #instVarName • haltOnWrite • haltOnRead

• compile: sourceCode • uses: aTrait • acquire: aCompiledMethod