摘要
采用一种基于范畴论发展出来的Monad的实现方法,该方法可从编译器中提取操作性语义,然后将其等价转换为指示性语义。由于Monad方法普遍适用于函数式编程语言,使得基于Monad的可认证数据结构可根据源语言的语法生成新语言特性。优点是新语言特性的设计者无须深入了解修改编译器语法树,也无须修改源语言的语法,即可完成程序语言编译器之间语义的移植。
This paper introduced a Monad implementation method based on category theory, which could extract operational semantics from compilers and convert them into denotational semantics equivalently. As Monad approach was generally applicable to functional programming languages, it made the Monad-based certifiable data structure possible to generate a new language feature according to the syntax of the original language. It was an advantage that the designer of the new language features could migrate the semantics between programming language compilers without the in-depth understanding of the syntax tree of the modified compiler and without amending the syntax of the source language.
作者
贺新征
光焱
祝跃飞
He Xinzheng;Guang Yan;Zhu Yuefei(Information Engineering University,Zhengzhou 450001,Henan,China;School of Computer and Information Engineering,Henan University,Kaifeng 475000,Henan,China)
出处
《计算机应用与软件》
北大核心
2022年第4期5-13,59,共10页
Computer Applications and Software
基金
国家重点研发计划项目(2016YFB0801601)。
关键词
可认证数据结构
范畴理论
类型理论
函数式编程
程序语言设计
Authenticated data structure
Category theory
Type theory
Functional programming
Programming language design