کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
6875263 1441592 2018 17 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
Method safety mechanism for asynchronous layer deactivation
ترجمه فارسی عنوان
مکانیزم ایمنی روش برای غیر فعال کردن لایه آسنکرون
کلمات کلیدی
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
چکیده انگلیسی
Context-oriented programming (COP) enhances the modularity of context-dependent behavior in context-aware systems, as it provides modules to implement context-dependent behavior (layers) and composes them dynamically in a disciplined manner (layer activation). We propose a COP language that enables layers to define base methods, while the layers can be asynchronously activated and deactivated. Base methods in layers enhance modularity because they extend the interface of classes without modifying original class definitions. However, calling such a method defined in a layer is problematic as the layer may be inactive when the method is called. We address this problem by introducing a method lookup mechanism that uses the static scope of method invocation for COP; i.e., in addition to currently activated layers, the layer where the method invocation is written, as well as the layers on which that layer depends, are searched during method lookup. We formalize this mechanism as a small calculus referred to as ContextFJa and prove its type soundness. We implement this mechanism in ServalCJ, a COP language that supports asynchronous, as well as synchronous, layer activation.
ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Science of Computer Programming - Volume 156, 1 May 2018, Pages 104-120
نویسندگان
, , , ,