SPiCE: a system for translating Smalltalk programs into a C environment
- 1 January 1995
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 21 (11) , 902-912
- https://doi.org/10.1109/32.473219
Abstract
Smalltalk-80 (hereafter referred to as Smalltalk), which is one of the most productive programming languages/ environments, is very well suited for prototyping of applications but it is less well suited for delivering applications because applications can neither run in isolation from the Smalltalk environment nor be combined with other programs written in other languages. One way to make Smalltalk suitable for delivering applications is to translate Smalltalk into a compiler language such as C. By translating Smalltalk code into portable and interoperable C code, it is possible to deliver a stand-alone version of Smalltalk applications, and to develop an application partly in Smalltalk and partly in C. However, there are some difficulties in translating Smalltalk code into such a C code. First, the execution model of Smalltalk, which creates activation records as objects, is very different from that of C, and second, Smalltalk and C have very different approaches to storage management. We have implemented SPiCE, a system for translating Smalltalk into C. Our approach to the translation is to create runtime replacement classes implementing the same functionality of Smalltalk classes that are inherently part of the Smalltalk execution model, and to provide semi-conservative real-time compacting garbage collection that works without language support. Our approach fills the gaps of the execution model and storage management in a safe and efficient manner, and enables the generation of portable and interoperable C code while preserving the semantics of Smalltalk. Currently, the performance of the generated C code is roughly the same as the original Smalltalk.Keywords
This publication has 13 references indexed in Scilit:
- An accidental translator from Smalltalk to ANSI CACM SIGPLAN OOPS Messenger, 1991
- The portable common runtime approach to interoperabilityPublished by Association for Computing Machinery (ACM) ,1989
- An efficient implementation of SELF a dynamically-typed object-oriented language based on prototypesPublished by Association for Computing Machinery (ACM) ,1989
- Experiences creating a portable cedarPublished by Association for Computing Machinery (ACM) ,1989
- Garbage collection in an uncooperative environmentSoftware: Practice and Experience, 1988
- Producer: A tool for translating Smalltalk-80 to Objective-CPublished by Association for Computing Machinery (ACM) ,1987
- Type-checking SmalltalkPublished by Association for Computing Machinery (ACM) ,1986
- Generation ScavengingPublished by Association for Computing Machinery (ACM) ,1984
- A type declaration and inference system for smalltalkPublished by Association for Computing Machinery (ACM) ,1982
- Inferring types in SmalltalkPublished by Association for Computing Machinery (ACM) ,1981