Go to the first, previous, next, last section, table of contents.


Independent and-parallel execution

Author(s): Manuel Hermenegildo, Manuel Carro.

Version: 1.5#118 (2000/4/19, 18:13:43 CEST)

Version of last change: 1.3#120 (1999/11/26, 12:5:17 MET)

This library allows and-parallel execution of goals in (Herbrand-)independent fashion. It resembles the execution rules of &-Prolog [HG90]. Basically, goals are run in and-parallel provided that their arguments do not share bindings, i.e., are not bound to terms which contain a common variable.

Beware: it is highly unstable at the moment!

Usage and interface (andprolog)

Documentation on exports (andprolog)

PREDICATE: @&/2:

@&(GoalA,GoalB)

GoalA and GoalB are run in independent and-parallel fashion. This is just a first sketch, and valid only for deterministic independent goals.

Meta-predicate with arguments: @&(goal,goal).

PREDICATE: =>/2:

=>(A,B)

If A is true B is run in parallel, otherwise sequentially.

Meta-predicate with arguments: =>(goal,goal).

Usage: =>(A,B)

PROPERTY: indep/1:

indep(X)

The variables in each pair of the list X are pairwise independent.

Usage: indep(X)

PROPERTY: indep/2:

indep(X,Y)

X and Y are independent, i.e., they are bound to terms which have no variables in common. For example, indep(X,Y) holds for X=f(Z),Y=g(K) and also for X=f(a),Y=X (since both X and Y are bound to ground terms). It does not hold for X=f(Z),Y=g(Z) and for X=Y.

Usage: indep(X,Y)

PREDICATE: active_agents/1:

Usage: active_agents(?(NumberOfAgents))

Known bugs and planned improvements (andprolog)


Go to the first, previous, next, last section, table of contents.