Papers1 provider · 1 record
July 16, 2018· Proceedings of the 10th ACM International Workshop on Context-Oriented Programming: Advanced Modularity for Run-time Composition
conference-paper

Activity Contexts

Authors:Toni MattisRobert Hirschfeld

Abstract

Smart contracts formalize and automate interactions among and between individuals and systems in an executable and decentralized way. They are analogous to objects in object-oriented programming, but their behavior and state is replicated across multiple participants in a network and messages sent to the "object" are relayed to all network participants, allowing everyone to keep its replica up-to-date. Originally introduced in the mid-1990s, their recent surge in popularity is linked to a rising interest in blockchain-backed, general-purpose smart contract platforms. Manging contract-specific state and behavior associated with the interacting parties and shared objects is a modularity challenge in smart contracts. Each contract has individual requirements for the (non-contract) objects it interacts with. We observed that smart contracts tend to manage object-specific state and behavior itself, often leading to a single monolithic mediator. We aim at improving encapsulation and separation of concerns by allowing programmers to modularly express instance-specific state and behavior within the scope of a so called Activity Context. Activity Contexts are an extension to objects that collect these modular adaptations and jointly overlay them over instances that participate in the activity modeled by the smart contract. We demonstrate the benefits of Activity Contexts by refactoring an exemplary smart contract and discuss their trade-offs compared to traditional object-oriented decomposition and their integration into an existing layer-based context-oriented ecosystem.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.