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?

Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloud
lennartkats
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platform
deimos
 
Java vs .net
Java vs .netJava vs .net
Java vs .net
Tech_MX
 
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
 

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

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
Docker, Inc.
 
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
Antiy Labs
 
jhkghj
jhkghjjhkghj
jhkghj
Admin
 
test2PPT
test2PPTtest2PPT
test2PPT
Admin
 

Ä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 Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and 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
 
Asp net
Asp netAsp net
Asp net
 
test2PPT
test2PPTtest2PPT
test2PPT
 
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 programming
ESUG
 
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
ESUG
 
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 results
ESUG
 
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
ESUG
 
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
ESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
ESUG
 
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
ESUG
 
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
ESUG
 
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
ESUG
 
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
ESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
ESUG
 
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
ESUG
 

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

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Kürzlich hochgeladen (20)

%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 

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