A commonly-used technique in dependently-typed programming is to encode invariants about a data structure into its type, thus ensuring that the data structure is correct by construction. Unfortunately, this often nece...
详细信息
ISBN:
(纸本)9781450368155
A commonly-used technique in dependently-typed programming is to encode invariants about a data structure into its type, thus ensuring that the data structure is correct by construction. Unfortunately, this often necessitates the embedding of explicit proof terms within the data structure, which are not part of the structure conceptually, but merely supplied to ensure that the data invariants are maintained. As the complexity of the specifications in the types increases, these additional terms tend to clutter definitions, reducing readability. We introduce a technique where these proof terms can be supplied later, by constructing the data structure within a proof delay applicative functor. We apply this technique to Trip, our new language for Hoare-logic verification of imperative programs embedded in Agda, where our applicative functor is used as the basis for a verification condition generator, turning the typed holes of Agda into a method for stepwise derivation of a program from its specification in the form of a Hoare triple.
The finitistic philosophy of mathematics, critical of referencing infinite totalities, has been associated from its inception with primitive recursion. That kinship was not initially substantiated, but is widely assum...
详细信息
ISBN:
(纸本)9783030367558;9783030367541
The finitistic philosophy of mathematics, critical of referencing infinite totalities, has been associated from its inception with primitive recursion. That kinship was not initially substantiated, but is widely assumed, and is supported by Parson's Theorem, which may be construed as equating finitistic reasoning with finitistic computing. In support of identifying PR with finitism we build on the generic framework of [7] and articulate a finitistic theory of finite partialstructures, and a generic imperative programming language for modifying them, equally rooted in finitism. The theory is an abstract generalization of Primitive Recursive Arithmetic, and the programming language is a generic generalization of first-order recurrence (primitive recursion). We then prove an abstract form of Parson's Theorem that links the two.
In today's software engineering tool landscape, many sophisticated imperative static source code analysis tools exist. However the implementations of these analyses are normally tied to specific languages, so must...
详细信息
ISBN:
(纸本)9783319133324;9783319133317
In today's software engineering tool landscape, many sophisticated imperative static source code analysis tools exist. However the implementations of these analyses are normally tied to specific languages, so must be recreated for any new or lesser-known languages. It can be burdensome for small groups of language developers or third party tool authors to devote the necessary resources to creating an analysis tool suite specifically for their language, so a number of less popular languages lack such automated tool support to the detriment of their users. As a solution this paper argues that multiple analysis algorithms exist which are applicable to almost any high-level imperative programming language, and that support for them can be added to a language cheaply with a high degree of automation. Pursuit of these would provide a new way of gathering knowledge about application structure for languages that have not previously enjoyed strong tool support.
This poster investigated the data from the past year of CS1 and found overwhelming evidence that students who have taken calculus are significantly more likely to succeed and less likely to fail that those who do not....
详细信息
ISBN:
(纸本)9781450351034
This poster investigated the data from the past year of CS1 and found overwhelming evidence that students who have taken calculus are significantly more likely to succeed and less likely to fail that those who do not. On a Fall 2016 CS1 final exam, students who had not earned credit for a first course in college-level calculus were 2.8 times more likely to fail it than those who had (p=<0.0001,N=844). The mean final score for students with calculus was an 84, and those without was 61 (p=<0.0001). The result surprised the instructor, course staff, and faculty familiar with the course because the course itself does not emphasize mathematical or scientific computing. The course was Java-based, objects-early, and introduces both object-oriented and imperative programming fundamentals. The effect was evident across a range of problems, none seemingly requiring beyond basic algebra. In the Spring of 2017, the instructor and course staff set forth to explore these questions and close the math gap discovered in the Fall of 2016. This poster further proposes to develop interventions to aid those with a lower math maturity level through introducing a specialized CS1 to better accommodate those with a lower math maturity level by reducing the pace and installing prerequisites for the established CS1. Prospective Computer Science students at liberal arts colleges and universities enter with a wide range of mathematical backgrounds. Failing to acknowledge these disparities is demoralizing to students during their first course in CS and is counter-productive to inclusivity.
Self-adjusting computation enables writing programs that can automatically and efficiently respond to changes to their data (e. g., inputs). The idea behind the approach is to store all data that can change over time ...
详细信息
Self-adjusting computation enables writing programs that can automatically and efficiently respond to changes to their data (e. g., inputs). The idea behind the approach is to store all data that can change over time in modifiable references and to let computations construct traces that can drive change propagation. After changes have occurred, change propagation updates the result of the computation by re-evaluating only those expressions that depend on the changed data. Previous approaches to self-adjusting computation require that modifiable references be written at most once during execution-this makes the model applicable only in a purely functional setting. In this paper, we present techniques for imperative self-adjusting computation where modifiable references can be written multiple times. We define a language SAIL (Self-Adjusting imperative Language) and prove consistency, i.e., that change propagation and from-scratch execution are observationally equivalent. Since SAIL programs are imperative, they can create cyclic data structures. To prove equivalence in the presence of cycles in the store, we formulate and use an untyped, step-indexed logical relation, where step indices are used to ensure well-foundedness. We show that SAIL accepts an asymptotically efficient implementation by presenting algorithms and data structures for its implementation. When the number of operations (reads and writes) per modifiable is bounded by a constant, we show that change propagation becomes as efficient as in the non-imperative case. The general case incurs a slowdown that is logarithmic in the maximum number of such operations. We describe a prototype implementation of SAIL as a Standard ML library.
We use procedural parameters as a means to cut off unwanted branches in a search tree. The technique may be used to effect non-blind backtracking. A recursive algorithm for generating all strings of n pairs of balance...
详细信息
We use procedural parameters as a means to cut off unwanted branches in a search tree. The technique may be used to effect non-blind backtracking. A recursive algorithm for generating all strings of n pairs of balanced parentheses is chosen as an illustrative example, since it cannot be formulated by conventional recursive backtracking.
We propose a simple imperative programming language, ERC, that features arbitrary real numbers as primitive data type, exactly. Equipped with a denotational semantics, ERC provides a formal programming language -theor...
详细信息
We propose a simple imperative programming language, ERC, that features arbitrary real numbers as primitive data type, exactly. Equipped with a denotational semantics, ERC provides a formal programming language -theoretic foundation to the algorithmic processing of real numbers. In order to capture multi-valuedness, which is well-known to be essential to real number computation, we use a Plotkin powerdomain and make our programming language semantics computable and complete: all and only real functions computable in computable analysis can be realized in ERC. The base programming language supports real arithmetic as well as implicit limits;expansions support additional primitive operations (such as a user -defined exponential function). By restricting integers to Presburger arithmetic and real coercion to the 'precision' embedding Z is not an element of p 7 -> 2p is an element of R, we arrive at a first -order theory which we prove to be decidable and model -complete. Based on said logic as specification language for preconditions and postconditions, we extend Hoare logic to a sound (w.r.t. the denotational semantics) and expressive system for deriving correct total correctness specifications. Various examples demonstrate the practicality and convenience of our language and the extended Hoare logic.
Capsules are a clean representation of the state of a computation in higher-order programming languages with effects. Their intent is to simplify and replace the notion of closure. They naturally provide support for f...
详细信息
Capsules are a clean representation of the state of a computation in higher-order programming languages with effects. Their intent is to simplify and replace the notion of closure. They naturally provide support for functional and imperative features, including recursion and mutable bindings, and ensure lexical scoping without the use of closures, heaps, stacks or combinators. We present a comparison of the use of closures and capsules in the semantics of higher-order programming languages with effects. In proving soundness of one to the other, we give a precise account of how capsule environments and closure environments relate to each other.
Expectation-based probabilistic predicate transformers [15] provide a logic for probabilistic sequential programs, giving access to expressions such as ‘the probability that predicate A is achieved finally’. Using e...
详细信息
Expectation-based probabilistic predicate transformers [15] provide a logic for probabilistic sequential programs, giving access to expressions such as ‘the probability that predicate A is achieved finally’. Using expectations more generally however, we can express μ-calculus formulae for the expected path-length of a computation tree. Moreover within an expectation-based μ-calculus such efficiency measures and more conventional (but probabilistic) temporal operators [14] can be related.
暂无评论