计算机科学 > 程序设计语言
[提交于 2025年8月17日]
标题:Controlling Copatterns: There and Back Again (Extended Version)
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Copatterns give functional programs a flexible mechanism for responding to their context, and composition can greatly enhance their expressiveness. However, that same expressive power makes it harder to precisely specify the behavior of programs. Using Danvy's functional and syntactic correspondence between different semantic artifacts, we derive a full suite of semantics for copatterns, twice. First, a calculus of monolithic copatterns is taken on a journey from small-step operational semantics to abstract machine to continuation-passing style. Then within continuation-passing style, we refactor the semantics to derive a more general calculus of compositional copatterns, and take the return journey back to derive the other semantic artifacts in reverse order.
提交历史
来自:Paul Downen[v1] 2025年8月17日 星期日 16:44:50 UTC