arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2206.01024cs.PL
收藏

面向约束和对象的第五代程序设计语言及其编译系统

A Constraint and Object Oriented Fifth Generation Programming Language and its Compiler and Runtime System

Han Jipeng, Lichen Zhihang

摘要:

自LISP语言问世以来,第五代程序设计语言已经发展了几十年。然而,与第四代程序设计语言相比,第五代程序设计语言由于语义晦涩、问题表示严谨、推理能力有限等原因,一直没有得到广泛应用。为此,本文提出的第五代程序设计语言COOL(Constraint and Object Ordered Language)克服了以往第五代程序设计语言语义直观、处理问题条件限制严格等问题,提高了其推理能力。具体改进如下:第一,COOL支持面向过程和面向对象,便于在生产项目中应用;第二,COOL支持表达式作为函数声明和函数返回,提高了对数学公式的语言亲和力,支持将函数参数嵌入函数名字符串,使函数命名更接近自然语言。使数学问题更容易描述;第三,COOL引入了加权机制,通过累积加权加速推理过程。第四,COOL在编程中引入了正向和反向函数的概念,这样计算机就可以推断和执行具有逻辑顺序约束的问题。第五,计算机可以通过回溯算法和动态规划算法,利用正解过程推导出逆解过程,从而使计算机能够推导出具有时序约束的问题。第六,引入预执行步骤,将程序的推理和函数查询过程与执行过程分离,提高程序的执行速度。

英文摘要:

Since the advent of LISP, the fifth generation programming language has developed for decades. However, compared with the fourth generation programming language, the fifth generation programming language has not been widely used because of its obscure semantics, rigorous representation of problems, and limited inference ability. For this reason, COOL (Constraint and Object Ordered Language), a fifth generation programming language proposed in this paper, overcomes the problems of intuitive semantics, rigorous restrictions on handling problem conditions, and improves the inference ability of previous fifth generation programming languages. Specific improvements are as follows: First, COOL supports process-oriented and object-oriented for easy application in production projects; Second, COOL supports expression as function declaration and function return, which improves language affinity for mathematical formulas, and supports embedding function parameters into function name strings to make function naming closer to natural languages. Make mathematical problems easier to describe; Third, COOL introduces a weighting mechanism and accelerates the inference process through cumulative weighting. Fourth, COOL introduces the concepts of forward and reverse functions in programming so that computers can infer and execute problems with logical sequential constraints. Fifth, the computer can deduce the reverse solution process by using the forward solution process through the back-tracking algorithm and the dynamic programming algorithm, so that the computer can deduce the problem with time-sequential constraints. Sixth, the pre-execution step is introduced to separate the inference and function query process of the program from the execution process, so as to improve the execution speed of the program.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑