Did you know ... Search Documentation:
Pack rtp_qsndqs -- prolog/rtp_dqs.pl
PublicShow source

Offers a Prolog implementation of double-ended queues (deques) with constant time basic operations and full version reusability. The implementation is based on Bouma (2012), referenced below. Time guarantees and determinism indications apply to the cases in which the predicate signature is respected.

In the signatures, +DQ:deque means that DQ is an input argument and must be sufficiently instantiated, that is, it is a valid deque representing term as produced by a deque outputting predicate. Due to the design of the datastructure, these need not be ground.

author
- Gerlof Bouma, Uni Gothenburg
See also
- Bouma, Gerlof. 2012. Real-time Persistent Queues and Deques with Logic Variables (Declarative Pearl). In Schrijvers and Thiemann (Eds), Functional and Logic Programming, Proceedings of the 11th International Symposium FLOPS 2012, LNCS 7294, pp. 62-72, Heidelberg: Springer.
- http://spraakbanken.gu.se/personal/gerlof/home
bug
- Loading together with rtp_qs.pl somehow doesn't work.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 empty_deque(Arg1)
 inject_deque(Arg1, Arg2, Arg3)
 eject_deque(Arg1, Arg2, Arg3)
 push_deque(Arg1, Arg2, Arg3)
 pop_deque(Arg1, Arg2, Arg3)
 reverse_deque(Arg1, Arg2)
 poplist_deque(Arg1, Arg2, Arg3)
 pushlist_deque(Arg1, Arg2, Arg3)
 injectlist_deque(Arg1, Arg2, Arg3)
 ejectlist_deque(Arg1, Arg2, Arg3)