499 research outputs found

    Static Application-Level Race Detection in STM Haskell using Contracts

    Get PDF
    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]

    Program Model Checking: A Practitioner's Guide

    Get PDF
    Program model checking is a verification technology that uses state-space exploration to evaluate large numbers of potential program executions. Program model checking provides improved coverage over testing by systematically evaluating all possible test inputs and all possible interleavings of threads in a multithreaded system. Model-checking algorithms use several classes of optimizations to reduce the time and memory requirements for analysis, as well as heuristics for meaningful analysis of partial areas of the state space Our goal in this guidebook is to assemble, distill, and demonstrate emerging best practices for applying program model checking. We offer it as a starting point and introduction for those who want to apply model checking to software verification and validation. The guidebook will not discuss any specific tool in great detail, but we provide references for specific tools

    LNCS

    Get PDF
    We present layered concurrent programs, a compact and expressive notation for specifying refinement proofs of concurrent programs. A layered concurrent program specifies a sequence of connected concurrent programs, from most concrete to most abstract, such that common parts of different programs are written exactly once. These programs are expressed in the ordinary syntax of imperative concurrent programs using gated atomic actions, sequencing, choice, and (recursive) procedure calls. Each concurrent program is automatically extracted from the layered program. We reduce refinement to the safety of a sequence of concurrent checker programs, one each to justify the connection between every two consecutive concurrent programs. These checker programs are also automatically extracted from the layered program. Layered concurrent programs have been implemented in the CIVL verifier which has been successfully used for the verification of several complex concurrent programs

    A semantics for Behavior Trees using CSP with specification commands

    Get PDF
    AbstractIn this paper we give a formal definition of the requirements translation language Behavior Trees. This language has been used with success in industry to systematically translate large, complex, and often erroneous requirements documents into a structured model of the system. It contains a mixture of state-based manipulations, synchronisation, message passing, and parallel, conditional, and iterative control structures. The formal semantics of a Behavior Tree is given via a translation to a version of Hoareโ€™s process algebra CSP, extended with state-based constructs such as guards and updates, and a message passing facility similar to that used in publish/subscribe protocols. We first provide the extension of CSP and its operational semantics, which preserves the meaning of the original CSP operators, and then the Behavior Tree notation and its translation into the extended version of CSP

    SAVCBS 2004 Specification and Verification of Component-Based Systems: Workshop Proceedings

    Get PDF
    This is the proceedings of the 2004 SAVCBS workshop. The workshop is concerned with how formal (i.e., mathematical) techniques can be or should be used to establish a suitable foundation for the specification and verification of component-based systems. Component-based systems are a growing concern for the software engineering community. Specification and reasoning techniques are urgently needed to permit composition of systems from components. Component-based specification and verification is also vital for scaling advanced verification techniques such as extended static analysis and model checking to the size of real systems. The workshop considers formalization of both functional and non-functional behavior, such as performance or reliability

    Compositional Verification of Compiler Optimisations on Relaxed Memory

    Get PDF
    This paper is about verifying program transformations on an axiomatic relaxed memory model of the kind used in C/C++ and Java. Relaxed models present particular challenges for verifying program transformations, because they generate many additional modes of interaction between code and context. For a block of code being transformed, we define a denotation from its behaviour in a set of representative contexts. Our denotation summarises interactions of the code block with the rest of the program both through local and global variables, and through subtle synchronisation effects due to relaxed memory. We can then prove that a transformation does not introduce new program behaviours by comparing the denotations of the code block before and after. Our approach is compositional: by examining only representative contexts, transformations are verified for any context. It is also fully abstract, meaning any valid transformation can be verified. We cover several tricky aspects of C/C++-style memory models, including release-acquire operations, sequentially consistent fences, and non-atomics. We also define a variant of our denotation that is finite at the cost of losing full abstraction. Based on this variant, we have implemented a prototype verification tool and ap

    IST Austria Thesis

    Get PDF
    Designing and verifying concurrent programs is a notoriously challenging, time consuming, and error prone task, even for experts. This is due to the sheer number of possible interleavings of a concurrent program, all of which have to be tracked and accounted for in a formal proof. Inventing an inductive invariant that captures all interleavings of a low-level implementation is theoretically possible, but practically intractable. We develop a refinement-based verification framework that provides mechanisms to simplify proof construction by decomposing the verification task into smaller subtasks. In a first line of work, we present a foundation for refinement reasoning over structured concurrent programs. We introduce layered concurrent programs as a compact notation to represent multi-layer refinement proofs. A layered concurrent program specifies a sequence of connected concurrent programs, from most concrete to most abstract, such that common parts of different programs are written exactly once. Each program in this sequence is expressed as structured concurrent program, i.e., a program over (potentially recursive) procedures, imperative control flow, gated atomic actions, structured parallelism, and asynchronous concurrency. This is in contrast to existing refinement-based verifiers, which represent concurrent systems as flat transition relations. We present a powerful refinement proof rule that decomposes refinement checking over structured programs into modular verification conditions. Refinement checking is supported by a new form of modular, parameterized invariants, called yield invariants, and a linear permission system to enhance local reasoning. In a second line of work, we present two new reduction-based program transformations that target asynchronous programs. These transformations reduce the number of interleavings that need to be considered, thus reducing the complexity of invariants. Synchronization simplifies the verification of asynchronous programs by introducing the fiction, for proof purposes, that asynchronous operations complete synchronously. Synchronization summarizes an asynchronous computation as immediate atomic effect. Inductive sequentialization establishes sequential reductions that captures every behavior of the original program up to reordering of coarse-grained commutative actions. A sequential reduction of a concurrent program is easy to reason about since it corresponds to a simple execution of the program in an idealized synchronous environment, where processes act in a fixed order and at the same speed. Our approach is implemented the CIVL verifier, which has been successfully used for the verification of several complex concurrent programs. In our methodology, the overall correctness of a program is established piecemeal by focusing on the invariant required for each refinement step separately. While the programmer does the creative work of specifying the chain of programs and the inductive invariant justifying each link in the chain, the tool automatically constructs the verification conditions underlying each refinement step

    C์˜ ์ €์ˆ˜์ค€ ๊ธฐ๋Šฅ๊ณผ ์ปดํŒŒ์ผ๋Ÿฌ ์ตœ์ ํ™” ์กฐํ™”์‹œํ‚ค๊ธฐ

    Get PDF
    ํ•™์œ„๋…ผ๋ฌธ (๋ฐ•์‚ฌ)-- ์„œ์šธ๋Œ€ํ•™๊ต ๋Œ€ํ•™์› : ๊ณต๊ณผ๋Œ€ํ•™ ์ปดํ“จํ„ฐ๊ณตํ•™๋ถ€, 2019. 2. ํ—ˆ์ถฉ๊ธธ.์ฃผ๋ฅ˜ C ์ปดํŒŒ์ผ๋Ÿฌ๋“ค์€ ํ”„๋กœ๊ทธ๋žจ์˜ ์„ฑ๋Šฅ์„ ๋†’์ด๊ธฐ ์œ„ํ•ด ๊ณต๊ฒฉ์ ์ธ ์ตœ์ ํ™”๋ฅผ ์ˆ˜ํ–‰ํ•˜๋Š”๋ฐ, ๊ทธ๋Ÿฐ ์ตœ์ ํ™”๋Š” ์ €์ˆ˜์ค€ ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์˜ ํ–‰๋™์„ ๋ฐ”๊พธ๊ธฐ๋„ ํ•œ๋‹ค. ๋ถˆํ–‰ํžˆ๋„ C ์–ธ์–ด๋ฅผ ๋””์ž์ธํ•  ๋•Œ ์ €์ˆ˜์ค€ ๊ธฐ๋Šฅ๊ณผ ์ปดํŒŒ์ผ๋Ÿฌ ์ตœ์ ํ™”๋ฅผ ์ ์ ˆํ•˜๊ฒŒ ์กฐํ™”์‹œํ‚ค๊ฐ€ ๊ต‰์žฅํžˆ ์–ด๋ ต๋‹ค๋Š” ๊ฒƒ์ด ํ•™๊ณ„์™€ ์—…๊ณ„์˜ ์ค‘๋ก ์ด๋‹ค. ์ €์ˆ˜์ค€ ๊ธฐ๋Šฅ์„ ์œ„ํ•ด์„œ๋Š”, ๊ทธ๋Ÿฌํ•œ ๊ธฐ๋Šฅ์ด ์‹œ์Šคํ…œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์— ์‚ฌ์šฉ๋˜๋Š” ํŒจํ„ด์„ ์ž˜ ์ง€์›ํ•ด์•ผ ํ•œ๋‹ค. ์ปดํŒŒ์ผ๋Ÿฌ ์ตœ์ ํ™”๋ฅผ ์œ„ํ•ด์„œ๋Š”, ์ฃผ๋ฅ˜ ์ปดํŒŒ์ผ๋Ÿฌ๊ฐ€ ์ˆ˜ํ–‰ํ•˜๋Š” ๋ณต์žกํ•˜๊ณ ๋„ ํšจ๊ณผ์ ์ธ ์ตœ์ ํ™”๋ฅผ ์ž˜ ์ง€์›ํ•ด์•ผ ํ•œ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์ €์ˆ˜์ค€ ๊ธฐ๋Šฅ๊ณผ ์ปดํŒŒ์ผ๋Ÿฌ ์ตœ์ ํ™”๋ฅผ ๋™์‹œ์— ์ž˜ ์ง€์›ํ•˜๋Š” ์‹คํ–‰์˜๋ฏธ๋Š” ์˜ค๋Š˜๋‚ ๊นŒ์ง€ ์ œ์•ˆ๋œ ๋ฐ”๊ฐ€ ์—†๋‹ค. ๋ณธ ๋ฐ•์‚ฌํ•™์œ„ ๋…ผ๋ฌธ์€ ์‹œ์Šคํ…œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์—์„œ ์š”๊ธดํ•˜๊ฒŒ ์‚ฌ์šฉ๋˜๋Š” ์ €์ˆ˜์ค€ ๊ธฐ๋Šฅ๊ณผ ์ฃผ์š”ํ•œ ์ปดํŒŒ์ผ๋Ÿฌ ์ตœ์ ํ™”๋ฅผ ์กฐํ™”์‹œํ‚จ๋‹ค. ๊ตฌ์ฒด์ ์œผ๋กœ, ์šฐ๋ฆฐ ๋‹ค์Œ ์„ฑ์งˆ์„ ๋งŒ์กฑํ•˜๋Š” ๋Š์Šจํ•œ ๋™์‹œ์„ฑ, ๋ถ„ํ•  ์ปดํŒŒ์ผ, ์ •์ˆ˜-ํฌ์ธํ„ฐ ๋ณ€ํ™˜์˜ ์‹คํ–‰์˜๋ฏธ๋ฅผ ์ฒ˜์Œ์œผ๋กœ ์ œ์•ˆํ•œ๋‹ค. ์ฒซ์งธ, ๊ธฐ๋Šฅ์ด ์‹œ์Šคํ…œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์—์„œ ์‚ฌ์šฉ๋˜๋Š” ํŒจํ„ด๊ณผ, ๊ทธ๋Ÿฌํ•œ ํŒจํ„ด์„ ๋…ผ์ฆํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋ฒ•์„ ์ง€์›ํ•œ๋‹ค. ๋‘˜์งธ, ์ฃผ์š”ํ•œ ์ปดํŒŒ์ผ๋Ÿฌ ์ตœ์ ํ™”๋“ค์„ ์ง€์›ํ•œ๋‹ค. ์šฐ๋ฆฌ๊ฐ€ ์ œ์•ˆํ•œ ์‹คํ–‰์˜๋ฏธ์— ์ž์‹ ๊ฐ์„ ์–ป๊ธฐ ์œ„ํ•ด ์šฐ๋ฆฌ๋Š” ๋…ผ๋ฌธ์˜ ์ฃผ์š” ๊ฒฐ๊ณผ๋ฅผ ๋Œ€๋ถ€๋ถ„ Coq ์ฆ๋ช…๊ธฐ ์œ„์—์„œ ์ฆ๋ช…ํ•˜๊ณ , ๊ทธ ์ฆ๋ช…์„ ๊ธฐ๊ณ„์ ์ด๊ณ  ์—„๋ฐ€ํ•˜๊ฒŒ ํ™•์ธํ–ˆ๋‹ค.To improve the performance of C programs, mainstream compilers perform aggressive optimizations that may change the behaviors of programs that use low-level features in unidiomatic ways. Unfortunately, despite many years of research and industrial efforts, it has proven very difficult to adequately balance the conflicting criteria for low-level features and compiler optimizations in the design of the C programming language. On the one hand, C should support the common usage patterns of the low-level features in systems programming. On the other hand, C should also support the sophisticated and yet effective optimizations performed by mainstream compilers. None of the existing proposals for C semantics, however, sufficiently support low-level features and compiler optimizations at the same time. In this dissertation, we resolve the conflict between some of the low-level features crucially used in systems programming and major compiler optimizations. Specifically, we develop the first formal semantics of relaxed-memory concurrency, separate compilation, and cast between integers and pointers that (1) supports their common usage patterns and reasoning principles for programmers, and (2) provably validates major compiler optimizations at the same time. To establish confidence in our formal semantics, we have formalized most of our key results in the Coq theorem prover, which automatically and rigorously checks the validity of the results.Abstract Acknowledgements Chapter I Prologue Chapter II Relaxed-Memory Concurrency Chapter III Separate Compilation and Linking Chapter IV Cast between Integers and Pointers Chapter V Epilogue ์ดˆ๋กDocto
    • โ€ฆ
    corecore