Skip to main content

Implementing logical variables on a graph reduction architecture

  • Relationship To Logic Programming
  • Conference paper
  • First Online:
Book cover Graph Reduction (GR 1986)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 279))

Included in the following conference series:

Abstract

Logical variables offer a semantic meeting ground between functional and logic programming languages. That is, if functional languages are extended to do parameter passage by unification, much of the power of AND-parallel logic programming is obtained. However, multi-path search, by OR-parallelism or backtracking, remains the province of logic programming.

We outline an implementation strategy for FGL+LV, a functional language with logical variables, on the Rediflow multiprocessing graph reduction architecture. The aspects of logical variables receiving special consideration include:

  1. a.

    parallel unification, especially proper treatment of indeterminate behavior, e.g. mutual exclusion on variable binding;

  2. b.

    variable binding through emulated graph node merging;

  3. c.

    exploitation of two levels of demand: assertive (during unification), and non-assertive (ordinary “read-only” usage), and

  4. d.

    avoidance of meaningless cyclic variable bindings.

The existing base language implementation can be smoothly extended, with a word size increase of only one bit (needed to implement two levels of demand). Lazy evaluation in the base language is retained, except that actual parameters are now made strict to one level of evaluation. This requirement, overlooked in a previous paper on this subject, is argued to be semantically and operationally inescapable in a functional language with logical variables. It also provides insight into the vexing problem of how to apply the occur check in a language with infinite data objects. A novel technique for merging cyclic lists is used to implement logical variable binding in a distributed manner without locking or busy waiting.

This material is based upon work supported by NSF Grant DCR-8506000, and a Shared University Research Grant from the IBM Corporation.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. H. Abramson. A prological definition of HASL, a purely functional language with unification based conditional binding expressions. In D. DeGroot and G. Lindstrom (editors), Logic Programming: Functions, Relations, and Equations. Prentice Hall, 1986.

    Google Scholar 

  2. K. L. Clark and S. Gregory. A relational language for parallel programming. Technical Report DOC 81/16, Imperial College, London, 1981.

    Google Scholar 

  3. S. H. Danforth. Logical variables for a functional language. Technical Report PP-120-85, Microelectronics and Computer Technology Corp., 1985.

    Google Scholar 

  4. J. Darlington, A. J. Field, and H. Pull. The unification of functional and logic languages. In D. DeGroot and G. Lindstrom (editors), Logic Programming: Functions, Relations, and Equations. Prentice Hall, 1986.

    Google Scholar 

  5. J. Goguen and J. Meseguer. EQLOG: equality, types, and generic modules for logic programming. In D. DeGroot and G. Lindstrom (editors), Logic Programming: Functions, Relations, and Equations. Prentice Hall, 1986.

    Google Scholar 

  6. R.M. Keller, G. Lindstrom, and S. Patil. A loosely-coupled applicative multi-processing system. In AFIPS Conference Proceedings, pages 613–622. June, 1979.

    Google Scholar 

  7. R.M. Keller and G. Lindstrom. Hierarchical analysis of a distributed evaluator. In Proc. International Conference on Parallel Processing, pages 299–310. August, 1980.

    Google Scholar 

  8. R.M. Keller and G. Lindstrom. Applications of feedback in functional programming. In. Conference on functional languages and computer architecture, pages 123–130. October, 1981.

    Google Scholar 

  9. R.M. Keller. FEL (Function Equation Language) programmer's guide. Technical Report 7, University of Utah, Department of Computer Science, AMPS Technical Memorandum, 1982.

    Google Scholar 

  10. R.M. Keller, F.C.H. Lin, and J. Tanaka. Rediflow multiprocessing. In IEEE Compcon '84, pages 410–417, Feb., 1984.

    Google Scholar 

  11. R. M. Keller and F. C. H. Lin. Simulated performance of a reduction-based multiprocessor. IEEE Computer 17(7):70–82, July, 1984.

    Google Scholar 

  12. G. Lindstrom. OR-parallelism on applicative architectures. In Sten-Ake Tarnlund (editor), Proc. Second International Logic Programming Conference, pages 159–170. Uppsala University, July, 1984.

    Google Scholar 

  13. G. Lindstrom. Functional programming and the logical variable. In Symposium on Principles of Programming Languages, pages 266–280. ACM, January, 1985.

    Google Scholar 

  14. R. Milner. A theory of type polymorphism. J. of Comp. and Sys. Sci. 17(3):348–375, 1978.

    Article  Google Scholar 

  15. R. S. Nikhil, K. Pingali, and Arvind. Id Nouveau. Technical Report Computation Structures Group Memo 265, MIT Laboratory for Computer Science, July, 1986.

    Google Scholar 

  16. U.S. Reddy. On the relationship between functional and logic languages. In D. DeGroot and G. Lindstrom (editors), Logic Programming: Functions, Relations, and Equations. Prentice Hall, 1986.

    Google Scholar 

  17. E.Y. Shapiro. A subset of Concurrent Prolog and its interpreter. Technical Report TR-003, Institute for New Generation Computer Technology, January, 1983.

    Google Scholar 

  18. Shapiro, E., and A. Takeuchi. Object ortented programming in Concurrent Prolog. New Generation Computing 1(1):25–48, 1983.

    Google Scholar 

  19. P. A. Subrahmanyam and J.-H. You. FUNLOG: a computational model integrating logic programming and functional programming. In D. DeGroot and G. Lindstrom (editors), Logic Programming: Functions, Relations, and Equations. Prentice Hall, 1986.

    Google Scholar 

  20. J. Tanaka. Optimized execution of an applicative language. PhD thesis, Univ. of Utah. 1984.

    Google Scholar 

  21. S. Taylor, S. Safra and E. Shapiro. A parallel implementation of Flat Concurrent Prolog. October, 1986. Dept. of Computer Science, Weizmann Inst. of Science; to appear in International Journal of Parallel Programming.

    Google Scholar 

  22. K. R. Traub. An abstract parallel graph reduction machine. In Proc. 12th Ann. Symp. on Computer Architecture, pages 333–341. IEEE Computer Society, 1985.

    Google Scholar 

  23. P.C. Treleaven, D.R. Brownbridge, and R.P. Hopkins. Data-driven and demand-driven computer architecture. Computing Surveys 14(1):93–143, March, 1982.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Joseph H. Fasel Robert M. Keller

Rights and permissions

Reprints and permissions

Copyright information

© 1987 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lindstrom, G. (1987). Implementing logical variables on a graph reduction architecture. In: Fasel, J.H., Keller, R.M. (eds) Graph Reduction. GR 1986. Lecture Notes in Computer Science, vol 279. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-18420-1_67

Download citation

  • DOI: https://doi.org/10.1007/3-540-18420-1_67

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-18420-1

  • Online ISBN: 978-3-540-47963-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics