GRIPS: a Preprocessor for Functional Notation in Prolog

Although Prolog can be remarkably concise, it's far from ideal when we want to compose function calls. Even an expression as simple as "length of list A appended to list B" must be unwrapped into "append A to B giving C, then return the length of C". I'll explain how I overcame this by writing a preprocessor that translates functional notation into Prolog. It lets me define predicates as if defining functions, and write nested function calls without having to do what Fortran implementors had taught their compilers to do in the 1950s. The version described here works with SWI-Prolog.



February 11, 2010
URL:http://www.drdobbs.com/architecture-and-design/grips-a-preprocessor-for-functional-no/228700058

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.