Analysis of Logic Programs Using Regular Tree Languages - (Extended Abstract)
نویسنده
چکیده
The field of finite tree automata provides fundamental notations and tools for reasoning about set of terms called regular or recognizable tree languages. We consider two kinds of analysis using regular tree languages, applied to logic programs. The first approach is to try to discover automatically a tree automaton from a logic program, approximating its minimal Herbrand model. In this case the input for the analysis is a program, and the output is a tree automaton. The second approach is to expose or check properties of the program that can be expressed by a given tree automaton. The input to the analysis is a program and a tree automaton, and the output is an abstract model of the program. These two contrasting abstract interpretations can be used in a wide range of analysis and verification problems. Finite Tree Automata A tree language is a set of trees, commonly represented as terms. Terms are ubiquitous in computing, representing entities as diverse as data structures, computation trees, and computation states. Here we consider only finite terms. Informally, a finite tree automaton (FTA) is a mathematical machine for recognising terms. FTAs provide a means of finitely specifying possibly infinite sets of ground terms, just as finite state automata specify sets of strings. Detailed definitions, algorithms and complexity results can be found in the literature [1]. An FTA includes a grammar for trees given by transition rules of the form f(q1, . . . , qn)→ q, where f is a function symbol from a given signature Σ and q, q1, . . . , qn are states of the automaton. This rules states that a term f(t1, . . . , tn) is accepted by at state q of the FTA if t1, . . . , tn are accepted at states q1, . . . , qn respectively. If q is a final state, then the term f(t1, . . . , tn) is recognised by the FTA. A notational variant of FTAs is given by alternating tree automata, though the class of recognisable terms is the same as for FTAs. For the purposes of static analysis, a subset of alternating tree automata we call conjunctive FTA (CFTA) is useful. In a CFTA, transition rules have the form f(C1, . . . , Cn)→ q, which is like an FTA transition except that C1, . . . , Cn are nonempty sets of automata states. Such a rule states that a term f(t1, . . . , tn) is accepted at state ? Supported by Danish Research Council grants FNU 272-06-0574, FNU 10-084290.
منابع مشابه
Alternating Regular Tree Grammars in the Framework of Lattice-Valued Logic
In this paper, two different ways of introducing alternation for lattice-valued (referred to as {L}valued) regular tree grammars and {L}valued top-down tree automata are compared. One is the way which defines the alternating regular tree grammar, i.e., alternation is governed by the non-terminals of the grammar and the other is the way which combines state with alternation. The first way is ta...
متن کاملPolymorphic Type Analysis in Logic Programs by Abstract Interpretation1
domains and their associated abstract operators. Some examples are to be found in [6, 22, 24, 27, 28]. Most type analysis systems infer descriptive types. A descriptive type is a description of a set of terms by an expression in a type language. Different type analysis systems may use different type languages. Most of them use regular types or deterministic regular types [16] in one form or ano...
متن کاملProgram analysis and specialisation using tree automata
Static analysis of programs using regular tree grammars has been studied for more than 30 years, the earliest example being Reynolds’ work on automatic derivation of data-type definitions from untyped functional programs. Recently the topic has attracted renewed attention, with applications in program specialisation, data flow analysis, shape analysis, mode and type inference, termination analy...
متن کاملVisibly Pushdown Expression Effects for XML Stream Processing
We define an effect system, based upon visibly pushdown languages (VPLs), for a programming language that processes streams of tokens with parenthesis-like matching, as found in XML documents or s-expressions. The effect analysis ensures that programs read and write words in which tokens match, despite the fact that tokens are read and written individually. In particular, the novel treatment of...
متن کاملAbstract Interpretation over Non-deterministic Finite Tree Automata for Set-Based Analysis of Logic Programs
Interpretation over Non-Deterministic Finite Tree Automata for Set-Based Analysis of Logic Programs John P. Gallagher German Puebla Abstract Interpretation over Non-Deterministic Finite TreeInterpretation over Non-Deterministic Finite Tree Automata for Set-Based Analysis of Logic Programs John P. Gallagher and Germ an Puebla 1 University of Bristol, Dept. of Computer Science, BS8 1UB Bristol, U...
متن کامل