Abstract
Several earlier papers have shown that bounded quantification is an expressive and comfortable addition to logic programming languages. One shortcoming of bounded quantification, however, is that it does not allow easy and efficient relation of corresponding elements of aggregations being quantified over (lockstep iteration). Bounded quantification also does not allow easy quantification over part of an aggregation, nor does it make it easy to accumulate a result over an aggregation. We generalize the concept of bounded quantification to quantification over any finite sequence, as we can use a rich family of operations on sequences to create a language facility that avoids the weaknesses mentioned above. We also propose a concrete syntax for sequence quantification in Prolog programs, which we have implemented as a source-to-source transformation.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Krzysztof R. Apt. Arrays, bounded quantification and iteration in logic and constraint logic programming. Science of Computer Programming, 26(1-3):133–148, 1996.
J. Barklund and P. Hill. Extending godel for expressing restricted quantifications and arrays. Technical Report 102, UPMAIL, Uppsala University, Box 311, S-751 05, Sweden, 1995. Available from http://citeseer.nj.nec.com/barklund95extending.html.
Jonas Barklund and Johan Bevemyr. Prolog with arrays and bounded quantifications. In A. Voronkov, editor, Proceedings of the 4th International Conference on Logic Programming and Automated Reasoning (LPAR’93), volume 698 of LNAI, pages 28–39, St. Petersburg, Russia, July 1993. Springer Verlag.
Keith Clark. Negation as failure. In H. Gallaire and J. Minker, editors, Logic and Databases, pages 293–322. Plenum Press, 1978.
Gottlob Frege. Begriffsschrift, eine der Arithmetischen Nachgebildete Formelsprache des Reinen Denkens. Halle, 1879. English translation in From Frege to Gödel, a Source Book in Mathematical Logic (J. van Heijenoort, Editor), Harvard University Press, Cambridge, 1967, pp. 1–82.
Fergus Henderson, Thomas Conway, Zoltan Somogyi, David Jeffery, Peter Schachte, Simon Taylor, and Chris Speirs. The Mercury language reference manual. Available from http://www.cs.mu.oz.au/mercury/, 2000.
Pascal Van Hentenryck. The OPL Optimization Programming Language. MIT Press, 1999.
ISO. Standard for the Programming Language Prolog. ISO/IEC, 1995.
Robert A. Kowalski. Predicate logic as a programming language. In Proceedings of IFIP 4, pages 569–574, Amsterdam, 1974. North Holland.
Barbara Liskov and John Guttag. Abstraction and Speci.cation in Program Developement. MIT Press, Cambridge, Mass., 1986.
Lee Naish. Negation and quanti.ers in NU-Prolog. In Ehud Shapiro, editor, Proceedings of the Third International Conference on Lo gic Programming, pages 624–634, London, England, July 1986.
J. Alan Robinson. A machine-oriented logic based on the resolution principle. Journal of the ACM, 12(1):23–41, January 1965.
M. Sanella. InterLISP Reference Manual. Xerox PARC, Palo Alto, CA, October 1983.
Joachim Schimpf. Logical loops. In Peter J. Stuckey, editor, Logic Programming, volume 2401 of Lecture Notes in Computer Science, pages 224–238. Springer-Verlag, July 29-August 1 2002.
B. Stroustrup. The C++ Programming Language. Addison-Wesley, Reading, Mass., 3 edition, 1997.
James Thom and Justin Zobel. NU-Prolog reference manual, version 1.0. Technical Report 86/10, Department of Computer Science, University of Melbourne, Melbourne, Australia, 1986.
Simon Thompson. The Craft of Functional Programming. Addison-Wesley, second edition, 1999.
Andrei Voronkov. Logic programming with bounded quantification. In Andrei Voronkov, editor, Logic Programming-Proc. Second Russian Conf. on Logic Programming, number 592 in Lecture Notes in Computer Science, pages 486–514. Springer-Verlag, Berlin, 1992.
Philip Wadler. Deforestation: transforming programs to eliminate trees. Theoretical Computer Science, 73:231–248, 1990.
Barry A. Warsaw. Lockstep iteration. Python Enhancement Proposal, 2000. available from http://python.sourceforge.net/peps/pep-0201.html.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Schachte, P. (2003). Sequence Quantification. In: Dahl, V., Wadler, P. (eds) Practical Aspects of Declarative Languages. PADL 2003. Lecture Notes in Computer Science, vol 2562. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36388-2_10
Download citation
DOI: https://doi.org/10.1007/3-540-36388-2_10
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-00389-2
Online ISBN: 978-3-540-36388-0
eBook Packages: Springer Book Archive