klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 09d664966bad08a6df9848b23c8f5d0e37ab7d01
parent 94fbd845302765fdffc0580468fa847c3c0fbef2
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri, 27 May 2011 20:14:23 -0300

Added equivalence modules to the manual.

Diffstat:
Mmanual/html/Index.html | 9+++++++--
Mmanual/html/index.html | 4+++-
Mmanual/klisp.info | 59+++++++++++++++++++++++++++++++++++++++++++----------------
Mmanual/src/booleans.texi | 2+-
Amanual/src/equivalence.texi | 27+++++++++++++++++++++++++++
Mmanual/src/index.texi | 2+-
Mmanual/src/klisp.texi | 3+++
7 files changed, 85 insertions(+), 21 deletions(-)

diff --git a/manual/html/Index.html b/manual/html/Index.html @@ -5,7 +5,7 @@ <meta name="description" content="klisp Reference Manual"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> -<link rel="prev" href="Booleans.html#Booleans" title="Booleans"> +<link rel="prev" href="Equivalence.html#Equivalence" title="Equivalence"> <link rel="next" href="../index.html#dir" title="(dir)"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <meta http-equiv="Content-Style-Type" content="text/css"> @@ -26,7 +26,7 @@ <a name="Index"></a> <p> Next:&nbsp;<a rel="next" accesskey="n" href="../index.html#dir">(dir)</a>, -Previous:&nbsp;<a rel="previous" accesskey="p" href="Booleans.html#Booleans">Booleans</a>, +Previous:&nbsp;<a rel="previous" accesskey="p" href="Equivalence.html#Equivalence">Equivalence</a>, Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a> <hr> </div> @@ -43,6 +43,9 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a> <li><a href="Booleans.html#index-booleans-12">booleans</a>: <a href="Booleans.html#Booleans">Booleans</a></li> <li><a href="Format-of-Descriptions.html#index-description-format-7">description format</a>: <a href="Format-of-Descriptions.html#Format-of-Descriptions">Format of Descriptions</a></li> <li><a href="Evaluation-Notation.html#index-documentation-notation-4">documentation notation</a>: <a href="Evaluation-Notation.html#Evaluation-Notation">Evaluation Notation</a></li> +<li><a href="Equivalence.html#index-eq_003f-20"><code>eq?</code></a>: <a href="Equivalence.html#Equivalence">Equivalence</a></li> +<li><a href="Equivalence.html#index-equal_003f-21"><code>equal?</code></a>: <a href="Equivalence.html#Equivalence">Equivalence</a></li> +<li><a href="Equivalence.html#index-equivalence-19">equivalence</a>: <a href="Equivalence.html#Equivalence">Equivalence</a></li> <li><a href="Error-Messages.html#index-error-message-notation-6">error message notation</a>: <a href="Error-Messages.html#Error-Messages">Error Messages</a></li> <li><a href="Evaluation-Notation.html#index-evaluation-notation-3">evaluation notation</a>: <a href="Evaluation-Notation.html#Evaluation-Notation">Evaluation Notation</a></li> <li><a href="Some-Terms.html#index-fonts-2">fonts</a>: <a href="Some-Terms.html#Some-Terms">Some Terms</a></li> @@ -61,6 +64,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a> <li><a href="Index.html#toc_License">MIT/X11 License</a></li> <li><a href="Index.html#toc_Introduction">1 Introduction</a></li> <li><a href="Index.html#toc_Booleans">2 Booleans</a></li> +<li><a href="Index.html#toc_Equivalence">3 Equivalence</a></li> <li><a href="Index.html#toc_Index">Index</a></li> </ul> </div> @@ -87,6 +91,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a> <li><a href="Acknowledgements.html#Acknowledgements">1.4 Acknowledgements</a> </li></ul> <li><a name="toc_Booleans" href="Booleans.html#Booleans">2 Booleans</a> +<li><a name="toc_Equivalence" href="Equivalence.html#Equivalence">3 Equivalence</a> <li><a name="toc_Index" href="Index.html#Index">Index</a> </li></ul> </div> diff --git a/manual/html/index.html b/manual/html/index.html @@ -38,8 +38,10 @@ Up:&nbsp;<a rel="up" accesskey="u" href="../index.html#dir">(dir)</a> <li><a accesskey="2" href="Introduction.html#Introduction">Introduction</a>: Introduction and conventions used. <!-- TODO lisp types and other introductions --> <li><a accesskey="3" href="Booleans.html#Booleans">Booleans</a>: Boolean module features. +<li><a accesskey="4" href="Equivalence.html#Equivalence">Equivalence</a>: Equivalence under mutation &amp; Equivalence up to +mutation module features. <!-- TODO complete --> -<li><a accesskey="4" href="Index.html#Index">Index</a>: Index including concepts, functions, variables, +<li><a accesskey="5" href="Index.html#Index">Index</a>: Index including concepts, functions, variables, and other terms. <!-- Appendices --> diff --git a/manual/klisp.info b/manual/klisp.info @@ -27,6 +27,8 @@ in part. * License:: Conditions for copying and changing klisp. * Introduction:: Introduction and conventions used. * Booleans:: Boolean module features. +* Equivalence:: Equivalence under mutation & Equivalence up to +mutation module features. * Index:: Index including concepts, functions, variables, and other terms. @@ -341,7 +343,7 @@ manual also borrows freely from both the Kernel Report and the Scheme Reports.  -File: klisp.info, Node: Booleans, Next: Index, Prev: Introduction, Up: Top +File: klisp.info, Node: Booleans, Next: Equivalence, Prev: Introduction, Up: Top 2 Booleans ********** @@ -394,7 +396,28 @@ boolean type is encapsulated. value, an error is signaled (even if it's the last one).  -File: klisp.info, Node: Index, Next: (dir), Prev: Booleans, Up: Top +File: klisp.info, Node: Equivalence, Next: Index, Prev: Booleans, Up: Top + +3 Equivalence +************* + +Kernel has two general-purpose equivalence predicates (whereas R5RS +Scheme has three). The two Kernel predicates correspond to the abstract +notions of equivalence up to mutation (`equal') and equivalence in the +presence of mutation (`eq?'). + + -- Applicative: eq? (eq? . objects) + Predicate `eq?' returns true iff all of `objects' are effectively + the same object, even in the presence of mutation. + + -- Applicative: equal? (equal? . objects) + Predicate `equal?' returns true iff all of `objects' "look" the + same as long as nothing is mutated. This is a weaker predicate + than `eq?'; that is, `equal?' must return true whenever `eq?' + would return true. + + +File: klisp.info, Node: Index, Next: (dir), Prev: Equivalence, Up: Top Index ***** @@ -412,6 +435,9 @@ Index * description format: Format of Descriptions. (line 6) * documentation notation: Evaluation Notation. (line 6) +* eq?: Equivalence. (line 12) +* equal?: Equivalence. (line 16) +* equivalence: Equivalence. (line 6) * error message notation: Error Messages. (line 6) * evaluation notation: Evaluation Notation. (line 6) * fonts: Some Terms. (line 13) @@ -430,19 +456,20 @@ Index  Tag Table: Node: Top302 -Node: License924 -Node: Introduction2595 -Node: Caveats5404 -Node: Kernel History6186 -Node: Conventions7624 -Node: Some Terms8294 -Node: Evaluation Notation8963 -Node: Printing Notation9704 -Node: Error Messages10180 -Node: Format of Descriptions10826 -Node: A Sample Applicative Description11389 -Node: Acknowledgements13045 -Node: Booleans13430 -Node: Index15932 +Node: License1025 +Node: Introduction2696 +Node: Caveats5505 +Node: Kernel History6287 +Node: Conventions7725 +Node: Some Terms8395 +Node: Evaluation Notation9064 +Node: Printing Notation9805 +Node: Error Messages10281 +Node: Format of Descriptions10927 +Node: A Sample Applicative Description11490 +Node: Acknowledgements13146 +Node: Booleans13531 +Node: Equivalence16039 +Node: Index16828  End Tag Table diff --git a/manual/src/booleans.texi b/manual/src/booleans.texi @@ -1,7 +1,7 @@ @c -*-texinfo-*- @setfilename ../src/booleans -@node Booleans, Index, Introduction, Top +@node Booleans, Equivalence, Introduction, Top @comment node-name, next, previous, up @chapter Booleans diff --git a/manual/src/equivalence.texi b/manual/src/equivalence.texi @@ -0,0 +1,27 @@ +@c -*-texinfo-*- +@setfilename ../src/equivalence + +@node Equivalence, Index, Booleans, Top +@comment node-name, next, previous, up + +@chapter Equivalence +@cindex equivalence + + Kernel has two general-purpose equivalence predicates (whereas R5RS +Scheme has three). The two Kernel predicates correspond to the +abstract notions of equivalence up to mutation (@code{equal}) and +equivalence in the presence of mutation (@code{eq?}). + +@deffn Applicative eq? (eq? . objects) + Predicate @code{eq?} returns true iff all of @code{objects} are +effectively the same object, even in the presence of mutation. +@c todo maybe add more content here, specifical to klisp +@end deffn + +@deffn Applicative equal? (equal? . objects) + Predicate @code{equal?} returns true iff all of @code{objects} +``look'' the same as long as nothing is mutated. This is a weaker +predicate than @code{eq?}; that is, @code{equal?} must return true +whenever @code{eq?} would return true. +@c todo maybe add more content here, specifical to klisp +@end deffn diff --git a/manual/src/index.texi b/manual/src/index.texi @@ -2,7 +2,7 @@ @setfilename ../src/index @c TODO correct prev node -@node Index, (dir), Booleans, Top +@node Index, (dir), Equivalence, Top @c this is from the elisp manual... Should read a little about this. @unnumbered Index diff --git a/manual/src/klisp.texi b/manual/src/klisp.texi @@ -73,6 +73,8 @@ in part. * Introduction:: Introduction and conventions used. @c TODO lisp types and other introductions * Booleans:: Boolean module features. +* Equivalence:: Equivalence under mutation & Equivalence up to +mutation module features. @c TODO complete * Index:: Index including concepts, functions, variables, and other terms. @@ -85,6 +87,7 @@ in part. @include intro.texi @include booleans.texi +@include equivalence.texi @c appendices @c TODO