Results 1  10
of
25
Datatypegeneric programming
 Spring School on DatatypeGeneric Programming, volume 4719 of Lecture Notes in Computer Science
"... Abstract. Generic programming aims to increase the flexibility of programming languages, by expanding the possibilities for parametrization — ideally, without also expanding the possibilities for uncaught errors. The term means different things to different people: parametric polymorphism, data abst ..."
Abstract

Cited by 48 (12 self)
 Add to MetaCart
Abstract. Generic programming aims to increase the flexibility of programming languages, by expanding the possibilities for parametrization — ideally, without also expanding the possibilities for uncaught errors. The term means different things to different people: parametric polymorphism, data abstraction, metaprogramming, and so on. We use it to mean polytypism, that is, parametrization by the shape of data structures rather than their contents. To avoid confusion with other uses, we have coined the qualified term datatypegeneric programming for this purpose. In these lecture notes, we expand on the definition of datatypegeneric programming, and present some examples of datatypegeneric programs. We also explore the connection with design patterns in objectoriented programming; in particular, we argue that certain design patterns are just higherorder datatypegeneric programs. 1
Codequest: Scalable source code queries with datalog
 In ECOOP Proceedings
, 2006
"... Abstract. Source code querying tools allow programmers to explore relations between different parts of the code base. This paper describes such a tool, named CodeQuest. It combines two previous proposals, namely the use of logic programming and database systems. As the query language we use safe Dat ..."
Abstract

Cited by 42 (0 self)
 Add to MetaCart
Abstract. Source code querying tools allow programmers to explore relations between different parts of the code base. This paper describes such a tool, named CodeQuest. It combines two previous proposals, namely the use of logic programming and database systems. As the query language we use safe Datalog, which was originally introduced in the theory of databases. That provides just the right level of expressiveness; in particular recursion is indispensable for source code queries. Safe Datalog is like Prolog, but all queries are guaranteed to terminate, and there is no need for extralogical annotations. Our implementation of Datalog maps queries to a relational database system. We are thus able to capitalise on the query optimiser provided by such a system. For recursive queries we implement our own optimisations in the translation from Datalog to SQL. Experiments confirm that this strategy yields an efficient, scalable code querying system. 1
Calculating Functional Programs
 Algebraic and Coalgebraic Methods in the Mathematics of Program Construction, volume 2297 of LNCS, chapter 5
, 2000
"... A good way of developing a correct program is to calculate it from its specification. Functional programming languages are especially suitable for this, because their referential transparency greatly helps calculation. We discuss the ideas behind program calculation, and illustrate with an examp ..."
Abstract

Cited by 26 (8 self)
 Add to MetaCart
A good way of developing a correct program is to calculate it from its specification. Functional programming languages are especially suitable for this, because their referential transparency greatly helps calculation. We discuss the ideas behind program calculation, and illustrate with an example (the maximum segment sum problem). We show that calculations are driven by promotion, and that promotion properties arise from universal properties of the data types involved. 1 Context The history of computing is a story of two contrasting trends. On the one hand, the cost and cost/performance ratio of computer hardware plummets; on the other, computer software is overcomplex, unreliable and almost inevitably over budget. Clearly, we have learnt how to build computers, but not yet how to program them. It is now widely accepted that adhoc approaches to constructing software break down as projects get more ambitious. A more formal approach, based on sound mathematical foundations, i...
Temporal Algebra
 Mathematical Structures in Computer Science
, 1996
"... This paper is tutorial in style and there are no difficult technical results. To the experts in temporal logics, we hope to convey the simplicity and beauty of algebraic reasoning as opposed to the machineorientedness of logical deduction. To those familiar with the calculational approach to progra ..."
Abstract

Cited by 16 (0 self)
 Add to MetaCart
This paper is tutorial in style and there are no difficult technical results. To the experts in temporal logics, we hope to convey the simplicity and beauty of algebraic reasoning as opposed to the machineorientedness of logical deduction. To those familiar with the calculational approach to programming, we want to show that their methods extend easily and smoothly to temporal reasoning. For anybody else, this text may serve as a gentle introduction to both areas. 1. Introduction
Between Functions and Relations in Calculating Programs
, 1992
"... This thesis is about the calculational approach to programming, in which one derives programs from specifications. One such calculational paradigm is Ruby, the relational calculus developed by Jones and Sheeran for describing and designing circuits. We identify two shortcomings with derivations made ..."
Abstract

Cited by 15 (4 self)
 Add to MetaCart
This thesis is about the calculational approach to programming, in which one derives programs from specifications. One such calculational paradigm is Ruby, the relational calculus developed by Jones and Sheeran for describing and designing circuits. We identify two shortcomings with derivations made using Ruby. The first is that the notion of a program being an implementation of a specification has never been made precise. The second is to do with types. Fundamental to the use of type information in deriving programs is the idea of having types as special kinds of programs. In Ruby, types are partial equivalence relations (pers). Unfortunately, manipulating some formulae involving types has proved difficult within Ruby. In particular, the preconditions of the `induction' laws that are much used within program derivation often work out to be assertions about types; such assertions have typically been verified either by informal arguments or by using predicate calculus, rather than by ap...
Universal regular path queries
 HigherOrder and Symbolic Computation
, 2003
"... Given are a directed edgelabelled graph G with a distinguished node n0, and a regular expression P which may contain variables. We wish to compute all substitutions φ (of symbols for variables), together with all nodes n such that all paths n0 → n are in φ(P). We derive an algorithm for this proble ..."
Abstract

Cited by 12 (1 self)
 Add to MetaCart
Given are a directed edgelabelled graph G with a distinguished node n0, and a regular expression P which may contain variables. We wish to compute all substitutions φ (of symbols for variables), together with all nodes n such that all paths n0 → n are in φ(P). We derive an algorithm for this problem using relational algebra, and show how it may be implemented in Prolog. The motivation for the problem derives from a declarative framework for specifying compiler optimisations. 1 Bob Paige and IFIP WG 2.1 Bob Paige was a longstanding member of IFIP Working Group 2.1 on Algorithmic Languages and Calculi. In recent years, the main aim of this group has been to investigate the derivation of algorithms from specifications by program transformation. Already in the mideighties, Bob was way ahead of the pack: instead of applying transformational techniques to wellworn examples, he was applying his theories of program transformation to new problems, and discovering new algorithms [16, 48, 52]. The secret of his success lay partly in his insistence on the study of general algorithm design strategies (in particular
(Relational) Programming Laws in the Boom Hierarchy of Types
 Mathematics of Program Construction
, 1992
"... . In this paper we demonstrate that the basic rules and calculational techniques used in two extensively documented program derivation methods can be expressed, and, indeed, can be generalised within a relational theory of datatypes. The two methods to which we refer are the socalled "BirdMeertens ..."
Abstract

Cited by 9 (1 self)
 Add to MetaCart
. In this paper we demonstrate that the basic rules and calculational techniques used in two extensively documented program derivation methods can be expressed, and, indeed, can be generalised within a relational theory of datatypes. The two methods to which we refer are the socalled "BirdMeertens formalism" (see [22]) and the "DijkstraFeijen calculus" (see [15]). The current paper forms an abridged, though representative, version of a complete account of the algebraic properties of the Boom hierarchy of types [19, 18]. Missing is an account of extensionality and the socalled crossproduct. 1 Introduction The "BirdMeertens formalism" (to be more precise, our own conception of it) is a calculus of total functions based on a small number of primitives and a hierarchy of types including trees and lists. The theory was set out in an inspiring paper by Meertens [22] and has been further refined and applied in a number of papers by Bird and Meertens [8, 9, 11, 12, 13]. Its beauty deriv...
Compositional Logic Programming
 In Proceedings of the JICSLP'96 postconference workshop: Multiparadigm logic programming, Report 9628. Technische Universitat
, 2000
"... Relational program derivation has gathered momentum over the last decade with the development of many specification logics. However, before such relational specifications can be executed in existing programming languages, they must be carefully phrased to respect the evaluation order of the langu ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
Relational program derivation has gathered momentum over the last decade with the development of many specification logics. However, before such relational specifications can be executed in existing programming languages, they must be carefully phrased to respect the evaluation order of the language. In turn, this requirement inhibits the rapid prototyping of specifications in a relational notation. The aim of this thesis is to bridge the gap between the methodology and practice of relational program derivation by realising a compositional style of logic programming that permits specifications to be phrased naturally and executed declaratively.
Inverting Functions as Folds
 Mathematics of Program Construction. Proceedings, LNCS 2386
, 2002
"... This paper describes a technique for constructing the inverse of a partial function as a relational hylomorphism. When the function is total, the inverse is expressed as a relational fold. If the inverse is required to satisfy additional properties, the nondeterminism in the relational fold can be ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
This paper describes a technique for constructing the inverse of a partial function as a relational hylomorphism. When the function is total, the inverse is expressed as a relational fold. If the inverse is required to satisfy additional properties, the nondeterminism in the relational fold can be eliminated by appeal to fusion. The technique is illustrated with three examples, all dealing with constructing trees satisfying certain constraints.
Component Identification Through Program Slicing
 In Proc. of Formal Aspects of Component Software (FACS 2005). Elsevier ENTCS
, 2005
"... This paper reports on the development of specific slicing techniques for functional programs and their use for the identification of possible coherent components from monolithic code. An associated tool is also introduced. This piece of research is part of a broader project on program understanding ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
This paper reports on the development of specific slicing techniques for functional programs and their use for the identification of possible coherent components from monolithic code. An associated tool is also introduced. This piece of research is part of a broader project on program understanding and reengineering of legacy code supported by formal methods.