Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{amsmath}
- usepackage{framed}
- begin{document}
- begin{figure}
- begin{framed}
- begin{center}
- begin{tabular}{lr@{:space}l}
- textbf{in} & $a,b$ & textbf{integer where } $a>0$, $b>0$\
- textbf{local} & $y_1,y_2$ & textbf{integer where } $y_1=a$, $y_2=b$\
- textbf{out} & $g$ & textbf{integer}
- end{tabular}
- end{center}
- begin{equation*}
- left[begin{array}{l}
- ell_0: left[ begin{array}{l}
- ell_1: textbf{while $y_1ne y_2$ do}\
- qquadell_2
- left[ begin{array}{l}
- {ell_3:textbf{ await }y_2>y_1;ell_4: y_2=y_1-y_2}\
- quadtextbf{or}\
- {ell_5:textbf{ await }y_2>y_1;ell_6: y_2=y_2-y_1}
- end{array}
- right]\
- ell_7: g:=y_1\
- end{array}
- right]\
- ell_8:
- end{array}
- right]
- end{equation*}
- caption{A fully labeled program GCD-F.}
- end{framed}
- end{figure}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement