检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:张子航 罗雯 陈钢 ZHANG Zihang;LUO Wen;CHEN Gang(College of Computer Science and Technology,Nanjing University of Aeronautics and Astronautics Nanjing,Nanjing 211106,China)
机构地区:[1]南京航空航天大学计算机科学与技术学院,江苏南京211106
出 处:《微电子学与计算机》2023年第5期56-64,共9页Microelectronics & Computer
摘 要:相较于命令式语言,函数式语言有两个明显的优点:安全性好、开发周期短.但一般而言,函数式语言的代码性能不够好,妨碍了它的推广和实践应用,尤其是在性能要求很高的领域.基于上述问题进行了一次函数式语言和命令式语言混合编程的探索,试图在同一个项目中结合两类编程语言混合编程,一方面用函数式语言OCaml快速编写复杂度较高的算法核心代码;另一方面,用C语言编写难度不大但是对性能影响比较大的代码,通过这种混合编程方式在较短的时间内可以实现一个结构比较复杂但在性能上接近C语言编写的同类代码的软件.选用海量图形数据的高速区域化查询这一案例,该EDA问题对运算效率有较高的要求,所以在数据结构上选择四叉树结构来实现区域查询,因此是一个比较有代表性的使用高效数据结构来满足性能要求的问题.实验结果表明,OCaml和C的混合编程能将核心算法的研发周期明显缩短,同时性能与C语言编写的同类型的代码相仿,这也就说明了函数式语言和命令式语言的混合编程可以成为EDA软件开发的一个可行的方案.Compared with imperative languages,functional languages offer two main advantages:good security and a short development cycle.However,functional language programs are slower,which hinders their practical application,particularly in areas requiring high performances,such as exploratory data analysis(EDA).This study investigates a hybrid programming paradigm with both functional and command languages.Functional language OCaml develops the core code of an algorithm with high complexity.Meanwhile,C language is used to write codes that are not necessarily difficult but contribute significantly to the performance.An extremely complex algorithm can be implemented rapidly while achieving performance comparable to a handwritten C program using this method.A high-speed regional query of massive graphics data is used in the current experiment.Because EDA require a high computational efficiency of the algorithm,the quadtree data structure is used to accomplish an efficient binary region query.This representative problem uses an efficient data structure to fulfill the performance requirements.The experimental results show that the mixed programming of OCaml and C can shorten the development cycle of the core algorithm significantly,and the performance is similar to the code of the same type written in C language,which also shows that the mixed programming of functional language and imperative language can become a feasible program for EDA software development.
关 键 词:混合编程 电子设计自动化 OCaml 函数式语音 敏捷软件开发 四叉树
分 类 号:TP311.11[自动化与计算机技术—计算机软件与理论] TN702[自动化与计算机技术—计算机科学与技术]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:3.17.157.68