An application of abstract interpretation in source level program transformation [chapter]

Daniel Schreye, Maurice Bruynooghe
1989 Lecture Notes in Computer Science  
We describe an application of abstract interpretation within the field of source-tosource program transformation for pure Horn clause logic programs. Using a very concrete setting, we aim to provide a comprehensible introduction to the technique of abstract interpretation, particularly suited for the novice in the fxeld. Also, we argue that abstract interpretation is not only suited for applications in code optimization, but provides an excellent tool to support techniques in source level
more » ... m transformation. I n t r o d u c t i o n . If one aims to prove general properties of programs, it is of crucial importance ~ have the ability of performing some kind of data abstraction. Although the runtime behavior observed during a concrete execution of a program may provide an example to support our expectations on the presence or absence of certain properties, a technique for interpreting the program using abstract data is needed to be able to prove these properties in general. P.Cousot and R,Cousot in [10] were the first to thoroughly describe a general mechanism for the abstract interpretation of imperative programs. Very recently, several successful efforts were made to adapt their technique to logic programming. Gener~ reformulations have been presented by C.S.Mellish [22], N.D.Jones and H.Sondergaard [20],T.Kanamari and T.Kawamura [21] and M.Bruynooghe [6], applications in code optimization for logic programs have been described by S.K.Debray and D.S.~Varren [12] and M.Bruynooghe et al. [5]. Also, a first description of the use of abstract interpretation in program transformation -more particularly in program specialization is presented by J.Gallagher and M.Codish [16]. The increasing attention that abstract interpretation has obtained from researchers active in the field of logic programming can beexplained by severat reasons. First, there is the desire to obtain a better runtime efficiency for declarative programming languages such as Prolog. Through code optimizations obtained from mode inference, type inference and compile time garbage collection, there is high hope of eventually achieving runtime efficiencies of logic programs that are comparable to those of their imperative equivalents' Also, there is the ease with which abstract interpretation can be described and implemented within the setting of logic programming. This is partially due to the fact that a language such as Prolog contains its own meta-language, increasing the ability of writing various types of interpreters for the language. A second reason is that, because of its high declarativity and its data structuring facilities, the language is particularly well suited for symbol manipulation.
doi:10.1007/3-540-50820-1_39 fatcat:v3bwjopefzgmnggf6mtax3owuu