Title :
Compiling recursive Prolog programs with list structure into procedural languages
Author :
Nam, Young K. ; Henschen, Lawrence J.
Author_Institution :
Dept. of Electr. Eng. & Comput. Sci., Northwestern Univ., Evanston, IL, USA
Abstract :
An algorithm is presented for transforming a mutual recursive program in Prolog, which contains the list data structure as a term of the predicate, into an iterative program using a while loop in a procedural language like PASCAL. The purpose of this study is a part of the long-range project to use general logic programming as a software specification tool. The PASCAL program generated by the algorithm obtains the same result as the Prolog program, but without unification and backtracking. In this algorithm the recursive programs are classified into two cases, the determined programs and the undetermined programs, according to the conditions of the variables in the program. The unification process is transformed into a set of assignment and conditional statements by analyzing the variables of the rules in the program
Keywords :
PROLOG; data structures; formal specification; logic programming; program compilers; PASCAL; assignment; conditional statements; data structure; iterative program; list structure; logic programming; procedural languages; recursive Prolog programs compilation; software specification tool; unification process; while loop; Delay; Iterative algorithms; Logic programming; Program processors; Programming profession; Software engineering; Software libraries; Software prototyping; Software tools;
Conference_Titel :
Computer Software and Applications Conference, 1991. COMPSAC '91., Proceedings of the Fifteenth Annual International
Conference_Location :
Tokyo
Print_ISBN :
0-8186-2152-4
DOI :
10.1109/CMPSAC.1991.170190