Abstract
We present a translation from Fickle, a small object-oriented language allowing objects to change their class at runtime, into Java. The translation is provenly correct in the sense that it preserves the static and dynamic semantics. Moreover, it is compatible with separate compilation, since the translation of a Fickle class does not depend on the implementation of used classes. Based on the formal system, we have developed an implementation.
The translation turned out to be a more subtle problem than we expected. In this article, we discuss four possible approaches we considered for the design of the translation and to justify our choice, we present formally the translation and proof of preservation of the static and dynamic semantics, and discuss the prototype implementation. Moreover, we outline an alternative translation based on generics that avoids most of the casts (but not all) needed in the previous translation.
The language Fickle has undergone and is still undergoing several phases of development. In this article we are discussing the translation of FickleII.
- Ancona, D., Anderson, C., Damiani, F., Drossopoulou, S., Giannini, P., and Zucca, E. 2001. An effective translation of Fickle into Java (extended abstract). In Proceedings of the Italian Conference on Theoretical Computer Science. Lecture Notes in Computer Science, vol. 2202. Springer-Verleg 215--234. Google Scholar
Digital Library
- Ancona, D., Anderson, C., Damiani, F., Drossopoulou, S., Giannini, P., and Zucca, E. 2002. A type preserving translation of Fickle into Java. In TOSCA'01. Electronic Notes on Theoretical Computer Science, vol. 62. Elsevier. Google Scholar
Digital Library
- Ancona, D., Lagorio, G., and Zucca, E. 2003. Jam--Designing a Java extension with mixins. ACM Trans. Program. Lang. Syst. 25, 5 (Sept.), 641--712. Google Scholar
Digital Library
- Anderson, C. 2001. Implementing Fickle. Thesis, Imperial College.Google Scholar
- Anderson, C. 2003. Isabella-Fickle translator. http://www.macs.hw.ac.uk/DART/software/isabella/index.html.Google Scholar
- Boyland, J. and Castagna, G. 1997. Parasitic methods: An implementation of multi-methods for Java. In Proceedings of the ACM Symposium on Object-Oriented Programming: Systems, Languages and Applications. ACM Press, New York. 66--76. Google Scholar
Digital Library
- Bracha, G., Odersky, M., Stoutmire, D., and Wadler, P. 1998. Making the future safe for the past: Adding genericity to the Java programming language. In Proceedings of the ACM Symposium on Object-Oriented Programming: Systems, Languages and Applications. ACM Press, New York. 183--200. Google Scholar
Digital Library
- Chambers, C. 1993. Predicate classes. In Proceedings of the ECOOP---European Conference on Object-Oriented Programming. Lecture Notes in Computer Science, vol. 707. Springer Verlag. 268--296. Google Scholar
Digital Library
- Clifton, C., Millstein, T., Leavens, G. T., and Chambers, C. 2006. MultiJava: Design rationale, compiler implementation, and applications. ACM Trans. Program. Lang. Syst. 28, 3, 517--575. Google Scholar
Digital Library
- Costanza, P. 2001. Dynamic object replacement and implementation-only classes. In WCOP'01 (at ECOOP'01). http://www.cs.uni-bonn.de/~costanza/implementationonly.pdf.Google Scholar
- Damiani, F., Dezani-Ciancaglini, M., and Giannini, P. 2004. Re-Classification and multithreading: FickleMT. In OOPS track at SAC, vol. 2. ACM Press, New York, 1297--1304. Google Scholar
Digital Library
- Drossopoulou, S., Damiani, F., Dezani-Ciancaglini, M., and Giannini, P. 2001. Fickle: Dynamic object re-classification. In Proceedings of the ECOOP---European Conference on Object-Oriented Programming. Lecture Notes in Computer Science, vol. 2072. Springer Verlag, 130--149. Google Scholar
Digital Library
- Drossopoulou, S., Damiani, F., Dezani-Ciancaglini, M., and Giannini, P. 2002. More dynamic object re-classification: FickleII. ACM Trans. Program. Lang. Syst. 24, 2, 153--191. Google Scholar
Digital Library
- Ernst, M. D., Kaplan, C., and Chambers, C. 1998. Predicate dispatching: A unified theory of dispatch. In Proceedings of the ECOOP - European Conference on Object-Oriented Programming. Lecture Notes in Computer Science, vol. 1445. Springer Verlag, 186--211. Google Scholar
Digital Library
- Gamma, E., Helm, R., Johnson, R., and Vlissides, J. 1995. Design Patterns: Elements od Reusable Object-Oriented Software. Professional Computing Series. Addison-Wesley. Google Scholar
Digital Library
- Hürsch, W. 1994. Should superclasses be abstract? In Proceedings of the ECOOP---European Conference on Object-Oriented Programming. Lecture Notes in Computer Science, vol. 821. Springer Verlag, 12--31. Google Scholar
Digital Library
- Igarashi, A. and Pierce, B. C. 2002. On inner classes. Inf. Comput. 177, 1 (Aug.), 56--89. Google Scholar
Digital Library
- Joy, B., Gosling, J., Steele, G., and Bracha, G. 2005. The Java Language Specification, 3rd ed. Addison-Wesley. Google Scholar
Digital Library
- McDirmid, S., Flatt, M., and Hsieh, W. 2001. Jiazzi: New age components for old fashioned Java. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA). ACM Press, New York. Google Scholar
Digital Library
- Odersky, M. and Wadler, P. 1997. Pizza into Java: Translating theory into practice. In Proceedings of the ACM Symposium on Principles of Programming Languages. ACM Press, New York. Google Scholar
Digital Library
- Pierce, B. C. 2002. Types and Programming Languages. MIT Press, Cambridge, MA. Google Scholar
Digital Library
- Serrano, M. 1999. Wide classes. In Proceedings of the ECOOP---European Conference on Object-Oriented Programming. Lecture Notes in Computer Science, vol. 1628, Springer Verlag, 391--415.Google Scholar
- Taivalsaari, A. 1993. Object oriented programming with modes. J. Obj. Oriented Program. 6, 3, 27--32.Google Scholar
Index Terms
A provenly correct translation of Fickle into Java
Recommendations
An Effective Translation of Fickle into Java
ICTCS '01: Proceedings of the 7th Italian Conference on Theoretical Computer ScienceWe present a translation from Fickle (a Java-like language allowing dynamic object re-classification, that is, objects that can change their class at run-time) into plain Java. The translation is proved to preserve static and dynamic semantics; moreover,...
Divide and translate: improving long distance reordering in statistical machine translation
WMT '10: Proceedings of the Joint Fifth Workshop on Statistical Machine Translation and MetricsMATRThis paper proposes a novel method for long distance, clause-level reordering in statistical machine translation (SMT). The proposed method separately translates clauses in the source sentence and reconstructs the target sentence using the clause ...






Comments