Stepwise Enhancement and Higher Order Programming in Prolog

Lee Naish and Leon Sterling

This paper presents two views of stepwise enhancement, one a pragmatic syntax-based approach and the other a semantic approach based on higher order functions and relating to shape and polytypism. The approaches are outlined, and the perhaps surprisingly close relationship between the two described. By combining the advantages of both approaches, it is shown how more code in both functional and logic programming languages can be constructed in a systematic way. We describe a prototype system which allows higher order predicate definitions to be produced automatically from type definitions or Horn clause skeletons and relate some experiences in using higher order programming in Prolog.