Results 1 
5 of
5
FiniteTree Analysis for Constraint LogicBased Languages: The Complete Unabridged Version
, 2001
"... Logic languages based on the theory of rational, possibly infinite, trees have much appeal in that rational trees allow for faster unification (due to the safe omission of the occurscheck) and increased expressivity (cyclic terms can provide very efficient representations of grammars and other usef ..."
Abstract

Cited by 44 (16 self)
 Add to MetaCart
Logic languages based on the theory of rational, possibly infinite, trees have much appeal in that rational trees allow for faster unification (due to the safe omission of the occurscheck) and increased expressivity (cyclic terms can provide very efficient representations of grammars and other useful objects). Unfortunately, the use of infinite rational trees has problems. For instance, many of the builtin and library predicates are illdefined for such trees and need to be supplemented by runtime checks whose cost may be significant. Moreover, some widelyused program analysis and manipulation techniques are correct only for those parts of programs working over finite trees. It is thus important to obtain, automatically, a knowledge of the program variables (the finite variables) that, at the program points of interest, will always be bound to finite terms. For these reasons, we propose here a new dataflow analysis, based on abstract interpretation, that captures such information. We present a parametric domain where a simple component for recording finite variables is coupled, in the style of the open product construction of Cortesi et al., with a generic domain (the parameter of the construction) providing sharing information. The sharing domain is abstractly specified so as to guarantee the correctness of the combined domain and the generality of the approach. This finitetree analysis domain is further enhanced by coupling it with a domain of Boolean functions, called finitetree dependencies, that precisely captures how the finiteness of some variables influences the finiteness of other variables. We also summarize our experimental results showing how finitetree analysis, enhanced with finitetree dependencies, is a practical means of obtaining precise finitenes...
Parsing and Compiling Using Prolog
 ACM Transactions on Programming Languages and Systems
, 1987
"... This paper presents the material needed for exposing the reader to the advantages of using Prolog as a language for describing succinctly most of the algorithms needed in prototyping and implementing compilers or producing tools that facilitate this task. The available published material on the subj ..."
Abstract

Cited by 28 (2 self)
 Add to MetaCart
(Show Context)
This paper presents the material needed for exposing the reader to the advantages of using Prolog as a language for describing succinctly most of the algorithms needed in prototyping and implementing compilers or producing tools that facilitate this task. The available published material on the subject describes one particular approach in implementing compilers using Prolog. It consists of coupling actions to recursive descent parsers to produce syntaxtrees which are subsequently utilized in guiding the generation of assembly language code. Although this remains a worthwhile approach, there is a host of possibilities for Prolog usage in compiler construction. The primary aim of this paper is to demonstrate the use of Prolog in parsing and compiling. A second, but equally important, goal of this paper is to show that Prolog is a laborsaving tool in prototyping and implementing many nonnumerical algorithms which arise in compiling, and whose description using Prolog is not available in the literature. The paper discusses the use of unification and nondeterminism in compiler writing as well as means to bypass these (costly) features when they are deemed unnecessary. Topics covered include bottomup and topdown parsers, syntaxdirected translation, grammar properties, parser generation, code generation, and optimixations. Newly proposed features that are useful in compiler construction are also discussed. A knowledge of Prolog is assumed.
Rational Term Equality, Functionally
"... Abstract. This paper presents an elegant purely functional algorithm for deciding the equality of rational terms. The algorithm adapts Hopcroft and Karp’s classic algorithm for equality of finite state automata to structured graph representation of rational terms. 1 ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
(Show Context)
Abstract. This paper presents an elegant purely functional algorithm for deciding the equality of rational terms. The algorithm adapts Hopcroft and Karp’s classic algorithm for equality of finite state automata to structured graph representation of rational terms. 1
Tabling, Rational Terms, and Coinduction Finally Together!
, 2003
"... Tabling is a commonly used technique in logic programming for avoiding cyclic behavior of logic programs and enabling more declarative program definitions. Furthermore, tabling often improves computational performance. Rational term are terms with one or more infinite subterms but with a finite rep ..."
Abstract
 Add to MetaCart
(Show Context)
Tabling is a commonly used technique in logic programming for avoiding cyclic behavior of logic programs and enabling more declarative program definitions. Furthermore, tabling often improves computational performance. Rational term are terms with one or more infinite subterms but with a finite representation. Rational terms can be generated in Prolog by omitting the occurs check when unifying two terms. Applications of rational terms include definite clause grammars, constraint handling systems, and coinduction. In this paper, we report our extension of YAP’s Prolog tabling mechanism to support rational terms. We describe the internal representation of rational terms within the table space and prove its correctness. We then use this extension to implement a tabling based approach to coinduction. We compare our approach with current coinductive transformations and describe the implementation. In addition, we present an algorithm that ensures a canonical representation for rational terms.