Did you know ... | Search Documentation: |
Pack pha -- prolog/pha_sched.pl |
This module uses the the PHA continuation capturing meta-interpreter in pha_mi.pl to run PHA goals and a priority queue to manage a collection of threads, each exploring a different possible world associated with a list of valuations of random variables. Each time a thread tries to sample a random variable, its continuation is captured and a new set of threads corresponding to the different possible choices is created in a suspended state. next//1 then advances the state of the collection of threads by running all threads until a success is found or all threads fail.
A thread can either be a list of random variable valuations (assumptions) and a continuation, or a continuation to be appended to a lazy list of explanations for a previous goal. [cf. Monadic bind!]
The following predicates are exported, but not or incorrectly documented.