Hostname: page-component-6766d58669-kn6lq Total loading time: 0 Render date: 2026-05-16T14:13:11.196Z Has data issue: false hasContentIssue false

Linear pattern matching of compressed terms and polynomial rewriting

Published online by Cambridge University Press:  02 August 2018

MANFRED SCHMIDT-SCHAUß*
Affiliation:
Institut für Informatik, Fachbereich Informatik und Mathematik, Johann Wolfgang Goethe-Universität, Postfach 11 19 32, D-60054 Frankfurt, Germany Email: schauss@cs.uni-frankfurt.de

Abstract

We consider term rewriting under sharing in the form of compression by singleton tree grammars (STG), which is more general than the term dags. Algorithms for the subtasks of rewriting are analysed: finding a redex for rewriting by locating a position for a match, performing a rewrite step by constructing the compressed result and executing a sequence of rewrite steps. The first main result is that locating a match of a linear term s in another term t can be performed in polynomial time if s, t are both STG-compressed. This generalizes results on matching of STG-compressed terms, matching of straight-line-program-compressed strings with character-variables, where every variable occurs at most once, and on fully compressed matching of strings. Also, for the case where s is directed-acyclic-graph (DAG)-compressed, it is shown that submatching can be performed in polynomial time. The general case of compressed submatching can be computed in non-deterministic polynomial time, and an algorithm is described that may be exponential in the worst case, its complexity is nO(k), where k is the number of variables with double occurrences in s and n is the size of the input. The second main result is that in case there is an oracle for the redex position, a sequence of m parallel or single-step rewriting steps under STG-compression can be performed in polynomial time. This generalizes results on DAG-compressed rewriting sequences. Combining these results implies that for an STG-compressed term rewrite system with left-linear rules, m parallel or single-step term rewrite steps can be performed in polynomial time in the input size n and m.

Information

Type
Paper
Copyright
Copyright © Cambridge University Press 2018 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Article purchase

Temporarily unavailable