SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
Challenges in Debugging
Bootstraps of Reflective
Kernels
Carolina Hernández Phillips

INRIA Lille Nord Europe

IMT Lille Douai
Noury Bouraqadi

IMT Lille Douai
Luc Fabresse

IMT Lille Douai
Stéphane Ducasse

INRIA Lille Nord Europe
Guille Polito

Univ. Lille, CNRS, CRIStAL
Pablo Tesone

Pharo Consortium
1
Why generating custom application runtimes for IoT?
Small Hardware requires software

Limited processing capabilities, storage, battery
!2
Existing approaches: Generating lightweight implementations of
Languages from scratch
Implement from scratch: VM, base libraries, compiler

Implies complex low level implementation

Requires high expertise to develop!
!3
Our high level approach: Bootstrapping reflective kernels
• Bootstrapping is to generate a system using a previous version
of the system that is being generated

• Therefore we can use the high level abstractions and the
reflective capabilities of both systems during the bootstrap

• The result is a small Kernel (an image in the case of Pharo) which
can be executed by the same VM that executes its previous version
!4
Demo
Let’s Bootstrap PharoCandle
(a Pharo micro kernel)
!5
Virtual Machine
Host SystemLanguage Definition
1. GENERATE
2.LOAD 3.EXECUTE
Bootstrap
Kernel App entry
point
!6
Defects and Failures
!7
Defect: error in Language Definition

Failure: incorrect result during the Bootstrap
Virtual Machine
Host SystemLanguage Definition
Kernel
1. GENERATE
2.LOAD 3.EXECUTE
Defects & Failures
Kernel App entry
point
!8
Structural Defect
Defect: error in Language Definition

Defects Classification
Language Definition
Structural Definitions
of Classes
Methods Definitions
Class PCPoint
superclass : PCObject, 

instVars : { ‘x’, ’y’ },

type : variable
PCPoint >> + arg {
^ (x + arg x) @ (y + arg y) 

}

PCPoint >> crossProduct: aPoint {

	 ^ x * aPoint y - (y * aPoint x)

} 

…
Semantic Defect
fixed
x
!9
Defect: error in Language Definition

Semantic Defects are Dangerous
Language Definition
Structural Definitions
of Classes
Methods Definitions
Host System
Kernel
1. GENERATE
Reflective Ops
PCClassBuilder >> installMethod: aCompiledMethod inClass: aClass {

aClass methodDictionary add: aCompiledMethod

}
Modify
!10
Semantic Defects in

reflective methods 

modify the structural 

definitions in the Kernel
The why of defects
!11
Structural Defect
Defect: error in Language Definition

Defects
Language Definition
Structural Definitions
of Classes
Methods Definitions
Class PCPoint
superclass : PCObject, 

instVars : { ‘x’, ’y’ },

type : variable
PCPoint >> + arg {
^ (x + arg x) @ (y + arg y) 

}

PCPoint >> crossProduct: aPoint {

	 ^ x * aPoint y - (y * aPoint x)

} 

…
Semantic Defect
fixed
x
!12
• Virtual Machine requirements

• Application requirements
Kernel
The why of Defects
Virtual Machine
2.LOAD
Kernel
PCMainApplication >> entryPoint {

PCMyClass doSomething

}
Class PCArray
superclass : PCObject, 

instVars : { },

Type : variable
Virtual Machine
3.EXECUTE
Smalltalk stack dump: 0xbffc8fd0 M
>species 0x6e4e350: a(n) bad class 0xbffc7c0c M
>copyReplaceFrom:to:with: 0x6e4e350: a(n) bad class 0xbffc7c30 M
>, 0x6e4e350: a(n) bad class 0xbffc7c5c I
>doesNotUnderstand: activeProcess 0x6e2f7c0: a(n) bad class 0xbffc7c88 I
>doesNotUnderstand: activeProcess 0x6e2f7c0: a(n) bad class
Segmentation Fault
X
X
!13
Why is it hard to find the defects back?
• We are debugging the VM
• We lose great part of the abstractions of the generated
language
!14
Taxonomy of Errors
and proposed Solutions
!15
Taxonomy of Errors and Solutions
Failure Stage
Generation Loading Execution
Defect Type
Structural
Semantic
!16
Taxonomy of Errors and Solutions
Failure Stage
Generation Loading Execution
Defect Type
Structural
VM
requirement
VM
requirement
VM
requirement
Semantic
VM
requirement
Application
requirement
Static Tests on
Language Definition +
Base Language Definition
!17
Kernel
Virtual Machine
Host System
1. GENERATE
2.LOAD 3.EXECUTE
! App entry
point
Methods Definitions
Reflective Ops
Structural Definitions
of Classes
Static Tests on
Language Definition
Language Definition
Extensible Base
Language Definition
!18
(They reify the 

VM requirements)
Taxonomy of Errors and Solutions
Failure Stage
Generation Loading Execution
Defect Type
Structural
VM
requirement
VM
requirement
VM
requirement
Semantic
VM
requirement
Application
requirement
Static Tests on
Language Definition +
Base Language Definition
Static Tests on
Kernel + Hybrid Debugger
!19
Structural Definitions
of Classes
Virtual Machine
Language Definition
2.LOAD 3.EXECUTE
Kernel App entry
point
Methods Definitions
Kernel
1. GENERATE
Reflective Ops
+
Static Tests on
Language Kernel
Hybrid Debugger
Host System
!20
3 Execution levels:
- Language definition code

- Pharo code

- VM code

2 new Debugging Operations

- Step Down

- Step Up
Taxonomy of Errors and Solutions
Failure Stage
Generation Loading Execution
Defect Type
Structural
VM
requirement
VM
requirement
VM
requirement
Semantic
VM
requirement
Application
requirement
Static Tests on
Kernel + Hybrid Debugger
Simulated Execution
Static Tests on
Language Definition +
Base Language Definition
!21
Host System
Structural Definitions
of Classes
Virtual Machine
1. GENERATE
2.LOAD 3.EXECUTE
Kernel App entry
point
Reflective Ops
Methods Definitions
Kernel
Execution Simulator
AST interpreter
+
VM simulator
App entry
point
Language Definition
Lookup
R/W objects
!22
Taxonomy of Errors and Solutions
Failure Stage
Generation Loading Execution
Defect Type
Structural
VM
requirement
VM
requirement
VM
requirement
Semantic
VM
requirement
Application
requirement
Static Tests on
Kernel + Hybrid Debugger
Simulated Execution
Static Tests on
Language Definition +
Base Language Definition
All these solutions can be used to debug
the current Pharo bootstrap process!!
!23
Research Directions
• Define the Pharo VM requirements, and model them for future modifications in
future VM implementations

• Maximise the flexibility of the extensible base language definition, to maximise
the range of languages that we can define from it

• Explore what is a good design for the hybrid debugger, so it contains the correct
abstractions for debugging the bootstrap process

• Explore the limitations for the simulated execution environment

• Explore a way to debug failures hard to reproduce and which occur in production
environment

• Shrinking the VM by removing unused plugins, which will be determined by
dynamically analysing the simulated execution and its interaction with the VM
simulator
!24
Conclusions
• Analysis of Pharo Bootstrap process

• Taxonomy of Defects and Failures

• Proposed Solutions for each kind of error

carolina.hernandez-phillips@inria.fr
!25
Carolina Hernández Phillips

Weitere ähnliche Inhalte

Was ist angesagt?

Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation Rebaz Najeeb
 
PIL - A Platform Independent Language
PIL - A Platform Independent LanguagePIL - A Platform Independent Language
PIL - A Platform Independent Languagezefhemel
 
Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloudlennartkats
 
Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)lennartkats
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platformdeimos
 
Java vs .net
Java vs .netJava vs .net
Java vs .netTech_MX
 
Compiler Construction | Lecture 1 | What is a compiler?
Compiler Construction | Lecture 1 | What is a compiler?Compiler Construction | Lecture 1 | What is a compiler?
Compiler Construction | Lecture 1 | What is a compiler?Eelco Visser
 
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...lennartkats
 
The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)lennartkats
 
The essence of the VivaCore code analysis library
The essence of the VivaCore code analysis libraryThe essence of the VivaCore code analysis library
The essence of the VivaCore code analysis libraryPVS-Studio
 
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVMJung Kim
 
Thesis - LLVM toolchain support as a plug-in for Eclipse CDT
Thesis - LLVM toolchain support as a plug-in for Eclipse CDTThesis - LLVM toolchain support as a plug-in for Eclipse CDT
Thesis - LLVM toolchain support as a plug-in for Eclipse CDTTuononenP
 
Assignment complier design (GROUP1)
Assignment complier design (GROUP1)Assignment complier design (GROUP1)
Assignment complier design (GROUP1)ilias ahmed
 
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019corehard_by
 

Was ist angesagt? (20)

Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation
 
PIL - A Platform Independent Language
PIL - A Platform Independent LanguagePIL - A Platform Independent Language
PIL - A Platform Independent Language
 
Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloud
 
109842496 jni
109842496 jni109842496 jni
109842496 jni
 
Top ten of PHP 7.4
Top ten of PHP 7.4Top ten of PHP 7.4
Top ten of PHP 7.4
 
LLVM
LLVMLLVM
LLVM
 
Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platform
 
Lecture19.07.2014
Lecture19.07.2014Lecture19.07.2014
Lecture19.07.2014
 
Java vs .net
Java vs .netJava vs .net
Java vs .net
 
Compiler Construction | Lecture 1 | What is a compiler?
Compiler Construction | Lecture 1 | What is a compiler?Compiler Construction | Lecture 1 | What is a compiler?
Compiler Construction | Lecture 1 | What is a compiler?
 
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
 
The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)
 
Lab3 s2
Lab3 s2Lab3 s2
Lab3 s2
 
The essence of the VivaCore code analysis library
The essence of the VivaCore code analysis libraryThe essence of the VivaCore code analysis library
The essence of the VivaCore code analysis library
 
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
 
Thesis - LLVM toolchain support as a plug-in for Eclipse CDT
Thesis - LLVM toolchain support as a plug-in for Eclipse CDTThesis - LLVM toolchain support as a plug-in for Eclipse CDT
Thesis - LLVM toolchain support as a plug-in for Eclipse CDT
 
Assignment complier design (GROUP1)
Assignment complier design (GROUP1)Assignment complier design (GROUP1)
Assignment complier design (GROUP1)
 
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
 
Java vs .net (beginners)
Java vs .net (beginners)Java vs .net (beginners)
Java vs .net (beginners)
 

Ähnlich wie Challenges in Debugging Bootstraps of Reflective Kernels

Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitDimitry Snezhkov
 
01 Introduction to programming
01 Introduction to programming01 Introduction to programming
01 Introduction to programmingmaznabili
 
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing EnvironmentDCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing EnvironmentDocker, Inc.
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and TechniquesBala Subra
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging TechniquesBala Subra
 
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise ApplicationsDaniel Oh
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshoploodse
 
Hadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault InjectionHadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault InjectionCloudera, Inc.
 
Care and Feeding of Large Web Applications
Care and Feeding of Large Web ApplicationsCare and Feeding of Large Web Applications
Care and Feeding of Large Web ApplicationsPerrin Harkins
 
Parsing and Type checking all 2^10000 configurations of the Linux kernel
Parsing and Type checking all 2^10000 configurations of the Linux kernelParsing and Type checking all 2^10000 configurations of the Linux kernel
Parsing and Type checking all 2^10000 configurations of the Linux kernelchk49
 
Immutable Server generation: The new App Deployment
Immutable Server generation: The new App DeploymentImmutable Server generation: The new App Deployment
Immutable Server generation: The new App DeploymentAxel Fontaine
 
CI/CD Pipeline with Docker
CI/CD Pipeline with DockerCI/CD Pipeline with Docker
CI/CD Pipeline with Dockerkushalsingh007
 
Security Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and SystemsSecurity Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and SystemsAntiy Labs
 
jhkghj
jhkghjjhkghj
jhkghjAdmin
 
test2PPT
test2PPTtest2PPT
test2PPTAdmin
 
Introduction to c_sharp
Introduction to c_sharpIntroduction to c_sharp
Introduction to c_sharpHEM Sothon
 

Ähnlich wie Challenges in Debugging Bootstraps of Reflective Kernels (20)

Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
 
Introduction to Programming Lesson 01
Introduction to Programming Lesson 01Introduction to Programming Lesson 01
Introduction to Programming Lesson 01
 
01 Introduction to programming
01 Introduction to programming01 Introduction to programming
01 Introduction to programming
 
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing EnvironmentDCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 
Csharp dot net
Csharp dot netCsharp dot net
Csharp dot net
 
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Hadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault InjectionHadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault Injection
 
Care and Feeding of Large Web Applications
Care and Feeding of Large Web ApplicationsCare and Feeding of Large Web Applications
Care and Feeding of Large Web Applications
 
Parsing and Type checking all 2^10000 configurations of the Linux kernel
Parsing and Type checking all 2^10000 configurations of the Linux kernelParsing and Type checking all 2^10000 configurations of the Linux kernel
Parsing and Type checking all 2^10000 configurations of the Linux kernel
 
Immutable Server generation: The new App Deployment
Immutable Server generation: The new App DeploymentImmutable Server generation: The new App Deployment
Immutable Server generation: The new App Deployment
 
CI/CD Pipeline with Docker
CI/CD Pipeline with DockerCI/CD Pipeline with Docker
CI/CD Pipeline with Docker
 
Security Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and SystemsSecurity Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and Systems
 
Asp dot net
Asp dot netAsp dot net
Asp dot net
 
jhkghj
jhkghjjhkghj
jhkghj
 
test2PPT
test2PPTtest2PPT
test2PPT
 
Asp net
Asp netAsp net
Asp net
 
Introduction to c_sharp
Introduction to c_sharpIntroduction to c_sharp
Introduction to c_sharp
 

Mehr von ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingESUG
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in PharoESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapESUG
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 

Mehr von ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Kürzlich hochgeladen

Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 

Kürzlich hochgeladen (20)

Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 

Challenges in Debugging Bootstraps of Reflective Kernels

  • 1. Challenges in Debugging Bootstraps of Reflective Kernels Carolina Hernández Phillips INRIA Lille Nord Europe IMT Lille Douai Noury Bouraqadi IMT Lille Douai Luc Fabresse IMT Lille Douai Stéphane Ducasse INRIA Lille Nord Europe Guille Polito Univ. Lille, CNRS, CRIStAL Pablo Tesone Pharo Consortium 1
  • 2. Why generating custom application runtimes for IoT? Small Hardware requires software Limited processing capabilities, storage, battery !2
  • 3. Existing approaches: Generating lightweight implementations of Languages from scratch Implement from scratch: VM, base libraries, compiler Implies complex low level implementation Requires high expertise to develop! !3
  • 4. Our high level approach: Bootstrapping reflective kernels • Bootstrapping is to generate a system using a previous version of the system that is being generated • Therefore we can use the high level abstractions and the reflective capabilities of both systems during the bootstrap • The result is a small Kernel (an image in the case of Pharo) which can be executed by the same VM that executes its previous version !4
  • 5. Demo Let’s Bootstrap PharoCandle (a Pharo micro kernel) !5
  • 6. Virtual Machine Host SystemLanguage Definition 1. GENERATE 2.LOAD 3.EXECUTE Bootstrap Kernel App entry point !6
  • 8. Defect: error in Language Definition Failure: incorrect result during the Bootstrap Virtual Machine Host SystemLanguage Definition Kernel 1. GENERATE 2.LOAD 3.EXECUTE Defects & Failures Kernel App entry point !8
  • 9. Structural Defect Defect: error in Language Definition Defects Classification Language Definition Structural Definitions of Classes Methods Definitions Class PCPoint superclass : PCObject, instVars : { ‘x’, ’y’ }, type : variable PCPoint >> + arg { ^ (x + arg x) @ (y + arg y) } PCPoint >> crossProduct: aPoint { ^ x * aPoint y - (y * aPoint x) } … Semantic Defect fixed x !9
  • 10. Defect: error in Language Definition Semantic Defects are Dangerous Language Definition Structural Definitions of Classes Methods Definitions Host System Kernel 1. GENERATE Reflective Ops PCClassBuilder >> installMethod: aCompiledMethod inClass: aClass { aClass methodDictionary add: aCompiledMethod } Modify !10 Semantic Defects in reflective methods modify the structural definitions in the Kernel
  • 11. The why of defects !11
  • 12. Structural Defect Defect: error in Language Definition Defects Language Definition Structural Definitions of Classes Methods Definitions Class PCPoint superclass : PCObject, instVars : { ‘x’, ’y’ }, type : variable PCPoint >> + arg { ^ (x + arg x) @ (y + arg y) } PCPoint >> crossProduct: aPoint { ^ x * aPoint y - (y * aPoint x) } … Semantic Defect fixed x !12
  • 13. • Virtual Machine requirements • Application requirements Kernel The why of Defects Virtual Machine 2.LOAD Kernel PCMainApplication >> entryPoint { PCMyClass doSomething } Class PCArray superclass : PCObject, instVars : { }, Type : variable Virtual Machine 3.EXECUTE Smalltalk stack dump: 0xbffc8fd0 M >species 0x6e4e350: a(n) bad class 0xbffc7c0c M >copyReplaceFrom:to:with: 0x6e4e350: a(n) bad class 0xbffc7c30 M >, 0x6e4e350: a(n) bad class 0xbffc7c5c I >doesNotUnderstand: activeProcess 0x6e2f7c0: a(n) bad class 0xbffc7c88 I >doesNotUnderstand: activeProcess 0x6e2f7c0: a(n) bad class Segmentation Fault X X !13
  • 14. Why is it hard to find the defects back? • We are debugging the VM • We lose great part of the abstractions of the generated language !14
  • 15. Taxonomy of Errors and proposed Solutions !15
  • 16. Taxonomy of Errors and Solutions Failure Stage Generation Loading Execution Defect Type Structural Semantic !16
  • 17. Taxonomy of Errors and Solutions Failure Stage Generation Loading Execution Defect Type Structural VM requirement VM requirement VM requirement Semantic VM requirement Application requirement Static Tests on Language Definition + Base Language Definition !17
  • 18. Kernel Virtual Machine Host System 1. GENERATE 2.LOAD 3.EXECUTE ! App entry point Methods Definitions Reflective Ops Structural Definitions of Classes Static Tests on Language Definition Language Definition Extensible Base Language Definition !18 (They reify the VM requirements)
  • 19. Taxonomy of Errors and Solutions Failure Stage Generation Loading Execution Defect Type Structural VM requirement VM requirement VM requirement Semantic VM requirement Application requirement Static Tests on Language Definition + Base Language Definition Static Tests on Kernel + Hybrid Debugger !19
  • 20. Structural Definitions of Classes Virtual Machine Language Definition 2.LOAD 3.EXECUTE Kernel App entry point Methods Definitions Kernel 1. GENERATE Reflective Ops + Static Tests on Language Kernel Hybrid Debugger Host System !20 3 Execution levels: - Language definition code - Pharo code - VM code 2 new Debugging Operations - Step Down - Step Up
  • 21. Taxonomy of Errors and Solutions Failure Stage Generation Loading Execution Defect Type Structural VM requirement VM requirement VM requirement Semantic VM requirement Application requirement Static Tests on Kernel + Hybrid Debugger Simulated Execution Static Tests on Language Definition + Base Language Definition !21
  • 22. Host System Structural Definitions of Classes Virtual Machine 1. GENERATE 2.LOAD 3.EXECUTE Kernel App entry point Reflective Ops Methods Definitions Kernel Execution Simulator AST interpreter + VM simulator App entry point Language Definition Lookup R/W objects !22
  • 23. Taxonomy of Errors and Solutions Failure Stage Generation Loading Execution Defect Type Structural VM requirement VM requirement VM requirement Semantic VM requirement Application requirement Static Tests on Kernel + Hybrid Debugger Simulated Execution Static Tests on Language Definition + Base Language Definition All these solutions can be used to debug the current Pharo bootstrap process!! !23
  • 24. Research Directions • Define the Pharo VM requirements, and model them for future modifications in future VM implementations • Maximise the flexibility of the extensible base language definition, to maximise the range of languages that we can define from it • Explore what is a good design for the hybrid debugger, so it contains the correct abstractions for debugging the bootstrap process • Explore the limitations for the simulated execution environment • Explore a way to debug failures hard to reproduce and which occur in production environment • Shrinking the VM by removing unused plugins, which will be determined by dynamically analysing the simulated execution and its interaction with the VM simulator !24
  • 25. Conclusions • Analysis of Pharo Bootstrap process • Taxonomy of Defects and Failures • Proposed Solutions for each kind of error carolina.hernandez-phillips@inria.fr !25 Carolina Hernández Phillips