实现混合语义:从功能到命令
Implementing Hybrid Semantics: From Functional to Imperative
摘要:
混合程序将数字控制与微分方程相结合,自然地出现在从生物学和控制理论到实时软件工程的广泛应用领域。这种程序固有的离散和连续行为的纠缠超出了既定的计算机科学基础,产生了与例如无限迭代和混合行为与其他效果的组合相关的挑战。最近出现了一个系统的处理杂交作为一个专门的计算效果。特别是,一个通用的理想化的功能语言HybCore的声音和足够的操作语义已被提出。然而,后一种语义并没有提供将HybCore实现为可运行语言的提示,适合混合系统仿真(例如,语义特征规则具有不可数的前提)。我们介绍了一个强制性的对应HybCore,其语义更简单,可运行,但密切相关的混合单子的层次上的语义HybCore。然后,我们建立了相应的可靠性和充分性定理。为了证明,由此产生的语义可以作为一个坚实的基础,面向混合领域的编程的典型工具的实施,我们提出了一个基于Web的原型实现评估和检查混合程序,在GHCi的Haskell和UTop的OCaml的精神。我们的实现的主要资产是,它正式遵循的操作语义规则。
英文摘要:
Hybrid programs combine digital control with differential equations, and naturally appear in a wide range of application domains, from biology and control theory to real-time software engineering. The entanglement of discrete and continuous behaviour inherent to such programs goes beyond the established computer science foundations, producing challenges related to e.g. infinite iteration and combination of hybrid behaviour with other effects. A systematic treatment of hybridness as a dedicated computational effect has emerged recently. In particular, a generic idealized functional language HybCore with a sound and adequate operational semantics has been proposed. The latter semantics however did not provide hints to implementing HybCore as a runnable language, suitable for hybrid system simulation (e.g. the semantics features rules with uncountably many premises). We introduce an imperative counterpart of HybCore, whose semantics is simpler and runnable, and yet intimately related with the semantics of HybCore at the level of hybrid monads. We then establish a corresponding soundness and adequacy theorem. To attest that the resulting semantics can serve as a firm basis for the implementation of typical tools of programming oriented to the hybrid domain, we present a web-based prototype implementation to evaluate and inspect hybrid programs, in the spirit of GHCi for Haskell and UTop for OCaml. The major asset of our implementation is that it formally follows the operational semantic rules.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。