52 research outputs found

    Colouring flags with Dafny & Idris

    Get PDF
    Dafny and Idris are two verification-aware programming languages that support two different styles of fine-grained reasoning about our software programs. Dafny is an imperative design-by-contract language that provides a clear separation between specifications and code, while Idris is a dependently-typed functional language in which specifications are code. Each of these approaches support different styles of verification (Hoare Logic in Dafny versus Dependent Type Theory in Idris). In this paper, we will examine how Dafny and Idris express The Problem of the Dutch National Flag from Dijkstra’s Discipline of Programming and note the differences and similarities between both approaches

    Predictive Monitoring against Pattern Regular Languages

    Full text link
    In this paper, we focus on the problem of dynamically analysing concurrent software against high-level temporal specifications. Existing techniques for runtime monitoring against such specifications are primarily designed for sequential software and remain inadequate in the presence of concurrency -- violations may be observed only in intricate thread interleavings, requiring many re-runs of the underlying software. Towards this, we study the problem of predictive runtime monitoring, inspired by the analogous problem of predictive data race detection studied extensively recently. The predictive runtime monitoring question asks, given an execution Οƒ\sigma, if it can be soundly reordered to expose violations of a specification. In this paper, we focus on specifications that are given in regular languages. Our notion of reorderings is trace equivalence, where an execution is considered a reordering of another if it can be obtained from the latter by successively commuting adjacent independent actions. We first show that the problem of predictive admits a super-linear lower bound of O(nΞ±)O(n^\alpha), where nn is the number of events in the execution, and Ξ±\alpha is a parameter describing the degree of commutativity. As a result, predictive runtime monitoring even in this setting is unlikely to be efficiently solvable. Towards this, we identify a sub-class of regular languages, called pattern languages (and their extension generalized pattern languages). Pattern languages can naturally express specific ordering of some number of (labelled) events, and have been inspired by popular empirical hypotheses, the `small bug depth' hypothesis. More importantly, we show that for pattern (and generalized pattern) languages, the predictive monitoring problem can be solved using a constant-space streaming linear-time algorithm

    Foundations of Information-Flow Control and Effects

    Get PDF
    In programming language research, information-flow control (IFC) is a technique for enforcing a variety of security aspects, such as confidentiality of data,on programs. This Licenciate thesis makes novel contributions to the theory and foundations of IFC in the following ways: Chapter A presents a new proof method for showing the usual desired property of noninterference; Chapter B shows how to securely extend the concurrent IFC language MAC with asynchronous exceptions; and, Chapter C presents a new and simpler language for IFC with effects based on an explicit separation of pure and effectful computations

    АлгСбро-динамичСскиС ΠΌΠΎΠ΄Π΅Π»ΠΈ для распараллСливания ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌ

    Get PDF
    ΠŸΡ€Π΅Π΄Π»ΠΎΠΆΠ΅Π½Ρ‹ Π°Π»Π³Π΅Π±Ρ€ΠΎ-динамичСскиС ΠΌΠΎΠ΄Π΅Π»ΠΈ ΠΈ ΠΌΠ΅Ρ‚ΠΎΠ΄ ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠΈ коррСктности ΠΎΠΏΡ‚ΠΈΠΌΠΈΠ·ΠΈΡ€ΡƒΡŽΡ‰ΠΈΡ… ΠΏΡ€Π΅ΠΎΠ±Ρ€Π°Π·ΠΎΠ²Π°Π½ΠΈΠΉ для ΠΌΠ½ΠΎΠ³ΠΎΠΏΠΎΡ‚ΠΎΡ‡Π½Ρ‹Ρ… ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌ ΠΈ ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌ для графичСских ускоритСлСй. Описано использованиС этих ΠΌΠΎΠ΄Π΅Π»Π΅ΠΉ с ΠΏΠΎΠΌΠΎΡ‰ΡŒΡŽ Ρ‚Π΅Ρ…Π½ΠΈΠΊΠΈ ΠΏΠ΅Ρ€Π΅ΠΏΠΈΡΡ‹Π²Π°ΡŽΡ‰ΠΈΡ… ΠΏΡ€Π°Π²ΠΈΠ» для Π΄ΠΎΠΊΠ°Π·Π°Ρ‚Π΅Π»ΡŒΡΡ‚Π²Π° коррСктности ΠΏΡ€Π΅ΠΎΠ±Ρ€Π°Π·ΠΎΠ²Π°Π½ΠΈΠΉ ΠΈ ΠΏΠΎΠ²Ρ‹ΡˆΠ΅Π½ΠΈΡ эффСктивности распараллСливания вычислСний.Π—Π°ΠΏΡ€ΠΎΠΏΠΎΠ½ΠΎΠ²Π°Π½ΠΎ Π°Π»Π³Π΅Π±Ρ€ΠΎ-Π΄ΠΈΠ½Π°ΠΌΡ–Ρ‡Π½Ρ– ΠΌΠΎΠ΄Π΅Π»Ρ– Ρ‚Π° ΠΌΠ΅Ρ‚ΠΎΠ΄ ΠΏΠ΅Ρ€Π΅Π²Ρ–Ρ€ΠΊΠΈ корСктності ΠΎΠΏΡ‚ΠΈΠΌΡ–Π·ΡƒΡŽΡ‡ΠΈΡ… ΠΏΠ΅Ρ€Π΅Ρ‚Π²ΠΎΡ€Π΅Π½ΡŒ для ΠΌΡƒΠ»ΡŒΡ‚ΠΈΠΏΠΎΡ‚ΠΎΡ‡Π½ΠΈΡ… ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌ Ρ‚Π° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌ для Π³Ρ€Π°Ρ„Ρ–Ρ‡Π½ΠΈΡ… ΠΏΡ€ΠΈΡΠΊΠΎΡ€ΡŽΠ²Π°Ρ‡Ρ–Π². Описано використання Ρ†ΠΈΡ… ΠΌΠΎΠ΄Π΅Π»Π΅ΠΉ Π·Π° допомогою Ρ‚Π΅Ρ…Π½Ρ–ΠΊΠΈ ΠΏΠ΅Ρ€Π΅ΠΏΠΈΡΡƒΠ²Π°Π»ΡŒΠ½ΠΈΡ… ΠΏΡ€Π°Π²ΠΈΠ» для Π΄ΠΎΠ²Π΅Π΄Π΅Π½Π½Ρ– корСктності ΠΏΠ΅Ρ€Π΅Ρ‚Π²ΠΎΡ€Π΅Π½ΡŒ Ρ‚Π° підвищСння СфСктивності Ρ€ΠΎΠ·ΠΏΠ°Ρ€Π°Π»Π΅Π»ΡŽΠ²Π°Π½Π½Ρ ΠΎΠ±Ρ‡ΠΈΡΠ»Π΅Π½ΡŒ.We propose algebra-dynamic models and a method for checking correctness of optimizing transformations for multithread programs and programs for graphical processing units. Proposed models are used together with rewriting rules technique to prove correctness of transformations and increase effectiveness of program parallelization

    ΠΠ›Π“Π•Π‘Π Πž-Π”Π˜ΠΠΠœΠ˜Π§Π•Π‘ΠšΠ˜Π• ΠœΠžΠ”Π•Π›Π˜ Π”Π›Π― Π ΠΠ‘ΠŸΠΠ ΠΠ›Π›Π•Π›Π˜Π’ΠΠΠ˜Π― ΠŸΠ ΠžΠ“Π ΠΠœΠœ

    Get PDF
    ΠŸΡ€Π΅Π΄Π»ΠΎΠΆΠ΅Π½Ρ‹ Π°Π»Π³Π΅Π±Ρ€ΠΎ-динамичСскиС ΠΌΠΎΠ΄Π΅Π»ΠΈ ΠΈ ΠΌΠ΅Ρ‚ΠΎΠ΄ ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠΈ коррСктности ΠΎΠΏΡ‚ΠΈΠΌΠΈΠ·ΠΈΡ€ΡƒΡŽΡ‰ΠΈΡ… ΠΏΡ€Π΅ΠΎΠ±Ρ€Π°Π·ΠΎΠ²Π°Π½ΠΈΠΉ для ΠΌΠ½ΠΎΠ³ΠΎΠΏΠΎΡ‚ΠΎΡ‡Π½Ρ‹Ρ… ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌ ΠΈ ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌ для графичСских ускоритСлСй. Описано использованиС этих ΠΌΠΎΠ΄Π΅Π»Π΅ΠΉ с ΠΏΠΎΠΌΠΎΡ‰ΡŒΡŽ Ρ‚Π΅Ρ…Π½ΠΈΠΊΠΈ ΠΏΠ΅Ρ€Π΅ΠΏΠΈΡΡ‹Π²Π°ΡŽΡ‰ΠΈΡ… ΠΏΡ€Π°Π²ΠΈΠ» для Π΄ΠΎΠΊΠ°Π·Π°Ρ‚Π΅Π»ΡŒΡΡ‚Π²Π° коррСктности ΠΏΡ€Π΅ΠΎΠ±Ρ€Π°Π·ΠΎΠ²Π°Π½ΠΈΠΉ ΠΈ ΠΏΠΎΠ²Ρ‹ΡˆΠ΅Π½ΠΈΡ эффСктивности распараллСливания вычислСний

    Safer typing of complex API usage through Java generics

    Get PDF
    When several incompatible implementations of a single API are in use in a Java program, the danger exists that instances from different implementations may inadvertently be mixed, leading to errors. In this paper we show how to use generics to prevent such mixing. The core idea of the approach is to add a type parameter to the interfaces of the API, and tie the classes that make up an implementation to a unique choice of type parameter. In this way methods of the API can only be invoked with arguments that belong to the same implementation. We show that the presence of a type parameter in the interfaces does not violate the principle of interface-based programming: clients can still completely abstract over the choice of implementation. In addition, we demonstrate how code can be reused between different implementations, how implementations can be defined as extensions of other implementations, and how different implementations may be mixed in a controlled and safe manner. To explore the feasibility of the approach, gauge its usability, and identify any issues that may crop up in practical usage, we have refactored a fairly large existing API-based application suite, and we report on the experience gained in the process
    • …
    corecore