Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!Germany.EU.net!Munich.Germany.EU.net!ecrc!acrab60!thom
From: thom@ecrc.de (Thom Fruehwirth)
Subject: Re: In defense of Prolog's dynamic typing
Message-ID: <Czq82y.8t4@ecrc.de>
Sender: news@ecrc.de
Reply-To: thom@ecrc.de
Organization: European Computer-Industry Research Centre GmbH.
References: <3aviu6$7dq@hitchcock.dfki.uni-sb.de>
Date: Wed, 23 Nov 1994 15:23:22 GMT
Lines: 20

It is easy to manipulate programs as data in a typed logic language, e.g. 
Prolog with polymorhic types:

   T. Fr{\"{u}}hwirth,
   Using Meta-interpreters for Polymorphic Type Checking,
   2nd Workshop on Meta-Programming in Logic (META 90), K.U. Leuven, Belgium, 
   April 1990.

   contains types like the following (':' read as "has type"):

    (G1,G2):goal :- G1:goal, G2:goal.
    bagof(X,G,L):goal :- X:A, G:goal, Z:list(A).

thom

PS: I think it is not easy to treat programs as data in Prolog
   once you want to do something non-trivial. One reason is
   the syntax of terms - with feature terms it would be easier.


