Citation
Bueno Carrillo, Francisco and Hermenegildo, Manuel V. and López García, Pedro
(2010).
Automatic Inference of Determinacy and Mutual Exclusion
for Logic Programs Using Mode and Type Analyses.
"New generation computing", v. 28
(n. 2);
pp. 117-206.
ISSN 0288-3635.
https://doi.org/10.1007/s00354-008-0085-1.
Abstract
We propose an analysis for detecting procedures and goals
that are deterministic (i.e., that produce at most one solution at most once),or predicates whose clause tests are mutually exclusive (which implies that at most one of their clauses will succeed) even if they are not deterministic.
The analysis takes advantage of the pruning operator in order to improve the detection of mutual exclusion and determinacy. It also supports arithmetic equations and disequations, as well as equations and disequations on terms,for which we give a complete satisfiability testing algorithm, w.r.t. available type information. Information about determinacy can be used for program debugging and optimization, resource consumption and granularity control,
abstraction carrying code, etc. We have implemented the analysis and integrated it in the CiaoPP system, which also infers automatically the mode and type information that our analysis takes as input. Experiments performed on this implementation show that the analysis is fairly accurate and efficient.