scholarly journals Verification of Program Transformations with Inductive Refinement Types

2021 ◽  
Vol 30 (1) ◽  
pp. 1-33
Author(s):  
Ahmad Salim Al-Sibahi ◽  
Thomas P. Jensen ◽  
Aleksandar S. Dimovski ◽  
Andrzej Wąsowski

High-level transformation languages like Rascal include expressive features for manipulating large abstract syntax trees: first-class traversals, expressive pattern matching, backtracking, and generalized iterators. We present the design and implementation of an abstract interpretation tool, Rabit, for verifying inductive type and shape properties for transformations written in such languages. We describe how to perform abstract interpretation based on operational semantics, specifically focusing on the challenges arising when analyzing the expressive traversals and pattern matching. Finally, we evaluate Rabit on a series of transformations (normalization, desugaring, refactoring, code generators, type inference, etc.) showing that we can effectively verify stated properties.

2021 ◽  
Vol 5 (ICFP) ◽  
pp. 1-29
Author(s):  
Richard A. Eisenberg ◽  
Guillaume Duboc ◽  
Stephanie Weirich ◽  
Daniel Lee

Despite the great success of inferring and programming with universal types, their dual—existential types—are much harder to work with. Existential types are useful in building abstract types, working with indexed types, and providing first-class support for refinement types. This paper, set in the context of Haskell, presents a bidirectional type-inference algorithm that infers where to introduce and eliminate existentials without any annotations in terms, along with an explicitly typed, type-safe core language usable as a compilation target. This approach is backward compatible. The key ingredient is to use strong existentials, which support (lazily) projecting out the encapsulated data, not weak existentials accessible only by pattern-matching.


1978 ◽  
Vol 13 (5) ◽  
pp. 46-55 ◽  
Author(s):  
D. R. Ditzel
Keyword(s):  

2020 ◽  
Vol 53 (9) ◽  
pp. 147-160
Author(s):  
Ahmad Salim Al-Sibahi ◽  
Thomas P. Jensen ◽  
Aleksandar S. Dimovski ◽  
Andrzej Wąsowski
Keyword(s):  

2008 ◽  
Vol 18 (3) ◽  
pp. 501-553 ◽  
Author(s):  
DAVID SABEL ◽  
MANFRED SCHMIDT-SCHAUSS

We present a higher-order call-by-need lambda calculus enriched with constructors, case expressions, recursive letrec expressions, a seq operator for sequential evaluation and a non-deterministic operator amb that is locally bottom-avoiding. We use a small-step operational semantics in the form of a single-step rewriting system that defines a (non-deterministic) normal-order reduction. This strategy can be made fair by adding resources for book-keeping. As equational theory, we use contextual equivalence (that is, terms are equal if, when plugged into any program context, their termination behaviour is the same), in which we use a combination of may- and must-convergence, which is appropriate for non-deterministic computations. We show that we can drop the fairness condition for equational reasoning, since the valid equations with respect to normal-order reduction are the same as for fair normal-order reduction. We develop a number of proof tools for proving correctness of program transformations. In particular, we prove a context lemma for both may- and must- convergence that restricts the number of contexts that need to be examined for proving contextual equivalence. Combining this with so-called complete sets of commuting and forking diagrams, we show that all the deterministic reduction rules and some additional transformations preserve contextual equivalence. We also prove a standardisation theorem for fair normal-order reduction. The structure of the ordering ≤c is also analysed, and we show that Ω is not a least element and ≤c already implies contextual equivalence with respect to may-convergence.


1992 ◽  
Vol 21 (393) ◽  
Author(s):  
Jens Palsberg ◽  
Michael I. Schwartzbach

Binding time analysis is important in partial evaluators. Its task is to determine which parts of a program can be specialized if some of the expected input is known. Two approaches to do this are abstract interpretation and type inference. We compare two specific such analyses to see which one determines most program parts to be eliminable. The first is the abstract interpretation approach of Bondorf, and the second is the type inference approach o£ Gomard. Both apply to the untyped lambda calculus. We prove that Bondorf's analysis is better than Gomard's.


2000 ◽  
Vol 11 (01) ◽  
pp. 65-87
Author(s):  
MASATOMO HASHIMOTO

This paper develops an ML-style programming language with first-class contexts i.e. expressions with holes. The crucial operation for contexts is hole-filling. Filling a hole with an expression has the effect of dynamic binding or macro expansion which provides the advanced feature of manipulating open program fragments. Such mechanisms are useful in many systems including distributed/mobile programming and program modules. If we can treat a context as a first-class citizen in a programming language, then we can manipulate open program fragments in a flexible and seamless manner. A possibility of such a programming language was shown by the theory of simply typed context calculus developed by Hashimoto and Ohori. This paper extends the simply typed system of the context calculus to an ML-style polymorphic type system, and gives an operational semantics and a sound and complete type inference algorithm.


2017 ◽  
Vol 18 (1) ◽  
pp. 1-29
Author(s):  
WŁODZIMIERZ DRABENT

AbstractThis paper presents an example of formal reasoning about the semantics of a Prolog program of practical importance (the SAT solver of Howe and King). The program is treated as a definite clause logic program with added control. The logic program is constructed by means of stepwise refinement, hand in hand with its correctness and completeness proofs. The proofs are declarative – they do not refer to any operational semantics. Each step of the logic program construction follows a systematic approach to constructing programs which are provably correct and complete. We also prove that correctness and completeness of the logic program is preserved in the final Prolog program. Additionally, we prove termination, occur-check freedom and non-floundering.Our example shows how dealing with “logic” and with “control” can be separated. Most of the proofs can be done at the “logic” level, abstracting from any operational semantics.The example employs approximate specifications; they are crucial in simplifying reasoning about logic programs. It also shows that the paradigm of semantics-preserving program transformations may be not sufficient. We suggest considering transformations which preserve correctness and completeness with respect to an approximate specification.


Author(s):  
N. Belala ◽  
D.E. Saїdouni ◽  
R. Boukharrou ◽  
A.C. Chaouche ◽  
A. Seraoui ◽  
...  

The design of real-time systems needs a high-level specification model supporting at the same time timing constraints and actions duration. The authors introduce in this paper an extension of Petri Nets called Time Petri Nets with Action Duration (DTPN) where time is associated with transitions. In DTPN, the firing of transitions is bound to a time interval and transitions represent actions which have explicit durations. The authors give an operational semantics for DTPN in terms of Durational Action Timed Automata (DATA). DTPN considers both timing constraints and durations under a true-concurrency semantics with an aim of better expressing concurrent and parallel behaviours of real-time systems.


2008 ◽  
Vol 43 (1) ◽  
pp. 51-62 ◽  
Author(s):  
Katherine F. Moore ◽  
Dan Grossman

Author(s):  
A. DE LUCIA ◽  
G. TORTORA ◽  
M. TUCCI

This paper presents the software development workbench WSDW (Web structure-oriented Software Development Workbench) together with the tool development language TDL. WSDW is an integrated structure-oriented software environment which contains several tools for software evolution. The integration of tools is achieved by sharing a program representation which is based upon the mathematical concept of relation: the web structure is the basic high level representation of programs within the environment. The TDL language is a structure-oriented language that supports the creation of a wide variety of tools both for software development and maintenance. The elementary statements in a TDL program are web rewriting rules and manipulations of programs are expressed as web transformations. Moreover, to make program transformations more intuitive to the tool programmer, web rewriting rules are expressed graphically. Each tool in WSDW performs a sequence of web transformations and new software tools can be implemented as TDL programs and integrated into WSDW.


Sign in / Sign up

Export Citation Format

Share Document