\(\fbox{$e \longrightarrow e'$}\)
\(\inferrule[DoNeg]{
n' = - n_1
}{
\mathop{\texttt{-}} n_1 \longrightarrow n'
}\)
\(\inferrule[DoArith]{
n' = n_1 \mathbin{\mathit{bop}}n_2
\and
\mathit{bop}\in \left\{ \texttt{+}, \texttt{-}, \texttt{*}, \texttt{/} \right\}
}{
n_1 \mathbin{\mathit{bop}}n_2 \longrightarrow n'
}\)
\(\inferrule[DoPlusString]{
\mathit{str}' = \mathit{str}_1 \mathit{str}_2
}{
\mathit{str}_1 \mathbin{\texttt{+}} \mathit{str}_2 \longrightarrow\mathit{str}'
}\)
\(\inferrule[DoInequalityNumber]{
b' = n_1 \mathbin{\mathit{bop}}n_2
\and
\mathit{bop}\in \left\{ \texttt{<}, \texttt{<=}, \texttt{>}, \texttt{>=} \right\}
}{
n_1 \mathbin{\mathit{bop}}n_2 \longrightarrow b'
}\)
\(\inferrule[DoInequalityString]{
b' = \mathit{str}_1 \mathbin{\mathit{bop}}\mathit{str}_2
\and
\mathit{bop}\in \left\{ \texttt{<}, \texttt{<=}, \texttt{>}, \texttt{>=} \right\}
}{
\mathit{str}_1 \mathbin{\mathit{bop}}\mathit{str}_2 \longrightarrow b'
}\)
\(\inferrule[DoEquality]{
b' = (v_1 \mathbin{\mathit{bop}}v_2)
\and
\mathit{bop}\in \left\{ \texttt{===}, \texttt{!==} \right\}
}{
v_1 \mathbin{\mathit{bop}}v_2 \longrightarrow b'
}\)
\(\inferrule[DoNot]{
b' = \neg b_1
}{
\mathop{\texttt{!}} b_1 \longrightarrow b'
}\)
\(\inferrule[DoAndTrue]{
}{
\mathbf{true} \mathbin{\texttt{\&\&}} e_2 \longrightarrow e_2
}\)
\(\inferrule[DoAndFalse]{
}{
\mathbf{false} \mathbin{\texttt{\&\&}} e_2 \longrightarrow\mathbf{false}
}\)
\(\inferrule[DoOrTrue]{
}{
\mathbf{true} \mathbin{\texttt{||}} e_2 \longrightarrow\mathbf{true}
}\)
\(\inferrule[DoOrFalse]{
}{
\mathbf{false} \mathbin{\texttt{||}} e_2 \longrightarrow e_2
}\)
\(\inferrule[DoIfTrue]{
}{
\mathbf{true}\;\texttt{?}\;e_2\;\texttt{:}\;e_3 \longrightarrow e_2
}\)
\(\inferrule[DoIfFalse]{
}{
\mathbf{false}\;\texttt{?}\;e_2\;\texttt{:}\;e_3 \longrightarrow e_3
}\)
\(\inferrule[DoSeq]{
}{
v_1 \mathbin{\texttt{,}} e_2 \longrightarrow e_2
}\)
\(\inferrule[DoPrint]{
\text{$v_1$ printed}
}{
\texttt{console}\texttt{.}\texttt{log}\texttt{(}v_1\texttt{)} \longrightarrow\mathbf{undefined}
}\)
\(\inferrule[DoConst]{
}{
\mathbf{const}\;x\;\texttt{=}\;v_1\texttt{;}\;e_2 \longrightarrow[v_1/x]e_2
}\)
\(\inferrule[SearchUnary]{
e_1 \longrightarrow e_1'
}{
\mathop{\mathit{uop}}e_1 \longrightarrow\mathop{\mathit{uop}}e_1'
}\)
\(\inferrule[SearchBinary1]{
e_1 \longrightarrow e_1'
}{
e_1 \mathbin{\mathit{bop}}e_2 \longrightarrow e_1' \mathbin{\mathit{bop}}e_2
}\)
\(\inferrule[SearchBinary2]{
e_2 \longrightarrow e_2'
}{
v_1 \mathbin{\mathit{bop}}e_2 \longrightarrow v_1 \mathbin{\mathit{bop}}e_2'
}\)
\(\inferrule[SearchIf]{
e_1 \longrightarrow e_1'
}{
e_1\;\texttt{?}\;e_2\;\texttt{:}\;e_3 \longrightarrow e_1'\;\texttt{?}\;e_2\;\texttt{:}\;e_3
}\)
\(\inferrule[SearchPrint]{
e_1 \longrightarrow e_1'
}{
\texttt{console}\texttt{.}\texttt{log}\texttt{(}e_1\texttt{)} \longrightarrow\texttt{console}\texttt{.}\texttt{log}\texttt{(}e_1'\texttt{)}
}\)
\(\inferrule[SearchConst]{
e_1 \longrightarrow e_1'
}{
\mathbf{const}\;x\;\texttt{=}\;e_1\texttt{;}\;e_2 \longrightarrow\mathbf{const}\;x\;\texttt{=}\;e_1'\texttt{;}\;e_2
}\)