This document discusses representing variables in Smalltalk as first-class objects. It describes adding semantic annotations to the AST by modeling variables as objects that are aware of their defining scope. This allows variables to be looked up and accessed reflectively. Representing variables as first-class entities integrated with the reflective model simplifies name analysis in the compiler and enables custom variable kinds and tools that work with any variable.
Updated version of the Lecture. VUB Brussels, Ocotber 2018
Smalltalk provides many reflective features, yet behavioral reflection is limited. Pharo provides reflective features that go beyond standard Smalltalk.
The lecture will present Reflectivity, a framework for fine-grained behavioral reflection. It allows to annotate the AST with MetaLinks, alowing meta-objects to change behavior down to a single operation.
After a overview of the framework, we show how MetaLinks are used in Pharo to realize IDE tools such as BreakPoints and Code Coverage.
Updated version of the Lecture. VUB Brussels, Ocotber 2018
Smalltalk provides many reflective features, yet behavioral reflection is limited. Pharo provides reflective features that go beyond standard Smalltalk.
The lecture will present Reflectivity, a framework for fine-grained behavioral reflection. It allows to annotate the AST with MetaLinks, alowing meta-objects to change behavior down to a single operation.
After a overview of the framework, we show how MetaLinks are used in Pharo to realize IDE tools such as BreakPoints and Code Coverage.
Recent changes with C# 7 returning values by references, ref locals and ref returns, readonly struct, ref struct, in modifier, the Span<T> type and how it is used with libraries - performance improvements on the string type, stream overloads with Span parameters, and the System.IO.Pipeline library
Reference Semantik mit C# und .NET Core - BASTA 2019Christian Nagel
C# 7 bietet einige Erweiterungen für Value-Type-Parameter mit Referenzsemantik, wie z. B. das “in“ Keyword, als auch Rückgabe und lokale Variable mit "ref modifier". Eine Struct kann als "ref struct" deklariert werden. Was Sie damit machen können, wozu das in den neuesten .NET-Core-Versionen genutzt wird, und wie Sie diese Erweiterungen von .NET Core 2.1 selbst nutzen können, lernen Sie in dieser Session.
This presentation of ROBO INDIA comprises all of the elements that must be known to learn the programming language C.
This ppt also explains all these topics in details.
We welcome all you views and queries. Please write us, we are found at-
website: http://roboindia.com
mail: info@roboindia.com
Esoft Metro Campus - Programming with C++
(Template - Virtusa Corporate)
Contents:
Overview of C++ Language
C++ Program Structure
C++ Basic Syntax
Primitive Built-in types in C++
Variable types
typedef Declarations
Enumerated Types
Variable Scope
Constants/Literals
Storage Classes
Operators
Control Constructs
Functions
Math Operations in C++
Arrays
Multi-dimensional Arrays
Strings
C++ Pointers
References
Date and Time
Structures
Basic Input / Output
Classes and Objects
Inheritance
Overloading
Polymorphism
Interfaces
Files and Streams
Exception Handling
Dynamic Memory
Namespaces
Templates
Preprocessor
Multithreading
Behavioral Reflection in Pharo
Tue, July 14, 11:00am – 11:30am
First Name: Marcus
Last Name: Denker
Abstract:
In this talk I will present Reflectivity, a framework for behavioral
reflection. Reflectivity was implemented some years ago as a research
prototype but now has been re-implemented in Pharo5 in a practically usable
way.
This talk will present the ideas behind Reflectivity and show how to use
by presenting examples. I will explain the implementation strategy used
and discuss future improvements.
Video: https://www.youtube.com/watch?v=Ik539CtjtTI
Presented By:
N.V.Raja Sekhar Reddy
www.technolamp.co.in
Want more interesting...
Watch and Like us @ https://www.facebook.com/Technolamp.co.in
subscribe videos @ http://www.youtube.com/user/nvrajasekhar
Recent changes with C# 7 returning values by references, ref locals and ref returns, readonly struct, ref struct, in modifier, the Span<T> type and how it is used with libraries - performance improvements on the string type, stream overloads with Span parameters, and the System.IO.Pipeline library
Reference Semantik mit C# und .NET Core - BASTA 2019Christian Nagel
C# 7 bietet einige Erweiterungen für Value-Type-Parameter mit Referenzsemantik, wie z. B. das “in“ Keyword, als auch Rückgabe und lokale Variable mit "ref modifier". Eine Struct kann als "ref struct" deklariert werden. Was Sie damit machen können, wozu das in den neuesten .NET-Core-Versionen genutzt wird, und wie Sie diese Erweiterungen von .NET Core 2.1 selbst nutzen können, lernen Sie in dieser Session.
This presentation of ROBO INDIA comprises all of the elements that must be known to learn the programming language C.
This ppt also explains all these topics in details.
We welcome all you views and queries. Please write us, we are found at-
website: http://roboindia.com
mail: info@roboindia.com
Esoft Metro Campus - Programming with C++
(Template - Virtusa Corporate)
Contents:
Overview of C++ Language
C++ Program Structure
C++ Basic Syntax
Primitive Built-in types in C++
Variable types
typedef Declarations
Enumerated Types
Variable Scope
Constants/Literals
Storage Classes
Operators
Control Constructs
Functions
Math Operations in C++
Arrays
Multi-dimensional Arrays
Strings
C++ Pointers
References
Date and Time
Structures
Basic Input / Output
Classes and Objects
Inheritance
Overloading
Polymorphism
Interfaces
Files and Streams
Exception Handling
Dynamic Memory
Namespaces
Templates
Preprocessor
Multithreading
Behavioral Reflection in Pharo
Tue, July 14, 11:00am – 11:30am
First Name: Marcus
Last Name: Denker
Abstract:
In this talk I will present Reflectivity, a framework for behavioral
reflection. Reflectivity was implemented some years ago as a research
prototype but now has been re-implemented in Pharo5 in a practically usable
way.
This talk will present the ideas behind Reflectivity and show how to use
by presenting examples. I will explain the implementation strategy used
and discuss future improvements.
Video: https://www.youtube.com/watch?v=Ik539CtjtTI
Presented By:
N.V.Raja Sekhar Reddy
www.technolamp.co.in
Want more interesting...
Watch and Like us @ https://www.facebook.com/Technolamp.co.in
subscribe videos @ http://www.youtube.com/user/nvrajasekhar
Similar to First Class Variables as AST Annotations (20)
Smalltalk provides many reflective features, yet behavioral reflection is limited. Pharo provides reflective features that go beyond standard Smalltalk.
The lecture will present Reflectivity, a framework for fine-grained behavioral reflection. It allows to annotate the AST with MetaLinks, alowing meta-objects to change behavior down to a single operation.
After a overview of the framework, we show how MetaLinks are used in Pharo to realize IDE tools such as BreakPoints and Code Coverage.
Topic: Contributing to Pharo 7
Youtube: https://www.youtube.com/watch?v=VW7XrFjnbyw
We will show:
- How to submit issue tracker entries to the Pharo Issue Tracker
- How to do a Pull Request if you want to do a fix or enhancment
- How to review and comment other peoples fixes.
Dynamically Composing Collection Operations through Collection PromisesMarcus Denker
Dynamically Composing Collection Operations through Collection Promises.
Juan Pablo Sandoval Alcocer, Marcus Denker,
Alexandre Bergel, Yasett Acuran
Presented at IWST 2016
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
What is Augmented Reality Image Trackingpavan998932
Augmented Reality (AR) Image Tracking is a technology that enables AR applications to recognize and track images in the real world, overlaying digital content onto them. This enhances the user's interaction with their environment by providing additional information and interactive elements directly tied to physical images.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
Takashi Kobayashi and Hironori Washizaki, "SWEBOK Guide and Future of SE Education," First International Symposium on the Future of Software Engineering (FUSE), June 3-6, 2024, Okinawa, Japan
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
2. Part I: The AST
• AST = Abstract Syntax Tree
• Tree Representation of the Method
• Based on the RB AST
• Used by all tools (refactoring, syntax-highlighting,…)
Smalltalk compiler parse: 'test ^(1+2)'
3. AST
• RBMethodNode Root
• RBVariableNode Variable (read and write)
• RBAssignmentNode Assignment
• RBMessageNode A Message (most of them)
• RBReturnNode Return
4. Inspect a simple AST
• A very simple Example
Smalltalk compiler parse: 'test ^(1+2)'
5. User: Tools
• Refactoring
• Breakpoints / Watchers
• Syntax Highlight / Code Completion
• AST based Menu in the Code Browser
6. User: The Compiler
Source AST
Annotated
AST
IR
Annotated
AST
Bytecode
RBParser OCSemanticAnalyzer
OCASTTranslator/
IRBuilder
IRBytecodeGenerator
8. Problem: Kind of Variable?
• Example: SHRBTextStyler
• Syntax highlighting needs to know which kind
9. Variables in the AST
• Every de
fi
nition, read and write gets one new instance
of RBVariableNode (as we have to encode the parent
for each di
ff
erently)
• We just know the name
• SYNTAX, but no SEMANTICs
• Kind? (temp or ivar)
• Variables with same name can be di
ff
erent
variables
10. To the Rescue: Name
Analysis
• We have to annotate the AST with information about
Variables
• Block/Method: de
fi
ned Variables are put in a Scope
• Scopes know the parent Scope
• When we see a use, we loop up the variable in the Scope
11. Semantic Variables
• Every RBVariableNode gets a semantic variable
annotation
• Both the de
fi
nition and all uses
• There is one instance for each variable that models
• name
• scope it was de
fi
ned
13. Variables and Compilation
• Compiler just delegates to the Variable, e.g for instance
Variables:
• emitStore/emitValue: de
fi
ned for each kind of Variables
(global/temp/ivar)
emitStore: methodBuilder
"generate store bytecode"
methodBuilder storeInstVar: index
14. Repeat:The AST
• AST = Abstract Syntax Tree
• Tree Representation of the Method
• Produced by the Parser (part of the Compiler)
• Used by all tools and the Compiler
• We need to model Variables semantically to make it useful
20. Instance Variables
• De
fi
ned by the Class (list of variable names)
• Can be read via the object:
• instVarNamed:(put:), #instVarAt:(put:)
• Instance Variables have an o
ff
set in the Object
• De
fi
ned by the order of the de
fi
ned vars in the Hierarchy
1@2 instVarNamed: 'x'
21. Temporary Variable
• De
fi
ned by a method or Block
• Arguments are temps, too
• Can be read via the context
• #tempNamed:, tempNamed:put:
• With Closures this is more complex than you ever want to
know!
[| temp | temp := 1. thisContext tempNamed: 'temp' ] value
22. Globals
• Entries in the “Smalltalk globals” Dictionary
• Contain the value
• Can be read via the global Dictionary
• Access via #value / value: on the Association
• Class Vars and Pool Vars are just Associations from other
Dictionaries
Smalltalk globals at: #Object.
Object binding value.
25. Globals/Class Vars
• Here we have at least the Association (#binding):
• But there is no “GlobalVariable” class
• No API other than #value:/#value
• Classes de
fi
ne just names of variables
Object binding
26. Instance Variables
• The class just knows the names
• There is no Object representing instance variables
• Classes de
fi
ne just names of variables
• Bytecode accesses by o
ff
set
Point allInstVarNames
27. Temporary Variables
• The methods know nothing. Even to know the variable
name we need the compiler (and the source)
• There is no object representing temp Variables
• Re
fl
ective read and write is *hard* -> compiler needs to
create extensive meta-data
28. Why Not Do Better?
• Every de
fi
ned Variable is described a meta object
• Class Hierarchy: Variable
30. Example: vars of a class
• Get all Variables of a class
• Inspect it
• #usingMethods
Point instanceVariables
31. Instance Variable
• Read x in a Point
• Write
• read/write without sending a message to the object!
(Point instanceVariables
fi
rst) read: (5@4)
point := 5@4.
(Point instanceVariables
fi
rst) write: 100 to: point.
32. Globals
• Object binding class
• Object binding read
• We keep the Association API so the Global Variables can
play the role of associations in the global dictionary.
Object binding usingMethods
33. Temporary Variables
• There are too many to allocate them all
• They are created on demand (with the AST)
((LinkedList>>#do:) temporaryVariableNamed: 'aLink')
34. #lookupVar:
• Every variable knows the scope is was de
fi
ned in
• Every scope know the outer scope
• #lookupVar: looks up names along the scope
[ | temp |thisContext lookupVar: 'temp' ] value.
[ | temp |thisContext lookupVar: ‘Object' ] value
(Point slotNamed: #x ) scope outerScope
35. Debugger: Read Vars
• In the Debugger we to be able to read Variables from a
DoIt.
• lookupVar, then readInContext works for all Variables!
• If you know the context, you can read any variable
• DoItVariable: Nice names in DoIts (—> Show Us)
[ | temp | temp :=1 . (thisContext lookupVar: 'temp')
readInContext: thisContext] value
36. Part III: Putting it Together
• We have seen how Semantic Variables are needed to
make the AST useful
• We have seen First Class Variables as part of the
Re
fl
ective Model
• Do we really need the two?
37. Solution: Scope
• What is needed? Add the concept of Scope
• Scope of a global is Smalltalk globals
• Scope of an instance variable is the class
• Scope of temp: method and block scope
38. Example: Point x
(Point slotNamed: #x) scope == Point
(Point lookupVar: #x) == (Point slotNamed: #x)
(Point>>#x) ast variableNodes
fi
rst variable == (Point slotNamed: #x)
39. What do we get?
• Simpli
fi
ed Name Analysis in the Compiler
• Open Compiler: De
fi
ne your own kinds of Variables
• While fully integrated in the Re
fl
ective Model
• Re
fl
ective Reading/Writing
• All tools work for you own kinds of Variables
40. What we did not see…
• De
fi
ne your own kinds of Variables (e.g. subclasses of
Slot / ClassVariable)
• Fluid Class De
fi
nitions: How to create classes that use
these variables
• How this enables DoIts with nice variable names
• Re
fl
ection: MetaLinks on Variables
41. Thanks…
• This is the work on *many* contributors from the Pharo
Community
• Thanks for lots of interesting discussions, ideas, and
code!
42. Questions?
• We have seen how the AST needs semantic variables to
be useful
• We have seen First Class Variables as part of the
Re
fl
ective model
• First Class Variables, with just adding the concept of a
Scope, can serve as semantic annotations on the AST