We explore the integration of metaprogramming in a call-by-value linear lambda-calculus and sketch its extension to a session type system. We build on a model of contextual modal type theory with multi-level contexts, where contextual values, closing arbitrary terms over a series of variables, may then be boxed and transmitted in messages. Once received, one such value may then be unboxed (with a let-box construct) and locally applied before being run. We present a series of examples where servers prepare and ship code on demand via session typed messages.
翻译:我们探索在按值调用的线性λ-演算中集成元编程,并简述其向会话类型系统的扩展。我们基于具有多级上下文的上下文模态类型理论模型构建,其中上下文值(将任意项封闭于一系列变量之上)可被装箱并通过消息传输。在接收后,此类值可通过let-box构造解包并局部应用,随后执行。我们通过一系列示例展示服务器如何通过会话类型消息按需准备并传输代码。