Parallelization as program transformation



next up previous WS Presentations Main Page
Next: Automatic (And-) Parallelization Up: Document: tut Previous: Example: Strict Goal

Parallelization as program transformation

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>