Iona Thomas, Stéphane Ducasse, Pablo Tesone, Guillermo Polito
{"title":"Pharo:一种反思性语言--分析反思性应用程序接口及其内部依赖关系","authors":"Iona Thomas, Stéphane Ducasse, Pablo Tesone, Guillermo Polito","doi":"10.1016/j.cola.2024.101274","DOIUrl":null,"url":null,"abstract":"<div><p>Reflective operations are powerful APIs (Application Programming Interface) that let developers build advanced tools and architectures. Reflective operations are used for implementing tools and development environments (<em>e.g.,</em> compilers, debuggers, inspectors) or language features (<em>e.g.,</em> distributed systems, exceptions, proxies, aspect-oriented programming). In addition, languages are evolving, introducing better concepts, and revising practices and APIs. Since 2008 Pharo has evolved from Squeak and its reflective API has evolved accordingly, diverging consequently from the original Smalltalk reflective API. With more than 500 reflective methods identified, Pharo has one of the largest reflective feature sets ranging from structural reflection to on-demand stack reification. Those operations are often built on top of the other, creating different layers of reflective operations, from low-level to high-level ones.</p><p>There is a need to understand the current reflective APIs to understand their underlying use, potential dependencies, and whether some reflective features can be scoped and optional. Such an analysis is challenged by new metaobjects organically introduced in the system, such as first-class instance variables, and their mixture with the base-level API of objects and classes.</p><p>In this article, we analyze the reflective operations used in Pharo 12 and their interdependencies. We propose a classification based on their semantics and we identify a set of issues of the current implementation. Such an analysis of reflective operations in Pharo is important to support the revision of the reflective layer and its potential redesign.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"80 ","pages":"Article 101274"},"PeriodicalIF":1.7000,"publicationDate":"2024-05-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Pharo: A reflective language—Analyzing the reflective API and its internal dependencies\",\"authors\":\"Iona Thomas, Stéphane Ducasse, Pablo Tesone, Guillermo Polito\",\"doi\":\"10.1016/j.cola.2024.101274\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>Reflective operations are powerful APIs (Application Programming Interface) that let developers build advanced tools and architectures. Reflective operations are used for implementing tools and development environments (<em>e.g.,</em> compilers, debuggers, inspectors) or language features (<em>e.g.,</em> distributed systems, exceptions, proxies, aspect-oriented programming). In addition, languages are evolving, introducing better concepts, and revising practices and APIs. Since 2008 Pharo has evolved from Squeak and its reflective API has evolved accordingly, diverging consequently from the original Smalltalk reflective API. With more than 500 reflective methods identified, Pharo has one of the largest reflective feature sets ranging from structural reflection to on-demand stack reification. Those operations are often built on top of the other, creating different layers of reflective operations, from low-level to high-level ones.</p><p>There is a need to understand the current reflective APIs to understand their underlying use, potential dependencies, and whether some reflective features can be scoped and optional. Such an analysis is challenged by new metaobjects organically introduced in the system, such as first-class instance variables, and their mixture with the base-level API of objects and classes.</p><p>In this article, we analyze the reflective operations used in Pharo 12 and their interdependencies. We propose a classification based on their semantics and we identify a set of issues of the current implementation. Such an analysis of reflective operations in Pharo is important to support the revision of the reflective layer and its potential redesign.</p></div>\",\"PeriodicalId\":48552,\"journal\":{\"name\":\"Journal of Computer Languages\",\"volume\":\"80 \",\"pages\":\"Article 101274\"},\"PeriodicalIF\":1.7000,\"publicationDate\":\"2024-05-18\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Computer Languages\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S2590118424000170\",\"RegionNum\":3,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Computer Languages","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2590118424000170","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
摘要
反射操作是一种功能强大的应用程序接口(API),可让开发人员构建先进的工具和架构。反射操作可用于实现工具和开发环境(如编译器、调试器、检查器)或语言特性(如分布式系统、异常、代理、面向方面的编程)。此外,语言也在不断发展,引入了更好的概念,并修改了实践和 API。自2008年以来,Pharo从Squeak发展而来,其反射式应用程序接口也随之演变,与最初的Smalltalk反射式应用程序接口大相径庭。Pharo拥有500多种反射方法,是反射功能最齐全的公司之一,包括结构反射和按需堆栈重化。这些操作通常建立在其他操作之上,形成了从低级到高级的不同层次的反射操作。我们有必要了解当前的反射API,以了解它们的基本用途、潜在的依赖性,以及某些反射功能是否可以被范围化和可选。系统中有机引入的新元对象(如一流的实例变量)以及它们与对象和类的底层 API 的混合给这种分析带来了挑战。本文将分析 Pharo 12 中使用的反射操作及其相互依存关系,并根据其语义提出一种分类方法,同时指出当前实现中存在的一系列问题。对 Pharo 中的反射操作进行这样的分析对于支持反射层的修订及其潜在的重新设计非常重要。
Pharo: A reflective language—Analyzing the reflective API and its internal dependencies
Reflective operations are powerful APIs (Application Programming Interface) that let developers build advanced tools and architectures. Reflective operations are used for implementing tools and development environments (e.g., compilers, debuggers, inspectors) or language features (e.g., distributed systems, exceptions, proxies, aspect-oriented programming). In addition, languages are evolving, introducing better concepts, and revising practices and APIs. Since 2008 Pharo has evolved from Squeak and its reflective API has evolved accordingly, diverging consequently from the original Smalltalk reflective API. With more than 500 reflective methods identified, Pharo has one of the largest reflective feature sets ranging from structural reflection to on-demand stack reification. Those operations are often built on top of the other, creating different layers of reflective operations, from low-level to high-level ones.
There is a need to understand the current reflective APIs to understand their underlying use, potential dependencies, and whether some reflective features can be scoped and optional. Such an analysis is challenged by new metaobjects organically introduced in the system, such as first-class instance variables, and their mixture with the base-level API of objects and classes.
In this article, we analyze the reflective operations used in Pharo 12 and their interdependencies. We propose a classification based on their semantics and we identify a set of issues of the current implementation. Such an analysis of reflective operations in Pharo is important to support the revision of the reflective layer and its potential redesign.