کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
434866 1441630 2016 28 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
Effect capabilities for Haskell: Taming effect interference in monadic programming
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
پیش نمایش صفحه اول مقاله
Effect capabilities for Haskell: Taming effect interference in monadic programming
چکیده انگلیسی


• Effect capabilities protect monadic computations by requiring a specific capability to perform an operation.
• Effect capabilities integrate well with tagged monads to provide practical and safe monadic programming.
• We show how to manage state, exception and I/O effects.

Computational effects complicate the tasks of reasoning about and maintaining software, due to the many kinds of interferences that can occur. While different proposals have been formulated to alleviate the fragility and burden of dealing with specific effects, such as state or exceptions, there is no prevalent robust mechanism that addresses the general interference issue. Building upon the idea of capability-based security, we propose effect capabilities as an effective and flexible manner to control monadic effects and their interferences. Capabilities can be selectively shared between modules to establish secure effect-centric coordination. We further refine capabilities with type-based permission lattices to allow fine-grained decomposition of authority. We provide an implementation of effect capabilities in Haskell, using type classes to establish a way to statically share capabilities between modules, as well as to check proper access permissions to effects at compile time. We first exemplify how to tame effect interferences using effect capabilities by treating state and exceptions. Then we focus on taming I/O by proposing a fine-grained lattice of I/O permissions based on the current classification of its operations. Finally, we show that integrating effect capabilities with modern tag-based monadic mechanisms provides a practical, modular and safe mechanism for monadic programming in Haskell.

ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Science of Computer Programming - Volume 119, 1 April 2016, Pages 3–30
نویسندگان
, , ,