Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $COVERABILITY-GRAPH((S,T,F,M_0))$\
- $(V,E,v_0):=({M_0},emptyset,M_0);$\
- Work:set:=${M_0}$\
- textbf{while} Work $neq emptyset$\
- textbf{do} select $M$ from Work;\
- Work:=Work$setminus{M};$\
- textbf{for} $tin$enabled(M)\
- textbf{do} $M':=$fire($M,t);$\
- $M':=$AddOmegas($M,t,M',V,E$);
- textbf{if} $M'not in V$\
- textbf{then} $V:=Vcup {M'}$\
- Work:=Work$cup{M'};$\
- $E:=Ecup{(M,t,M')}$\
- textbf{return}$(V,E,v_0)$
- $ADDOMEGAS(M,t,M',V,E)$\
- textbf{for}$M''in V$\
- textbf{do if} $M''<M'$ and $M''xrightarrow{*}_{E} M$\
- textbf{then} $M':=M'+((M'-M'').omega);$\
- textbf{return} $M';$
- documentclass{article}
- usepackage{mathtools}
- usepackage{algorithm}
- usepackage[noend]{algpseudocode}
- usepackage{setspace, etoolbox, caption}
- AtBeginEnvironment{algorithmic}{setstretch{1.25}lettextbftextsfvspace{0.4ex}}
- begin{document}
- Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.
- begin{algorithm}
- caption{ textsc{Coverability-Graph} ($ (S,T,F,M₀) $)}
- begin{algorithmic}[1]
- State $(V,E,v₀) ∶= q({M₀},emptyset,M₀)$;
- State textit{Work}: set $ ∶= q{M₀}$;
- While{$ mathit{Work}neemptyset $}
- State select $M$ from $mathit{Work}$;
- State $mathit{Work} ∶= q mathit{Work}∖{M}$;
- For{$t ∈ mathsf{enabled}(M)$}
- State $M' ∶= q mathsf{fire}(M, t)$;
- State $M' ∶= q mathsf{AddOmegas}(M, t, M',V, E)$;
- If{$M' ∉ V$}
- State $V ∶= q V ∪ {M'}$;
- State $mathit{Work} ∶= qmathit{Work} ∪ {M'}$;
- EndIf
- State $E ∶= q E ∪ {(M, t, M')}$;
- EndFor
- EndWhile
- Return $(V, E, v₀)$;
- end{algorithmic}
- end{algorithm}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement