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. >

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call