This file is indexed.

/usr/share/doc/racket/racklog/index.html is in racket-doc 6.1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>Racklog: Prolog-Style Logic Programming</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="" class="tocviewselflink" data-pltdoc="x">Racklog:<span class="mywbr"> &nbsp;</span> Prolog-<wbr></wbr>Style Logic Programming</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="simple.html" class="tocviewlink" data-pltdoc="x">Simple Goals and Queries</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="predicates.html" class="tocviewlink" data-pltdoc="x">Predicates</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="racket-w-logic.html" class="tocviewlink" data-pltdoc="x">Using Conventional Racket Expressions in Racklog</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="backtracking.html" class="tocviewlink" data-pltdoc="x">Backtracking</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="unification.html" class="tocviewlink" data-pltdoc="x">Unification</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="and-or.html" class="tocviewlink" data-pltdoc="x">Conjuctions and Disjunctions</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="lv-manip.html" class="tocviewlink" data-pltdoc="x">Manipulating Racklog Variables</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="cut.html" class="tocviewlink" data-pltdoc="x">The Cut (<span class="RktSym"><span class="RktStxLink">!</span></span>)</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="set-of.html" class="tocviewlink" data-pltdoc="x">Set Predicates</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="Racklog_Module_Language.html" class="tocviewlink" data-pltdoc="x">Racklog Module Language</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="glossary.html" class="tocviewlink" data-pltdoc="x">Glossary of Racklog Primitives</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber"></span><a href="#%28part._top%29" class="tocsubseclink" data-pltdoc="x">Racklog:<span class="mywbr"> &nbsp;</span> Prolog-<wbr></wbr>Style Logic Programming</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">6.1</span></div><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<span class="nonavigation">&larr; prev</span>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">up</a>&nbsp;&nbsp;<a href="simple.html" title="forward to &quot;1 Simple Goals and Queries&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h2 x-source-module="(lib &quot;racklog/racklog.scrbl&quot;)" x-part-tag="&quot;top&quot;"><a name="(part._top)"></a><a name="(part._.Racklog__.Prolog-.Style_.Logic_.Programming)"></a><a name="(mod-path._racklog)"></a>Racklog: Prolog-Style Logic Programming</h2><div class="SAuthorListBox"><span class="SAuthorList"><p class="author">Dorai Sitaram</p></span></div><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>Adapted from Schelog by Dorai Sitaram for Racket by Dorai Sitaram,
John Clements, and Jay McCarthy.</p></blockquote></blockquote></blockquote><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">racklog</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">racklog</span></span></td></tr></table></p><p>Racklog is an <span style="font-style: italic">embedding</span> of
Prolog-style logic programming in Racket.  &ldquo;Embedding&rdquo;
means you don&rsquo;t lose Racket: You can use Prolog-style and
conventional Racket code fragments alongside each other.
Racklog contains the full repertoire of Prolog features,
including meta-logical and second-order (&ldquo;set&rdquo;)
predicates, leaving out only those features that could more
easily and more efficiently be done with Racket
subexpressions.</p><p>The Racklog implementation uses the approach to logic
programming for Scheme described in Felleisen [<a href="doc-bibliography.html#%28cite._mf~3aprolog%29" data-pltdoc="x">mf:prolog</a>] and
Haynes [<a href="doc-bibliography.html#%28cite._logick%29" data-pltdoc="x">logick</a>].  In contrast to earlier Lisp simulations of
Prolog [<a href="doc-bibliography.html#%28cite._campbell%29" data-pltdoc="x">campbell</a>],
which used explicit continuation
arguments to store failure (backtrack) information, the
Felleisen and Haynes model uses the implicit reified
continuations of Scheme. In Racket these are provided by the operator
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=cont.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._call-with-current-continuation%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">call-with-current-continuation</a></span> (aka <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=cont.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._call%252Fcc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">call/cc</a></span>).  This
allows Racklog to be an <span style="font-style: italic">embedding</span>, ie, logic
programming is not built as a new language on top of Racket,
but is used alongside Racket&rsquo;s other features.  Both styles
of programming may be mixed to any extent that a project
needs.</p><p>The Racklog user does not need to know about the
implementation mechanism or about <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=cont.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._call%252Fcc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">call/cc</a></span> and
continuations to get on with the business of
doing logic programming with Racklog.</p><p>This text is a gentle introduction to Racklog syntax
and programming.  It assumes a working knowledge of
Racket and an awareness of, if not actual programming
experience with, Prolog.  If you need assistance for Prolog,
you may consult [<a href="doc-bibliography.html#%28cite._bratko%29" data-pltdoc="x">bratko</a>, <a href="doc-bibliography.html#%28cite._ok~3aprolog%29" data-pltdoc="x">ok:prolog</a>, <a href="doc-bibliography.html#%28cite._aop%29" data-pltdoc="x">aop</a>] or
many other excellent books and
online documents available.</p><table cellspacing="0" cellpadding="0"><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="simple.html" class="toptoclink" data-pltdoc="x">1<span class="hspace">&nbsp;</span>Simple Goals and Queries</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="predicates.html" class="toptoclink" data-pltdoc="x">2<span class="hspace">&nbsp;</span>Predicates</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="predicates.html#%28part._facts%29" class="toclink" data-pltdoc="x">2.1<span class="hspace">&nbsp;</span>Predicates Introducing Facts</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="predicates.html#%28part._rules%29" class="toclink" data-pltdoc="x">2.2<span class="hspace">&nbsp;</span>Predicates with Rules</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="predicates.html#%28part._solving-goals%29" class="toclink" data-pltdoc="x">2.3<span class="hspace">&nbsp;</span>Solving Goals</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="predicates.html#%28part._assert%29" class="toclink" data-pltdoc="x">2.4<span class="hspace">&nbsp;</span>Asserting Extra Clauses</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="predicates.html#%28part._local-vars%29" class="toclink" data-pltdoc="x">2.5<span class="hspace">&nbsp;</span>Local Variables</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="racket-w-logic.html" class="toptoclink" data-pltdoc="x">3<span class="hspace">&nbsp;</span>Using Conventional Racket Expressions in Racklog</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="racket-w-logic.html#%28part._constructors%29" class="toclink" data-pltdoc="x">3.1<span class="hspace">&nbsp;</span>Constructors</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="racket-w-logic.html#%28part._is%29" class="toclink" data-pltdoc="x">3.2<span class="hspace">&nbsp;</span><span class="RktSym"><span class="RktStxLink">%is</span></span></a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="racket-w-logic.html#%28part._lexical-scoping%29" class="toclink" data-pltdoc="x">3.3<span class="hspace">&nbsp;</span>Lexical Scoping</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="racket-w-logic.html#%28part._type-predicates%29" class="toclink" data-pltdoc="x">3.4<span class="hspace">&nbsp;</span>Type Predicates</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="backtracking.html" class="toptoclink" data-pltdoc="x">4<span class="hspace">&nbsp;</span>Backtracking</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="unification.html" class="toptoclink" data-pltdoc="x">5<span class="hspace">&nbsp;</span>Unification</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="unification.html#%28part._.The_.Occurs_.Check%29" class="toclink" data-pltdoc="x">5.1<span class="hspace">&nbsp;</span>The Occurs Check</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="and-or.html" class="toptoclink" data-pltdoc="x">6<span class="hspace">&nbsp;</span>Conjuctions and Disjunctions</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="lv-manip.html" class="toptoclink" data-pltdoc="x">7<span class="hspace">&nbsp;</span>Manipulating Racklog Variables</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="lv-manip.html#%28part._var%29" class="toclink" data-pltdoc="x">7.1<span class="hspace">&nbsp;</span>Checking for Variables</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="lv-manip.html#%28part._freeze%29" class="toclink" data-pltdoc="x">7.2<span class="hspace">&nbsp;</span>Preserving Variables</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="cut.html" class="toptoclink" data-pltdoc="x">8<span class="hspace">&nbsp;</span>The Cut (<span class="RktSym"><span class="RktStxLink">!</span></span>)</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="cut.html#%28part._if-then-else%29" class="toclink" data-pltdoc="x">8.1<span class="hspace">&nbsp;</span>Conditional Goals</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="cut.html#%28part._not%29" class="toclink" data-pltdoc="x">8.2<span class="hspace">&nbsp;</span>Negation as Failure</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="set-of.html" class="toptoclink" data-pltdoc="x">9<span class="hspace">&nbsp;</span>Set Predicates</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="Racklog_Module_Language.html" class="toptoclink" data-pltdoc="x">10<span class="hspace">&nbsp;</span>Racklog Module Language</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html" class="toptoclink" data-pltdoc="x">11<span class="hspace">&nbsp;</span>Glossary of Racklog Primitives</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html#%28part._.Racket_.Predicates%29" class="toclink" data-pltdoc="x">11.1<span class="hspace">&nbsp;</span>Racket Predicates</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html#%28part._.User_.Interface%29" class="toclink" data-pltdoc="x">11.2<span class="hspace">&nbsp;</span>User Interface</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html#%28part._.Relations%29" class="toclink" data-pltdoc="x">11.3<span class="hspace">&nbsp;</span>Relations</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html#%28part._.Racklog_.Variables%29" class="toclink" data-pltdoc="x">11.4<span class="hspace">&nbsp;</span>Racklog Variables</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html#%28part._.Cut%29" class="toclink" data-pltdoc="x">11.5<span class="hspace">&nbsp;</span>Cut</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html#%28part._.Racklog_.Operators%29" class="toclink" data-pltdoc="x">11.6<span class="hspace">&nbsp;</span>Racklog Operators</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html#%28part._.Unification%29" class="toclink" data-pltdoc="x">11.7<span class="hspace">&nbsp;</span>Unification</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html#%28part._.Numeric_.Predicates%29" class="toclink" data-pltdoc="x">11.8<span class="hspace">&nbsp;</span>Numeric Predicates</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html#%28part._.List_.Predicates%29" class="toclink" data-pltdoc="x">11.9<span class="hspace">&nbsp;</span>List Predicates</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html#%28part._.Set_.Predicates%29" class="toclink" data-pltdoc="x">11.10<span class="hspace">&nbsp;</span>Set Predicates</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html#%28part._.Racklog_.Predicates%29" class="toclink" data-pltdoc="x">11.11<span class="hspace">&nbsp;</span>Racklog Predicates</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="glossary.html#%28part._.Racklog_.Variable_.Manipulation%29" class="toclink" data-pltdoc="x">11.12<span class="hspace">&nbsp;</span>Racklog Variable Manipulation</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="doc-bibliography.html" class="toptoclink" data-pltdoc="x">Bibliography</a></p></td></tr></table><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<span class="nonavigation">&larr; prev</span>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">up</a>&nbsp;&nbsp;<a href="simple.html" title="forward to &quot;1 Simple Goals and Queries&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>