如何格式化语义规则(附图)?

如何格式化语义规则(附图)?

我想知道如何输入如下图所示的语义规则: enter image description here

谢谢!

答案1

proof part

\documentclass[a4paper]{article}
\usepackage{geometry}
\usepackage{amsmath,mathtools,bussproofs,turnstile}

\begin{document}

\noindent
\begin{prooftree}
  \def\ScoreOverhang{1pt}
  \AxiomC{}
  \UnaryInfC{$so, E, S \sststile{}{} 2: Int(2), S$}
  \AxiomC{$\cdots$}\RightLabel{(2)}
  \UnaryInfC{$so, E[l_{new}/x], S[Int(2)/l_{new}] \sststile{}{} \text{while } 1 < x \text{ loop } x \leftarrow x - 1 \text{ pool } : void, S_{final}  $}\RightLabel{(3)}
  \BinaryInfC{$so, E, S \sststile{}{} \text{ let } x : Int \leftarrow 2 \text{ in while } 1 < \text{ loop } x \leftarrow x  - 1 \text{ pool } : void, S_{final}$}
\end{prooftree}


\end{document}

相关内容