> [!IMPORTANT] > This page was copied from https://github.com/dart-lang/sdk/wiki and needs review. > Please [contribute](../CONTRIBUTING.md) changes to bring it up-to-date - > removing this header - or send a CL to delete the file. --- The small-step operational semantics of Dart Kernel is given by an abstract machine in the style of the CEK machine. The machine is defined by a single step transition function where each step of the machine starts in a configuration and deterministically gives a next configuration. There are several different configurations defined below. _x_ ranges over variables, ρ ranges over environments, _K_ ranges over expression continuations, _A_ ranges over application continuations, _E_ ranges over expressions, _S_ ranges over statements, _V_ ranges over values. Environments are finite functions from variables to values. _ρ_[_x_ → _V_] denotes the environment that maps _x_ to _V_ and _y_ to _ρ_(_y_) for all _y_ ≠ _x_. #### Expression configuration An expression configuration indicates the evaluation of an expression with respect to an environment and an expression continuation. Expression configuration | Next configuration -- | -- <_x_, _ρ_, _K_>_expr_ | <_K_, _ρ_(_x_), _ρ_>_cont_ <_x = E_, _ρ_, _K_>_expr_ | <_E_, _ρ_, **VarSetK**(_x_, _K_)>_expr_ <_!E_, _ρ_, _K_>_expr_ | <_E_, _ρ_, **NotK**(_K_)>_expr_ <_E1 **and** E2_, _ρ_, _K_>_expr_ | <_E1_, _ρ_, **AndK**(_E2_, _K_)>_expr_ <_E1 **or** E2_, _ρ_, _K_>_expr_ | <_E1_, _ρ_, **OrK**(_E2_, _K_)>_expr_ <_E1? E2 : E3_, _ρ_, _K_>_expr_ | <_E1_, _ρ_, **ConditionalK**(_E2_, _E3_, _K_)>_expr_ <_StringConcat(exprList)_, _ρ_, _K_>_expr_ | <_exprList_, _ρ_, **StringConcatenationA**(_K_)>_exprList_ <_print(E)_, _ρ_, _K_>_expr_ | <_E_, _ρ_, **PrintK**(_K_)>_expr_ <_f(exprList)_, _ρ_, _K_>_expr_ | <_exprList_, _ρ_, **StaticInvocationA**(_S : f.body_, _K_)>_exprList_ <_BasicLiteral_, _ρ_, _K_>_expr_ | <_K_, _BasicLiteral_, _ρ_>_cont_ <_**Let** x = E1 **in** E2_, _ρ_, _K_>_expr_ | <_E1_, _ρ_, **LetK**(_x_, E2, _ρ_, _K_)>_expr_ #### Expression continuation configuration An expression continuation configuration indicates the application of an expression continuation __K__ to a value and an environment. The environment is threaded to the continuation because expressions can mutate the environment. Expression continuation configuration | Next configuration -- | -- <**VarSetK**(_x_, _K_), _V_, _ρ_>_cont_ | <_K_, _V_, _ρ_[_x_ → _V_]>cont <**PrintK**(_K_), _V_, _ρ_>_cont_ | <_K_, _∅_, _ρ_>cont <**ExpressionListK**(_exprList_, _A_), _V_, _ρ_>_cont_ | <_exprList_, _ρ_, **ValueApplicationA**(_V_, _A_)>_exprList_ <**ExpressionK**(_C_), _V_, _ρ_ >_cont_ | _C_ #### Expression list configuration An expression list configuration indicates the evaluation of a list of expressions with respect to an environment and an application continuation. Expression list configuration | Next configuration --|-- <_∅_, _ρ_, _A_>_exprList_ | <_A_, _∅_>_acont_ <_E :: tail_, _ρ_, _A_>_exprList_ | <_E_, _ρ_, **ExpressionListK**(_tail_, _A_)>_expr_ #### Application continuation configuration An application continuation configuration indicates the application of __A__ to a list of values. Application continuation configuration | Next configuration --|-- <**StaticInvocationA**(_S_, _K_), _valList_>_acont_ | <_S_, _ρ_[_formalList_ → _valList_], _∅_, **ExitC**(_K_), _K_>_exec_ <**ValueApplicationA**(V, _A_), _valList_>_acont_ | <_A_, _V :: valList_>_acont_ #### Statement configuration A statement configuration indicates the execution of a statement with respect to an environment. _S_ ranges over statements, _L_ ranges over labels, _C_ ranges over statement configurations. Statement configuration | Next configuration --|-- <**Expression**(_E_), _ρ_, _L_, _C_, _K_>_exec_ | <_E_, _ρ_, **ExpressionK**(_C_)>_expr_