计算机科学 ›› 2011, Vol. 38 ›› Issue (4): 185-187.

• 软件工程 • 上一篇    下一篇

基于范畴计算的多目标语言程序生成架构

王金全,郑宇军   

  1. (北京装备系统工程研究所 北京100093)1(中国科学院软件研究所 北京100080)
  • 出版日期:2018-11-16 发布日期:2018-11-16
  • 基金资助:
    本文受国家自然科学基金(60773054)资助。

Category Theoretic Framework of Multi-language Program Generation

WANG Jin-quan,ZHENG Yu-jun   

  • Online:2018-11-16 Published:2018-11-16

摘要: 提出了一种基于范畴论的多目标语言程序生成架构,程序元素的元类型在程序元模型范畴中定义,常用的软件开发模式由元模型实例组成并带有可配置的参数,模式到可执行语言的表达式、函数、类型等映射由范畴函子统一定义。在实际应用开发时,通过函子计算将抽象模式精化到不同的目标语言程序范畴。各种语言的精化计算方式具有统一的契约规范,从而支持高度的灵活性和重用度水平。

关键词: 范畴论,程序生成,函子,模型变换

Abstract: The paper proposed a multi language program generation framework based on category theory. Meta-types of basic program elements are defined in the category of meta-models. Typical patterns in software development are parameterized and composed by instances of meta-models and can be transformed into different programs through refinements to different executable language categories, the computations of which arc based on categorical functors defining the mappings to language expressions,functions and types and complying with a unified contract. Thus the framework significantly improves the flexibility and reusability of program generation.

Key words: Category theory, Program generation, Functor, Model transformation

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!