45,121 research outputs found
Extending Context-Sensitivity in Term Rewriting
We propose a generalized version of context-sensitivity in term rewriting
based on the notion of "forbidden patterns". The basic idea is that a rewrite
step should be forbidden if the redex to be contracted has a certain shape and
appears in a certain context. This shape and context is expressed through
forbidden patterns. In particular we analyze the relationships among this novel
approach and the commonly used notion of context-sensitivity in term rewriting,
as well as the feasibility of rewriting with forbidden patterns from a
computational point of view. The latter feasibility is characterized by
demanding that restricting a rewrite relation yields an improved termination
behaviour while still being powerful enough to compute meaningful results.
Sufficient criteria for both kinds of properties in certain classes of rewrite
systems with forbidden patterns are presented
Singular and Plural Functions for Functional Logic Programming
Functional logic programming (FLP) languages use non-terminating and
non-confluent constructor systems (CS's) as programs in order to define
non-strict non-determi-nistic functions. Two semantic alternatives have been
usually considered for parameter passing with this kind of functions: call-time
choice and run-time choice. While the former is the standard choice of modern
FLP languages, the latter lacks some properties---mainly
compositionality---that have prevented its use in practical FLP systems.
Traditionally it has been considered that call-time choice induces a singular
denotational semantics, while run-time choice induces a plural semantics. We
have discovered that this latter identification is wrong when pattern matching
is involved, and thus we propose two novel compositional plural semantics for
CS's that are different from run-time choice.
We study the basic properties of our plural semantics---compositionality,
polarity, monotonicity for substitutions, and a restricted form of the bubbling
property for constructor systems---and the relation between them and to
previous proposals, concluding that these semantics form a hierarchy in the
sense of set inclusion of the set of computed values. We have also identified a
class of programs characterized by a syntactic criterion for which the proposed
plural semantics behave the same, and a program transformation that can be used
to simulate one of them by term rewriting. At the practical level, we study how
to use the expressive capabilities of these semantics for improving the
declarative flavour of programs. We also propose a language which combines
call-time choice and our plural semantics, that we have implemented in Maude.
The resulting interpreter is employed to test several significant examples
showing the capabilities of the combined semantics.
To appear in Theory and Practice of Logic Programming (TPLP)Comment: 53 pages, 5 figure
Automatic Sequences and Zip-Specifications
We consider infinite sequences of symbols, also known as streams, and the
decidability question for equality of streams defined in a restricted format.
This restricted format consists of prefixing a symbol at the head of a stream,
of the stream function `zip', and recursion variables. Here `zip' interleaves
the elements of two streams in alternating order, starting with the first
stream. For example, the Thue-Morse sequence is obtained by the
`zip-specification' {M = 0 : X, X = 1 : zip(X,Y), Y = 0 : zip(Y,X)}. Our
analysis of such systems employs both term rewriting and coalgebraic
techniques. We establish decidability for these zip-specifications, employing
bisimilarity of observation graphs based on a suitably chosen cobasis. The
importance of zip-specifications resides in their intimate connection with
automatic sequences. We establish a new and simple characterization of
automatic sequences. Thus we obtain for the binary zip that a stream is
2-automatic iff its observation graph using the cobasis (hd,even,odd) is
finite. The generalization to zip-k specifications and their relation to
k-automaticity is straightforward. In fact, zip-specifications can be perceived
as a term rewriting syntax for automatic sequences. Our study of
zip-specifications is placed in an even wider perspective by employing the
observation graphs in a dynamic logic setting, leading to an alternative
characterization of automatic sequences. We further obtain a natural extension
of the class of automatic sequences, obtained by `zip-mix' specifications that
use zips of different arities in one specification. We also show that
equivalence is undecidable for a simple extension of the zip-mix format with
projections like even and odd. However, it remains open whether zip-mix
specifications have a decidable equivalence problem
Termination of Rewriting with Right-Flat Rules Modulo Permutative Theories
We present decidability results for termination of classes of term rewriting
systems modulo permutative theories. Termination and innermost termination
modulo permutative theories are shown to be decidable for term rewrite systems
(TRS) whose right-hand side terms are restricted to be shallow (variables occur
at depth at most one) and linear (each variable occurs at most once). Innermost
termination modulo permutative theories is also shown to be decidable for
shallow TRS. We first show that a shallow TRS can be transformed into a flat
(only variables and constants occur at depth one) TRS while preserving
termination and innermost termination. The decidability results are then proved
by showing that (a) for right-flat right-linear (flat) TRS, non-termination
(respectively, innermost non-termination) implies non-termination starting from
flat terms, and (b) for right-flat TRS, the existence of non-terminating
derivations starting from a given term is decidable. On the negative side, we
show PSPACE-hardness of termination and innermost termination for shallow
right-linear TRS, and undecidability of termination for flat TRS.Comment: 20 page
On Constructor Rewrite Systems and the Lambda Calculus
We prove that orthogonal constructor term rewrite systems and lambda-calculus
with weak (i.e., no reduction is allowed under the scope of a
lambda-abstraction) call-by-value reduction can simulate each other with a
linear overhead. In particular, weak call-by- value beta-reduction can be
simulated by an orthogonal constructor term rewrite system in the same number
of reduction steps. Conversely, each reduction in a term rewrite system can be
simulated by a constant number of beta-reduction steps. This is relevant to
implicit computational complexity, because the number of beta steps to normal
form is polynomially related to the actual cost (that is, as performed on a
Turing machine) of normalization, under weak call-by-value reduction.
Orthogonal constructor term rewrite systems and lambda-calculus are thus both
polynomially related to Turing machines, taking as notion of cost their natural
parameters.Comment: 27 pages. arXiv admin note: substantial text overlap with
arXiv:0904.412
Definitions by Rewriting in the Calculus of Constructions
The main novelty of this paper is to consider an extension of the Calculus of
Constructions where predicates can be defined with a general form of rewrite
rules. We prove the strong normalization of the reduction relation generated by
the beta-rule and the user-defined rules under some general syntactic
conditions including confluence. As examples, we show that two important
systems satisfy these conditions: a sub-system of the Calculus of Inductive
Constructions which is the basis of the proof assistant Coq, and the Natural
Deduction Modulo a large class of equational theories.Comment: Best student paper (Kleene Award
- …