کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
435138 1441702 2013 26 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
On flexible dynamic trait replacement for Java-like languages
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
پیش نمایش صفحه اول مقاله
On flexible dynamic trait replacement for Java-like languages
چکیده انگلیسی

Dynamic trait replacement is a programming language feature for changing the objects’ behavior at runtime by replacing some of the objects’ methods. In previous work on dynamic trait replacement for Java-like languages, the objects’ methods that may be replaced must correspond exactly to a named trait used in the object’s class definition. In this paper we propose the notion of replaceable: a programming language feature that decouples the trait replacement operation code and the class declaration code, thus making it possible to refactor classes and to perform unanticipated trait replacement operations without invalidating existing code. We give a formal account of our proposal through a core calculus, FDTJ (Featherweight Dynamic Trait Java), equipped with a static type system guaranteeing that in a well-typed program no runtime type error will take place.

ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Science of Computer Programming - Volume 78, Issue 7, 1 July 2013, Pages 907-932