摘要
为了给基于可逆逻辑综合、可逆电路技术的可逆硬件平台设计可逆软件系统,提出基于JDK的可逆编程语言RJAVA。首先总结可逆编程语言的设计原则,然后为可逆语言R-JAVA设计文法规则和语言处理系统,其语言处理系统提取源程序中的可逆代码段并将其翻译成分别对应正反语义的等价JAVA代码,再将翻译后的JAVA代码交由JDK解释执行。最后通过示例程序表明R-JAVA源程序中的可逆函数既可正向运行,又可反向运行,从软件层次上实现了可逆计算。
To design reversible software system for reversible hardware platform based on reversible logic synthesis and reversible circuit,reversible programming language R-JAVA based on JDK is presented.Firstly the design principles of reversible programming language are summarized,then reversible language R-JAVA is built with JDK,including jobs of designing and implementing syntax rules and language processing system for it,the processing system extracts reversible parts from source code and translates it into equivalent JAVA code with positive semantics and reverse semantics respectively,and then the code is interpreted by JDK.Finally,the results of sample programs show that reversible functions of R-JAVA can proceed either forward or backward,implementing reversible computation on software level is demonstrated the conclusion.
出处
《计算机工程与设计》
CSCD
北大核心
2013年第10期3502-3510,共9页
Computer Engineering and Design
基金
国家自然科学基金项目(60873069)
关键词
可逆逻辑综合
可逆电路
可逆编程语言
语言处理系统
文法规则
可逆计算
reversible logic synthesis
reversible circuit
reversible programming language
language processing system
syntax rule
reversible computation