Abstract
Mode and data dependency analyses find many applications in the generation of efficient executable code for logic programs. For example, mode information can be used to generate specialized unification instructions where permissible, to detect determinacy and functionality of programs, generate index structures more intelligently, reduce the amount of runtime tests in systems that support goal suspension, and in the integration of logic and functional languages. Data dependency information can be used for various source-level optimizing transformations, to improve backtracking behavior and to parallelize logic programs. This paper describes and proves correct an algorithm for the static inference of modes and data dependencies in a program. The algorithm is shown to be quite efficient for programs commonly encountered in practice.
- 1 BRUYNOOGHE, M., DEMOEN, B., CALLEBAUT, A., AND JANSSENS, C. Abstract interpretation: Towards the global optimization of Prolog programs. In Proceedings of the Fourth IEEE Symposium on Logic Programming (San Francisco, Sept. 1987). IEEE, New York, 1987.Google Scholar
- 2 CHANG, J., DESPAIN, A. M., AND DEGROOT, D. AND-parallelism of logic programs based on a static data dependency analysis. In Digest of Papers, Compcon 85 (Feb. 1985). IEEE, New York, 1985.Google Scholar
- 3 CHANG, J., AND DESPAIN, A.M. Semi-intelligent backtracking of Prolog based on static data dependency analysis. In Proceedings of the 1985 Symposium on Logic Programming (Boston, July 1985). IEEE, New York, 1985, pp. 10-21.Google Scholar
- 4 COUSOT, P., AND COUSOT, R. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proceedings of the Fourth Annual ACM Symposium on Principles of Programming Languages (1977). ACM, New York, 1977, pp. 238-252. Google Scholar
- 5 DEBRAY, S. K. Synthesizing control strategies for AND-parallel logic programs. Tech. Rep. 87-12, Dept. of Computer Science, Univ. of Arizona, Tucson, May 1987.Google Scholar
- 6 DEBRAY, S. K., AND WARREN, D. S. Automatic mode inference for logic programs, J. Logic Program. 5, 3 (Sept. 1988), 207-229. Google Scholar
- 7 DEBRA~, S.K. Unfold/fold transformations and loo~, optimization of logic programs. In Proceedings of the ACM SIGPLAN 1988 Conference on P 'ogramming Language Design and Implementation (Atlanta, Ga., June 1988). ACM, New York, 1988, 297-307. SIGPLAN Not. 23, 7. Google Scholar
- 8 DEBRAY, S. $., AND MISHRA, P. Denotational and operational semantics for Prolog. J. Logic Program. 5, I (Mar. 1988), 61-91. Google Scholar
- 9 DEBRAY, S. $., AND WARREN, D.S. Functional computations in logic programs. ACM Trans. Program. Lang. Syst. This issue, pp. 418-450. Google Scholar
- 10 DEERAY, S.K. Flow analysis of dynamic logic programs. J. Logic Program. 1989. To appear. (Preliminary version in Proceedings of the Fourth IEEI~ Symposium on Logic Programming (San Francisco, Sept. 1987)). Google Scholar
- 11 DERANSART, P., AND MAEUSZYNSKI, J. Relating logic programs and attribute grammars. J. Logic Program. 2, 2 (July 1985), 119-156.Google Scholar
- 12 DIETRICH, S.W. Extension tables: Memo relations in logic programming. In Proceedings of the Fourth IEEE Symposium on Logic Programming (San ?rancisco, Sept. 1987). IEEE, New York, 1987, pp. 264-272.Google Scholar
- 13 JANSSENS, G., AND BRUYNOOGHE, M. An instance o ~ abstract interpretation integrating type and mode inferencing. In Proceedings of the Fifth International Conference on Logic Programming (Seattle, Wash., Aug. 1988). MIT Press, Cambridge, Mass., 1988, pp. 669-683.Google Scholar
- 14 JONES, N. D., AND MYCROFT, A. Stepwise development of operational and denotational semantics for PROLOG. In Proceedings of the 1984 International Symposium on Logic Programming (Atlantic City, N.J., Feb. 1984). IEEE, New York, 1984, pp. 289-298.Google Scholar
- 15 MANNILA, H., AND UKKONEN, E. Flow analysis of Prolog programs. In Proceedings of the Fourth IEEE Symposium on Logic Programming (San ?rancisco, Sept. 1987). IEEE, New York, 1987.Google Scholar
- 16 MELLISH, C. S. The automatic generation of mode declarations for Prolog programs. DAI Research Paper 163, Dept. of Artificial Intelligence, Univ. of Edinburgh, Aug. 1981.Google Scholar
- 17 MELL!SH, C.S. Some global optimizations for a Prolog compiler. J. Logic Program. 2, I (Apr. 1985), 43-66.Google Scholar
- 18 MELLISH, C. S. Abstract interpretation of Prolog ~rograms. In Proceedings of the Third International Logic Programming Conference (London, July 1986). LNCS 225, Springer, New York, 1986. Google Scholar
- 19 NAISH, L. Negation and Control in Prolog. LNCS 238, Springer, New York, 1986. Google Scholar
- 20 PLAISTED, D. The occur-check problem in Prolog. In Proceedings of the 1984 International Symposium on Logic Programming (Atlantic City, N.J., Feb. 1984). IEEE, New York, 1984, pp. 272-280.Google Scholar
- 21 REDD~, U.S. Transformation of logic programs into fimctional programs. In Proceedings of the 1984 International Symposium on Logic Programming (Atlantic City, N.J., Feb. 1984). IEEE, New York, 1984, pp. 187-196.Google Scholar
- 22 SONDERGAARD, H. An application of abstract interp :etation of logic programs: Occur check reduction. In Proceedings ESOP '86 (Saarbrucken, Mar 1986). Google Scholar
- 23 Sicstus Prolog User's Manual. Swedish Institute of Co mputer Science, Sweden, Sept. 1987.Google Scholar
- 24 TAMAKI, H., ANO SATO, T. OLD-resolution with tabulation. In Proceedings of the Third International Conference on Logic Programming (Londcn, July 1986). LNCS 225, Springer, New York, 1986. Google Scholar
- 25 VAN ROY, P., DEMOEN, B., AND WILLEMS, Y.D. Improving the execution speed of compiled Prolog with modes, clause selection and determinism. In Proceedings of TAPSOFT 1987 (Pisa, Mar. 1987). Google Scholar
- 26 WARREN, D. H.D. Implementing Prolog--compiling predicate logic programs. Res. Reps. 39 and 40, Dept. of Artificial Intelligence, Univ. of Edinbu~'gh, 1977.Google Scholar
- 27 WARREN, R., HERMENEGILDO, M., AND DEBRAY, S. K. On the practicality of global flow analysis of logic programs. In Proceedings of the Fifth In~ ernational Conference on Logic P~'ogramming (Seattle, Wash., Aug. 1988). MIT Press, Cambridge, Mass., 1988.Google Scholar
Index Terms
- Static inference of modes and data dependencies in logic programs
Recommendations
SLGAD Resolution for Inference on Logic Programs with Annotated Disjunctions
RCRA 2008 Experimental Evaluation of Algorithms for Solving Problems with Combinatorial ExplosionLogic Programs with Annotated Disjunctions (LPADs) allow to express probabilistic information in logic programming. The semantics of an LPAD is given in terms of the well-founded models of the normal logic programs obtained by selecting one disjunct ...
Logic programming as classical inference
We propose a denotational semantics for logic programming based on a classical notion of logical consequence which is apt to capture the main proposed semantics of logic programs. In other words, we show that any of those semantics can be viewed as a ...
Comments