# -*- coding: utf-8 -*- # For emacs: (setq mac-option-modifier nil) # ___________________________________________________________________________ # effect-flow(s, fa) ALGORITHM effect-flow LABEL alg:effect-flow OUT ← \{ ∅ for each block \} initialize OUT with starting assumptions WHILE OUT continues to change FORALL blocks b f_succ ← ∪(OUT_b' for each b' ∈ successors of b) f_stmts ← the set of effects caused by any statement in b IF checking a par agreement and b terminates a basic block f_stms ← ∅ ENDIF OUT_b ← f_succ ∪ f_stmts ENDFOR ENDWHILE ENDALGORITHM #ALGORITHM effect-flow #LABEL alg:effect-flow #POST ← \{ ∅ for each block \} #PAR ← \{ ∅ for each block \} #initialize POST and PAR with starting assumptions #WHILE POST or PAR continues to change # FORALL blocks b # f_post ← ∪(POST_b' for each b' ∈ successors of b) # f_par ← ∪(PAR_b' for each b' ∈ successors of b) # f_stmts ← the set of effects caused by any statement in b # POST_b ← f_post ∪ f_stmts # PAR_b ← f_par ∪ f_stmts # ENDFOR #ENDWHILE #ENDALGORITHM