Real-time persistent queues and deques with logic variables (declarative pearl)

0Citations
Citations of this article
2Readers
Mendeley users who have this article in their library.
Get full text

Abstract

We present a Prolog implementation of real-time persistent queues and double-ended queues. Our implementation is inspired by Okasaki's lazy-functional approach, but relies only on standard Prolog, comprising of the pure subset plus if-then-else constructs to efficiently implement guards and meta-calls for convenience. The resulting data structure is a nice demonstration of the fact that the use of logic variables to hold the outcome of an unfinished computation can sometimes give the same kind of elegant and compact solutions as lazy evaluation. © 2012 Springer-Verlag.

Cite

CITATION STYLE

APA

Bouma, G. (2012). Real-time persistent queues and deques with logic variables (declarative pearl). In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 7294 LNCS, pp. 62–72). https://doi.org/10.1007/978-3-642-29822-6_8

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free