Program optimization with logic program transformation

We will introduce a software development method to develop an efficient program for stream data with a logic program transformation technique. The program specification is represented with the graph representation which is transformed to declarative Prolog predicates directly. In the specification, the input/output data are abstracted with list structure and the problem is specified with the relations between input list and output list. Since Prolog program is regarded as not only declarative predicates but also procedural program, we can utilize Prolog description as a declarative specification and a procedural program. In our method, the declarative specification is transformed to an efficient procedural program by the Fold/Unfold program transformation technique. In this paper, we will apply our method to the lexical analysis problem of the compiler program.

[1]  Christopher J. Hogger,et al.  Derivation of Logic Programs , 1981, JACM.

[2]  William F. Clocksin,et al.  Programming in Prolog , 1981, Springer Berlin Heidelberg.

[3]  K. Clark,et al.  Predicate logic: a calculus for deriving programs , 1977, IJCAI 1977.