I was looking for some LaTeX code to replicate the result shown on the image below. This image is taken from the book "Temporal Verification of Reactive Systems - safety"enter image description here

  • Welcome to TeX.SX!. Please post a Welcome to TeX.SX!. When asking questions it is better to provide a full minimal working example (MWE) both in order to demonstrate what you are trying to do and to help others help you. The MWE should look like \documentclass...\begin{document}...\end{document}, it should compile and contain close to the minima – user30471 Mar 3 '15 at 12:05
  • I don't have a MWE because it's an image, i don't know how to make it. I'm asking suggestions. – Zack Mar 3 '15 at 12:25
  • 1
    Well, the idea is that you should try and to get something that is close to working first. It doesn't have to be perfect... – user30471 Mar 3 '15 at 12:27

This looks pretty awful but it looks similar to your image:)


        \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}
           \ell_0: \left[ \begin{array}{l}
                 \ell_1: \textbf{while $y_1\ne y_2$ do}\\
                    \left[ \begin{array}{l}
                           {\ell_3:\textbf{ await }y_2>y_1;\ell_4: y_2=y_1-y_2}\\
                          {\ell_5:\textbf{ await }y_2>y_1;\ell_6: y_2=y_2-y_1}
                 \ell_7: g:=y_1\\
  \caption{A fully labeled program GCD-F.}


The output:

enter image description here

| improve this answer | |
  • Thanks so much! It's exactly what i was looking for. It doesn't look awful in my opinion! – Zack Mar 3 '15 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.