Cost analysis of logic programs

Saumya Debray, Nai-Wei Lin · ACM Transactions on Programming Languages and Systems · 1993

Cost analysis of programs has been studied in the context of imperative and functional programming languages. For logic programs, the problem is complicated by the fact that programs may be nondeterministic and produce multiple solutions. A related problem is that because failure of execution is not an abnormal situation, it is possible to write programs where implicit failures have to be dealt with explicitly in order to get meaningful results. This paper addresses these problems and develops a method for (semi-)automatic analysis of the worst-case cost of a large class of logic programs. The primary contribution of this paper is the development of techniques to deal with nondeterminism and the generation of multiple solutions via backtracking. Applications include program transformation and synthesis, software engineering, and in parallelizing compilers. Categories and Subject Descriptors: D.1 [Software]: Programming Techniques; D.1.6 [Program- ming Techniques]: Logic Progra...

Read the paper · More papers on PaperTik