60,013 research outputs found
A Concurrent Perspective on Smart Contracts
In this paper, we explore remarkable similarities between multi-transactional
behaviors of smart contracts in cryptocurrencies such as Ethereum and classical
problems of shared-memory concurrency. We examine two real-world examples from
the Ethereum blockchain and analyzing how they are vulnerable to bugs that are
closely reminiscent to those that often occur in traditional concurrent
programs. We then elaborate on the relation between observable contract
behaviors and well-studied concurrency topics, such as atomicity, interference,
synchronization, and resource ownership. The described
contracts-as-concurrent-objects analogy provides deeper understanding of
potential threats for smart contracts, indicate better engineering practices,
and enable applications of existing state-of-the-art formal verification
techniques.Comment: 15 page
Comprehensive Monitor-Oriented Compensation Programming
Compensation programming is typically used in the programming of web service
compositions whose correct implementation is crucial due to their handling of
security-critical activities such as financial transactions. While traditional
exception handling depends on the state of the system at the moment of failure,
compensation programming is significantly more challenging and dynamic because
it is dependent on the runtime execution flow - with the history of behaviour
of the system at the moment of failure affecting how to apply compensation. To
address this dynamic element, we propose the use of runtime monitors to
facilitate compensation programming, with monitors enabling the modeller to be
able to implicitly reason in terms of the runtime control flow, thus separating
the concerns of system building and compensation modelling. Our approach is
instantiated into an architecture and shown to be applicable to a case study.Comment: In Proceedings FESCA 2014, arXiv:1404.043
Kickstarting Choreographic Programming
We present an overview of some recent efforts aimed at the development of
Choreographic Programming, a programming paradigm for the production of
concurrent software that is guaranteed to be correct by construction from
global descriptions of communication behaviour
Towards a Unified Framework for Declarative Structured Communications
We present a unified framework for the declarative analysis of structured
communications. By relying on a (timed) concurrent constraint programming
language, we show that in addition to the usual operational techniques from
process calculi, the analysis of structured communications can elegantly
exploit logic-based reasoning techniques. We introduce a declarative
interpretation of the language for structured communications proposed by Honda,
Vasconcelos, and Kubo. Distinguishing features of our approach are: the
possibility of including partial information (constraints) in the session
model; the use of explicit time for reasoning about session duration and
expiration; a tight correspondence with logic, which formally relates session
execution and linear-time temporal logic formulas
A generic persistence model for CLP systems (and two useful implementations)
This paper describes a model of persistence in (C)LP languages and two different and practically very useful ways to implement this model in current systems. The fundamental idea is that persistence is a characteristic of certain dynamic predicates (Le., those which encapsulate
state). The main effect of declaring a predicate persistent is that the dynamic changes made to such predicates persist from one execution to the next one. After proposing a syntax for declaring persistent predicates, a simple, file-based implementation of the concept is presented and
some examples shown. An additional implementation is presented which stores persistent predicates in an external datábase. The abstraction of the concept of persistence from its implementation allows developing applications
which can store their persistent predicates alternatively in files or databases with only a few simple changes to a declaration stating the location and modality used for persistent storage. The paper presents the model, the implementation approach in both the cases of using files
and relational databases, a number of optimizations of the process (using information obtained from static global analysis and goal clustering), and performance results from an implementation of these ideas
- …