A scheme for compiling GHC to prolog using freeze

Holmgren, Fredrik and Waern, Annika (1987) A scheme for compiling GHC to prolog using freeze. [SICS Report]



By using the metapredicate freeze, object-oriented programming and process simulation can, for several problems, be done directly in Prolog; although, this is a tiresome and untidy chore. Committed choice languages, on the other hand, provide an elegant syntax for these types of programs. A scheme is given for compiling Guarded Horn Clauses into sequential Prolog, using Prolog's own scheduling principle. Synchronization is implemented using freeze, thereby avoiding busy wait. This proves that Prolog, including freeze, gives enough strength to cover a wide range of object-oriented programming problems, without redefining unification or defining a non-depth-first execution system on top of Prolog. The report presents two versions of the idea: one for flat GHC and one for full GHC. For the flat GHC version, a compiler has been developed and found to give satsfactory behavior.

Item Type:SICS Report
Additional Information:Original report number R87007.
ID Code:2552
Deposited By:Vicki Carleson
Deposited On:17 Sep 2009
Last Modified:18 Nov 2009 16:11

Repository Staff Only: item control page