12,935 research outputs found
Static Application-Level Race Detection in STM Haskell using Contracts
Writing concurrent programs is a hard task, even when using high-level
synchronization primitives such as transactional memories together with a
functional language with well-controlled side-effects such as Haskell, because
the interferences generated by the processes to each other can occur at
different levels and in a very subtle way. The problem occurs when a thread
leaves or exposes the shared data in an inconsistent state with respect to the
application logic or the real meaning of the data. In this paper, we propose to
associate contracts to transactions and we define a program transformation that
makes it possible to extend static contract checking in the context of STM
Haskell. As a result, we are able to check statically that each transaction of
a STM Haskell program handles the shared data in a such way that a given
consistency property, expressed in the form of a user-defined boolean function,
is preserved. This ensures that bad interference will not occur during the
execution of the concurrent program.Comment: In Proceedings PLACES 2013, arXiv:1312.2218. [email protected];
[email protected]
Efficient, Near Complete and Often Sound Hybrid Dynamic Data Race Prediction (extended version)
Dynamic data race prediction aims to identify races based on a single program
run represented by a trace. The challenge is to remain efficient while being as
sound and as complete as possible. Efficient means a linear run-time as
otherwise the method unlikely scales for real-world programs. We introduce an
efficient, near complete and often sound dynamic data race prediction method
that combines the lockset method with several improvements made in the area of
happens-before methods. By near complete we mean that the method is complete in
theory but for efficiency reasons the implementation applies some optimizations
that may result in incompleteness. The method can be shown to be sound for two
threads but is unsound in general. We provide extensive experimental data that
shows that our method works well in practice.Comment: typos, appendi
- …