Correct-by-Construction Concurrency
BibTeX
@MISC{Brady_correct-by-constructionconcurrency,
author = {Edwin Brady and Kevin Hammond},
title = {Correct-by-Construction Concurrency},
year = {}
}
OpenURL
Abstract
In the modern, multi-threaded, multi-core programming environment, correctly managing system resources such as locks and shared variables can be especially difficult and error-prone. A simple error, such as forgetting to release a lock, can have major consequences on the correct operation of the program (e.g. deadlock), often at a time and location that is isolated from the original error. While there have been many previous proposals for managing locks and resources, these often arise from the systems arena, and are therefore often only loosely integrated with the host programming language. Such approaches therefore do not generally provide the strong formal guarantees of correctness-by-construction that we would prefer for all fundamental properties of our programs. In this paper, we propose a new type-based approach to resource management, based on the use of dependent types to construct a Domain-Specific Embedded Language (DSEL) whose typing rules enforce the properties we require. We illustrate our approach by implementing a DSEL for concurrent programming and demonstrate its applicability with reference to concurrent transactions on a bank account. 1.







