Partial Evaluation of Order-Sorted Equational Programs Modulo Axioms
نویسندگان
چکیده
Partial evaluation (PE) is a powerful and general program optimization technique with many successful applications. However, it has never been investigated in the context of expressive rule-based languages like Maude, CafeOBJ, OBJ, ASF+SDF, and ELAN, which support: 1) rich type structures with sorts, subsorts and overloading; 2) equational rewriting modulo axioms such as commutativity, associativity–commutativity, and associativity–commutativity–identity. In this extended abstract, we illustrate the key concepts by showing how they apply to partial evaluation of expressive rule-based programs written in Maude. Our partial evaluation scheme is based on an automatic unfolding algorithm that computes term variants and relies on equational least general generalization for ensuring global termination. We demonstrate the use of the resulting partial evaluator for program optimization on several examples where it shows significant speed-ups.
منابع مشابه
A modular order-sorted equational generalization algorithm
Generalization, also called anti-unification, is the dual of unification. Given terms t and t′, a generalization is a term t′′ of which t and t′ are substitution instances. The dual of a most general unifier (mgu) is that of least general generalization (lgg). In this work, we extend the known untyped generalization algorithm to, first, an order-sorted typed setting with sorts, subsorts, and su...
متن کاملProving Ground Confluence of Equational Specifications Modulo Axioms
Terminating functional programs should be deterministic, i.e., should evaluate to a unique result, regardless of the evaluation order. For equational functional programs such determinism is exactly captured by the ground confluence property. For terminating equations this is equivalent to ground local confluence, which follows from local confluence. Checking local confluence by computing critic...
متن کاملOperational Termination of Membership Equational Programs: the Order-Sorted Way
Our main goal is automating termination proofs for programs in rewriting-based languages with features such as: (i) expressive type structures, (ii) conditional rules, (iii) matching modulo axioms, and (iv) contextsensitive rewriting. Specifically, we present a new operational termination method for membership equational programs with features (i)-(iv) that can be applied to programs in members...
متن کاملOn the Church-Rosser and Coherence Properties of Conditional Order-Sorted Rewrite Theories1
In the effort to bring rewriting-based methods into contact with practical applications both in programing and in formal verification, there is a tension between: (i) expressiveness and generality—so that a wide range of applications can be expressed easily and naturally—, and (ii) support for formal verification, which is harder to get for general and expressive specifications. This paper answ...
متن کاملIncremental Checking of Well-Founded Recursive Speci cations Modulo Axioms
We introduce the notion of well-founded recursive order-sorted equational logic (OS) theories modulo axioms. Such theories de ne functions by well-founded recursion and are inherently terminating. Moreover, for well-founded recursive theories important properties such as con uence and su cient completeness are modular for so-called fair extensions. This enables us to incrementally check these p...
متن کامل