Finite-Tree Analysis for Constraint Logic-Based Languages: The Complete Unabridged Version
Roberto Bagnara, Roberta Gori, Patricia M. Hill, and Enea Zaffanella

TL;DR
This paper introduces a new data-flow analysis method for logic programming languages that use rational trees, enabling automatic detection of variables bound to finite terms to improve program analysis and correctness.
Contribution
It presents a novel abstract interpretation-based analysis that determines which program variables are guaranteed to be finite, addressing issues with infinite rational trees.
Findings
The analysis accurately identifies finite variables in logic programs.
It improves the safety and correctness of program analysis involving rational trees.
The method enhances the efficiency of logic language implementations.
Abstract
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 occurs-check) 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 built-in and library predicates are ill-defined for such trees and need to be supplemented by run-time checks whose cost may be significant. Moreover, some widely-used 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Logic, Reasoning, and Knowledge
