Prolog in ‘C’

  • Authors:
  • Joanne L. Boyd;Gerald M. Karam

  • Affiliations:
  • Dept. of Systems and Computer Eng., Carleton Univ., Ottawa, Ontario, CANADA, K1S 5B6;Dept. of Systems and Computer Eng., Carleton Univ., Ottawa, Ontario, CANADA, K1S 5B6

  • Venue:
  • ACM SIGPLAN Notices
  • Year:
  • 1990

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper describes a procedural definition of Prolog based on the features of the 'C' programming language. Our motivation to exploit the complementary nature of procedural and declarative programming lead to the objective of a dual Prolog and 'C' programming environment. A translator has been built which accepts Prolog programs and produces sets of 'C' functions which can be integrated into a 'C' program to form a single, common language target system. Each 'C' function corresponds to a single Prolog procedure. The emphasis of the translation is placed on producing a consistent and readable format for PIC (Prolog in 'C') code which allows the user to optimize the code by tuning. Examples are provided to demonstrate the benefit of optimizations versus their programming effort. The PIC code produced by the translator has been tested for accuracy, coverage, and efficiency, and exhibited acceptable results.