The widespread adoption of XML has led to programming languages that support XML as a first class construct. In this paper, we present a method for analyzing and optimizing imperative XML processing programs. In parti...
详细信息
The widespread adoption of XML has led to programming languages that support XML as a first class construct. In this paper, we present a method for analyzing and optimizing imperative XML processing programs. In particular, we present a program analysis, based on a flow-sensitive type system, for detecting both redundant computations and redundant traversals in such programs. The analysis handles imperative loops that traverse XML values explicitly and declarative queries over XML data in a uniform framework. We describe two optimizations that take advantage of our analysis: one merges queries that traverse the same set of XML nodes, and the other replaces an XPath expression by a previously computed result. We demonstrate performance improvements for selected XMark benchmark queries and XLinq sample queries. (C) 2009 Elsevier B.V. All rights reserved.
Following the Crisis of Foundations Hilbert proposed to consider a finitistic form of arithmetic as mathematics' safe core. This approach to finitism has often admitted primitive recursive function definitions as ...
详细信息
Following the Crisis of Foundations Hilbert proposed to consider a finitistic form of arithmetic as mathematics' safe core. This approach to finitism has often admitted primitive recursive function definitions as obviously finitistic, but some have advocated the inclusion of additional variants of recurrence, while others argued that, to the contrary, primitive recursion exceeds finitism. In a landmark essay, William Tait contested the finitistic nature of these extensions, due to their impredicativity, and advocated identifying finitism with primitive recursive arithmetic, a stance often referred to as Tait's Thesis. However, a problem with Tait's argument is that the recurrence schema has itself impredicative and non-finitistic facets, starting with an explicit reference to the functions being defined, which are after all infinite objects. It is therefore desirable to buttress Tait's Thesis on grounds that avoid altogether any trace of concrete infinities or impredicativity. We propose here to do just that, building on the generic framework of [13]. We provide further evidence for Tait's Thesis by outlining a proof of a purely finitistic version of Parsons' theorem, whose intuitive gist is that finitistic reasoning is equivalent to finitistic computing.
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.
Existing package and system configuration management tools suffer from an imperative model, where system administration actions such as package upgrades or changes to system configuration files are stateful: they dest...
详细信息
Existing package and system configuration management tools suffer from an imperative model, where system administration actions such as package upgrades or changes to system configuration files are stateful: they destructively update the state of the system. This leads to many problems, such as the inability to roll back changes easily, to deploy multiple versions of a package side-by-side, to reproduce a configuration deterministically on another machine, or to reliably upgrade a system. In this paper we show that we can overcome these problems by moving to a purely functional system configuration model. This means that all static parts of a system (such as software packages, configuration files and system startup scripts) are built by pure functions and are immutable, stored in a way analogous to a heap in a purely functional language. We have implemented this model in NixOS, a non-trivial Linux distribution that uses the Nix package manager to build the entire system configuration from a modular, purely functional specification.
We establish a strong completeness property called observational completeness of the program logic for imperative, higher-order functions introduced in [1]. Observational completeness states that valid assertions char...
详细信息
We establish a strong completeness property called observational completeness of the program logic for imperative, higher-order functions introduced in [1]. Observational completeness states that valid assertions characterise program behaviour up to observational congruence, giving a precise correspondence between operational and axiomatic semantics. The proof layout for the observational completeness which uses a restricted syntactic structure called finite canonical forms originally introduced in game-based semantics, and characteristic formulae originally introduced in the process calculi, is generally applicable for a precise axiomatic characterisation of more complex program behaviour, such as aliasing and local state. (C) 2013 Elsevier B.V. All rights reserved.
This is a study of a technique for deriving the session type of a program written in a statically typed imperative language from its control flow. We impose on our unlabelled session type syntax a well-formedness cons...
详细信息
This is a study of a technique for deriving the session type of a program written in a statically typed imperative language from its control flow. We impose on our unlabelled session type syntax a well-formedness constraint based upon normalisation and explore the effects thereof. We present our inference algorithm declaratively and in a form suitable for implementation, and illustrate it with examples. We then present an implementation of the algorithm using a program analysis and transformation toolkit.
In the fourth industrial revolution, programming promises to be a fundamental subject like mathematics, science, languages or the arts. Architects design more than buildings developing innovative methods and they are ...
详细信息
In the fourth industrial revolution, programming promises to be a fundamental subject like mathematics, science, languages or the arts. Architects design more than buildings developing innovative methods and they are among the pioneers in visual programming development. However, after more than 10 years of visual programming in architecture, despite the fast-learning curve, visual programming presents considerable limitations to solve complex problems. To overcome limitations, the authors propose to associate the advantages of visual and textual languages in Python. The article addresses an ongoing research study to implement Computational Methods in Architectural Education. The authors began by describing the general goal of this project, and of this article in particular. This article focuses on the implementation of two disciplines 'Computation for Architecture in Python' I and II. The first discipline uses programming based on the construction of functions in the imperative language, implemented in the text editor, in visual programming, using Grasshopper methods. The second discipline, which is under development, intends to teach object-oriented programming. The results of the first discipline are encouraging;despite reported difficulties in programming fundamentals, such as lists, loops and recursion. The development of the second discipline, in object-oriented programming, deals with the concepts of classes and objects, and more abstract principles such abstraction, inheritance, polymorphism or encapsulation. This paradigm allows building robust programs, but requires a more in-depth syntax. The article reports this ongoing research on this new paradigm of object-oriented language, expanding the application of a hybrid visual-textual language in Architecture.
In this paper we demonstrate how to prove the correctness of systems implemented using low-level imperative features like pointers, files, and socket I/O with respect to high level I/O protocol descriptions by using t...
详细信息
In this paper we demonstrate how to prove the correctness of systems implemented using low-level imperative features like pointers, files, and socket I/O with respect to high level I/O protocol descriptions by using the Coq proof assistant. We present a web-based course gradebook application developed with Ynot, a Coq library for verified imperative programming. We add a dialog-based I/O system to Ynot, and we extend Ynot's underlying Hoare logic with event traces to reason about I/O and protocol behavior. Expressive abstractions allow the modular verification of both high level specifications like privacy guarantees and low level properties like data structure pointer invariants. (C) 2010 Elsevier Ltd. All rights reserved.
We present the kernel language approach;a new way to teach programming that situates most of the widely known programming paradigms (including imperative, object-oriented, concurrent, logic, and functional) into a uni...
详细信息
ISBN:
(纸本)140207266X
We present the kernel language approach;a new way to teach programming that situates most of the widely known programming paradigms (including imperative, object-oriented, concurrent, logic, and functional) into a uniform setting that shows their deep relationships and how to use them together. Widely different practical languages (exemplified by Java, Haskell, Prolog, and Erlang) with their rich panoplies of abstractions and syntax are explained by straightforward translations into closely related kernel languages, simple languages that consist of small numbers of programmer-significant concepts. Kernel languages are easy to understand and have a simple formal semantics that can be used by practicing programmers to reason about correctness and complexity.
We elaborate our relational model of non-strict, imperative computations. The theory is extended to support infinite data structures. To facilitate their use in programs, we extend the programming language by concepts...
详细信息
We elaborate our relational model of non-strict, imperative computations. The theory is extended to support infinite data structures. To facilitate their use in programs, we extend the programming language by concepts such as procedures, parameters, partial application, algebraic data types, pattern matching and list comprehensions. For each concept, we provide a relational semantics. Abstraction is further improved by programming patterns such as fold, unfold and divide-and-conquer. To support program reasoning, we prove laws such as fold-map fusion, otherwise known from functional programming languages. We give examples to show the use of our concepts in programs. (C) 2010 Elsevier Inc. All rights reserved.
暂无评论