Abstract
This paper presents a technique for compiling a Horn-clause program intended for exhaustive search into a GHC (Guarded Horn Clauses) program. The technique can be viewed also as a transformation technique for Prolog programs which compiles away the ‘bagof’ primitive and non-determinate bindings. The class of programs to which our technique is applicable is shown with a static checking algorithm; it is nontrivial and could be extended. An experiment on a compiler-based Prolog system showed that our technique improved the efficiency of exhaustive search by 6 times for a permutation generator program. This compilation technique is important also in that it exploits the AND-parallelism of GHC for parallel search.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Bowen, D. L., Byrd, L., Perira, F. C. N., Pereira, L. M. and Warren, D. H. D.,DECsystem-10 Prolog User’s Manual (Bowen, D. L. ed.), Dept. of Artificial Intelligence, Univ. of Edinburgh, 1983.
Carlsson, M., “On Implementing Prolog in Functional Programming,”Proc. 1984 Int. Symp. on Logic Programming, IEEE Computer Society, pp. 154–159, 1984.
Ciepielewski, A. and Haridi, S., “A Formal Model for OR-Parallel Execution of Logic Programs,”Proc. IFIP ’83 (Mason, R. E. A., ed.), Elsevier Science Publishers B. V., Amsterdam, pp. 299–305, 1983.
Clark, K. L. and Gregory, S., “PARLOG: Parallel Programming in Logic,”Research Report DOC 84/4, Dept. of Computing Imperial College of Science and Technology, London, 1984. Also inACM Trans. Prog. Lang. Syst., Vol. 8, No. 1, pp. 1–49, 1986.
Clark, K. L. and Gregory, S., “Notes on the Implementation of PARLOG,”Research Report DOC 84/16, Dept. of Computing, Imperial College of Science and Technology, London, 1984. Also inJ. of Logic Programming, Vol. 2, No. 1, pp. 17–42, 1985.
Hirakawa, H., Chikayama, T. and Furukawa, K., “Eager and Lazy Enumerations in Concurrent Prolog,Proc. Second Int. Logic Programming Conf., Uppsala Univ., Sweden, pp. 89–100, 1984.
Lloyd, J. W.,Foundations of Logic Programming, Springer-Verlag, Berlin, Heidelberg, New York, Tokyo, 1984.
Naish, L., “All Solution Predicates in Prolog,”Proc. 1985 Symp. on Logic Programming, IEEE Computer Society, pp. 73–77, 1985.
Reddy, U. S., “Transformation of Logic Programs into Functional Programs,”Proc. 1984 Int. Symp. on Logic Programming, IEEE Computer Society, pp. 187–196, 1984.
Shapiro, E. Y., “A Subset of Concurrent Prolog and Its Interpreter,”ICOT Tech. Report TR-003, Institute for New Generation Computer Technology, Tokyo, 1983.
Ueda, K., “Guarded Horn Clauses,”ICOT Tech. Report TR-103, Institute for New Generation Computer Technology, Tokyo, 1985. Also inProc. Logic Programming ’85 (Wada E., ed.), Lecture Notes in Computer Science 221, Springer-Verlag, Berlin, Heidelberg, pp. 168–179, 1986.
Ueda, K., “Guarded Horn Clauses,”Doctoral Thesis, Information Engineering Course, Faculty of Engineering, Univ. of Tokyo, 1986.
Ueda, K., “Guarded Horn Clauses: A Parallel Logic Programming Language with the Concept of a Guard,”ICOT Tech. Report TR-208, Institute for New Generation Computer Technology, Tokyo, 1986.
Ueda, K. and Chikayama, T., “Concurrent Prolog Compiler on Top of Prolog,”Proc. 1985 Symp. on Logic Programming, IEEE Computer Society, pp. 119–126, 1985.
Warren, D. H. D., “Higher-order extensions to PROLOG: are they needed?,” inMachine Intelligence, 10 (Hayes, J. E., Mitchie, D. and Pao, Y.-H., eds.), Ellis Horwood, Chichester, England, pp. 441–454, 1982.
Author information
Authors and Affiliations
About this article
Cite this article
Ueda, K. Making exhaustive search programs deterministic. New Gener Comput 5, 29–44 (1987). https://doi.org/10.1007/BF03037456
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF03037456