class LamSemantics[Abs, Addr, Time] extends Semantics[LamExp, Abs, Addr, Time]
This defines the semantics of call-by-value lambda expressions
- Alphabetic
- By Inheritance
- LamSemantics
- Semantics
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new LamSemantics()(implicit arg0: LamLattice[Abs], arg1: Address[Addr], arg2: Timestamp[Time])
Type Members
-
type
Env = Environment[Addr]
Shortcut for the environment
-
case class
FrameArg(e: LamExp, env: Env) extends LamFrame with Product with Serializable
One frame to remember the operand when we evaluate the operator
-
case class
FrameFun(v: Abs) extends LamFrame with Product with Serializable
And one frame to remember the operator value when we evaluate the operand
-
trait
LamFrame extends Frame
We need some frames
-
type
Sto = Store[Addr, Abs]
Shorcuct for the store
Value Members
-
implicit
def
actionToSet(action: Action[LamExp, Abs, Addr]): Set[Action[LamExp, Abs, Addr]]
- Definition Classes
- Semantics
-
def
initialBindings: Iterable[(String, Addr, Abs)]
Defines the elements in the initial environment/store
Defines the elements in the initial environment/store
- Definition Classes
- Semantics
-
def
initialEnv: Iterable[(String, Addr)]
- Definition Classes
- Semantics
-
def
initialStore: Iterable[(Addr, Abs)]
- Definition Classes
- Semantics
-
implicit
def
mfActionToActions(mf: MayFail[Action[LamExp, Abs, Addr]]): Set[Action[LamExp, Abs, Addr]]
- Definition Classes
- Semantics
-
implicit
def
mfToActions(mf: MayFail[Set[Action[LamExp, Abs, Addr]]]): Set[Action[LamExp, Abs, Addr]]
- Definition Classes
- Semantics
-
def
parse(program: String): LamExp
The parse function just parses an expression from a string.
The parse function just parses an expression from a string. We rely on an already-defined s-expression parser, and compile an s-expression in a lambda expression. There is some verbosity due to the fact that every s-expression is associated to a position information.
- Definition Classes
- LamSemantics → Semantics
-
def
stepEval(e: LamExp, env: Env, store: Sto, t: Time): Set[Action[LamExp, Abs, Addr]]
The stepEval function defines how to perform an evaluation step on an expression
The stepEval function defines how to perform an evaluation step on an expression
- Definition Classes
- LamSemantics → Semantics
-
def
stepKont(v: Abs, frame: Frame, store: Sto, t: Time): Set[Action[LamExp, Abs, Addr]]
The stepKont function defines how to behave when we reached a value v and we have frame as the top continuation on the stack
The stepKont function defines how to behave when we reached a value v and we have frame as the top continuation on the stack
- Definition Classes
- LamSemantics → Semantics
-
def
stepReceive(self: Any, mname: String, margsv: List[Abs], d: LamExp, env: Environment[Addr], store: Store[Addr, Abs], t: Time): Set[Action[LamExp, Abs, Addr]]
WIP
WIP
- Definition Classes
- Semantics
-
object
Action extends ActionHelpers[Exp, Abs, Addr]
- Definition Classes
- Semantics