<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>A proposal for (aux kanren micro) on Massimo Nocentini</title><link>https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/</link><description>Recent content in A proposal for (aux kanren micro) on Massimo Nocentini</description><generator>Hugo</generator><language>en-US</language><atom:link href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/index.xml" rel="self" type="application/rss+xml"/><item><title>Anatomy of (aux kanren micro)</title><link>https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch10-micro/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch10-micro/</guid><description>&lt;p&gt;The chapters so far studied what a higher-order logic programming language &lt;em&gt;is&lt;/em&gt;: the uniform&#10;proofs of hereditary Harrop formulas (&lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-1/ch03-hh/"&gt;Chapter&amp;nbsp;3&lt;/a&gt;), λ-terms as data (&lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-1/ch04-lambda/"&gt;Chapter&amp;nbsp;4&lt;/a&gt; and &lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-1/ch06-lambdatree/"&gt;Chapter&amp;nbsp;6&lt;/a&gt;),&#10;higher-order pattern unification (&lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-1/ch07-hounif/"&gt;Chapter&amp;nbsp;7&lt;/a&gt;), and, in &lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-2/ch09-lkanren/"&gt;Chapter&amp;nbsp;9&lt;/a&gt;, how λKanren grafts&#10;these features onto a miniKanren &lt;label for="sn-2bef39-1" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-2bef39-1" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="mafriedman2021"&gt;Weixi Ma and Daniel P. Friedman. A new higher-order unification algorithm for &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\lambda&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;Kanren. In &lt;cite&gt;miniKanren and Relational Programming Workshop&lt;/cite&gt;, 2021&lt;/span&gt;; and &lt;span class="bib-entry" data-cite="malufriedman2020"&gt;Weixi Ma, Kuang-Chen Lu, and Daniel P. Friedman. Higher-order logic programming with &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\lambda&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;Kanren. In &lt;cite&gt;miniKanren and Relational Programming Workshop&lt;/cite&gt;, 2020&lt;/span&gt;&lt;/span&gt;. This chapter opens the&#10;&lt;em&gt;proposal&lt;/em&gt; part of the document. Before deciding how &lt;code&gt;(aux kanren micro)&lt;/code&gt; should grow, we need an exact&#10;picture of the engine: what a variable is, what a state contains, how unification&#10;and the constraint stores interact, how the search interleaves, and how answers are printed. The&#10;point is not to explain the code to its author but to put next to each other the facts that matter&#10;when the engine is extended: which invariants a new feature must preserve, which parts can be&#10;reused from outside, and which parts are closed.&lt;/p&gt;</description></item><item><title>Bringing λProlog to (aux kanren micro): the design</title><link>https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch11-design/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch11-design/</guid><description>&lt;p&gt;&lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch10-micro/"&gt;Chapter&amp;nbsp;10&lt;/a&gt; ended with a precise list of what an importing module cannot obtain from &lt;code&gt;(aux kanren micro)&lt;/code&gt; today: a named place in the state for its own data, a call after every binding (to check the scope of eigenvariables eagerly and to wake postponed equations), and a say in reification (to print new constraints and to hide what must not escape). The three tricks of &lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch10-micro/#sec:micro-noedit"&gt;Section&amp;nbsp;10.9.2&lt;/a&gt; show that &lt;span class="sc"&gt;augment&lt;/span&gt; and &lt;span class="sc"&gt;generic&lt;/span&gt; &lt;em&gt;fit&lt;/em&gt; the shape of a μKanren goal; they do not make them sound under every goal of the engine, nor cheap.&lt;/p&gt;</description></item><item><title>The module (aux kanren lambda)</title><link>https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch12-module/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch12-module/</guid><description>&lt;p&gt;&lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch10-micro/"&gt;Chapter&amp;nbsp;10&lt;/a&gt; took &lt;code&gt;(aux kanren micro)&lt;/code&gt; apart and ended, in &lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch10-micro/#sec:micro-ext"&gt;Section&amp;nbsp;10.9&lt;/a&gt;, with the list of points an extension&#10;cannot reach from outside: the state has no free slot, and the unifier, the walkers and the reifier are closed.&#10;&lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch11-design/"&gt;Chapter&amp;nbsp;11&lt;/a&gt; opened exactly those points with a small, λ-agnostic protocol of hooks and explained why the&#10;proposal is a client module of that protocol rather than a native engine. This chapter is about the client&#10;itself: the module &lt;code&gt;(aux kanren lambda)&lt;/code&gt;, which brings into &lt;code&gt;(aux kanren micro)&lt;/code&gt; the three ingredients of Part I,&lt;/p&gt;</description></item><item><title>The book’s examples in (aux kanren lambda)</title><link>https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch13-examples/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch13-examples/</guid><description>&lt;p&gt;&lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch12-module/"&gt;Chapter&amp;nbsp;12&lt;/a&gt; presented the module &lt;code&gt;(aux kanren lambda)&lt;/code&gt; rule by rule: the terms &lt;code&gt;ƛ&lt;/code&gt; and&#10;&lt;code&gt;@&lt;/code&gt;, the levels that police the scope of eigenvariables,&#10;the unifier for &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;L&lt;/mi&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;L_\lambda&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; with its delayed equations, and the goals &lt;code&gt;∀°&lt;/code&gt; and &lt;code&gt;⊃°&lt;/code&gt;. This chapter&#10;runs that machinery on the programs of Part I. Each example was introduced in an earlier chapter, where&#10;we explained what it means in λProlog. Here we ask a narrower question: what does the module&#10;&lt;em&gt;do&lt;/em&gt; with it? Which rule fires, why does the answer have the shape it has, and does it come out in&#10;the order λProlog gives?&lt;/p&gt;</description></item><item><title>Limitations, costs and the merge</title><link>https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch14-roadmap/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch14-roadmap/</guid><description>&lt;p&gt;&lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch11-design/"&gt;Chapter&amp;nbsp;11&lt;/a&gt;, &lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch12-module/"&gt;Chapter&amp;nbsp;12&lt;/a&gt; and &lt;a class="xref" href="https://massimo-nocentini.github.io/book/higher-order-kanren/part-3/ch13-examples/"&gt;Chapter&amp;nbsp;13&lt;/a&gt; presented the proposal from the inside. The first gave the&#10;extension protocol added to &lt;code&gt;(aux kanren micro)&lt;/code&gt;, the second the module &lt;code&gt;(aux kanren lambda)&lt;/code&gt; built on it, and&#10;the third the book&amp;rsquo;s programs running beside their λProlog originals. This chapter looks at the proposal&#10;from the outside, as a reviewer does before and after a merge. It asks five questions.&lt;/p&gt;</description></item></channel></rss>