Properties such as logging, persistence, debugging, tracing, distribution, performance monitoring and exception handling occur in most programming paradigms and are normally very difficult or even impossible to modula...
详细信息
Properties such as logging, persistence, debugging, tracing, distribution, performance monitoring and exception handling occur in most programming paradigms and are normally very difficult or even impossible to modularize with traditional modularization mechanisms because they are crosscutting. Recently, aspect-oriented programming has enjoyed recognition as a practical solution for separating these concerns. In this paper we describe an extension to the Stratego term rewriting language for capturing such properties. We show our aspect language offers a concise, practical and adaptable solution for dealing with unanticipated algorithm extension for forward data-flow propagation and dynamic type checking of terms. We briefly discuss some of the challenges faced when designing and implementing an aspect extension for and in a rule-based term rewriting system.
We describe our efforts to use rule-based programming to produce a model of Jumbo, a run-time program generation (RTPG) system for Java. Jumbo incorporates RTPG following the simple principle that the regular compiler...
详细信息
We describe our efforts to use rule-based programming to produce a model of Jumbo, a run-time program generation (RTPG) system for Java. Jumbo incorporates RTPG following the simple principle that the regular compiler - or, rather, its back-end - can be used both for ordinary, static compilation and for run-time compilation. This tends to produce a run-time compiler that is inefficient but potentially subject to improvement by partial evaluation. However, the complexity of the language and compiler have made it difficult for us to achieve actual optimization. The model, written in Maude, preserves all the essential ingredients of Jumbo, but operates on a simplified language, called Mumbo. The simplification in the language together with Maude's support for code rewriting has allowed us to make rapid progress. We discuss the model in detail, the kinds of optimizations we have obtained, and the impact on the Jumbo project.
In this paper, rule-based programming is explored in the field of automated generation of chemical reaction mechanisms. We explore a class of graphs and a graph rewriting relation where vertices are preserved and only...
详细信息
In this paper, rule-based programming is explored in the field of automated generation of chemical reaction mechanisms. We explore a class of graphs and a graph rewriting relation where vertices are preserved and only edges are changed. We show how to represent cyclic labeled graphs by decorated labeled trees or forests, then how to transform trees into terms. A graph rewriting relation is defined, then simulated by a tree rewriting relation, which can be in turn simulated by a rewriting relation on equivalence classes of terms. As a consequence, this kind of graph rewriting can be implemented using term rewriting. This study is motivated by the design of the GasEl system for the generation of kinetics reactions mechanisms. In GasEl, chemical reactions correspond to graph rewrite rules and are implemented by conditional rewriting rules in ELAN. The control of their application is done through the ELAN strategy language.
rule-based programming experiences renaissance due to its applications in areas such as Business rules, Semantic Web, Computational Biology, Verification and Security. Executable rules are used in declarative programm...
详细信息
ISBN:
(纸本)9781595933881
rule-based programming experiences renaissance due to its applications in areas such as Business rules, Semantic Web, Computational Biology, Verification and Security. Executable rules are used in declarative programming languages, in program transformation and analysis, and for reasoning in artificial intelligence *** Handling rules (CHR) [6, 8, 11] is a concurrent committed-choice constraint logic programming language consisting of guarded rules that transform multi-sets of atomic formulas (constraints) into simpler ones until exhaustion. CHR was initially developed for solving constraints, but has matured into a general-purpose concurrent constraint language over the last decade, because it can embed many rule-based formalisms and describe algorithms in a declarative way. The clean semantics of CHR facilitates non-trivial program analysis and transformation
We describe the foundations of a system for rule-based programming which integrates two powerful mechanisms: (1) matching with context variables, sequence variables, and regular constraints for their matching values;a...
详细信息
We describe the foundations of a system for rule-based programming which integrates two powerful mechanisms: (1) matching with context variables, sequence variables, and regular constraints for their matching values;and (2) strategic programming with labeled rules. The system is called ρLog, and is built on top of the pattern matching and rule-based programming capabilities of Mathematica.
We study here schedulers for a class of rules that naturally arise in the context of rule-based constraint programming. We systematically derive a scheduler for them from a generic iteration algorithm of Apt (2000). W...
详细信息
We study here schedulers for a class of rules that naturally arise in the context of rule-based constraint programming. We systematically derive a scheduler for them from a generic iteration algorithm of Apt (2000). We apply this study to so-called membership rules of Apt and Monfroy (2001). This leads to an implementation that yields a considerably better performance for these rules than their execution as standard CHR rules. Finally, we show how redundant rules can be identified and how appropriately reduced sets of rules can be computed.
The aim of this paper is to gain a better understanding of the impact of simplification on a sequential model of activity-scheduling behavior which uses feature-selection methods. To that effect, the predictive perfor...
详细信息
The aim of this paper is to gain a better understanding of the impact of simplification on a sequential model of activity-scheduling behavior which uses feature-selection methods. To that effect, the predictive performance of the Albatross model, which incorporates nine different facets of activity-travel behavior, based on the original full decision trees, is compared with the performance of the model based on trimmed decision trees. The results indicate that significantly smaller decision trees can be used for modeling the different choice facets of the sequential model system without losing much in predictive power. The performance of the models is compared at three levels: the choice-facet level, the activity-pattern level (comparing the observed and generated sequences of activities), and the trip-matrix level, comparing the correlation coefficients that determine the strength of the associations between the observed and the predicted origin-destination matrices. The results indicate that the model based on the trimmed decision trees predicts activity-diary schedules with a minimum loss of accuracy at the decision level. Moreover, the results indicate a slightly better performance at the activity-pattern and the trip-matrix level.
We are interested in evolution scenarios for language-based functionality. We identify different dimensions along which such functionality can evolve, including the following: (i) coding style;(ii) coding details;(iii...
详细信息
We are interested in evolution scenarios for language-based functionality. We identify different dimensions along which such functionality can evolve, including the following: (i) coding style;(ii) coding details;(iii) data model;(iv) crosscutting concerns;and (v) patches. We focus at language interpreters as examples of language-based functionality, but similar scenarios exist for type checkers, static analyses, program transformations, and other sorts of language-based functionality. Our experiences are based on using rule-based programming (with Prolog) for the implementation of language-based functionality, while evolutionary transformations of the functionality are perceived as meta-programs.
This paper is an introduction to rule-based programming in Maude. We illustrate in particular the use of operator attributes to structure the state of a system, and the difference between equations and rules. We use w...
详细信息
This paper is an introduction to rule-based programming in Maude. We illustrate in particular the use of operator attributes to structure the state of a system, and the difference between equations and rules. We use well-known mathematical games and puzzles for our examples illustrating the expressive power of Maude.
We work through a sequence of evolution scenarios for language-based functionality implemented as rule-based programs. We identify and illustrate different dimensions along which such functionality can evolve, includi...
详细信息
We work through a sequence of evolution scenarios for language-based functionality implemented as rule-based programs. We identify and illustrate different dimensions along which such functionality can evolve, including the following: (i) coding style;(ii) coding details;(iii) data model;(iv) crosscutting concerns;and (v) patches. We focus at language interpreters as examples of language-based functionality, but similar scenarios exist for type checkers, static analyses, program transformations, and other sorts of language-based functionality. We opt for Prolog as the rule-based programming language used for the implementation of language-based functionality. We employ the Prolog-basedrule Evolution Kit (REK) for the operationalisation of the evolution scenarios by means of evolutionary transformations. We compile a list of exercises that are meant to help with the digestion of the scenarios and with the further exploration of the overall subject.
暂无评论