scispace - formally typeset
Journal ArticleDOI

Deciding Context Unification

Artur Jeż
- 16 Oct 2019 - 
- Vol. 66, Iss: 6, pp 1-45
Reads0
Chats0
TLDR
The technique is generalized to trees, and the corresponding algorithm is generalized from word equations to context unification, which shows that context unification is in PSPACE (in EXPTIME , when tree regular constraints are also allowed).
Abstract
In first-order term unification, variables represent well-formed terms over a given signature, and we are to solve equations built using function symbols from the signature and such variables; this problem is well-known to be decidable (in linear time). In second-order term unification, the variables take arguments (i.e., other terms) and a substitution uses those arguments an arbitrary number of times; for instance, an equation f(X(c),X(c)) = X(f(c,c)) has a solution X = b, where b is a special symbol denoting the place in which the argument is substituted. Under this substitution, both sides evaluate to f(c,c). There are other solutions, for instance X = f(b,b), which evaluates both sides tof(f(c,c),f(c,c)); in general, a solution that evaluates both sides to full binary tree of arbitrary height is easy to construct. Second-order unification is in general undecidable. Context unification is a natural problem in between first- and second-order unification—we deal with equations over terms, the variables take arguments, but we restrict the set of solutions: The argument is used exactly once. Formally, contexts are terms with exactly one occurrence of the special symbol b and in context unification, we are given an equation over terms with variables representing contexts and ask about the satisfiability of this equation. For instance, when the aforementioned equation f(X(c),X(c)) = X(f(c,c)) is treated as a context unification problem, then it has exactly one solution: X = b. Other substitutions that are solutions of it as an instance of the second-unification problem, say X = f(b, b), are not valid, as b is used more than once. Context unification also generalizes satisfiability of word equations, which is decidable (in PSPACE). The decidability status of context unification remained unknown for almost two decades. In this article, we show that context unification is in PSPACE (in EXPTIME , when tree regular constraints are also allowed). Those results are obtained by extending the recently developed recompression technique, which was previously defined for strings and used to obtain a new PSPACE algorithm for satisfiability of word equations. In this article, the technique is generalized to trees, and the corresponding algorithm is generalized from word equations to context unification. The idea of recompression is to apply simple compression rules (replacing pairs of neighboring function symbols) to the solution of the context equation; to this end, we appropriately modify the equation (without the knowledge of the actual solution) so compressing the solution can be simulated by compressing parts of the equation. It is shown that if the compression operations are appropriately chosen, then the size of the instance is polynomial during the whole algorithm, thus giving a PSPACE-upper bound.

read more

Citations
More filters
Journal ArticleDOI

Word equations in non-deterministic linear space

TL;DR: In this article, it was shown that satisfiability of word equations is in non-deterministic linear space, thus the language of satisfiable word equations was context-sensitive.
Journal ArticleDOI

Word equations in non-deterministic linear space

TL;DR: In this paper , it was shown that satisfiability of word equations is in non-deterministic linear space, thus the language of satisfiable word equations was context-sensitive.
Journal Article

Linear Second-Order Unification and Context Unification with tree-regular constraints

TL;DR: In this paper, it was shown that linear second-order unification can be reduced to context unification with tree-regular constraints, and that context unification is a restriction of linear secondorder unification.
Posted Content

Pattern Matching on Grammar-Compressed Strings in Linear Time.

TL;DR: In this article, a linear-time algorithm was proposed for the problem of pattern matching in the context of text processing, which can be solved in O(n+m) time.
Journal ArticleDOI

Some techniques for reasoning automatically on co-inductive data structures

TL;DR: In this paper , a sound axiomatization of conservative extensions of co-inductive structures is proposed, which reduces the problem of checking whether a formula admits a coinductive model to a first-order satisfiability test.
References
More filters
Journal ArticleDOI

The Problem of Solvability of Equations in a Free Semigroup

TL;DR: In this paper, an algorithm for recognizing the solvability of arbitrary equations in a free semigroup is presented, and the algorithm is shown to be efficient in the presence of arbitrary variables.
Journal ArticleDOI

The undecidability of the second-order unification problem

TL;DR: It is shown that there is no effective procedure for determining whether or not two terms of the language of second-order logic have a common instance.
Journal ArticleDOI

Finite automata and unary languages

TL;DR: It is proved that O(e √ n log n ) states are sufficient to simulate an n -state 1nfa recognizing a unary language by a 1dfa and the lower bound is the same.
Journal ArticleDOI

Satisfiability of word equations with constants is in PSPACE

TL;DR: It is proved that satisfiability problem for word equations is in PSPACE, and the solution to this problem can be deduced from the inequality of the EPTs.
Proceedings ArticleDOI

Logic programs as types for logic programs

TL;DR: It is argued that this approach unifies the denotational and operational approaches to descriptive type systems and is simpler and more natural than previous approaches.