Next: Introduction
Prop : A C++ -based Pattern Matching Language
Allen Leung
Courant Institute of Mathematical Sciences
Abstract:
In this paper we introduce Prop , a
multiparadigm extension of C++ with
Standard ML-style algebraic datatypes and pattern matching,
tree rewriting, DATALOG-style forward chaining inference,
and constraint logical programming. Applications
written in Prop can utilize various cooperating
formalisms, integrated into the object oriented paradigm of the base
language. We use efficient automata-based and semantics
based algorithms to generate various pattern matching
constructs into efficient and lightweight C++ programs.
Interoperability with the base language
is achieved transparently since all high level data structures in Prop
are mapped into classes. Furthermore, we
use conservative garbage collection schemes to minimize interaction
with existing code by eliminating the need for manual storage
management. Typical Prop program sources are 2--10 times more
compact than equivalent programs written in C++ .
Our benchmarks also show that programs written in Prop 's high level
formalisms are competitive with native C++ programs.
Keywords: pattern matching, object-oriented
programming, rewriting, semantic based optimization, compiler generation
Allen Leung
Wed Mar 6 20:55:43 EST 1996