57
The Moldable Debugger A Framework for Developing Domain-Specific Debuggers Andrei Chiș University of Bern @chis_andrei andreichis.com Tudor Gîrba CompuGroup Medical Schweiz AG @girba tudorgirba.com Oscar Nierstrasz University of Bern @onierstrasz scg.unibe.ch/staff/oscar

The Moldable Debugger, SLE 2014

Embed Size (px)

DESCRIPTION

The Moldable Debugger, SLE 2014

Citation preview

Page 1: The Moldable Debugger, SLE 2014

The Moldable DebuggerA Framework for Developing Domain-Specific Debuggers

Andrei ChișUniversity of Bern

@chis_andreiandreichis.com

Tudor GîrbaCompuGroup Medical

Schweiz AG

@girbatudorgirba.com

Oscar NierstraszUniversity of Bern

@onierstraszscg.unibe.ch/staff/oscar

Page 2: The Moldable Debugger, SLE 2014

2

Debugging needs Motivating examples

The Moldable Debugger

Activation predicatesDomain-specificextensions

Roadmap

1 23

4 5

Page 3: The Moldable Debugger, SLE 2014

Object-oriented applications use objects to express a model

of the business domain

3

Page 4: The Moldable Debugger, SLE 2014

4

Page 5: The Moldable Debugger, SLE 2014

5

Page 6: The Moldable Debugger, SLE 2014

6

Page 7: The Moldable Debugger, SLE 2014

Mind the abstraction gap

7

Page 8: The Moldable Debugger, SLE 2014

A publisher/subscriber framework

8

2. Publish an event

aDispatcher

1. Subscribe for events

3. Deliver the event

aPublisher

aSubscriber aSubscriber aSubscriber

Page 9: The Moldable Debugger, SLE 2014

Pressing CMD+s in an editor

2. press CMD+s

aDispatcher

1. Register for CMD+s event

3. Deliver CMD+s event

aUser

aTextEditor...

9

Page 10: The Moldable Debugger, SLE 2014

10

Page 11: The Moldable Debugger, SLE 2014

11

Page 12: The Moldable Debugger, SLE 2014

12

Page 13: The Moldable Debugger, SLE 2014

13

Page 14: The Moldable Debugger, SLE 2014

14

Page 15: The Moldable Debugger, SLE 2014

15

Page 16: The Moldable Debugger, SLE 2014

16

Page 17: The Moldable Debugger, SLE 2014

17

Page 18: The Moldable Debugger, SLE 2014

18

Page 19: The Moldable Debugger, SLE 2014

19

Page 20: The Moldable Debugger, SLE 2014

20

Page 21: The Moldable Debugger, SLE 2014

21

Page 22: The Moldable Debugger, SLE 2014

22

Page 23: The Moldable Debugger, SLE 2014

PetitParser

identifier letter , (letter / digit) *

letter *

,

/

letter digit

23

Page 24: The Moldable Debugger, SLE 2014

24

IdentifierParser new parse: 'aLong32Identifier'

Page 25: The Moldable Debugger, SLE 2014

25

Page 26: The Moldable Debugger, SLE 2014

26

Page 27: The Moldable Debugger, SLE 2014

27

Page 28: The Moldable Debugger, SLE 2014

28

Page 29: The Moldable Debugger, SLE 2014

29

Page 30: The Moldable Debugger, SLE 2014

30

Page 31: The Moldable Debugger, SLE 2014

31

Page 32: The Moldable Debugger, SLE 2014

The Moldable Debugger

32

Page 33: The Moldable Debugger, SLE 2014

33

Page 34: The Moldable Debugger, SLE 2014

Debugging widgets

Debugging actions

34

Page 35: The Moldable Debugger, SLE 2014

35

Page 36: The Moldable Debugger, SLE 2014

Next subscription

Selected subscription

36

Page 37: The Moldable Debugger, SLE 2014

37

Page 38: The Moldable Debugger, SLE 2014

Next production

Next parser

Production(aproduction)

Next failure

Stream position(anInteger)

Stream position changed

38

Page 39: The Moldable Debugger, SLE 2014

Domain specific-extension

39

DebuggingWidget

DebuggingView

DebuggingAction

DebuggingSession

DebuggingPredicate

PrimitivePredicate

HighLevelPredicate

***

Page 40: The Moldable Debugger, SLE 2014

Domain specific-extension

40

DebuggingWidget

DebuggingView

DebuggingAction

DebuggingSession

DebuggingPredicate

PrimitivePredicate

HighLevelPredicate

***

Page 41: The Moldable Debugger, SLE 2014

Domain specific-extension

DebuggingWidget

DebuggingView

DebuggingAction

DebuggingSession

DebuggingPredicate

PrimitivePredicate

HighLevelPredicate

***

41

Page 42: The Moldable Debugger, SLE 2014

DebuggingWidget

DebuggingView

DebuggingAction

DebuggingSession

DebuggingPredicate

PrimitivePredicate

HighLevelPredicate

***

StepToNextParser

StepToNextProduction

StepToNextFailure

...

Domain specific-extension

42

Page 43: The Moldable Debugger, SLE 2014

Petit Parser Events

43

Page 44: The Moldable Debugger, SLE 2014

Petit Parser Events

SUnit Glamour

43

Page 45: The Moldable Debugger, SLE 2014

Size of extensions in LOC

44

Page 46: The Moldable Debugger, SLE 2014

45

Page 47: The Moldable Debugger, SLE 2014

Activation predicate

DebuggingWidget

DebuggingView

DebuggingAction

DebuggingSession

DebuggingPredicate

PrimitivePredicate

HighLevelPredicate

***

ActivationPredicate

46

Page 48: The Moldable Debugger, SLE 2014

Activation predicate

DebuggingWidget

DebuggingView

DebuggingAction

DebuggingSession

DebuggingPredicate

PrimitivePredicate

HighLevelPredicate

***

ActivationPredicate

47

Page 49: The Moldable Debugger, SLE 2014

Petit Parser Events

SUnit Glamour

48

Page 50: The Moldable Debugger, SLE 2014

Petit Parser Events

SUnit Glamour

49

Page 51: The Moldable Debugger, SLE 2014

Petit Parser Events

SUnit Glamour

50

Page 52: The Moldable Debugger, SLE 2014

Conclusions

51

Page 53: The Moldable Debugger, SLE 2014

Mind the abstraction gap

Conclusions

51

Page 54: The Moldable Debugger, SLE 2014

Mind the abstraction gap

DebuggingWidget

DebuggingView

DebuggingAction

DebuggingSession

DebuggingPredicate

PrimitivePredicate

HighLevelPredicate

***

ActivationPredicate

Conclusions

51

Page 55: The Moldable Debugger, SLE 2014

Mind the abstraction gap

DebuggingWidget

DebuggingView

DebuggingAction

DebuggingSession

DebuggingPredicate

PrimitivePredicate

HighLevelPredicate

***

ActivationPredicate

Conclusions

51

Page 56: The Moldable Debugger, SLE 2014

Mind the abstraction gap

DebuggingWidget

DebuggingView

DebuggingAction

DebuggingSession

DebuggingPredicate

PrimitivePredicate

HighLevelPredicate

***

ActivationPredicate

Conclusions

51

Page 57: The Moldable Debugger, SLE 2014

gt.moosetechnology.org

52