TY - GEN
T1 - Compiling recursive Prolog programs with list structure into procedural languages
AU - Nam, Young K.
AU - Henschen, Lawrence Joseph
N1 - Publisher Copyright:
© 1991 IEEE.
PY - 1991
Y1 - 1991
N2 - We present an algorithm 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 paper 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 presented in this paper 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. Backtracking is accomplished by a traversal of a tree whose nodes contain predicates instantiated.
AB - We present an algorithm 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 paper 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 presented in this paper 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. Backtracking is accomplished by a traversal of a tree whose nodes contain predicates instantiated.
KW - List constructor
KW - Mutual recursive programs
KW - Procedural languages
KW - Prolog compilation
KW - Software specification language
UR - http://www.scopus.com/inward/record.url?scp=85068062057&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85068062057&partnerID=8YFLogxK
U2 - 10.1109/CMPSAC.1991.170190
DO - 10.1109/CMPSAC.1991.170190
M3 - Conference contribution
AN - SCOPUS:85068062057
T3 - Proceedings - International Computer Software and Applications Conference
SP - 281
EP - 287
BT - Proceedings of the15th Annual International Computer Software and Applications Conference, CMPSAC 1991
PB - IEEE Computer Society
T2 - 15th Annual International Computer Software and Applications Conference, CMPSAC 1991
Y2 - 11 September 1991 through 13 September 1991
ER -