next up previous
Next: Related work Up: Prop : A Previous: Prop : A

Introduction

In this paper we introduce Prop , an extension of C++ [Str91,] that includes string matching, algebraic datatypes, Standard ML-style pattern matching[HMM86,RMH90,,], pretty printing, tree rewriting[SPvE93], DATALOG-style inference[], constraint logic programming[] and simple persistence as built-in features. Prop is designed as a development language for interpreters, compilers, and language translation and transformation tools[ASU86,]. It simplifies the construction of these systems by providing high level declarative and rule based formalisms on top of the traditional procedural and object-oriented paradigms of the base language.

We design Prop with two main objectives in mind: the first is to improve the productivity of programmers working in a mainstream imperative language --- especially in domains heavy in symbolic manipulation such as interpreters, compilers, program analysis and transformation --- by introducing high level formalisms based on trees and graphs, equational programming, finite set theory, and logic. By providing the users with a wide array of high level data structures and program combining forms, we encourage the use of the appropriate level of abstraction in each component of a language processing system. Rather than being restricted to a single imperative mode of thinking, users can utilize applicative, transformational, equational, deductive, imperative or even a combination of formalisms in a large system. For example, syntactic analysis can be performed with the parsing/lexical analysis constructs of Prop ; semantic analysis with pattern matching, tree rewriting, and inference; optimization with the SETL-style sublanguage; and, finally, code generation and machine language level tools development with tree reduction with dynamic programming[] and pattern matching with bitstring[].

The second objective is high performance, portability and full backward compatibility with C++ . To make this possible, all features are translated into C++ with a source to source translator written in Prop itself, using efficient automata-based and semantics-based algorithms. Maximal compatibility with the base language is maintained by mapping all Prop 's high level data structures of directly into C++ classes. Programs written in Prop are lightweight and efficient: i.e. unneeded features are never included in the runtime system of a program, and those that are included are first transformed into interpretation free C++ code. Programs written in Prop can readily utilize existing code and libraries with little change. An optional conservative garbage collector based on [ED93,AF] can also be linked into the runtime system for Prop programs that desire automatic memory reclamation.

Prop will appeal to two main groups of users. The first are programmers working in C++ but are seeking to incorporate higher level tools without abandoning existing libraries and object oriented frameworks. The second are programmers working in other high level languages but would like to integrate with C++ to take advantage of the abundance of tools and libraries while not giving up all the high level features present in the former languages.





next up previous
Next: Related work Up: Prop : A Previous: Prop : A



Allen Leung
Wed Mar 6 20:55:43 EST 1996