Call-by-Push-Value (CBPV) is a programming paradigm subsuming both Call-by-Name (CBN) and Call-by-Value (CBV) semantics. The paradigm was recently modelled by means of the Bang Calculus, a term language connecting CBPV and Linear Logic. This paper presents a revisited version of the Bang Calculus, called $\lambda !$, enjoying some important properties missing in the original system. Indeed, the new calculus integrates commutative conversions to unblock value redexes while being confluent at the same time. A second contribution is related to non-idempotent types. We provide a quantitative type system for our $\lambda !$-calculus, and we show that the length of the (weak) reduction of a typed term to its normal form \emph{plus} the size of this normal form is bounded by the size of its type derivation. We also explore the properties of this type system with respect to CBN/CBV translations. We keep the original CBN translation from $\lambda$-calculus to the Bang Calculus, which preserves normal forms and is sound and complete with respect to the (quantitative) type system for CBN. However, in the case of CBV, we reformulate both the translation and the type system to restore two main properties: preservation of normal forms and completeness. Last but not least, the quantitative system is refined to a \emph{tight} one, which transforms the previous upper bound on the length of reduction to normal form plus its size into two independent \emph{exact} measures for them.
翻译:callby- Push- Value (CBPV) 是一个包含 Call- by- Name (CBN) 和 Call- Value (CBV) 语义的编程范式。 这个范式最近由Bang Calculus(一个连接 CBPV 和 Linear 逻辑的术语语言) 来模拟。 本文展示了一个重现版的 Bang Calculus, 名为$\ lumbda $ 。 具有在原始系统中缺失的一些重要属性。 事实上, 新的微积分将通缩转换成解盘值的值 值 。 第二种贡献与非功能性格类型的类型有关。 我们为我们的 $\ lambda 提供了一种定量类型系统, 将一个类型缩放到正常的 \ emphevph{plus 。 此格式的大小与其类型排序有关, 我们还在 CBNB/ CBV 翻译中探索了这个类型系统的属性, 将CBN 和 Cal- blus 格式的原始格式转换为 Cal- cal- cal 。