47 research outputs found
Type-and-Scope Safe Programs and Their Proofs
We abstract the common type-and-scope safe structure fromcomputations on lambda-terms that deliver, e.g., renaming, substitution, evaluation, CPS-transformation, and printing witha name supply. By exposing this structure, we can prove generic simulation and fusion lemmas relating operations built this way. This work has been fully formalised in Agda
On Language Processors and Software Maintenance
This work investigates declarative transformation tools in the context of software maintenance. Besides maintenance of the language specification, evolution of a software language
requires the adaptation of the software written in that language as well as the adaptation of the software that transforms software written in the evolving language. This co-evolution is studied to derive automatic adaptations of artefacts from adaptations of the language specification.
Furthermore, AOP for Prolog is introduced to improve maintainability of language specifications and derived tools.Die Arbeit unterstĂźtzt deklarative Transformationswerkzeuge
im Kontext der Softwarewartung. Neben der Wartung der
Sprachbeschreibung erfordert die Evolution einer Sprache
sowohl die Anpassung der Software, die in dieser Sprache geschrieben ist als auch die Anpassung der Software, die diese Software transformiert. Diese Koevolution wird untersucht, um automatische Anpassungen
von Artefakten von Anpassungen der Sprachbeschreibungen abzuleiten. Weiterhin wird AOP fĂźr Prolog eingefĂźhrt, um die Wartbarkeit von Sprachbeschreibungen und den daraus abgeleiteten Werkzeugen zu erhĂśhen
Refinement kinds: type-safe programming with practical type-level computation
UID/CEC/04516/2019 PTDC/EEICTP/4293/2014This work introduces the novel concept of kind refinement, which we develop in the context of an explicitly polymorphic ML-like language with type-level computation. Just as type refinements embed rich specifications by means of comprehension principles expressed by predicates over values in the type domain, kind refinements provide rich kind specifications by means of predicates over types in the kind domain. By leveraging our powerful refinement kind discipline, types in our language are not just used to statically classify program expressions and values, but also conveniently manipulated as tree-like data structures, with their kinds refined by logical constraints on such structures. Remarkably, the resulting typing and kinding disciplines allow for powerful forms of type reflection, ad-hoc polymorphism and type-directed meta-programming, which are often found in modern software development, but not typically expressible in a type-safe manner in general purpose languages. We validate our approach both formally and pragmatically by establishing the standard meta-theoretical results of type safety and via a prototype implementation of a kind checker, type checker and interpreter for our language.publishersversionpublishe
Transforming XML Documents using fxt
As XML spreads to various application domains, transformation tasks on XML documents are accomplished by an ever increasing number of non-programmers. In this respect, rather than providing just a collection of basic operations via a library in a special purpose language, it is useful to provide a more intuitive, rule-based approach to XML transformation. The rule-based approach requires pattern-matching for identifying parts of the document to be processed. As XML document processing is basically a subarea of tree processing for which the functional programming style is very natural, we choose SML as implementation language. The functional style implies a processing model in which navigation is possible only to subtrees of a tree. This restriction can be compensated by using a tree pattern-matcher able to relate to ancestors, successors, as well as to siblings of a match. On top of the powerful fxgrep XML pattern-matcher, we build fxt, a transformation tool for XML documents. The functional processing model that fxt uses, allows an implementation more efficient than implementations permitted by the processing model of the popular XSLT, where navigation in the input tree can proceed in arbitrary directions. Usual transformations are specified in fxt in an intuitive, declarative way. More elaborate transformations can be flexibly achieved by the hooks provided to the full functionality of the SML programming language, as well as by the fxtâs variable mechanism
Programming errors in traversal programs over structured data
Traversal strategies \'a la Stratego (also \'a la Strafunski and 'Scrap Your
Boilerplate') provide an exceptionally versatile and uniform means of querying
and transforming deeply nested and heterogeneously structured data including
terms in functional programming and rewriting, objects in OO programming, and
XML documents in XML programming. However, the resulting traversal programs are
prone to programming errors. We are specifically concerned with errors that go
beyond conservative type errors; examples we examine include divergent
traversals, prematurely terminated traversals, and traversals with dead code.
Based on an inventory of possible programming errors we explore options of
static typing and static analysis so that some categories of errors can be
avoided. This exploration generates suggestions for improvements to strategy
libraries as well as their underlying programming languages. Haskell is used
for illustrations and specifications with sufficient explanations to make the
presentation comprehensible to the non-specialist. The overall ideas are
language-agnostic and they are summarized accordingly
Concurrency in a System for Symbolic and Algebraic Computations
As miniaturization of computer components is approaching the limits of physics, researchers in computer architecture are looking for less conventional means to perpetuate Moore's law. Recent trends in hardware ve been adding more cores. Consequently multicore machines are now commodity. To help programmers benefit from Moore's dividend, researchers in programming techniques, tools and languages have been exploring several venues. A dominant theme is the design and implementation of parallel algorithms. Several programming models have been proposed, but none at the moment seem to be substantially better than others. While general parallel programming is a distinctively challenging task, we believe that scientific computation algorithms display algebraic structures, thanks to the rich mathematical objects they manipulate. The present work aims at exploring the extent to which algebraic properties displayed by computer algebra algorithms may be automatically exploited to take advantage of parallelism in the OpenAxiom scientific computation platform. We designed a runtime system that exploits the ubiquitous parallelism of modern CPUs; the system is also scaled to many-system clusters. By taking advantage of the existing InputForm domain in OpenAxiom and connecting of the standard input channel to sockets, we were able to minimize potentially hazardous modifications to the OpenAxiom source while still implementing desired functionality. Additionally, we designed and implemented FFI extensions to the OpenAxiom core to take advantage of SIMD instructions, particularly SSE2 (SIMD Streaming Extensions). The extension allowed us to nearly double the speed of common operations such as multiplying arrays of doubles. We also defined and implemented a foreign function interface for the OpenAxiom system. All of these additions were benchmarked using Berlekamp's algorithm for factorization of polynomials over integers. While much still remains to be done in parallelizing the algebra to work over many calculation nodes, mathematical annotations remain viable in unloading the burden of parallelizing code from the programmer by substituting a simpler activity
Managing change in persistent object systems
Persistent object systems are highly-valued technology because they o er an e ec- tive foundation for building very long-lived persistent application systems (PAS). The technology becomes more e ective as it o ers a more consistently integrated computational context. For it to be feasible to design and construct a PAS it must be possible to in- crementally add program and data to the existing collection. For a PAS to endure it must o er exibility: a capacity to evolve and change. This paper examines the capacity of persistent object systems to accommodate incremental construction and change. Established store based technologies can support incremental construction but methodologies are needed to deploy them e ectively. Evolving data description is one motivation for inheritance but inheritance alone is not enough to support change management. The case for supporting incremental change is very persuasive. The challenge is to provide technologies that will facilitate it and methodologies that will organise it. This paper identi es change absorbers as a means of describing how changes should propagate. It is argued that if we systematically develop an adequate reper- toire of change absorbers then they will facilitate much better quality change man- agement
Techniques in Active and Generic Software Libraries
Reusing code from software libraries can reduce the time and effort to construct software
systems and also enable the development of larger systems. However, the benefits
that come from the use of software libraries may not be realized due to limitations in
the way that traditional software libraries are constructed. Libraries come equipped
with application programming interfaces (API) that help enforce the correct use of
the abstractions in those libraries. Writing new components and adapting existing
ones to conform to library APIs may require substantial amounts of "glue" code that
potentially affects software's efficiency, robustness, and ease-of-maintenance. If, as a
result, the idea of reusing functionality from a software library is rejected, no benefits
of reuse will be realized.
This dissertation explores and develops techniques that support the construction
of software libraries with abstraction layers that do not impede efficiency. In many
situations, glue code can be expected to have very low (or zero) performance overhead.
In particular, we describe advances in the design and development of active libraries
- software libraries that take an active role in the compilation of the user's code.
Common to the presented techniques is that they may "break" a library API (in a
controlled manner) to adapt the functionality of the library for a particular use case.
The concrete contributions of this dissertation are: a library API that supports
iterator selection in the Standard Template Library, allowing generic algorithms to
find the most suitable traversal through a container, allowing (in one case) a 30-fold improvement in performance; the development of techniques, idioms, and best practices
for concepts and concept maps in C++, allowing the construction of algorithms
for one domain entirely in terms of formalisms from a second domain; the construction
of generic algorithms for algorithmic differentiation, implemented as an active
library in Spad, language of the Open Axiom computer algebra system, allowing algorithmic
differentiation to be applied to the appropriate mathematical object and
not just concrete data-types; and the description of a static analysis framework to
describe the generic programming notion of local specialization within Spad, allowing
more sophisticated (value-based) control over algorithm selection and specialization
in categories and domains.
We will find that active libraries simultaneously increase the expressivity of the
underlying language and the performance of software using those libraries