SlideShare a Scribd company logo

Pharo: a reflective language A first systematic analysis of reflective APIs

E
ESUG

Talk from iwst 2023

1 of 23
Download to read offline
Iona Thomas, Stéphane Ducasse, Pablo Tessone, Guillermo Polito
Pharo: a reflective language
A first systematic analysis of reflective APIs
IWST 2023 - 29/08/2023
What is reflection ?
“Re
fl
ection is the ability of a program to manipulate
as data something representing the state of the
program during its own execution.” 1
2
1. R.G. Gabriel and D.G. Bobrow and J.L. White. CLOS in Context - The Shape of the Design Space. In Object OrientedProgramming - The CLOS perspective. MIT Press, 1993.
Reflection by example
3
Reflection categories
4
Often separated in 3 subcategories :
• Introspection
• Self-modi
fi
cation
• Intercession
https://www.theguardian.com/education/gallery/2015/jan/23/a-language-family-tree-in-pictures
Why an analysis of reflective features ?
Language evolution :
6

Recommended

The Rhetoric of Research Objects
The Rhetoric of Research ObjectsThe Rhetoric of Research Objects
The Rhetoric of Research ObjectsCarole Goble
 
Research Objects: more than the sum of the parts
Research Objects: more than the sum of the partsResearch Objects: more than the sum of the parts
Research Objects: more than the sum of the partsCarole Goble
 
EvoPat - Pattern-Based Evolution and Refactoring of RDF Knowledge Bases
EvoPat - Pattern-Based Evolution and Refactoring of RDF Knowledge BasesEvoPat - Pattern-Based Evolution and Refactoring of RDF Knowledge Bases
EvoPat - Pattern-Based Evolution and Refactoring of RDF Knowledge BasesSebastian Tramp
 
Object-Oriented Programming.pptx
Object-Oriented Programming.pptxObject-Oriented Programming.pptx
Object-Oriented Programming.pptxssusereae59d
 
Converting Metadata to Linked Data
Converting Metadata to Linked DataConverting Metadata to Linked Data
Converting Metadata to Linked DataKaren Estlund
 

More Related Content

Similar to Pharo: a reflective language A first systematic analysis of reflective APIs

2011 03-provenance-workshop-edingurgh
2011 03-provenance-workshop-edingurgh2011 03-provenance-workshop-edingurgh
2011 03-provenance-workshop-edingurghJun Zhao
 
SharePoint Taxonomy Introduction
SharePoint Taxonomy IntroductionSharePoint Taxonomy Introduction
SharePoint Taxonomy IntroductionChris Woodill
 
The paper trail:steps towards a reference model for the metadata ecology
The paper trail:steps towards a reference model for the metadata ecologyThe paper trail:steps towards a reference model for the metadata ecology
The paper trail:steps towards a reference model for the metadata ecologyR. John Robertson
 
Paper presentations: UK e-science AHM meeting, 2005
Paper presentations: UK e-science AHM meeting, 2005Paper presentations: UK e-science AHM meeting, 2005
Paper presentations: UK e-science AHM meeting, 2005Paolo Missier
 
Core Java Training in Noida
Core Java Training in NoidaCore Java Training in Noida
Core Java Training in NoidaTech Mentro
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanPriyanka Pradhan
 
CiteSeerX: Mining Scholarly Big Data
CiteSeerX: Mining Scholarly Big DataCiteSeerX: Mining Scholarly Big Data
CiteSeerX: Mining Scholarly Big DataJian Wu
 
Quality Metrics for Linked Open Data
Quality Metrics for  Linked Open Data Quality Metrics for  Linked Open Data
Quality Metrics for Linked Open Data ebrahim_bagheri
 
empirical-SLR.pptx
empirical-SLR.pptxempirical-SLR.pptx
empirical-SLR.pptxJitha Kannan
 
HT06, Position Paper, Tagging, Taxonomy, Flickr, Academic Article, ToRead, Pr...
HT06, Position Paper, Tagging, Taxonomy, Flickr, Academic Article, ToRead, Pr...HT06, Position Paper, Tagging, Taxonomy, Flickr, Academic Article, ToRead, Pr...
HT06, Position Paper, Tagging, Taxonomy, Flickr, Academic Article, ToRead, Pr...cameron
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine LearningRahul Jain
 

Similar to Pharo: a reflective language A first systematic analysis of reflective APIs (20)

Oops design pattern_amitgupta
Oops design pattern_amitguptaOops design pattern_amitgupta
Oops design pattern_amitgupta
 
2011 03-provenance-workshop-edingurgh
2011 03-provenance-workshop-edingurgh2011 03-provenance-workshop-edingurgh
2011 03-provenance-workshop-edingurgh
 
SharePoint Taxonomy Introduction
SharePoint Taxonomy IntroductionSharePoint Taxonomy Introduction
SharePoint Taxonomy Introduction
 
The paper trail:steps towards a reference model for the metadata ecology
The paper trail:steps towards a reference model for the metadata ecologyThe paper trail:steps towards a reference model for the metadata ecology
The paper trail:steps towards a reference model for the metadata ecology
 
Paper presentations: UK e-science AHM meeting, 2005
Paper presentations: UK e-science AHM meeting, 2005Paper presentations: UK e-science AHM meeting, 2005
Paper presentations: UK e-science AHM meeting, 2005
 
Core Java Training in Noida
Core Java Training in NoidaCore Java Training in Noida
Core Java Training in Noida
 
Unit 3
Unit 3Unit 3
Unit 3
 
Java programming -Object-Oriented Thinking- Inheritance
Java programming -Object-Oriented Thinking- InheritanceJava programming -Object-Oriented Thinking- Inheritance
Java programming -Object-Oriented Thinking- Inheritance
 
Final presentation
Final presentationFinal presentation
Final presentation
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka Pradhan
 
Tutorial 1-Ontologies
Tutorial 1-OntologiesTutorial 1-Ontologies
Tutorial 1-Ontologies
 
CiteSeerX: Mining Scholarly Big Data
CiteSeerX: Mining Scholarly Big DataCiteSeerX: Mining Scholarly Big Data
CiteSeerX: Mining Scholarly Big Data
 
Quality Metrics for Linked Open Data
Quality Metrics for  Linked Open Data Quality Metrics for  Linked Open Data
Quality Metrics for Linked Open Data
 
empirical-SLR.pptx
empirical-SLR.pptxempirical-SLR.pptx
empirical-SLR.pptx
 
A Clean Slate?
A Clean Slate?A Clean Slate?
A Clean Slate?
 
HT06, Position Paper, Tagging, Taxonomy, Flickr, Academic Article, ToRead, Pr...
HT06, Position Paper, Tagging, Taxonomy, Flickr, Academic Article, ToRead, Pr...HT06, Position Paper, Tagging, Taxonomy, Flickr, Academic Article, ToRead, Pr...
HT06, Position Paper, Tagging, Taxonomy, Flickr, Academic Article, ToRead, Pr...
 
C# by Zaheer Abbas Aghani
C# by Zaheer Abbas AghaniC# by Zaheer Abbas Aghani
C# by Zaheer Abbas Aghani
 
C# by Zaheer Abbas Aghani
C# by Zaheer Abbas AghaniC# by Zaheer Abbas Aghani
C# by Zaheer Abbas Aghani
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Oodb
OodbOodb
Oodb
 

More from 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
 
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
 
BioSmalltalk
BioSmalltalkBioSmalltalk
BioSmalltalkESUG
 

More from 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
 
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
 
BioSmalltalk
BioSmalltalkBioSmalltalk
BioSmalltalk
 

Recently uploaded

Role of DevOps in SaaS product Development.pdf.pptx
Role of DevOps in SaaS product Development.pdf.pptxRole of DevOps in SaaS product Development.pdf.pptx
Role of DevOps in SaaS product Development.pdf.pptxMindInventory
 
Machine Learning Basics for Dummies (no math!)
Machine Learning Basics for Dummies (no math!)Machine Learning Basics for Dummies (no math!)
Machine Learning Basics for Dummies (no math!)Dmitry Zinoviev
 
Implementing Docker Containers with Windows Server 2019
Implementing Docker Containers with Windows Server 2019Implementing Docker Containers with Windows Server 2019
Implementing Docker Containers with Windows Server 2019VICTOR MAESTRE RAMIREZ
 
killing camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfkilling camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfssuser82c38d
 
No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!Anthony Dahanne
 
Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Jeffrey Haguewood
 
Orion Context Broker introduction 20240227
Orion Context Broker introduction 20240227Orion Context Broker introduction 20240227
Orion Context Broker introduction 20240227Fermin Galan
 
Workshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con FlinkWorkshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con Flinkconfluent
 
LLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowLLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowNaoki (Neo) SATO
 
Cybersecurity Measures For Remote Workers.pdf
Cybersecurity Measures For Remote Workers.pdfCybersecurity Measures For Remote Workers.pdf
Cybersecurity Measures For Remote Workers.pdfCIOWomenMagazine
 
Agile & Scrum, Certified Scrum Master! Crash Course
Agile & Scrum,  Certified Scrum Master! Crash CourseAgile & Scrum,  Certified Scrum Master! Crash Course
Agile & Scrum, Certified Scrum Master! Crash CourseRohan Chandane
 
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이ssuser82c38d
 
Passbolt Introduction and Usage for secret managment
Passbolt Introduction and Usage for secret managmentPassbolt Introduction and Usage for secret managment
Passbolt Introduction and Usage for secret managmentThierry Gayet
 
Open Source vs Closed Source LLMs. Pros and Cons
Open Source vs Closed Source LLMs. Pros and ConsOpen Source vs Closed Source LLMs. Pros and Cons
Open Source vs Closed Source LLMs. Pros and ConsSprings
 
How AI is preventing account fraud at web scale
How AI is preventing account fraud at web scaleHow AI is preventing account fraud at web scale
How AI is preventing account fraud at web scaleAmir Moghimi
 
killing camp 주차장 나누기-2 topology sort.pdf
killing camp 주차장 나누기-2 topology sort.pdfkilling camp 주차장 나누기-2 topology sort.pdf
killing camp 주차장 나누기-2 topology sort.pdfssuser82c38d
 
Welcome to AltTask - the nexus where innovation converges with empowerment!
Welcome to AltTask - the nexus where innovation converges with empowerment!Welcome to AltTask - the nexus where innovation converges with empowerment!
Welcome to AltTask - the nexus where innovation converges with empowerment!alttaskcom
 
OpenChain AI Study Group - North America and Europe - 2024-02-20
OpenChain AI Study Group - North America and Europe - 2024-02-20OpenChain AI Study Group - North America and Europe - 2024-02-20
OpenChain AI Study Group - North America and Europe - 2024-02-20Shane Coughlan
 
Joseph Yoder : Being Agile about Architecture
Joseph Yoder : Being Agile about ArchitectureJoseph Yoder : Being Agile about Architecture
Joseph Yoder : Being Agile about ArchitectureHironori Washizaki
 

Recently uploaded (20)

Role of DevOps in SaaS product Development.pdf.pptx
Role of DevOps in SaaS product Development.pdf.pptxRole of DevOps in SaaS product Development.pdf.pptx
Role of DevOps in SaaS product Development.pdf.pptx
 
eLearning Content Development Company Code and Pixels.pdf
eLearning Content Development Company Code and Pixels.pdfeLearning Content Development Company Code and Pixels.pdf
eLearning Content Development Company Code and Pixels.pdf
 
Machine Learning Basics for Dummies (no math!)
Machine Learning Basics for Dummies (no math!)Machine Learning Basics for Dummies (no math!)
Machine Learning Basics for Dummies (no math!)
 
Implementing Docker Containers with Windows Server 2019
Implementing Docker Containers with Windows Server 2019Implementing Docker Containers with Windows Server 2019
Implementing Docker Containers with Windows Server 2019
 
killing camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfkilling camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdf
 
No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!
 
Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)
 
Orion Context Broker introduction 20240227
Orion Context Broker introduction 20240227Orion Context Broker introduction 20240227
Orion Context Broker introduction 20240227
 
Workshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con FlinkWorkshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con Flink
 
LLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowLLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flow
 
Cybersecurity Measures For Remote Workers.pdf
Cybersecurity Measures For Remote Workers.pdfCybersecurity Measures For Remote Workers.pdf
Cybersecurity Measures For Remote Workers.pdf
 
Agile & Scrum, Certified Scrum Master! Crash Course
Agile & Scrum,  Certified Scrum Master! Crash CourseAgile & Scrum,  Certified Scrum Master! Crash Course
Agile & Scrum, Certified Scrum Master! Crash Course
 
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
 
Passbolt Introduction and Usage for secret managment
Passbolt Introduction and Usage for secret managmentPassbolt Introduction and Usage for secret managment
Passbolt Introduction and Usage for secret managment
 
Open Source vs Closed Source LLMs. Pros and Cons
Open Source vs Closed Source LLMs. Pros and ConsOpen Source vs Closed Source LLMs. Pros and Cons
Open Source vs Closed Source LLMs. Pros and Cons
 
How AI is preventing account fraud at web scale
How AI is preventing account fraud at web scaleHow AI is preventing account fraud at web scale
How AI is preventing account fraud at web scale
 
killing camp 주차장 나누기-2 topology sort.pdf
killing camp 주차장 나누기-2 topology sort.pdfkilling camp 주차장 나누기-2 topology sort.pdf
killing camp 주차장 나누기-2 topology sort.pdf
 
Welcome to AltTask - the nexus where innovation converges with empowerment!
Welcome to AltTask - the nexus where innovation converges with empowerment!Welcome to AltTask - the nexus where innovation converges with empowerment!
Welcome to AltTask - the nexus where innovation converges with empowerment!
 
OpenChain AI Study Group - North America and Europe - 2024-02-20
OpenChain AI Study Group - North America and Europe - 2024-02-20OpenChain AI Study Group - North America and Europe - 2024-02-20
OpenChain AI Study Group - North America and Europe - 2024-02-20
 
Joseph Yoder : Being Agile about Architecture
Joseph Yoder : Being Agile about ArchitectureJoseph Yoder : Being Agile about Architecture
Joseph Yoder : Being Agile about Architecture
 

Pharo: a reflective language A first systematic analysis of reflective APIs

  • 1. Iona Thomas, Stéphane Ducasse, Pablo Tessone, Guillermo Polito Pharo: a reflective language A first systematic analysis of reflective APIs IWST 2023 - 29/08/2023
  • 2. What is reflection ? “Re fl ection is the ability of a program to manipulate as data something representing the state of the program during its own execution.” 1 2 1. R.G. Gabriel and D.G. Bobrow and J.L. White. CLOS in Context - The Shape of the Design Space. In Object OrientedProgramming - The CLOS perspective. MIT Press, 1993.
  • 4. Reflection categories 4 Often separated in 3 subcategories : • Introspection • Self-modi fi cation • Intercession
  • 6. Why an analysis of reflective features ? Language evolution : 6
  • 7. Why an analysis of reflective features ? Language evolution : Understand current state of re fl ection : • Years of organic evolution • Outdated documentations : • Smalltalk-80: The Language and Its Implementation (83) (Blue book) • Smalltalk: a Re fl ective Language (96) • ANSI Smalltalk (98) • New concepts : Pragmas, Slots, Packages … 7
  • 8. Class CompiledMethod Slot InstanceVariable Selector SharedPools ClassVariable Pragma Trait has composed of inherits from refers to has has 8 NEW NEW NEW Why an analysis of reflective features ? Evolution of the structural pharo meta-model
  • 9. Why an analysis of reflective features ? Once we understand the current state, we can : • (Re)design the MOP • Modularize some of the re fl ective API • Study re fl ection from security/stability point of view 9
  • 10. Goals • Create a catalog of re fl ective API • Analyse meta-objects • Analyse re fl ective APIs • Highlight areas of improvements
  • 11. Class Object MethodDict Compiled Block Compiled Method Slot Memory Reference Runtime Block Closure Context Thread Message Environment Legend Metaobject Implementation object Missing object Group of reflective features related to …. Reflective features’ relations with objects Relations between objects contains defines contains contains contains becomes at runtime knows its own selector/methods access and iteration hierarchy navigation lookup (messages/variables) class creation accessing instances message not understood identity memory iteration reference to instance variable query state acess object adoption reflective message send arbitrary method/ primitive execution editing pointers to an object method query selectors sender/receiver current method/arguments context hierarchy Class Variable MessageSend ClassBuilder/ Installer has class variable query 11 A map of some reflective features and their meta-objects
  • 12. Categories Object inspection State inspection Acessing object identity Acessing object class Chasing and atomic pointer swapping Find pointers to Bulk pointer swapping Class structural inspection Class / Metaclass shift Iterating and querying hierarchy Slot inspection Instance variable inspection Pragma Variable lookup SharedPools inspection Class variable inspection Selectors and methods inspection Stack Context Stack manipulation Message sending and code execution Reflective message send Method lookup Structural queries on Method Method element references Method slot uses Object modification State modification Manipulating object identity Object’s class change Class structural modification Class creation Slot modification Instance variable modification SharedPools modification Class variable modification Selectors /methods modification Hierarchy modification Method creation Compiled method creation Arbitrary method/ primitive execution Message send reification Control message passing Memory scanning Instances of a class Memory scanning 12
  • 13. Accessing instance variables • Object>>InstVarAt: • Object>>InstVarNamed: Object inspection State inspection Acessing object identity Acessing object class Class structural inspection Class / Metaclass shift Iterating and querying hierarchy Slot inspection Instance variable inspection Pragma Variable lookup SharedPools inspection Class variable inspection Selectors and methods inspection Message sending and code execution Reflective message send Method lookup Object modification State modification Manipulating object identity Object’s class change Class structural modification Class creation Slot modification Instance variable modification SharedPools modification Class variable modification Selectors /methods modification Hierarchy modification Method creation Compiled method creation Arbitrary method/ primitive execution Message send Control message Memory scanning Instances of a class Memory scanning • Object>>InstVarAt:Put: • Object>>InstVarNamed:Put: API
  • 14. Accessing instance variables • Object>>InstVarAt: • Object>>InstVarNamed: • ProtoObject>>InstVarsInclude: • Context>>objectSize: Object inspection State inspection Acessing object identity Acessing object class Class structural inspection Class / Metaclass shift Iterating and querying hierarchy Slot inspection Instance variable inspection Pragma Variable lookup SharedPools inspection Class variable inspection Selectors and methods inspection Message sending and code execution Reflective message send Method lookup Object modification State modification Manipulating object identity Object’s class change Class structural modification Class creation Slot modification Instance variable modification SharedPools modification Class variable modification Selectors /methods modification Hierarchy modification Method creation Compiled method creation Arbitrary method/ primitive execution Message send Control message Memory scanning Instances of a class Memory scanning • Object>>InstVarAt:Put: • Object>>InstVarNamed:Put: API
  • 15. Accessing instance variables Uses and potential improvements Object inspection State inspection Acessing object identity Acessing object class Class structural inspection Class / Metaclass shift Iterating and querying hierarchy Slot inspection Instance variable inspection Pragma Variable lookup SharedPools inspection Class variable inspection Selectors and methods inspection Message sending and code execution Reflective message send Method lookup Object modification State modification Manipulating object identity Object’s class change Class structural modification Class creation Slot modification Instance variable modification SharedPools modification Class variable modification Selectors /methods modification Hierarchy modification Method creation Compiled method creation Arbitrary method/ primitive execution Message send Control message Memory scanning Instances of a class Memory scanning Current uses : • Copying objects • Serialising objects • Printing objects • Inspecting objects • Checking references • Testing, including for some fi elds without getter methods
  • 16. Accessing instance variables Uses and potential improvements Object inspection State inspection Acessing object identity Acessing object class Class structural inspection Class / Metaclass shift Iterating and querying hierarchy Slot inspection Instance variable inspection Pragma Variable lookup SharedPools inspection Class variable inspection Selectors and methods inspection Message sending and code execution Reflective message send Method lookup Object modification State modification Manipulating object identity Object’s class change Class structural modification Class creation Slot modification Instance variable modification SharedPools modification Class variable modification Selectors /methods modification Hierarchy modification Method creation Compiled method creation Arbitrary method/ primitive execution Message send Control message Memory scanning Instances of a class Memory scanning Current uses : • Copying objects • Serialising objects • Printing objects • Inspecting objects • Checking references • Testing, including for some fi elds without getter methods Areas of improvement : • No solution for intercession on state read/write
  • 17. Changing the class of an object API • Behavior»adoptInstance: • Metaclass»adoptInstance:from: • Object»primitiveChangeClassTo: ct ble up ble up Object modification State modification Manipulating object identity Object’s class change Class structural modification Class creation Slot modification Instance variable modification SharedPools modification Class variable modification Selectors /methods modification Hierarchy modification Method creation Compiled method creation Memory scanning Instances of a class Memory scanning
  • 18. Changing the class of an object API • Behavior»adoptInstance: • Metaclass»adoptInstance:from: • Object»primitiveChangeClassTo: ct ble up ble up Object modification State modification Manipulating object identity Object’s class change Class structural modification Class creation Slot modification Instance variable modification SharedPools modification Class variable modification Selectors /methods modification Hierarchy modification Method creation Compiled method creation Memory scanning Instances of a class Memory scanning Uses : • Proxy implementation • Updating instances to the new version of a class Areas of improvement : • Constraints on same class format • Some state can be lost (class builder)
  • 19. What is next ? • Assess potential safety issues • Better understand how the re fl ective feature are used • Modularisation of some re fl ective operations 19
  • 20. More in the paper ! • Memory Scanning • Stack Manipulation … and more !
  • 21. Key Takeaways Contributions : • Discovering the re fl ective API of Pharo • Digging into Pharo MOP design • Implementing some of the suggested improvements ! • A Catalog of re fl ective API • Analysis on meta-objects • Analysis on re fl ective APIs • Areas of improvements for the re fl ective API Why read the article ?
  • 22. The Limites of Intercession Sending a message Look up Throw a DNU Applying the method Method found ?
  • 23. The Limits of Intercession Sending a message Look up Throw a DNU Applying the method Method found ? No high-level API to do intercession here