iteration

File iteration.str
Author unknown
Since unknown

Various iteration strategies.




Statistics


General
Lines of code 80
Stratego
Module number 1 (100% documented)
Constructor number 0
Overlay number 0
Strategy number 11 (100% documented)
Rule number 0
DynamicRule number 0



Strategy summary


do-while(Strategy s, Strategy c) Apply s at least once and then repeat while c succeeds iteration.str
for(Strategy i, Strategy c, Strategy s) Repeat application of s after initialization with i while c fails iteration.str
for(Strategy s, ATerm low, ATerm up) Apply s for each integer from low to up (inclusive) iteration.str
repeat(Strategy s) Repeatedly apply s until it fails iteration.str
repeat(Strategy s, Strategy c) Repeatedly apply s until it fails and terminate with application of c iteration.str
repeat(Strategy s, ATerm n) Applies s repeatedly exactly n times iteration.str
repeat-until(Strategy s, Strategy c) Repeatedly apply s until c succeeds iteration.str
repeat1(Strategy s, Strategy c) Repeatedly apply s (at least once) and terminate with application of c iteration.str
repeat1(Strategy s) Repeatedly apply s (at least once) iteration.str
while(Strategy c, Strategy s) While c succeeds apply s iteration.str
while-not(Strategy c, Strategy s) While c does not succeed apply s iteration.str



Strategy details


ATerm do-while(Strategy s, Strategy c)
File iteration.str
Author unknown
Since unknown
 

Apply s at least once and then repeat while c succeeds.



 
ATerm for(Strategy i, Strategy c, Strategy s)
File iteration.str
Author unknown
Since unknown
 

Repeat application of s after initialization with i while c fails.



 
ATerm for(Strategy s, ATerm low, ATerm up)
File iteration.str
Author unknown
Since unknown
 

Apply s for each integer from low to up (inclusive).



 
ATerm repeat(Strategy s)
File iteration.str
Author unknown
Since unknown
 

Repeatedly apply s until it fails.



 
ATerm repeat(Strategy s, Strategy c)
File iteration.str
Author unknown
Since unknown
 

Repeatedly apply s until it fails and terminate with application of c.



 
ATerm repeat(Strategy s, ATerm n)
File iteration.str
Author unknown
Since unknown
 

Applies s repeatedly exactly n times. If s fails at some point duringthe n applications, the entire strategy fails. The result of thestrategy is that of the nth application of s.



 
ATerm repeat-until(Strategy s, Strategy c)
File iteration.str
Author unknown
Since unknown
 

Repeatedly apply s until c succeeds.



 
ATerm repeat1(Strategy s, Strategy c)
File iteration.str
Author unknown
Since unknown
 

Repeatedly apply s (at least once) and terminate with application of c.



 
ATerm repeat1(Strategy s)
File iteration.str
Author unknown
Since unknown
 

Repeatedly apply s (at least once).



 
ATerm while(Strategy c, Strategy s)
File iteration.str
Author unknown
Since unknown
 

While c succeeds apply s.



 
ATerm while-not(Strategy c, Strategy s)
File iteration.str
Author unknown
Since unknown
 

While c does not succeed apply s.