90 research outputs found
Unification and Matching on Compressed Terms
Term unification plays an important role in many areas of computer science,
especially in those related to logic. The universal mechanism of grammar-based
compression for terms, in particular the so-called Singleton Tree Grammars
(STG), have recently drawn considerable attention. Using STGs, terms of
exponential size and height can be represented in linear space. Furthermore,
the term representation by directed acyclic graphs (dags) can be efficiently
simulated. The present paper is the result of an investigation on term
unification and matching when the terms given as input are represented using
different compression mechanisms for terms such as dags and Singleton Tree
Grammars. We describe a polynomial time algorithm for context matching with
dags, when the number of different context variables is fixed for the problem.
For the same problem, NP-completeness is obtained when the terms are
represented using the more general formalism of Singleton Tree Grammars. For
first-order unification and matching polynomial time algorithms are presented,
each of them improving previous results for those problems.Comment: This paper is posted at the Computing Research Repository (CoRR) as
part of the process of submission to the journal ACM Transactions on
Computational Logic (TOCL)
Decidable Classes of Tree Automata Mixing Local and Global Constraints Modulo Flat Theories
We define a class of ranked tree automata TABG generalizing both the tree
automata with local tests between brothers of Bogaert and Tison (1992) and with
global equality and disequality constraints (TAGED) of Filiot et al. (2007).
TABG can test for equality and disequality modulo a given flat equational
theory between brother subterms and between subterms whose positions are
defined by the states reached during a computation. In particular, TABG can
check that all the subterms reaching a given state are distinct. This
constraint is related to monadic key constraints for XML documents, meaning
that every two distinct positions of a given type have different values. We
prove decidability of the emptiness problem for TABG. This solves, in
particular, the open question of the decidability of emptiness for TAGED. We
further extend our result by allowing global arithmetic constraints for
counting the number of occurrences of some state or the number of different
equivalence classes of subterms (modulo a given flat equational theory)
reaching some state during a computation. We also adapt the model to unranked
ordered terms. As a consequence of our results for TABG, we prove the
decidability of a fragment of the monadic second order logic on trees extended
with predicates for equality and disequality between subtrees, and cardinality.Comment: 39 pages, to appear in LMCS journa
The HOM problem is EXPTIME-complete
We define a new class of tree automata with constraints and prove decidability of the emptiness problem for this class in exponential time. As a consequence, we obtain several EXPTIME-completeness results for problems on images of regular tree languages under tree homomorphisms, like set inclusion, regularity (HOM problem), and finiteness of set difference. Our result also has implications in term rewriting, since the set of reducible terms of a term rewrite system can be described as the image of a tree homomorphism. In particular, we prove that inclusion of sets of normal forms of term rewrite systems can be decided in exponential time. Analogous consequences arise in the context of XML typechecking, since types are defined by tree automata and some type transformations are homomorphic.Peer ReviewedPostprint (published version
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
Automated deduction with built-in theories: completeness results and constraint solving techniques
Postprint (published version
Desenvolupament d'un sistema de gestió d'energia per a una microxarxa híbrida
La humanitat s’enfrontarà en els propers anys al repte de canviar el seu model energètic pel canvi climàtic global. Entre moltes altres propostes, les microxarxes ja són una realitat que pot ajudar a mitigar els seus efectes per la seva capacitat d’integrar producció energètica provinent de fonts renovables, a més d’aportar molts altres avantatges al funcionament del sistema elèctric.
Aquest projecte té la finalitat de dissenyar un sistema de gestió energètica (EMS) per a una microxarxa híbrida i simular-lo mitjançant xarxes de Petri. El disseny d’aquest gestor es basa en el concepte d’eficiència energètica i s’ha desenvolupat seguint la norma ISO 50001:2011 i el procés de millora contínua que aquesta proposa.
Inicialment, s’ha desenvolupat un EMS per a una microxarxa híbrida intel·ligent genèrica amb connexió a la xarxa elèctrica convencional, un generador dièsel de suport, generació fotovoltaica i un sistema d’emmagatzematge de bateries.
Una vegada simulat aquest EMS mitjançant xarxes de Petri i assegurat el seu funcionament adequat per a qualsevol aplicació possible, s’ha pre-dimensionat una microxarxa en un escenari concret – Palestina – per a observar l’actuació de l’EMS en totes les situacions possibles i comprovar que les polítiques energètiques i estratègies seguides són complertes en la seva totalitat
Automatic evaluation of top-down predictive parsing
We develop efficient methods to check whether two given Context-Free Grammars (CFGs) are transformed into parsers that recognize the same language and construct the same Abstract Syntax Trees (ASTs) for each input. In this setting, we consider a model of top-down predictive parser generator with directives for AST construction that is a simplified variant of PCCTS/ANTLR3. As an application, we implement an
evaluator for an online judge with educational purposes in the context of a Compilers course.Preprin
Closure of Tree Automata Languages under Innermost Rewriting
International audiencePreservation of regularity by a term rewriting system (TRS) states that the set of reachable terms from a tree automata (TA) language (aka regular term set) is also a TA language. It is an important and useful property, and there have been many works on identifying classes of TRS ensuring it; unfortunately, regularity is not preserved for restricted classes of TRS like shallow TRS. Nevertheless, this property has not been studied for important strategies of rewriting like the innermost strategy -- which corresponds to the {\em call by value} computation of programming languages. We prove that the set of innermost-reachable terms from a TA language by a shallow TRS is not necessarily regular, but it can be recognized by a TA with equality and disequality constraints between brothers. As a consequence we conclude decidability of regularity of the reachable set of terms from a TA language by innermost rewriting and shallow TRS. This result is in contrast with plain (not necessarily innermost) rewriting for which we prove undecidability. We also show that, like for plain rewriting, innermost rewriting with linear and right-shallow TRS preserves regularity
Context unification with one context variable
AbstractThe context unification problem is a generalization of standard term unification. It consists of finding a unifier for a set of term equations containing first-order variables and context variables. In this paper we analyze the special case of context unification where the use of at most one context variable is allowed and show that it is in NP. The motivation for investigating this subcase of context unification is interprocedural program analysis for programs described using arbitrary terms, generalizing the case where terms were restricted to using unary function symbols. Our results imply that the redundancy problem is in coNP, and that the finite redundancy property holds in this case. We also exhibit particular cases where one context unification is polynomial
- …