52 research outputs found
Colouring flags with Dafny & Idris
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
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 , 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 , where
is the number of events in the execution, and 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
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
ΠΠ»Π³Π΅Π±ΡΠΎ-Π΄ΠΈΠ½Π°ΠΌΠΈΡΠ΅ΡΠΊΠΈΠ΅ ΠΌΠΎΠ΄Π΅Π»ΠΈ Π΄Π»Ρ ΡΠ°ΡΠΏΠ°ΡΠ°Π»Π»Π΅Π»ΠΈΠ²Π°Π½ΠΈΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌ
ΠΡΠ΅Π΄Π»ΠΎΠΆΠ΅Π½Ρ Π°Π»Π³Π΅Π±ΡΠΎ-Π΄ΠΈΠ½Π°ΠΌΠΈΡΠ΅ΡΠΊΠΈΠ΅ ΠΌΠΎΠ΄Π΅Π»ΠΈ ΠΈ ΠΌΠ΅ΡΠΎΠ΄ ΠΏΡΠΎΠ²Π΅ΡΠΊΠΈ ΠΊΠΎΡΡΠ΅ΠΊΡΠ½ΠΎΡΡΠΈ ΠΎΠΏΡΠΈΠΌΠΈΠ·ΠΈΡΡΡΡΠΈΡ
ΠΏΡΠ΅ΠΎΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠΉ Π΄Π»Ρ ΠΌΠ½ΠΎΠ³ΠΎΠΏΠΎΡΠΎΡΠ½ΡΡ
ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌ ΠΈ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌ Π΄Π»Ρ Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΈΡ
ΡΡΠΊΠΎΡΠΈΡΠ΅Π»Π΅ΠΉ. ΠΠΏΠΈΡΠ°Π½ΠΎ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ ΡΡΠΈΡ
ΠΌΠΎΠ΄Π΅Π»Π΅ΠΉ Ρ ΠΏΠΎΠΌΠΎΡΡΡ ΡΠ΅Ρ
Π½ΠΈΠΊΠΈ ΠΏΠ΅ΡΠ΅ΠΏΠΈΡΡΠ²Π°ΡΡΠΈΡ
ΠΏΡΠ°Π²ΠΈΠ» Π΄Π»Ρ Π΄ΠΎΠΊΠ°Π·Π°ΡΠ΅Π»ΡΡΡΠ²Π° ΠΊΠΎΡΡΠ΅ΠΊΡΠ½ΠΎΡΡΠΈ ΠΏΡΠ΅ΠΎΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠΉ ΠΈ ΠΏΠΎΠ²ΡΡΠ΅Π½ΠΈΡ ΡΡΡΠ΅ΠΊΡΠΈΠ²Π½ΠΎΡΡΠΈ ΡΠ°ΡΠΏΠ°ΡΠ°Π»Π»Π΅Π»ΠΈΠ²Π°Π½ΠΈΡ Π²ΡΡΠΈΡΠ»Π΅Π½ΠΈΠΉ.ΠΠ°ΠΏΡΠΎΠΏΠΎΠ½ΠΎΠ²Π°Π½ΠΎ Π°Π»Π³Π΅Π±ΡΠΎ-Π΄ΠΈΠ½Π°ΠΌΡΡΠ½Ρ ΠΌΠΎΠ΄Π΅Π»Ρ ΡΠ° ΠΌΠ΅ΡΠΎΠ΄ ΠΏΠ΅ΡΠ΅Π²ΡΡΠΊΠΈ ΠΊΠΎΡΠ΅ΠΊΡΠ½ΠΎΡΡΡ ΠΎΠΏΡΠΈΠΌΡΠ·ΡΡΡΠΈΡ
ΠΏΠ΅ΡΠ΅ΡΠ²ΠΎΡΠ΅Π½Ρ Π΄Π»Ρ ΠΌΡΠ»ΡΡΠΈΠΏΠΎΡΠΎΡΠ½ΠΈΡ
ΠΏΡΠΎΠ³ΡΠ°ΠΌ ΡΠ° ΠΏΡΠΎΠ³ΡΠ°ΠΌ Π΄Π»Ρ Π³ΡΠ°ΡΡΡΠ½ΠΈΡ
ΠΏΡΠΈΡΠΊΠΎΡΡΠ²Π°ΡΡΠ². ΠΠΏΠΈΡΠ°Π½ΠΎ Π²ΠΈΠΊΠΎΡΠΈΡΡΠ°Π½Π½Ρ ΡΠΈΡ
ΠΌΠΎΠ΄Π΅Π»Π΅ΠΉ Π·Π° Π΄ΠΎΠΏΠΎΠΌΠΎΠ³ΠΎΡ ΡΠ΅Ρ
Π½ΡΠΊΠΈ ΠΏΠ΅ΡΠ΅ΠΏΠΈΡΡΠ²Π°Π»ΡΠ½ΠΈΡ
ΠΏΡΠ°Π²ΠΈΠ» Π΄Π»Ρ Π΄ΠΎΠ²Π΅Π΄Π΅Π½Π½Ρ ΠΊΠΎΡΠ΅ΠΊΡΠ½ΠΎΡΡΡ ΠΏΠ΅ΡΠ΅ΡΠ²ΠΎΡΠ΅Π½Ρ ΡΠ° ΠΏΡΠ΄Π²ΠΈΡΠ΅Π½Π½Ρ Π΅ΡΠ΅ΠΊΡΠΈΠ²Π½ΠΎΡΡΡ ΡΠΎΠ·ΠΏΠ°ΡΠ°Π»Π΅Π»ΡΠ²Π°Π½Π½Ρ ΠΎΠ±ΡΠΈΡΠ»Π΅Π½Ρ.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
ΠΠΠΠΠΠ Π-ΠΠΠΠΠΠΠ§ΠΠ‘ΠΠΠ ΠΠΠΠΠΠ ΠΠΠ― Π ΠΠ‘ΠΠΠ ΠΠΠΠΠΠΠΠΠΠΠ― ΠΠ ΠΠΠ ΠΠΠ
ΠΡΠ΅Π΄Π»ΠΎΠΆΠ΅Π½Ρ Π°Π»Π³Π΅Π±ΡΠΎ-Π΄ΠΈΠ½Π°ΠΌΠΈΡΠ΅ΡΠΊΠΈΠ΅ ΠΌΠΎΠ΄Π΅Π»ΠΈ ΠΈ ΠΌΠ΅ΡΠΎΠ΄ ΠΏΡΠΎΠ²Π΅ΡΠΊΠΈ ΠΊΠΎΡΡΠ΅ΠΊΡΠ½ΠΎΡΡΠΈ ΠΎΠΏΡΠΈΠΌΠΈΠ·ΠΈΡΡΡΡΠΈΡ
ΠΏΡΠ΅ΠΎΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠΉ Π΄Π»Ρ ΠΌΠ½ΠΎΠ³ΠΎΠΏΠΎΡΠΎΡΠ½ΡΡ
ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌ ΠΈ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌ Π΄Π»Ρ Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΈΡ
ΡΡΠΊΠΎΡΠΈΡΠ΅Π»Π΅ΠΉ. ΠΠΏΠΈΡΠ°Π½ΠΎ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ ΡΡΠΈΡ
ΠΌΠΎΠ΄Π΅Π»Π΅ΠΉ Ρ ΠΏΠΎΠΌΠΎΡΡΡ ΡΠ΅Ρ
Π½ΠΈΠΊΠΈ ΠΏΠ΅ΡΠ΅ΠΏΠΈΡΡΠ²Π°ΡΡΠΈΡ
ΠΏΡΠ°Π²ΠΈΠ» Π΄Π»Ρ Π΄ΠΎΠΊΠ°Π·Π°ΡΠ΅Π»ΡΡΡΠ²Π° ΠΊΠΎΡΡΠ΅ΠΊΡΠ½ΠΎΡΡΠΈ ΠΏΡΠ΅ΠΎΠ±ΡΠ°Π·ΠΎΠ²Π°Π½ΠΈΠΉ ΠΈ ΠΏΠΎΠ²ΡΡΠ΅Π½ΠΈΡ ΡΡΡΠ΅ΠΊΡΠΈΠ²Π½ΠΎΡΡΠΈ ΡΠ°ΡΠΏΠ°ΡΠ°Π»Π»Π΅Π»ΠΈΠ²Π°Π½ΠΈΡ Π²ΡΡΠΈΡΠ»Π΅Π½ΠΈΠΉ
Safer typing of complex API usage through Java generics
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
- β¦