defined trait Expr defined class N defined class Var defined class ConstDecl
Thursday, October 3, 2024
What questions does your neighbor have?
defined trait Expr defined class N defined class Var defined class ConstDecl
\[ \begin{array}{rrrll} \text{values} & v& \mathrel{::=}& \texttt{(}x\texttt{)} \mathrel{\texttt{=}\!\texttt{>}} e_1 \\ \text{expressions} & e& \mathrel{::=}& e_1\texttt{(}e_2\texttt{)} \\ \text{variables} & x \end{array} \tag{1}\]
defined class Fun defined class Call
defined function isValue
defined type Env defined class DynamicTypeError
\[ \inferrule[EvalCall]{ ??? }{ E \vdash e_1\texttt{(}e_2\texttt{)} \Downarrow v' } \]
defined function eval
defined function eval defined function eval
e_dynamicScoping: ConstDecl = ConstDecl( x = "x", e1 = N(n = 1.0), e2 = ConstDecl( x = "g", e1 = Fun(x = "y", e1 = Var(x = "x")), e2 = Call( e1 = Fun(x = "x", e1 = Call(e1 = Var(x = "g"), e2 = N(n = 2.0))), e2 = N(n = 3.0) ) ) )
scala.NotImplementedError: an implementation is missing scala.Predef$.$qmark$qmark$qmark(Predef.scala:345) ammonite.$sess.cmd2$Helper.isValue(cmd2.sc:1) ammonite.$sess.cmd8$Helper.eval(cmd8.sc:5) ammonite.$sess.cmd8$Helper.eval(cmd8.sc:39) ammonite.$sess.cmd11$Helper.<init>(cmd11.sc:1) ammonite.$sess.cmd11$.<clinit>(cmd11.sc:7)
expressions e ::=
values v ::=
variables x
scala.NotImplementedError: an implementation is missing scala.Predef$.$qmark$qmark$qmark(Predef.scala:345) ammonite.$sess.cmd12$Helper.<init>(cmd12.sc:1) ammonite.$sess.cmd12$.<clinit>(cmd12.sc:7)
\[ \inferrule[EvalFun]{ ??? }{ E \vdash \texttt{(}x\texttt{)} \mathrel{\texttt{=}\!\texttt{>}} e \Downarrow \texttt{(}x\texttt{)} \mathrel{\texttt{=}\!\texttt{>}} e [ E ] } \]
\[ \inferrule[EvalCall]{ ??? }{ E \vdash e_1\texttt{(}e_2\texttt{)} \Downarrow v' } \]
scala.NotImplementedError: an implementation is missing scala.Predef$.$qmark$qmark$qmark(Predef.scala:345) ammonite.$sess.cmd14$Helper.<init>(cmd14.sc:1) ammonite.$sess.cmd14$.<clinit>(cmd14.sc:7)