DocumentCode
2185769
Title
An Extension of the Interpreter Pattern to Define Domain-Parametric Rewriting Systems
Author
Capra, Lorenzo ; Stile, Vincenzo
Author_Institution
Dipt. di Inf., Univ. degli Studi di Milano, Milan, Italy
fYear
2013
fDate
23-26 Sept. 2013
Firstpage
185
Lastpage
192
Abstract
The Interpreter design pattern provides an elegant and natural way of implementing systems based on term-rewriting in a OO fashion. The idea is simply associating each term of a language, either terminal or non-terminal, with a corresponding class provided with a suitable simplify() method.Reducing a term to a normal form is thus performed through a series of recursive calls to such a method.The main weakness of this approach is that it does not take into account similarities existing among different domains, thus enforcing programmers to pollute generic and domain-specific rules. The resulting code if often wordy, hard to maintain, non-reusable. In this paper we adapt the Interpreter pattern so that a clean separation between generic (common to different domains) and domain-specific rules is possible. The new pattern significantly helps design even complex rewriting systems. A running example which refers to a generic Logical domain is used throughout the paper. An application to High Level Petri nets analysis is sketched. Without any loss of generality we refer to Java as representative of a large class of languages.
Keywords
Java; object-oriented methods; program interpreters; rewriting systems; Java; OO fashion; domain-parametric rewriting systems; domain-specific rules; generic logical domain; interpreter pattern; term-rewriting; Abstracts; Boolean algebra; Concrete; Engines; Grammar; Java; Production facilities; Intepreter; design patterns; generic programming; rewriting systems;
fLanguage
English
Publisher
ieee
Conference_Titel
Symbolic and Numeric Algorithms for Scientific Computing (SYNASC), 2013 15th International Symposium on
Conference_Location
Timisoara
Print_ISBN
978-1-4799-3035-7
Type
conf
DOI
10.1109/SYNASC.2013.32
Filename
6821149
Link To Document