\begin{array}{l}
e \in \texttt{Expr} \quad n\in\texttt{Int} \quad b\in\texttt{Bool}
\\
e ::= x \mid \texttt{if}\;e\;\texttt{then}\;e\;\texttt{else}\;e\;
\\ \qquad\mid n \mid e + e \mid \ldots
\\ \qquad\mid b \mid e \land e \mid \neg e \mid \ldots
\\ \qquad\mid e = e \mid e \lt e \mid \ldots\\
\end{array}
\begin{array}{l}
e \in \texttt{Expr} \quad n\in\texttt{Int} \quad b\in\texttt{Bool}
\\
e ::= x \mid \texttt{if}\;e\;\texttt{then}\;e\;\texttt{else}\;e\;
\\ \qquad\mid n \mid e + e \mid \ldots
\\ \qquad\mid b \mid e \land e \mid \neg e \mid \ldots
\\ \qquad\mid e = e \mid e \lt e \mid \ldots\\
\end{array}
\begin{array}{l}
e \in \texttt{Expr} \quad n\in\texttt{Int} \quad b\in\texttt{Bool}
\\
e ::= x \mid \texttt{if}\;e\;\texttt{then}\;e\;\texttt{else}\;e\;
\\ \qquad\mid n \mid e + e \mid \ldots
\\ \qquad\mid b \mid e \land e \mid \neg e \mid \ldots
\\ \qquad\mid e = e \mid e \lt e \mid \ldots\\
\end{array}
v \in \texttt{Value} ~ = \texttt{Int} \uplus \texttt{Bool}
\texttt{Bool} \cap \texttt{Int} = \emptyset
비교식 의미규칙
Syntax
\begin{array}{l}
e ::= x \mid n \mid b
\mid e + e
\mid e \mid \neg e \mid e \land e
\\~\quad~~
\mid e = e \mid e \lt e \mid \texttt{if}\;e\;\texttt{then}\;e\;\texttt{else}\;e\;
\end{array}
Semantics
~\sigma,e \Downarrow v~
v \in \texttt{Value} \;=\; \texttt{Int} \uplus \texttt{Bool}
e \in \texttt{Expr} \quad n\in\texttt{Int} \quad b\in\texttt{Bool}
\begin{array}{l}
e ::= x \mid n \mid b
\mid e + e
\mid e \mid \neg e \mid e \land e
\\~\quad~~
\mid e = e \mid e \lt e \mid \texttt{if}\;e\;\texttt{then}\;e\;\texttt{else}\;e\;
\end{array}
Semantics
~\sigma,e \Downarrow v~
v \in \texttt{Value} \;=\; \texttt{Int} \uplus \texttt{Bool}
e \in \texttt{Expr} \quad n\in\texttt{Int} \quad b\in\texttt{Bool}
\begin{array}{l}
e ::= x \mid n \mid b
\mid e + e
\mid \neg e \mid e \land e
\\~\quad~~
\mid e = e \mid e \lt e \mid \texttt{if}\;e\;\texttt{then}\;e\;\texttt{else}\;e\;
\end{array}
Semantics
~\sigma,e \Downarrow v~
v \in \texttt{Value} \;=\; \texttt{Int} \uplus \texttt{Bool}
e \in \texttt{Expr} \quad n\in\texttt{Int} \quad b\in\texttt{Bool}
\begin{array}{l}
e ::= x \mid n \mid b
\mid e + e
\mid \neg e \mid e \land e
\\~\quad~~
\mid e = e \mid e \lt e \mid \texttt{if}\;e\;\texttt{then}\;e\;\texttt{else}\;e\;
\end{array}
Semantics
~\sigma,e \Downarrow v~
v \in \texttt{Value} \;=\; \texttt{Int} \uplus \texttt{Bool}
e \in \texttt{Expr} \quad n\in\texttt{Int} \quad b\in\texttt{Bool}
\frac{\sigma,\,e\,\Downarrow\,b }{\sigma,\,\neg e \;\Downarrow\; \texttt{not}\,b}
하스켈에서 Value 정의하기
\begin{array}{l}
e ::= x \mid n \mid b
\mid e + e
\mid e \mid \neg e \mid e \land e
\\~\quad~~
\mid e = e \mid e \lt e \mid \texttt{if}\;e\;\texttt{then}\;e\;\texttt{else}\;e\;
\end{array}