Abstract
This article introduces a language FPL allowing to combine functional and logic programming styles in an integrated framework. FPL preserves the essential features and assets of both approaches : clarity, formal simplicity, compositionality for the functional approach — and resolution-based calculus, non-determinism, capacity to compute inverses for the logical approach. FPL is based on Backus' FP language, extended by guarded command constructs. Guards are solved in Prolog, and the bindings achieved solving a guard may be exploited within its consequence. An interpreter and a compiler have been implemented, both written in Prolog. We show how to provide operational semantics to FPL, based on a simple, term rewriting system semantics for FP.
Preview
Unable to display preview. Download preview PDF.
References
H. Abramson, a Prological Definition of HASL, a Purely Functional Language with Unification Based Conditional Binding Expressions, New Generation Computing 2,1, pp. 3–35 (1984)
J. Backus, Can Programming be liberated from Von Neumann Style?, CACM 21,8, pp. 613–641 (1978)
R. Barbuti, M. Bellia, G. Levi, M. Montanari, LEAF: a Language that Integrates Logic Equations and Functions, in Logic Programming: Functions, Relations and Equations, Degroot, Lindstrom Eds., Prentice Hall, pp. 201–238 (1986)
S. Cohen, The APPLOG Language, in Logic Programming: Functions, Relations and Equations, Degroot, Lindstrom Eds., Prentice Hall, pp. 239–276 (1986)
Proc. of the Int. Conf. on Conditional Term Rewriting Systems, Kaplan, Jouannaud Eds., LNCS 308, Springer Verlag (1988)
N. Dershowitz, S. Kaplan, D. Plaisted, Infinite Normal Forms, to appear in Theoretical Computer Science (1990)
J.A. Goguen, J. Meseguer, Equality, Types, Modules and (why not?) Generics for Logic Programming, Journal of Logic Programming 6,2, pp. 179–210 (1984)
J. Halpern, J.H. Williams, E.L. Wimmers, T.C. Winkler, Denotational Semantics and Rewrite Rules for FP, Proc. of the POPL'84 Conf., pp. 108–120 (1984)
J.W. Klop, Term rewriting systems: a tutorial, Bulletin of the EATCS, 32, pp. 143–183 (1987)
J.W. Klop, Rewrite Rule Systems, unpublished manuscript, CWI, Amsterdam (1987)
N. Lichtenstein, FPL: Functional Plus Logic Programming. An integration of the FP and Prolog Languages, M. Sc. Thesis, Bar-Ilan University, Ramat-Gan, Israel (1990)
J.A. Robinson, E.E. Sibert, LOGLISP: Motivation, Design and Implementation, in Logic Programming, Clark, Tarnlund Eds., Academic Press, pp. 299–314 (1982)
G. Smolka, FRESH: a Hiher-Order Language with Unification and Multiple Results, in Logic Programming: Functions, Relations and Equations, Degroot, Lindstrom Eds., Prentice Hall, pp. 469–524 (1986)
M. Sato, T. Takurai QUTE: a Functional Language based on Unification, Int. Conf. Fifth Generation Computer Systems, ICOT, pp. 157–165 (1984)
P.A. Subrahmanyam, J.H. You, FUNLOG: a Computational Model Integrating Logic Programming and Functional Programming, Proc. of the IEEE International Conference on Logic Programming, pp. 144–153 (1984)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lichtenstein, N., Kaplan, S. (1991). FPL : Functional plus logic programming an integration of the FP and Prolog languages. In: Kaplan, S., Okada, M. (eds) Conditional and Typed Rewriting Systems. CTRS 1990. Lecture Notes in Computer Science, vol 516. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54317-1_98
Download citation
DOI: https://doi.org/10.1007/3-540-54317-1_98
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-54317-6
Online ISBN: 978-3-540-47558-3
eBook Packages: Springer Book Archive