Parallelization as program transformation
WS Presentations Main Page
Next: Automatic (And-) Parallelization
Up: Document: tut
Previous: Example: Strict Goal
- Parallelization process:
- A transformation of the original program into a parallelized
(``annotated'') program
in a concurrent/parallel language.
- Prolog/CLP &-Prolog / Ciao-Prolog
- &-Prolog / Ciao-Prolog in brief:
- Prolog/CLP (with if-then-else)
- Parallel conjunction ``&/2''
(correct forwards and backwards semantics)
- Primitives to detect parallelism conditions at run-time, when
static analysis is not enough
- (Synchronization primitives, concurrency &/1, ...)
- (Tracing and control primitives)
Example:
qs([X|L],R) :- part(L,X,L1,L2), qs(L2,R2), qs(L1,R1),
app(R1,[X|R2],R).
Might be annotated in &-Prolog / Ciao-Prolog as (strict indep):
qs([X|L],R) :-
part(L,X,L1,L2),
( ground(L1), ground(L2)
->
qs(L2,R2) & qs(L1,R1)
;
qs(L2,R2), qs(L1,R1) ),
app(R1,[X|R2],R).
Thu Jan 18 11:21:33 MET 1996 <herme@fi.upm.es>-<webmaster@clip.dia.fi.upm.es>