Domain-Level Debugging for Compiled DSLs with the GEMOC Studio - - PowerPoint PPT Presentation

domain level debugging for compiled dsls with the gemoc
SMART_READER_LITE
LIVE PREVIEW

Domain-Level Debugging for Compiled DSLs with the GEMOC Studio - - PowerPoint PPT Presentation

Context Domain-level feedback Demo Conclusion Domain-Level Debugging for Compiled DSLs with the GEMOC Studio (Tool Demo) Erwan Bousse Tanja Mayerhofer Manuel Wimmer TU Wien (Austria) September 17, 2017 Erwan Bousse, Tanja Mayerhofer,


slide-1
SLIDE 1

Context Domain-level feedback Demo Conclusion

Domain-Level Debugging for Compiled DSLs with the GEMOC Studio

(Tool Demo) Erwan Bousse Tanja Mayerhofer Manuel Wimmer

TU Wien (Austria)

September 17, 2017

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 1/8

slide-2
SLIDE 2

Context Domain-level feedback Demo Conclusion

1 Context 2 Domain-level feedback 3 Demo 4 Conclusion

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 2/8

slide-3
SLIDE 3

Context Domain-level feedback Demo Conclusion

(Domain-level) interactive debugging

Many existing approaches to define Domain Specific Languages (DSLs) with execution semantics. Enable the use of interactive debugging (ie. breakpoints, step into, etc.) to understand and investigate defects. Two main kinds of DSLs to consider:

– interpreted DSLs (with operational semantics) – compiled DSLs (with translational semantics)

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 3/8

slide-4
SLIDE 4

Context Domain-level feedback Demo Conclusion

(Domain-level) interactive debugging

Many existing approaches to define Domain Specific Languages (DSLs) with execution semantics. Enable the use of interactive debugging (ie. breakpoints, step into, etc.) to understand and investigate defects. Two main kinds of DSLs to consider:

– interpreted DSLs (with operational semantics) – compiled DSLs (with translational semantics)

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 3/8

slide-5
SLIDE 5

Context Domain-level feedback Demo Conclusion

Interpreted VS compiled DSLs

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Runtime services

Provides services at runtime by observing occuring steps and the changing state

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 4/8

slide-6
SLIDE 6

Context Domain-level feedback Demo Conclusion

Interpreted VS compiled DSLs

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition

Runtime services

Provides services at runtime by observing occuring steps and the changing state

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 4/8

slide-7
SLIDE 7

Context Domain-level feedback Demo Conclusion

Interpreted VS compiled DSLs

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model

Runtime services

Provides services at runtime by observing occuring steps and the changing state

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 4/8

slide-8
SLIDE 8

Context Domain-level feedback Demo Conclusion

Interpreted VS compiled DSLs

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model Exec. Engine

Runtime services

Provides services at runtime by observing occuring steps and the changing state

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 4/8

slide-9
SLIDE 9

Context Domain-level feedback Demo Conclusion

Interpreted VS compiled DSLs

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model Exec. Engine Exec. steps Runtime services

Tracer Debugger ...

Runtime services

Provides services at runtime by observing occuring steps and the changing state

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 4/8

slide-10
SLIDE 10

Context Domain-level feedback Demo Conclusion

Interpreted VS compiled DSLs

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model Exec. Engine Exec. steps Runtime services

Tracer Debugger ...

T arget abstract syntax Target executed model T arget state definition T arget Engine Target steps Target language

Runtime services

Provides services at runtime by observing occuring steps and the changing state

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 4/8

slide-11
SLIDE 11

Context Domain-level feedback Demo Conclusion

Interpreted VS compiled DSLs

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model Exec. Engine Exec. steps Runtime services

Tracer Debugger ...

T arget abstract syntax Target executed model T arget state definition T arget Engine Target steps Target language Source compiled DSL Compiler Source abstract syntax

Runtime services

Provides services at runtime by observing occuring steps and the changing state

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 4/8

slide-12
SLIDE 12

Context Domain-level feedback Demo Conclusion

Interpreted VS compiled DSLs

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model Exec. Engine Exec. steps Runtime services

Tracer Debugger ...

T arget abstract syntax Target executed model T arget state definition T arget Engine Target steps Target language Source compiled DSL Compiler Source abstract syntax Source executed model

Runtime services

Provides services at runtime by observing occuring steps and the changing state

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 4/8

slide-13
SLIDE 13

Context Domain-level feedback Demo Conclusion

Interpreted VS compiled DSLs

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model Exec. Engine Exec. steps Runtime services

Tracer Debugger ...

T arget abstract syntax Target executed model T arget state definition T arget Engine Target steps Target language Source compiled DSL Compiler Source abstract syntax Source executed model How to connect?

  • No explicit source states
  • No explicit source steps

Runtime services

Provides services at runtime by observing occuring steps and the changing state

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 4/8

slide-14
SLIDE 14

Context Domain-level feedback Demo Conclusion

Problem How to provide domain-level interactive debugging when executing models conforming to compiled DLSs?

Idea

At runtime, automatically translate on-the-fly target states and steps into source states and steps, which can then be observed by domain-level tools.

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 5/8

slide-15
SLIDE 15

Context Domain-level feedback Demo Conclusion

Problem How to provide domain-level interactive debugging when executing models conforming to compiled DLSs?

Idea

At runtime, automatically translate on-the-fly target states and steps into source states and steps, which can then be observed by domain-level tools.

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 5/8

slide-16
SLIDE 16

Context Domain-level feedback Demo Conclusion

Overview

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model Exec. Engine Exec. steps Runtime services

Tracer Debugger ...

T arget abstract syntax Target executed model T arget state definition T arget Engine Target steps Target language Source compiled DSL Compiler Source abstract syntax Source executed model

Result

The same runtime services can be (re)used for both interpreted and compiled DSLs!

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 6/8

slide-17
SLIDE 17

Context Domain-level feedback Demo Conclusion

Overview

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model Exec. Engine Exec. steps Runtime services

Tracer Debugger ...

T arget abstract syntax Target executed model T arget state definition T arget Engine Target steps Target language Source compiled DSL Compiler Source abstract syntax Source executed model How to connect?

  • No explicit source states
  • No explicit source steps

Source state definition Source executed model

Part of the approach

Result

The same runtime services can be (re)used for both interpreted and compiled DSLs!

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 6/8

slide-18
SLIDE 18

Context Domain-level feedback Demo Conclusion

Overview

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model Exec. Engine Exec. steps Runtime services

Tracer Debugger ...

T arget abstract syntax Target executed model T arget state definition T arget Engine Target steps Target language Source compiled DSL Compiler Source abstract syntax Source executed model How to connect?

  • No explicit source states
  • No explicit source steps

Source state definition Source executed model

Part of the approach

Compilation links

Result

The same runtime services can be (re)used for both interpreted and compiled DSLs!

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 6/8

slide-19
SLIDE 19

Context Domain-level feedback Demo Conclusion

Overview

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model Exec. Engine Exec. steps Runtime services

Tracer Debugger ...

T arget abstract syntax Target executed model T arget state definition T arget Engine Target steps Target language Source compiled DSL Compiler Source abstract syntax Source executed model How to connect?

  • No explicit source states
  • No explicit source steps

Source state definition Source executed model

Part of the approach

Compilation links Feedback manager

Result

The same runtime services can be (re)used for both interpreted and compiled DSLs!

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 6/8

slide-20
SLIDE 20

Context Domain-level feedback Demo Conclusion

Overview

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model Exec. Engine Exec. steps Runtime services

Tracer Debugger ...

T arget abstract syntax Target executed model T arget state definition T arget Engine Target steps Target language Source compiled DSL Compiler Source abstract syntax Source executed model How to connect?

  • No explicit source states
  • No explicit source steps

Source state definition Source executed model

Part of the approach

Compilation links Feedback manager Feedback Engine Source steps

Result

The same runtime services can be (re)used for both interpreted and compiled DSLs!

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 6/8

slide-21
SLIDE 21

Context Domain-level feedback Demo Conclusion

Overview

Model Generated Model Input/output Modifies Depends on / Uses Conforms to Procedure

Interpreted DSL Execution rules Abstract syntax State definition Executed model Exec. Engine Exec. steps Runtime services

Tracer Debugger ...

T arget abstract syntax Target executed model T arget state definition T arget Engine Target steps Target language Source compiled DSL Compiler Source abstract syntax Source executed model How to connect?

  • No explicit source states
  • No explicit source steps

Source state definition Source executed model

Part of the approach

Compilation links Feedback manager Feedback Engine Source steps

Result

The same runtime services can be (re)used for both interpreted and compiled DSLs!

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 6/8

slide-22
SLIDE 22

Context Domain-level feedback Demo Conclusion

Demo

  • Demo. . .

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 7/8

slide-23
SLIDE 23

Context Domain-level feedback Demo Conclusion

Conclusion

Providing interactive debugging for compiled DSLs is not trivial Idea: a feedback manager to translate target steps back to the source domain Evaluation: median execution slowdown of 1,8 times due to feedback Future work: manage non GEMOC-ready compilers (eg. code generators) Eclipse Research Consortium GEMOC: sustains the GEMOC studio as a research platform to experiment on the globalization of, possibly executable and heterogeneous, modeling languages Contributors are welcome!

http://gemoc.org/ https://github.com/eclipse/gemoc-studio-modeldebugging

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 8/8

slide-24
SLIDE 24

Context Domain-level feedback Demo Conclusion

Conclusion

Providing interactive debugging for compiled DSLs is not trivial Idea: a feedback manager to translate target steps back to the source domain Evaluation: median execution slowdown of 1,8 times due to feedback Future work: manage non GEMOC-ready compilers (eg. code generators) Eclipse Research Consortium GEMOC: sustains the GEMOC studio as a research platform to experiment on the globalization of, possibly executable and heterogeneous, modeling languages Contributors are welcome!

http://gemoc.org/ https://github.com/eclipse/gemoc-studio-modeldebugging

Erwan Bousse, Tanja Mayerhofer, Manuel Wimmer Domain-Level Debugging for Compiled DSLs 8/8