remote debugging and reflection in resource constrained devices · 2015-11-03 · remote agile...
TRANSCRIPT
![Page 1: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/1.jpg)
Remote Debugging and Reflection in Resource Constrained DevicesNikolaos Papoulias - December 2013
����
! 1
![Page 2: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/2.jpg)
Outline
Introduction
Related Work
Contributions
Implementation
Validation
Conclusion & Future Work
2
![Page 3: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/3.jpg)
Context - Constrained Devices
Cannot locally support an IDE & Dev-Tools
Have different HW/SW Configurations from Dev-Machines3
![Page 4: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/4.jpg)
Context - DebuggingConstrained Devices
Emulators
Post-Mortem Analysis
Developer's end Target Devices
Deployment
LogCollection
1
Coding / Compilation
2
Execution
3
45
Post-mortemanalysis
Logging4
![Page 5: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/5.jpg)
Context - DebuggingConstrained Devices
Emulators
Post-Mortem Analysis
Deployment
Inspection
Coding / Compilation
2
Exec
utio
n
3
Action / Modification
14
5
Developer's end Target Devices
Remote Debugging5
![Page 6: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/6.jpg)
Remote Debugging
Impact on productivity due to re-deployments [ZeroTurnAround 2011]
Lacks facilities otherwise available in a local setting (e.g O-Centric Debugging [Ressia 2012b])
Is a solution that is distributed in a nature:
6
![Page 7: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/7.jpg)
Research Questions
What are the properties of an ideal remote debugging solution ?
Given these properties which model for remote debugging can exhibit them ?
What are the trade-offs between this ideal model and a real world implementation ?
7
![Page 8: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/8.jpg)
Thesis Statement - Properties
InteractivenessInstrumentationDistributionSecurity
An ideal remote debugging solution should support
8
![Page 9: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/9.jpg)
Interactiveness
the ability to incrementally update all partsof a remote application without losing the running
context (i.e without stopping the application).
Add/Rem Packages, Add/Rem Classes, Add/Rem Fields, Edit Hierarchy, Add/Rem Methods
9
![Page 10: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/10.jpg)
Instrumentation
the ability to alter the semantics ofa running process in order to assist debugging
Method/Statement Execution, Class Instantiation/Field Read/WriteObject Read/Write/Send/Receive/Argument/Store/Interact
10
![Page 11: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/11.jpg)
Distribution
the ability of a debugging solution to adapt its framework while debugging a remote target
No-Distribution / Fixed Middleware / Extensible Middleware / Adaptable Middleware
11
![Page 12: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/12.jpg)
Security
the availability of prerequisites for security mechanisms such as
authentication and access restriction
Internal / External / Target-Side / Client-Side
12
![Page 13: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/13.jpg)
Outline
Introduction
Related Work
Contributions
Implementation
Validation
Conclusion & Future Work
13
![Page 14: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/14.jpg)
Related Work - Overview
Interactiveness (6)
Instrumentation (13)
Distribution (+++)
Security (4)
1 1 1 6 6 6 6
4 4 5 4 4 3 12
+ ++ + + + - -
3 4 2 3 3 0 0
GDB DCEJPDA .NET JREBEL SMALLTALK BIFROST
14
![Page 15: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/15.jpg)
1 1 1 6 6 6 6
4 4 5 4 4 3 12
+ ++ + + + - -
3 4 2 3 3 0 0
Related Work - Overview
GDB DCEJPDA .NET JREBEL SMALLTALK BIFROST(A) None of the existing solutions
met all of our criteria
(B) But reflective debugging proved
superior to other approaches in a local
setting15
![Page 16: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/16.jpg)
1 1 1 6 6 6 6
4 4 5 4 4 3 12
+ ++ + + + - -
3 4 2 3 3 0 0
Related Work - Overview
GDB DCEJPDA .NET JREBEL SMALLTALK BIFROST
(B) Since reflective debugging proved
superior to other approaches in a local
setting
(C) Investigate Remote Reflection
Design Patterns
16
![Page 17: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/17.jpg)
Remote Reflection
DATA
PROGRAM
Meta System
INTERPRETER
Part of the world
DATA
PROGRAM
Reflective System
INTERPRETER
act uponrepresent
DISTRIBUTED-SELF-REPRESENTATION OF SYSTEM B
System A System B
Remote Proxy / Remote Facade / Mirrors
17
![Page 18: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/18.jpg)
Mirrors - Explicit Meta-Objects
18
ObjectMirrorObject
anObject anObjectMIrrorreflects on
<<ObjectMirrorInterface>>
getClass()
Encapsulation StratificationOnt. Correspondance
Mirror on: anObjectIndirection
![Page 19: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/19.jpg)
Design Patterns - Criteria
Extensibility, Re-use
Distribution
Identity [Bracha 2010]
Meta-recursion [Denker 2008]
Mirrors can be seen as an extension to both the remote proxy and
the remote facade patterns
19
![Page 20: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/20.jpg)
Mirrors - Open Issues
Mirrors and the Problem of State - debugging meta-information in cohesive language kernels
Mirrors and Intercession - advanced instrumentation support while debugging
20
![Page 21: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/21.jpg)
Outline
Introduction
Related Work
Contributions
Implementation
Validation
Conclusion & Future Work
21
![Page 22: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/22.jpg)
Our Proposals
Α solution to the problem of Reflective-Data [Maes 1987b] in the context of mirrors [Bracha 2004]
The definition of a model for remote debugging that can exhibit the properties of: interactiveness, instrumentation distribution and security
MetaTalk
Mercury22
![Page 23: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/23.jpg)
Our Proposal MetaTalk
From a language design perspective meta-objects should be both:
Pluggable as mirrors areand State-Full as 3-KRS meta-objects
23
![Page 24: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/24.jpg)
MetaTalk Kernel
Object
Point
Class
aPointBASE LEVEL META LEVEL
ObjectMirror ClassMirror
Mirror
AbstractMirrorObject
AbstractMirrorClass
Mirror on: ClassMirror on:
aPoint
Mirror on: Object
Mirror on: Point
24
![Page 25: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/25.jpg)
MetaTalk Implementation
MetaTalk-VM is written in PharoMetaTalk-Compiler relies on Petit-ParserObject-Model inspired by ObjVLisp
http://www.squeaksource.com/MetaTalk/
25
![Page 26: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/26.jpg)
Our Proposals
Α solution to the problem of Reflective-Data [Maes 1987b] in the context of mirrors [Bracha 2004]
The definition of a model for remote debugging that can exhibit the properties of: interactiveness, instrumentation distribution and security
MetaTalk
Mercury26
![Page 27: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/27.jpg)
Overview
DEBUGGED APPLICATION
DEVELOPER'S END TARGET
RUN-TIMEDEBUGGING SUPPORT
MIDDLEWARE
DEBUGGER / IDE
MODELOF THE DEBUGGED APP
MIDDLEWARE
Interactiveness - through a mirror-based remote meta-level that is causally connected to its target
Mercury
1
27
![Page 28: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/28.jpg)
Core ModelTarget Side
Object Point
aPoint
instance ofRTSupport
RunTimeDebuggingSupport
+ objectinstVarAt(forObject: Object, anIvName: String): Object+ ...
.....
Mirror
- targetObject: Object
ObjectMirror
- rtMirror: RunTimeMirror
+ instVarAt(anIvName: String): ObjectMirror+ ...
mirrorOnAPoint
RunTimeMirror
- runTime: RTDebuggingSupport
+ objectinstVarAt(forObject: Object, anIvName: String): ObjectMirror+ ...
.....
aRunTimeMirror
runTimeDebuggingSupport
1*
1 1
reflects on
instance of
Development Side
MIDDLEWARE
28
![Page 29: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/29.jpg)
Interactiveness
(2) Computational Reflection
ExceptionMirror
ProcessMirror
ContextMirror+ saveAndContinue(newSrc: String): ContextMirror
(1) Structural Reflection Mirror- targetObject: Object
RunTimeMirror- runTime: RunTimeDebuggingSupport
ObjectMirror- rtMirror: RunTimeMirror
+ setClass(aClassMirror: ClassMirror): ClassMirror
.....
EnvironmentMirror+ newPackageNamed(aPackageName: String): PackageMirror+ removePackageNamed(aPackageName: String): PackageMirror
ClassMirror+ setSuperClass(aClassMirror: ClassMirror): ClassMirror+ addInstVarName(anIvName: String): ClassMirror+ deleteInstVarName(anIvName: String): ClassMirror + addMethod(methodName: String, source: String): MethodMirror+ deleteMethod(methodName: String): MethodMirror
PackageMirror+ newClassNamed(aClassName: String): ClassMirror+ removeClassNamed(aClassName: String): ClassMirror
MethodMirror+ recompileWithSource(src: String): MethodMirror
29
![Page 30: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/30.jpg)
Our Proposal - Overview
DEBUGGED APPLICATION
DEVELOPER'S END TARGET
RUN-TIMEDEBUGGING SUPPORT
MIDDLEWARE
DEBUGGER / IDE
MODELOF THE DEBUGGED APP
MIDDLEWARE
Instrumentation - through reflective intercession by reifying the underlying execution environment
2
30
![Page 31: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/31.jpg)
InstrumentationTarget Side Object
Closure
LocalCallBack
RemoteCallBack
ImplicitMetaObject- onReceive: Closure- onSend: Closure- onRead: Closure- onWrite: Closure….
InterpreterbaseMetaDict: Dictionary
RunTimeDebuggingSupport
+ ...+ objectHalt(): Object+ objectHaltOnReceive(): Object+ objectOnReceive(callBack: LocalCallBack)+ objectOnReceive(callBack: RemoteCallBack)
interpreter: Interpreter
values: Dictionary<Object>
MetaEnvironment
1
1
1
1
*
*
*
1
*1
31
![Page 32: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/32.jpg)
Our Proposal - Overview
DEBUGGED APPLICATION
DEVELOPER'S END TARGET
RUN-TIMEDEBUGGING SUPPORT
MIDDLEWARE
DEBUGGER / IDE
MODELOF THE DEBUGGED APP
MIDDLEWARE
Distribution - through an Adaptable Middleware
3
32
![Page 33: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/33.jpg)
Distribution
Middleware Deamon
Marshaller
DistributionPolicy Transporter
SecurityPolicy
33
Middleware Deamon
Marshaller
DistributionPolicy Transporter
SecurityPolicy
1 1
1
11
![Page 34: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/34.jpg)
Our Proposal - Overview
DEBUGGED APPLICATION
DEVELOPER'S END TARGET
RUN-TIMEDEBUGGING SUPPORT
MIDDLEWARE
DEBUGGER / IDE
MODELOF THE DEBUGGED APP
MIDDLEWARE
Security - security by decomposing and authenticating access to reflective facilities
4a
4b
34
![Page 35: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/35.jpg)
SecurityDevelopment Side
Reflection
+ onEnvironment(environmentAddress: RemoteEnvironment) : EnvironmentMirrorRemoteEnvironment
- address: String
uses a
Mirror
- targetObject: Object
ObjectMirror
- rtMirror: RunTimeMirror
RunTimeMirror
- runTime: RunTimeDebuggingSupport
+ instVarAt(anIvName: String): ObjectIntrospectionMirror+ ...
IntrospectionMirrorForAPoint
instance of ObjectIntrospectionMirror
SecurityPolicy Process11 is invoked by
IntrercessionMirrorForAPoint
instance of
EnvironmentIntrospectionMirror
EnvironmentIntercessionMirror
ProcessIntrospectionMirror
ProcessIntercessionMirror
ObjectIntercessionMirror
+ instVarAtPut(anIvName: String, aValue: ObjectIntercessionMirror): ObjectIntercessionMirror+ ...
.....
35
![Page 36: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/36.jpg)
Comparison
1 1 1 6 6 6 6 6
4 4 5 4 4 3 12 13
+ ++ + + + - - +++
3 4 2 3 3 0 0 4
GDB DCEJPDA .NET JREBEL SMALLTALK BIFROST MERCURY
36
Interactiveness (6)
Instrumentation (13)
Distribution (+++)
Security (4)
![Page 37: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/37.jpg)
Outline
Introduction
Related Work
Contributions
Implementation
Validation
Conclusion & Future Work
37
![Page 38: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/38.jpg)
Implementation Overview
Mercury-Core Mercury-Ui
Seamless MetaStackVM
(Alexandria)
http://ss3.gemstone.com/ss/Mercury-Prototype.html
http://ss3.gemstone.com/ss/Seamless.html
http://ss3.gemstone.com/ss/mSVM.html38
![Page 39: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/39.jpg)
Meta-Recursion - mStackVM
39
Interpreter on: MessageReceived for: anObject do: [:reifications |
anObject incrementMessageCounter.anObject
perform: reifications selector withArguments: reifications arguments]
Ooops !
![Page 40: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/40.jpg)
MetaStackVM - Reflectogram
40
Interpreter on: MessageReceived for: anObject do: [:reifications :reflectogram |
reflectogram disable.anObject incrementMessageCounter.reflectogram enable.reflectogram
returnValue: reflectogram defaultAction]
![Page 41: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/41.jpg)
MetaStackVM - Reflectogram
41
Interpreter on: MessageReceived for: anObject do: [:reifications :reflectogram |
reflectogram disable.anObject incrementMessageCounter.reflectogram enable.reflectogram
returnValue: reflectogram defaultAction]
Reflectogram
+ ..+ enable+ disable+ remove+…+ defaultAction+ returnValue:+ …+ processMetaLevel+ objectMetaLevel+ …+ obj:perform:
![Page 42: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/42.jpg)
Implementation Trade-offs
Through Local Reflection Through Virtual-Machine supportThrough Byte-code manipulation
Supporting Interactiveness and Instrumentation
42
![Page 43: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/43.jpg)
Benchmark
No Instrumentation
Disabled Instrumentation
Enabled Instrumentation
1x 1x
1x 1x
35x 8x
Mercury
Benchmark basedon Tanter [Tanter 2003]
43
![Page 44: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/44.jpg)
Outline
Introduction
Related Work
Contributions
Implementation
Validation
Conclusion & Future Work
44
![Page 45: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/45.jpg)
Experimental Setting
Developer-Machine
Mac-Mini - (2.3 GHz / 4GB RAM)Ubuntu 12.04
Constraint Device (A)Phone
Galaxy Nexus - (1.2 GHz / 1GB RAM)Android 4.3
Constraint Device (B)Tablet
Galaxy Tab - (1.0 GHz / 1GB RAM)Android 4.0
Constraint Device (C)Remote Server
Running
HP Workstation - (2.3 GHz / 4GB RAM)Ubuntu 12.04
over wifi / usbover wifi / usb
over ethernet
ETH: 10.1.10.206WIFI: 10.1.160.116USB: PORT-FWD
WIFI: 10.1.160.158USB: PORT-FWD
ETH: 10.1.10.81WIFI: 10.1.160.92USB: PORT-FWD
Mercury IDE
45
![Page 46: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/46.jpg)
Alexandria
46
![Page 47: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/47.jpg)
Experimental Setting 47
![Page 48: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/48.jpg)
ObjectivesVerify the applicability of Mercury for these constrained debugging targets.
Illustrate how a debugging session benefits from Mercury’s properties
Remote Agile Debugging
Remote ObjectInstrumentation
Case-Study I Case-Study II
48
![Page 49: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/49.jpg)
49
Remote Agile Debugging
Phone: ’/charger’ Tablet: ’/default.prop’ Server: ’/User/.profile-xmind-portable-201212250029’
Suffix Bug
![Page 50: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/50.jpg)
Remote Agile Debugging
Developer-Machine
Mac-Mini - (2.3 GHz / 4GB RAM)Ubuntu 12.04
Constraint Device (A)Phone
Galaxy Nexus - (1.2 GHz / 1GB RAM)Android 4.3
Constraint Device (B)Tablet
Galaxy Tab - (1.0 GHz / 1GB RAM)Android 4.0
Constraint Device (C)Remote Server
Running
HP Workstation - (2.3 GHz / 4GB RAM)Ubuntu 12.04
over wifi / usbover wifi / usb
over ethernet
ETH: 10.1.10.206WIFI: 10.1.160.116USB: PORT-FWD
WIFI: 10.1.160.158USB: PORT-FWD
ETH: 10.1.10.81WIFI: 10.1.160.92USB: PORT-FWD
Mercury IDE
50
FileBrowserTest
+ suffixOf: aString+ testSuffixWithDot+ testSuffixWithoutDot+ testLongFilePath
TestCaseFileBrowserTest
+ suffixOf: aString+ testSuffixWithDot+ testSuffixWithoutDot+ testLongFilePath
TestCase
FileBrowserTest
+ suffixOf: aString+ testSuffixWithDot+ testSuffixWithoutDot+ testLongFilePath
TestCase
![Page 51: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/51.jpg)
Remote Agile Debugging 51
![Page 52: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/52.jpg)
ObjectivesVerify the applicability of Mercury for these constrained debugging targets.
Illustrate how a debugging session benefits from Mercury’s properties
Remote Agile Debugging
Remote ObjectInstrumentation
Case-Study I Case-Study II
52
![Page 53: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/53.jpg)
53
Remote Object Instrumentation
Suffix Bug
Phone: ’/charger’ Tablet: ’/default.prop’ Server: ’/User/.profile-xmind-portable-201212250029’
FileDirectory dot
![Page 54: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/54.jpg)
Remote Object Instrumentation
54
![Page 55: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/55.jpg)
Remote Object Instrumentation
55
![Page 56: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/56.jpg)
Results
56
![Page 57: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/57.jpg)
Outline
Introduction
Related Work
Contributions
Implementation
Validation
Conclusion & Future Work
57
![Page 58: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/58.jpg)
Summary - Contributions
Identification of four desirable properties for remote debugging: interactiveness, instrumentation, distribution and security.
The definition of a model for remote debugging (Mercury) that exhibits these desirable properties.
A solution to the problem of Reflective-Data [Maes 1987b] in the context of mirrors [Bracha 2004] (MetaTalk)
58
![Page 59: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/59.jpg)
Contributions
The reification of a previously illustrative notion (that of the reflectogram [Tanter 2003])
Prototype implementation of our model for remote debugging in the context of reflective languages.
Implementation of an adaptable middleware [David 2002] for supporting distribution (Seamless).
Implementation of a dedicated VM for Pharo (MetaStackVM) for advanced intercession facilities.
59
![Page 60: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/60.jpg)
Diffusion of ResultsSubmitted/Published: Nikolaos Papoulias, Noury Bouraqadi, Marcus Denker, Stéphane Ducasse and Luc Fabresse. Towards Structural Decomposition of Reflection with Mirrors}. In Proceedings of International Workshop on Smalltalk Technologies (IWST’11), Edingburgh, United Kingdom, 2011. 105
Conference Talk: Nikolaos Papoulias. Seamless -- Let a thousand systems bloom. 20th International Smalltalk Conference, Ghent, Belgium, 2012.
To Be Submitted: Nikolaos Papoulias, Noury Bouraqadi, Luc Fabresse, Marcus Denker and Stéphane Ducasse. Mercury: Live Remote Debugging in Reflective Languages. To be submitted in The Journal of Object Technology.
To Be Submitted: Nikolaos Papoulias, Stéphane Ducasse, Marcus Denker, Guillermo Pollito, Noury Bouraqadi and Luc Fabresse. MetaTalk: Designing a Language with a Pluggable Meta-Level. To be submitted in The Journal for Universal Computer Science.
Invited Chapter: Nikolaos Papoulias. Seamless: an Adaptable Middleware Solution. Invited Chapter to be submitted for the forthcoming book Pharo in the Enterprise, by Square Bracket Associates.
60
![Page 61: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/61.jpg)
Future Work
Language and Virtual-Machine Debugging in the Same ModelIntegration of Automated Debugging Techniques (e.g delta-debugging) in Developer-Driven Debugging
61
![Page 62: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/62.jpg)
MetaTalk
Mercury
����
Thank you !
!
62
Mercury-Core Mercury-Ui
Seamless MetaStackVM
(Alexandria)
Nick Papoulias 2013
![Page 63: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/63.jpg)
Some time left ?Groovy !!
63
![Page 64: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/64.jpg)
Collaborations
Seamless as a library for the Continuous integration services of Pharo.
The MetaTalk model as a case-study for bootstraping OO - languages.
Mercury integration with the PhaROS robotic middleware (on-going effort).
64
![Page 65: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/65.jpg)
Design Patterns - Mirrors
Explicit meta-objectAbstract class / InterfaceFactoryFacade and Bridge
65
![Page 66: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/66.jpg)
Conditional Meta-Action[:reifications :reflectogram |
reifications trigger halt. reflectogram override: true; returnValue: reflectogram defaultAction.
]
66
![Page 67: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/67.jpg)
Seamless InitializationSeamlessDeamon class>>newDefaultWithGlobalAccess
^ self new buildWithTransporterClass: SeamlessSocketStreamTransporter transcoderClass: SeamlessFuelTranscoder proxyClass: SeamlessFastDNUProxy garbageCollectorClass: SeamlessDefaultGarbageCollector andAuthenticationManager: ((SeamlessAuthenticationManager new) addGroup: [...] withPolicy: (SeamlessDistributionPolicy
newWithEntryPoint: [...] classesToPassByValue: [...] classesToPassByShallowCopy: [...] andSecurityPolicy: (SeamlessSecurityPolicy
newWithClassesToPassByReference: [..] classesNotToReference: [..] includingMessages: [...] excludingMessages: [...]); addUser: [...] withPassword: [...] inGroup: [...]).
67
![Page 68: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/68.jpg)
Seamless
SeamlessTranscoder SeamlessConnection
SeamlessTransporter
SeamlessObjectTransporter
SeamlessProtocol
SeamlessProcessManager
SeamlessDistributionTable
SeamlessDeamon
SeamlessSession
SeamlessAuthenticationManager
SeamlessDistributionStrategy
SeamlessUserGroup
SeamlessUser
SeamlessDistributionPolicy
SeamlessSecurityPolicy
68
![Page 69: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/69.jpg)
JMercury - Our model on top of Java
JPDA + DCE VM (Interactiveness)Reflex / ASM / JavaAssist (Instrumentation)Cajo Project (Distribution)Decomposed Hierarchy of Mirrors / Closer integration with SecurityManager (Security)
69
![Page 70: Remote Debugging and Reflection in Resource Constrained Devices · 2015-11-03 · Remote Agile Debugging Developer-Machine Mac-Mini - (2.3 GHz / 4GB RAM) Ubuntu 12.04 Constraint](https://reader034.vdocuments.net/reader034/viewer/2022043007/5f94644a36427826c44b4bae/html5/thumbnails/70.jpg)
Emulators - Field Experience
IPhone/Android emulators (different models - versions of OSes - gyroscopes - touch gestures ...)Car-Team experience -- RoboShop 2013 Demo (unanticipated changes - people walking by - glass walls ...)
70