Abstract
The binary relation algebra has operators that correspond to wellknown programming constructs. As a result, it is to possible base useful programming languages on it. An earlier paper by the author described such a language. Since Prolog predicates define relations between variables, Prolog is often considered to be a relational language. In fact, there are several straight-forward translations from relation algebra expressions to Prolog rules. This paper explores this idea in depth, showing how relation algebra can be translated into Prolog.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Backus J. (1978) Can Programming be Liberated from the Von Neumann Style? Communications of the ACM, 21(8):613–641
Bird R., Scruggs T.E., Mastropieri M.A. (1998) Introduction to Functional Programming Using Haskell. (Prentice Hall)
Cattrall D.M. (1992) The Design and Implementation of a Relational Programming System. PhD Thesis, Dept. of Computer Science, University of York
Dwyer B. (1994) Programming Using Binary Relations: a proposed programming language. Technical Report 94–04, Dept. of Computer Science, University of Adelaide
Dwyer B. (1995) LIBRA: A Lazy Interpreter of Binary Relational Algebra. Technical Report 95–10, Dept. of Computer Science, University of Adelaide. (Also available via http://www.cs.adelaide.edu.au/∼dwyer.)
Gabber E. (1990) Developing a Portable Parallelizing Pascal Compiler in Prolog. In: Sterling L. (Ed.) The Practice of Prolog, 109–136
Milner R. (1978) A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17(3):348–375
O’Keefe R.A. (1990) The Craft of Prolog. MIT Press, Cambridge, Mass.
Potter B., Sinclair J. and Till D. (1991) An Introduction to Formal Specification and Z. Prentice-Hall
Sanderson J.G. (1980) A Relational Theory of Computing. Lecture Notes in Computer Science 82, Springer-Verlag Berlin
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Dwyer, B. (2001). Translating Relational Programs into Prolog. In: Orłowska, E., Szałas, A. (eds) Relational Methods for Computer Science Applications. Studies in Fuzziness and Soft Computing, vol 65. Physica, Heidelberg. https://doi.org/10.1007/978-3-7908-1828-4_2
Download citation
DOI: https://doi.org/10.1007/978-3-7908-1828-4_2
Publisher Name: Physica, Heidelberg
Print ISBN: 978-3-662-00362-6
Online ISBN: 978-3-7908-1828-4
eBook Packages: Springer Book Archive