SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
1
Prototalk: an Environment for
Teaching, Understanding,
Designing and Prototyping OO
Languages
Alexandre Bergel, Christophe Dony, Stéphane Ducasse
University of Bern (Switzerland)
LIRMM, Montpellier (France)
bergel@iam.unibe.ch
2
Outline
1. Prototype OO Languages
2. Expressing Different Languages
3. Prototalk
4. Example: Newtonscript
5. Conclusion
3
Prototype OO Languages
• Classless paradigm
• A prototype contains its state and
behavior
• Link between prototypes is usually
done using:
• Delegation
• Composition
4
Different Languages
• Self: Unification of variables and
methods and multiple parents
• ObjectLisp: variables distinct from
methods
• NewtonScript: two kinds of delegation
over two links
5
Prototalk
6
Goal and Design Decisions
• Uniformity: same syntax for all the
languages
• Minimality: minimal kernel to express
the most general semantics
• Extensibility: new languages has to be
implemented efficiently and easily
• Usability: integrated in the
environment
7
Prototalk
• Language represented by a subclass of
AbstractProto
• Execution of program by sending
evaluate: to it
• The AST is built using a
ProgramNodeBuilder
• It is composed of subclass of the
Smalltalk AST nodes
8
Architecture
AbstractObjectModel
evaluate: sourceCode
compileMethodAt: name
compile: codeSource
globalVar: varName put: aValue
nodeBuilder
NodeBuilder
newVariableName: name
newMessageReceiver: rcvr
...
ProgramNode
eval: context
MethodNode
selector
block
eval: context
applyWith: args in: context
VariableNode
variableName
eval: context
MessageNode
selector
eval: context
Language1
variables
methods
methodOwner: name
clone
...
Language1NodeBuilder
newVariableName: name
newMessageReceiver:
...
Language1
VariableNode
eval: context
Language1
MessageNode
eval: context
Prototalk Base
Implementation of Language1
9
Language1
• Language1 is a subclass of
AbstractProto
• Ability to execute programs
• Prototypes are represented by its
instances
• Provides primitives like clone, addVar:
addMethod:, hasVar:, ...
10
Example: NewtonScript
• It has a double inheritance: _proto is
searched prior to _parent
_parent
_proto
11
Double Inheritance
f := {getX: funct() x, _proto: {_proto: {x: 10}}};
f._parent := {x: 20};
f getX x: 10
x: 20
_parent
_proto
f.getX() ==> 10
12
In Prototalk
f := {getX: funct() x, _proto: {_proto: {x: 10}}};
f._parent := {x: 20};
f.getX() ==> 10
The same program in Prototalk:
NewtonScriptLike evaluate: ‘
f := PRoot clone.
f proto: (PRoot clone; proto: (PRoot clone; addSlot: ‘‘x = 10’’)).
f addSlot: ‘‘getX x’’.
f parent: (PRoot clone; addSlot: ‘x = 20’).
f getX.’
13
In Prototalk
AbstractProto
NewtonScriptLike
parent
proto
methodOwner: name
methodOwnerInProto: name
t := self methodOwnerInProto: name.
^ t isNil
ifTrue: [
parent isNil
ifTrue: [nil]
ifFalse: [parent methodOwner: name]]
ifFalse: [t]]
^ (slots includesKey: name)
ifTrue: [self]
ifFalse: [
proto isNil
ifTrue: [nil]
ifFalse:
[proto methodOwnerInProto: name]]
slots
14
Conclusion
• Platform to design and experiment
prototypes-based OO language
• Pure interpretation of programs
• Pedagogical tool: used at University
Paris VI, Montpellier and Berne
15
• Prototalk: an Environment for
Teaching, Understanding, Designing
and Prototyping OO languages
• bergel@iam.unibe.ch
16
17
Hierarchy of Object Model
AbstractProto
newEmpty
SlotProto
slots
clone
addSlot: name
method: code
methodNamed: name
L11
initInitials: slots
newInitials: slots
L11AndImplicitDelegation
parent
clone
methodLookup: name
parent
son
L16
ModifiableSlot
L7
L7AndImplicitDelegation
parent
initializeParent: parent
close
SelfLike
addSlot: slot
assignmentMethod: code
L7AndExplicitDelegation
18
ProgramNodeBuilder
SelfLikeAssignment
MethodBuilder
Smalltalk ProgramNodeBuilder
Prototalk ProgramNodeBuilder
ProgramNodeBuilder
newCondition(cond, then, else)
newLiteralValue(literal)
newMessageReceiver(object)
newMethodSelector(methName)
newVariable(varName)
newAssignmentVariable(name)
ImplicitDelegationPNB
newMessageReceiver: object
ImplicitDelegation
EncapsulationPNB
newMessageReceiver: object
newAssignmentVariable: name
ObjectLispLikePNB
newMessageReceiver: object
SelfLikePNB
newVariable: varName
EncapsulationPNB
newVariable: varName
newAssignmentVariable: name
ExplicitDelegationPNB
newMessageReceiver: object
ExplicitDelegationEncapsulationPNB
newVariable: varName
newAssignmentVariable: name
AbstractProto
nodeBuilder
19
Self, ObjectLisp, ...
Person
age=26
name=Luc
eat=...
Student
num=1234567
grade=2
doExam=...
Person
age=26
name=Luc
eat(...)
Student
num=1234567
grade=2
doExam(...)

Contenu connexe

En vedette

Welcome ESUG 2005
Welcome ESUG 2005Welcome ESUG 2005
Welcome ESUG 2005ESUG
 
MBA Smalltalk: to manage your objects
MBA Smalltalk: to manage your objectsMBA Smalltalk: to manage your objects
MBA Smalltalk: to manage your objectsESUG
 
trabalho 2
trabalho 2trabalho 2
trabalho 2nlopesr
 
The Value of Smalltalk
The Value of SmalltalkThe Value of Smalltalk
The Value of SmalltalkESUG
 
Meta-Driven Browsers
Meta-Driven BrowsersMeta-Driven Browsers
Meta-Driven BrowsersESUG
 
Ocean
OceanOcean
OceanESUG
 
Application-Specific Models and Pointcuts using a Logic Meta Language
Application-Specific Models and Pointcuts using a Logic Meta LanguageApplication-Specific Models and Pointcuts using a Logic Meta Language
Application-Specific Models and Pointcuts using a Logic Meta LanguageESUG
 

En vedette (7)

Welcome ESUG 2005
Welcome ESUG 2005Welcome ESUG 2005
Welcome ESUG 2005
 
MBA Smalltalk: to manage your objects
MBA Smalltalk: to manage your objectsMBA Smalltalk: to manage your objects
MBA Smalltalk: to manage your objects
 
trabalho 2
trabalho 2trabalho 2
trabalho 2
 
The Value of Smalltalk
The Value of SmalltalkThe Value of Smalltalk
The Value of Smalltalk
 
Meta-Driven Browsers
Meta-Driven BrowsersMeta-Driven Browsers
Meta-Driven Browsers
 
Ocean
OceanOcean
Ocean
 
Application-Specific Models and Pointcuts using a Logic Meta Language
Application-Specific Models and Pointcuts using a Logic Meta LanguageApplication-Specific Models and Pointcuts using a Logic Meta Language
Application-Specific Models and Pointcuts using a Logic Meta Language
 

Similaire à Prototalk

Design patterns illustrated 010PHP
Design patterns illustrated 010PHPDesign patterns illustrated 010PHP
Design patterns illustrated 010PHPHerman Peeren
 
1. Mini seminar intro
1. Mini seminar intro1. Mini seminar intro
1. Mini seminar introLeonid Maslov
 
Future Programming Language
Future Programming LanguageFuture Programming Language
Future Programming LanguageYLTO
 
Python for Delphi Developers - Part 1 Introduction
Python for Delphi Developers - Part 1 IntroductionPython for Delphi Developers - Part 1 Introduction
Python for Delphi Developers - Part 1 IntroductionEmbarcadero Technologies
 
These questions will be a bit advanced level 2
These questions will be a bit advanced level 2These questions will be a bit advanced level 2
These questions will be a bit advanced level 2sadhana312471
 
EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4Max Kleiner
 
Python: The Programmer's Lingua Franca
Python: The Programmer's Lingua FrancaPython: The Programmer's Lingua Franca
Python: The Programmer's Lingua FrancaActiveState
 
Xbase implementing specific domain language for java
Xbase  implementing specific domain language for javaXbase  implementing specific domain language for java
Xbase implementing specific domain language for javaYash Patel
 
TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesEelco Visser
 
Comment Asciidoctor peut vous aider pour votre doc
Comment Asciidoctor peut vous aider pour votre docComment Asciidoctor peut vous aider pour votre doc
Comment Asciidoctor peut vous aider pour votre docJérémie Bresson
 
PHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityPHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityGeorgePeterBanyard
 
Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475Max Kleiner
 
Pal gov.tutorial4.session12 2.wordnets
Pal gov.tutorial4.session12 2.wordnetsPal gov.tutorial4.session12 2.wordnets
Pal gov.tutorial4.session12 2.wordnetsMustafa Jarrar
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughgabriellekuruvilla
 
DSL's with Groovy
DSL's with GroovyDSL's with Groovy
DSL's with Groovypaulbowler
 
Creating a textual domain specific language
Creating a textual domain specific languageCreating a textual domain specific language
Creating a textual domain specific languageVicente García Díaz
 
20100730 phpstudy
20100730 phpstudy20100730 phpstudy
20100730 phpstudyYusuke Ando
 

Similaire à Prototalk (20)

Design patterns illustrated 010PHP
Design patterns illustrated 010PHPDesign patterns illustrated 010PHP
Design patterns illustrated 010PHP
 
1. Mini seminar intro
1. Mini seminar intro1. Mini seminar intro
1. Mini seminar intro
 
Future Programming Language
Future Programming LanguageFuture Programming Language
Future Programming Language
 
Python for Delphi Developers - Part 1 Introduction
Python for Delphi Developers - Part 1 IntroductionPython for Delphi Developers - Part 1 Introduction
Python for Delphi Developers - Part 1 Introduction
 
These questions will be a bit advanced level 2
These questions will be a bit advanced level 2These questions will be a bit advanced level 2
These questions will be a bit advanced level 2
 
biopython, doctest and makefiles
biopython, doctest and makefilesbiopython, doctest and makefiles
biopython, doctest and makefiles
 
EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4
 
Python: The Programmer's Lingua Franca
Python: The Programmer's Lingua FrancaPython: The Programmer's Lingua Franca
Python: The Programmer's Lingua Franca
 
Xbase implementing specific domain language for java
Xbase  implementing specific domain language for javaXbase  implementing specific domain language for java
Xbase implementing specific domain language for java
 
TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific Languages
 
Comment Asciidoctor peut vous aider pour votre doc
Comment Asciidoctor peut vous aider pour votre docComment Asciidoctor peut vous aider pour votre doc
Comment Asciidoctor peut vous aider pour votre doc
 
PHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityPHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing Insanity
 
Andy On Closures
Andy On ClosuresAndy On Closures
Andy On Closures
 
Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Pal gov.tutorial4.session12 2.wordnets
Pal gov.tutorial4.session12 2.wordnetsPal gov.tutorial4.session12 2.wordnets
Pal gov.tutorial4.session12 2.wordnets
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
 
DSL's with Groovy
DSL's with GroovyDSL's with Groovy
DSL's with Groovy
 
Creating a textual domain specific language
Creating a textual domain specific languageCreating a textual domain specific language
Creating a textual domain specific language
 
20100730 phpstudy
20100730 phpstudy20100730 phpstudy
20100730 phpstudy
 

Plus de 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
 

Plus de 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
 

Dernier

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Dernier (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

Prototalk

  • 1. 1 Prototalk: an Environment for Teaching, Understanding, Designing and Prototyping OO Languages Alexandre Bergel, Christophe Dony, Stéphane Ducasse University of Bern (Switzerland) LIRMM, Montpellier (France) bergel@iam.unibe.ch
  • 2. 2 Outline 1. Prototype OO Languages 2. Expressing Different Languages 3. Prototalk 4. Example: Newtonscript 5. Conclusion
  • 3. 3 Prototype OO Languages • Classless paradigm • A prototype contains its state and behavior • Link between prototypes is usually done using: • Delegation • Composition
  • 4. 4 Different Languages • Self: Unification of variables and methods and multiple parents • ObjectLisp: variables distinct from methods • NewtonScript: two kinds of delegation over two links
  • 6. 6 Goal and Design Decisions • Uniformity: same syntax for all the languages • Minimality: minimal kernel to express the most general semantics • Extensibility: new languages has to be implemented efficiently and easily • Usability: integrated in the environment
  • 7. 7 Prototalk • Language represented by a subclass of AbstractProto • Execution of program by sending evaluate: to it • The AST is built using a ProgramNodeBuilder • It is composed of subclass of the Smalltalk AST nodes
  • 8. 8 Architecture AbstractObjectModel evaluate: sourceCode compileMethodAt: name compile: codeSource globalVar: varName put: aValue nodeBuilder NodeBuilder newVariableName: name newMessageReceiver: rcvr ... ProgramNode eval: context MethodNode selector block eval: context applyWith: args in: context VariableNode variableName eval: context MessageNode selector eval: context Language1 variables methods methodOwner: name clone ... Language1NodeBuilder newVariableName: name newMessageReceiver: ... Language1 VariableNode eval: context Language1 MessageNode eval: context Prototalk Base Implementation of Language1
  • 9. 9 Language1 • Language1 is a subclass of AbstractProto • Ability to execute programs • Prototypes are represented by its instances • Provides primitives like clone, addVar: addMethod:, hasVar:, ...
  • 10. 10 Example: NewtonScript • It has a double inheritance: _proto is searched prior to _parent _parent _proto
  • 11. 11 Double Inheritance f := {getX: funct() x, _proto: {_proto: {x: 10}}}; f._parent := {x: 20}; f getX x: 10 x: 20 _parent _proto f.getX() ==> 10
  • 12. 12 In Prototalk f := {getX: funct() x, _proto: {_proto: {x: 10}}}; f._parent := {x: 20}; f.getX() ==> 10 The same program in Prototalk: NewtonScriptLike evaluate: ‘ f := PRoot clone. f proto: (PRoot clone; proto: (PRoot clone; addSlot: ‘‘x = 10’’)). f addSlot: ‘‘getX x’’. f parent: (PRoot clone; addSlot: ‘x = 20’). f getX.’
  • 13. 13 In Prototalk AbstractProto NewtonScriptLike parent proto methodOwner: name methodOwnerInProto: name t := self methodOwnerInProto: name. ^ t isNil ifTrue: [ parent isNil ifTrue: [nil] ifFalse: [parent methodOwner: name]] ifFalse: [t]] ^ (slots includesKey: name) ifTrue: [self] ifFalse: [ proto isNil ifTrue: [nil] ifFalse: [proto methodOwnerInProto: name]] slots
  • 14. 14 Conclusion • Platform to design and experiment prototypes-based OO language • Pure interpretation of programs • Pedagogical tool: used at University Paris VI, Montpellier and Berne
  • 15. 15 • Prototalk: an Environment for Teaching, Understanding, Designing and Prototyping OO languages • bergel@iam.unibe.ch
  • 16. 16
  • 17. 17 Hierarchy of Object Model AbstractProto newEmpty SlotProto slots clone addSlot: name method: code methodNamed: name L11 initInitials: slots newInitials: slots L11AndImplicitDelegation parent clone methodLookup: name parent son L16 ModifiableSlot L7 L7AndImplicitDelegation parent initializeParent: parent close SelfLike addSlot: slot assignmentMethod: code L7AndExplicitDelegation
  • 18. 18 ProgramNodeBuilder SelfLikeAssignment MethodBuilder Smalltalk ProgramNodeBuilder Prototalk ProgramNodeBuilder ProgramNodeBuilder newCondition(cond, then, else) newLiteralValue(literal) newMessageReceiver(object) newMethodSelector(methName) newVariable(varName) newAssignmentVariable(name) ImplicitDelegationPNB newMessageReceiver: object ImplicitDelegation EncapsulationPNB newMessageReceiver: object newAssignmentVariable: name ObjectLispLikePNB newMessageReceiver: object SelfLikePNB newVariable: varName EncapsulationPNB newVariable: varName newAssignmentVariable: name ExplicitDelegationPNB newMessageReceiver: object ExplicitDelegationEncapsulationPNB newVariable: varName newAssignmentVariable: name AbstractProto nodeBuilder