🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #1123

Re: Meta-programming question

#1123
From: R. Kym Horsell
Date: Wed, 29 Aug 1990 19:59
24 lines
1271 bytes
In article <199@qt.cs.utexas.edu> bradley@cs.utexas.edu (Bradley L. Richards) writes:
>I'm working on a meta-programming project and have run across something I just
>can't figure a way to do.  I want to locate a clause via unification with its
>head, and then be able to retrieve the clause *without binding any variables*.

I hope RO'K will provide a more definitive answer, but until
the post makes it to Oz this will have to do.

A general technique (note ``logic programming'' degenerates to
a matter of ``technique'') is to use double negation to
verify whether something can be proved. For example:

verify(X) :- not(not(X)).

?- verify(X=1).

produces

X=_

The extension to unification of clause headds with goals is
straightforward.

-Kym Horsell
Technical Details
Message-ID: <3908@bingvaxu.cc.binghamton.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!leah!bingvaxu!vu0310
References: <199@qt.cs.utexas.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!leah!bingvaxu!vu0310
From: vu0310@bingvaxu.cc.binghamton.edu (R. Kym Horsell)
Newsgroups: comp.lang.prolog
Subject: Re: Meta-programming question
Message-ID: <3908@bingvaxu.cc.binghamton.edu>
Date: 29 Aug 90 19:59:34 GMT
References: <199@qt.cs.utexas.edu>
Reply-To: vu0310@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (R. Kym Horsell)
Organization: SUNY Binghamton, NY
Lines: 24