## Determinacy Analysis for Logic Programs Using Mode and Type Information (2004)

### Cached

### Download Links

- [clip.dia.fi.upm.es]
- [www.clip.dia.fi.upm.es]
- [clip.dia.fi.upm.es]
- [www.clip.dia.fi.upm.es]
- DBLP

### Other Repositories/Bibliography

Venue: | In Proceedings of the 14th International Symposium on Logic-based Program Synthesis and Transformation (LOPSTR’04), number 3573 in LNCS |

Citations: | 14 - 5 self |

### BibTeX

@INPROCEEDINGS{López-garcía04determinacyanalysis,

author = {P. López-garcía and F. Bueno and M. Hermenegildo},

title = {Determinacy Analysis for Logic Programs Using Mode and Type Information},

booktitle = {In Proceedings of the 14th International Symposium on Logic-based Program Synthesis and Transformation (LOPSTR’04), number 3573 in LNCS},

year = {2004},

publisher = {Springer-Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

Abstract. We propose an analysis for detecting procedures and goals that are deterministic (i.e. that produce at most one solution), 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 (because they call other predicates that can produce more than one solution). Applications of such determinacy information include detecting programming errors, performing certain high-level program transformations for improving search efficiency, optimizing low level code generation and parallel execution, and estimating tighter upper bounds on the computational costs of goals and data sizes, which can be used for program debugging, resource consumption and granularity control, 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.

### Citations

11502 |
Computers and Intractability, A Guide to the Theory of NPCompleteness
- Garey, Johnson
- 1979
(Show Context)
Citation Context ...ogramming problems in this way, it follows that the mutual exclusion problem for linear integer tests is decidable. Since determining whether an integer programming problem is solvable is NP-complete =-=[9]-=-, the following complexity result is immediate: Theorem 3. The mutual exclusion problem for linear arithmetic tests over the integers is co-NP-hard. It should be noted, however, that the vast majority... |

227 |
Unification revisited
- Lassez, Maher, et al.
- 1987
(Show Context)
Citation Context ... set of tuples of terms Den(S) is equal to the set of solutions of τ). 1. Let θ be the substitution associated with the solved form of E (this can be computed by using the techniques of Lassez et al. =-=[19]-=-). 2. Let θi, for 1 ≤ i ≤ n, be the substitution associated with the solved form of E ∧ Ni, where Ni is the negation of Di. 3. S = A ⊗ comp(B1) ⊗ · · · ⊗ comp(Bn), where A = (¯x)θ and Bi = (¯x)θi, for... |

200 | The execution algorithm of Mercury, an efficient purely declarative logic programming language
- Somogyi, Henderson, et al.
- 1996
(Show Context)
Citation Context ...development. If we assume that the programmer has indicated that certain predicates should be deterministic for certain calling patterns (using suitable assertions as those used in Ciao [24], Mercury =-=[27]-=-, or HAL [7]) and a predicate is determined to be non-deterministic in one of those cases then, clearly, a compile-time error has been detected and can be reported [14, 12]. This is quite useful since... |

188 |
A practical algorithm for exact array dependence analysis
- Pugh
- 1992
(Show Context)
Citation Context .... Herbrand mutual exclusion is checked by a naive direct implementation of the analyses presented. Testing of mutual exclusion for linear arithmetic tests is implemented directly using the Omega test =-=[25]-=-. This test determines whether there is an integer solution to an arbitrary set of linear equalities and inequalities, referred to as a problem. We have tested the prototype first on a number of simpl... |

126 |
Deriving descriptions of possible values of program variables by means of abstract interpretation
- Janssen, Bruynooghe
- 1992
(Show Context)
Citation Context ...the result of a previous analysis. A type refers to a set of terms, and can be denoted by using several type representations (e.g. type terms and regular term grammars as in [3], or type graphs as in =-=[17]-=- or simply predicates as in the Ciao system). We include below the definitions of type term, type rule, and deterministic type rule from [3], for a better understanding of the algorithms that we have ... |

121 | Cost analysis of logic programs
- Debray, Lin
- 1993
(Show Context)
Citation Context ...dition, performing data parallelism transformations [13]. Finally, determinacy (and mutual exclusion) information can be used to estimate much tighter upper bounds on the computational costs of goals =-=[5]-=-. Since it is generally not known in advance how many of the solutions generated by a predicate will be demanded, a conservative upper bound on the computational cost of a predicate can be obtained by... |

102 | Fast and Precise Regular Approximations of Logic Programs
- Gallagher, Waal
- 1994
(Show Context)
Citation Context ...the CiaoPP PLAI analyzer to derive mode information, using, for the reported experiments, the Sharing+Freeness domain [22], and an adaptation of Gallagher’s analysis to derive the types of predicates =-=[8]-=-. The resulting type- and mode-annotated programs are then analyzed using the algorithms presented for Herbrand and linear arithmetic tests. Herbrand mutual exclusion is checked by a naive direct impl... |

82 |
Andorra-I: A Parallel Prolog System that Transparently Exploits both And- and Or-Parallelism
- Costa, Warren, et al.
- 1991
(Show Context)
Citation Context ...rch efficiency. In particular, literals can be reordered so that deterministic goals are executed ahead of possibly non-deterministic goals where possible, improving the efficiency of parallel search =-=[26]-=-. Determinacy information is also very useful during program specialization. In addition, the implementation of (and-)parallelism is greatly simplified in presence of determinacy information: knowing ... |

81 |
Combined determination of sharing and freeness of program variables through abstract interpretation
- Muthukumar, Hermenegildo
- 1991
(Show Context)
Citation Context ...e and mode analysis (including the intervening type definitions). The system uses the CiaoPP PLAI analyzer to derive mode information, using, for the reported experiments, the Sharing+Freeness domain =-=[22]-=-, and an adaptation of Gallagher’s analysis to derive the types of predicates [8]. The resulting type- and mode-annotated programs are then analyzed using the algorithms presented for Herbrand and lin... |

65 | Parallel Execution of Prolog Programs: a Survey
- Gupta, Pontelli, et al.
(Show Context)
Citation Context ...entation of (and-)parallelism is greatly simplified in presence of determinacy information: knowing that a goal is deterministic allows one to eliminate significant run-time overhead (due to markers) =-=[15, 11, 23]-=- and, in addition, performing data parallelism transformations [13]. Finally, determinacy (and mutual exclusion) information can be used to estimate much tighter upper bounds on the computational cost... |

65 | Strict and Non-Strict Independent And-Parallelism in Logic Programs
- Hermenegildo, Rossi
- 1995
(Show Context)
Citation Context ...entation of (and-)parallelism is greatly simplified in presence of determinacy information: knowing that a goal is deterministic allows one to eliminate significant run-time overhead (due to markers) =-=[15, 11, 23]-=- and, in addition, performing data parallelism transformations [13]. Finally, determinacy (and mutual exclusion) information can be used to estimate much tighter upper bounds on the computational cost... |

63 |
A Regular Type Language for Logic Programs
- W, Zobel
- 1992
(Show Context)
Citation Context ...ilable, generally also as the result of a previous analysis. A type refers to a set of terms, and can be denoted by using several type representations (e.g. type terms and regular term grammars as in =-=[3]-=-, or type graphs as in [17] or simply predicates as in the Ciao system). We include below the definitions of type term, type rule, and deterministic type rule from [3], for a better understanding of t... |

61 | A Methodology for Granularity Based Control of Parallelism in Logic Programs
- López-Garcı́a, Hermenegildo, et al.
- 1996
(Show Context)
Citation Context ...the clauses is the sum of the cost of all literals in it, which simplifies the cost estimation (as explained in [5]). These upper bounds can be used for improved granularity control of parallel tasks =-=[20]-=- and for better performance/complexity debugging and verification of programs [14]. In this paper we propose a method whereby, given (upper approximations of) mode and type information, we can detect ... |

52 | Functional Computations in Logic Programs
- DEBRAY, WARREN
- 1989
(Show Context)
Citation Context ...tic). There has been much interest on determinacy detection in the literature (see [16] and its references), using several different forms of determinism. The line of work closest to ours starts with =-=[6]-=-, in which functional computations are detected and exploited. However, the notion of mutual exclusion in this work is not based on constraint satisfaction. This concept is used in the analysis presen... |

51 |
An Assertion Language for Constraint Logic Programs
- Puebla, Bueno, et al.
- 2000
(Show Context)
Citation Context ...xt of program development. If we assume that the programmer has indicated that certain predicates should be deterministic for certain calling patterns (using suitable assertions as those used in Ciao =-=[24]-=-, Mercury [27], or HAL [7]) and a predicate is determined to be non-deterministic in one of those cases then, clearly, a compile-time error has been detected and can be reported [14, 12]. This is quit... |

50 | 1983-1993: The Wonder Years of Sequential Prolog Implementation
- Roy
- 1994
(Show Context)
Citation Context ...ile time, determinacy inference can obviously be used to verify (i.e., prove correct) such determinacy assertions [14].sDeterminacy information can also be used for performing low-level optimizations =-=[28, 21, 27]-=- as well higher-level program transformations for improving search efficiency. In particular, literals can be reordered so that deterministic goals are executed ahead of possibly non-deterministic goa... |

45 | An overview of HAL
- Demoen, Banda, et al.
- 1999
(Show Context)
Citation Context ...If we assume that the programmer has indicated that certain predicates should be deterministic for certain calling patterns (using suitable assertions as those used in Ciao [24], Mercury [27], or HAL =-=[7]-=-) and a predicate is determined to be non-deterministic in one of those cases then, clearly, a compile-time error has been detected and can be reported [14, 12]. This is quite useful since certain cla... |

42 |
A Polynomial Time Algorithm for Solving Systems of Linear Inequalities with Two Variables per Inequality
- Aspavall, Shiloach
- 1980
(Show Context)
Citation Context ...where each inequality involves at most two variables, i.e., is of the form ax+by ≤ c, can be decided efficiently in polynomial time by examining the loops in a graph constructed from the inequalities =-=[1]-=-. The integer programming problems that arise in practice, in the context of mutual exclusion analysis, are therefore efficiently decidable. The ideas explained in this section for linear arithmetic o... |

34 | Cardinality analysis of Prolog
- Braem, Charlier, et al.
- 1994
(Show Context)
Citation Context ...re defined for the detection of mutual exclusion. The cut is not taken into account, either. In [10] a combined analysis of modes, types, and determinacy is presented, as well as in the more accurate =-=[2]-=-. As we will show, our analysis improves on these proposals. Several programming systems also make use of determinacy, e.g., Mercury [16] and HAL [7]. The Mercury and HAL systems allow the programmer ... |

34 | Determinism analysis in the mercury compiler
- Henderson, Somogyi, et al.
- 1996
(Show Context)
Citation Context ...hose used in Ciao [24], Mercury [27], or HAL [7]) and a predicate is determined to be non-deterministic in one of those cases then, clearly, a compile-time error has been detected and can be reported =-=[14, 12]-=-. This is quite useful since certain classes of programming errors often result in turning predicates intended to be deterministic into nondeterministic ones. Also, in addition to detecting programmin... |

32 | Program development using abstract interpretation (and the Ciao system preprocessor
- Hermenegildo, Puebla, et al.
(Show Context)
Citation Context ...hose used in Ciao [24], Mercury [27], or HAL [7]) and a predicate is determined to be non-deterministic in one of those cases then, clearly, a compile-time error has been detected and can be reported =-=[14, 12]-=-. This is quite useful since certain classes of programming errors often result in turning predicates intended to be deterministic into nondeterministic ones. Also, in addition to detecting programmin... |

25 |
Answer sets and negation as failure
- Kunen
- 1987
(Show Context)
Citation Context ...etic tests on integer variables. 4.1 Checking Mutual Exclusion in the Herbrand Domain We present a decision procedure for checking mutual exclusion of tests that is inspired by a result, due to Kunen =-=[18]-=-, that the emptiness problem is decidable for Boolean combinations of (notations for) certain “basic” subsets of the Herbrand universe of a program. It also uses straightforward adaptations of some op... |

23 | R.C.: Extracting Determinacy in Logic Programs - Dawson, Ramakrishnan, et al. - 1993 |

13 | Detecting Determinate Computation by Bottom-Up Abstract Interpretation
- Giacobazzi, Ricci
- 1992
(Show Context)
Citation Context ...satisfaction. This concept is used in the analysis presented in [4], where, nonetheless, no algorithms are defined for the detection of mutual exclusion. The cut is not taken into account, either. In =-=[10]-=- a combined analysis of modes, types, and determinacy is presented, as well as in the more accurate [2]. As we will show, our analysis improves on these proposals. Several programming systems also mak... |

13 | Improving the Compilation of Prolog to C Using Moded Types and Determinism Information
- Morales, Carro, et al.
- 2004
(Show Context)
Citation Context ...ile time, determinacy inference can obviously be used to verify (i.e., prove correct) such determinacy assertions [14].sDeterminacy information can also be used for performing low-level optimizations =-=[28, 21, 27]-=- as well higher-level program transformations for improving search efficiency. In particular, literals can be reordered so that deterministic goals are executed ahead of possibly non-deterministic goa... |

11 | Relating Data-Parallelism and (And-) Parallelism in Logic Programs
- HERMENEGILDO, CARRO
- 1996
(Show Context)
Citation Context ...acy information: knowing that a goal is deterministic allows one to eliminate significant run-time overhead (due to markers) [15, 11, 23] and, in addition, performing data parallelism transformations =-=[13]-=-. Finally, determinacy (and mutual exclusion) information can be used to estimate much tighter upper bounds on the computational costs of goals [5]. Since it is generally not known in advance how many... |

7 |
Improving the Efficiency of Nondeterministic And–parallel Systems
- Pontelli, Gupta, et al.
- 1996
(Show Context)
Citation Context ...entation of (and-)parallelism is greatly simplified in presence of determinacy information: knowing that a goal is deterministic allows one to eliminate significant run-time overhead (due to markers) =-=[15, 11, 23]-=- and, in addition, performing data parallelism transformations [13]. Finally, determinacy (and mutual exclusion) information can be used to estimate much tighter upper bounds on the computational cost... |

6 | Determinacy and determinacy analysis
- Hill, King
- 1997
(Show Context)
Citation Context ...eterministic because they call other predicates that can produce more than one solution (i.e. that are not deterministic). There has been much interest on determinacy detection in the literature (see =-=[16]-=- and its references), using several different forms of determinism. The line of work closest to ours starts with [6], in which functional computations are detected and exploited. However, the notion o... |