changeset 76:13969295f118

...
author matac42 <matac@cr.ie.u-ryukyu.ac.jp>
date Wed, 14 Feb 2024 11:38:01 +0900
parents c6d41c973c8a
children 5847cf59e9b3
files marp-slide/figs/swap.drawio marp-slide/figs/swap.svg marp-slide/slide.md
diffstat 3 files changed, 124 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/marp-slide/figs/swap.drawio	Wed Feb 14 11:38:01 2024 +0900
@@ -0,0 +1,60 @@
+<mxfile host="65bd71144e">
+    <diagram id="mGzb4KQxwn7jOB_7Yuu3" name="Page-1">
+        <mxGraphModel dx="376" dy="767" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
+            <root>
+                <mxCell id="0"/>
+                <mxCell id="1" parent="0"/>
+                <mxCell id="8" value="" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=none;" vertex="1" parent="1">
+                    <mxGeometry x="100" y="290" width="360" height="120" as="geometry"/>
+                </mxCell>
+                <mxCell id="2" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
+                    <mxGeometry x="120" y="320" width="320" height="70" as="geometry"/>
+                </mxCell>
+                <mxCell id="3" value="Data Table Heap" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+                    <mxGeometry x="110" y="290" width="120" height="30" as="geometry"/>
+                </mxCell>
+                <mxCell id="14" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0;entryY=0;entryDx=0;entryDy=0;curved=1;exitX=0;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="4" target="10">
+                    <mxGeometry relative="1" as="geometry"/>
+                </mxCell>
+                <mxCell id="4" value="tree" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
+                    <mxGeometry x="145" y="320" width="45" height="70" as="geometry"/>
+                </mxCell>
+                <mxCell id="6" value="From&lt;br&gt;RBTree" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
+                    <mxGeometry x="230" y="320" width="100" height="70" as="geometry"/>
+                </mxCell>
+                <mxCell id="7" value="To&lt;br&gt;RBTree" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
+                    <mxGeometry x="370" y="320" width="60" height="70" as="geometry"/>
+                </mxCell>
+                <mxCell id="9" value="Context" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;dashed=1;" vertex="1" parent="1">
+                    <mxGeometry x="100" y="260" width="60" height="30" as="geometry"/>
+                </mxCell>
+                <mxCell id="10" value="Tree" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;fillColor=none;" vertex="1" parent="1">
+                    <mxGeometry x="100" y="465" width="120" height="120" as="geometry"/>
+                </mxCell>
+                <mxCell id="11" value="tree(RedBlackTree)" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="10">
+                    <mxGeometry y="30" width="120" height="20" as="geometry"/>
+                </mxCell>
+                <mxCell id="12" value="put()&lt;br&gt;get()&lt;br&gt;remove()&lt;br&gt;copy()" style="text;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="10">
+                    <mxGeometry y="50" width="120" height="70" as="geometry"/>
+                </mxCell>
+                <mxCell id="15" style="edgeStyle=orthogonalEdgeStyle;curved=1;html=1;entryX=0.345;entryY=0.996;entryDx=0;entryDy=0;entryPerimeter=0;dashed=1;" edge="1" parent="1" source="11" target="2">
+                    <mxGeometry relative="1" as="geometry"/>
+                </mxCell>
+                <mxCell id="16" style="edgeStyle=orthogonalEdgeStyle;curved=1;html=1;entryX=0;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="11" target="7">
+                    <mxGeometry relative="1" as="geometry"/>
+                </mxCell>
+                <mxCell id="17" value="" style="shape=flexArrow;endArrow=classic;html=1;curved=1;" edge="1" parent="1">
+                    <mxGeometry width="50" height="50" relative="1" as="geometry">
+                        <mxPoint x="240" y="445" as="sourcePoint"/>
+                        <mxPoint x="340" y="445" as="targetPoint"/>
+                    </mxGeometry>
+                </mxCell>
+                <mxCell id="18" value="Swap" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="17">
+                    <mxGeometry x="-0.1082" y="1" relative="1" as="geometry">
+                        <mxPoint as="offset"/>
+                    </mxGeometry>
+                </mxCell>
+            </root>
+        </mxGraphModel>
+    </diagram>
+</mxfile>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/marp-slide/figs/swap.svg	Wed Feb 14 11:38:01 2024 +0900
@@ -0,0 +1,1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="365px" height="326px" viewBox="-0.5 -0.5 365 326" content="&lt;mxfile&gt;&lt;diagram id=&quot;mGzb4KQxwn7jOB_7Yuu3&quot; name=&quot;Page-1&quot;&gt;7Zjdb5swEMD/GqTuYRUfCWkeR9JtD51UNZW2PTrggDWDkXGaZH/9zmADjulCN7b1YVJV+Y6z4/vdnb+cYJUfP3BUZp9Ygqnju8nRCdaO78+CG/gvFadG4blB2GhSThKl6xQb8h1rQ6XdkwRXhqFgjApSmsqYFQWOhaFDnLODabZj1PzVEqXYUmxiRG3tZ5KIrNHe+ItO/xGTNNO/7IXL5kuOtLHypMpQwg49VXDrBCvOmGha+XGFqYSnuTT93j/ztZ0Yx4UY00FF4gnRvfJNzUuctLOc7YsES3vXCaJDRgTelCiWXw8QXtBlIqcgedBMUJXVtlLYEUpXjDIOcsEK6BHZ81NTfsJc4GNPpeb7AbMcC34CE/3VVexU9vhLJR+6UASh0mX9MGjoSIU/bcfuCEFDQRoG5k8MbAogvgkk8AeA+ANAFhPwCCweayQQaB7RFoD47kcMLp8jAs+EyaESnH3DZ9kykECIkrQAMQZeGPSR5ESgNN+pDzlJEvkzg+DN0EzB3rucjN4Q+2AC9t7MAosTWKiUyLjIWMoKRG87bZ85uM1PXxSMWvjaF9ZHQzopKd7zp7bE8ZGIdgRof+3pu/5SOF2CXrE9j5UbyjGBeIq1lQImPfxpZDimSJAnc6n+HcwzK8UFx/jfl/1sfrHstcnUVR9aSN5zljt+SGVZbzm0Utl6iB5fA6q22n6Cqt1Wpma1sFg9sldLKlhcJjW0t04BammBWrGi3ile5/ZhnHWmKOjzg004jv0kW4lrZ+lQPlYHklPU0IXg6K2m3hcyQpM7dGJ7Oa9KoPiblqKMcfId7FEXL8SFOtgHrmGxkT3VmBxXYHOvqXpnqk/oaBjeoUro2TBKUVmRbT0/2TGHzYQUERMCVqpR9fR3zq+zcD7uyDDJ+dXzrEDL3ezqAScRBfAy6m+eK7jpq6wC+KRI7/BOOjnrNA/Kb6li0H1H62tSBh0xjBCVjBSi5jCP4A/IrNzruTOH2a5A9joZ/qQ5F7CagAOI1JHDkCoHLNMFqlrAkXXbJvLLV1l3dA7oZXXkKXGSiNtXlnIvrt7YexCctYbUHOcQgaEvMStPV/+z5U9ny3xktkyxCXtzK5yX7xTGlWDwgnEdwFG0f8m4Xi7DCxeNWrrHnIATMi9esOn27xJ6xetfJlRJ/P27hBf+Ebx9tN4FrL8MbfHPoNlHaPtgkqFSNncUH9/JJ77a70Q11zFFVUVik5/B9VksF/3tleV8oCq1bjQW9Qv3cs3q3WFmZ8cGfbfTQzThU7383pPf2UDBpYGamFsD1VFq3R4XOPt5cXMYeA6SiO/QFlMzPuM3hvr411uUzfV+PRxenVXn63D7bqwGdPpPs0Mnurfutefe+AZV7/eCrk3YblfhF4bBkZdx/YDcmHfP8MHtDw==&lt;/diagram&gt;&lt;/mxfile&gt;"><defs/><g><rect x="4" y="30" width="360" height="120" fill="none" stroke="rgb(0, 0, 0)" stroke-dasharray="3 3" pointer-events="all"/><rect x="24" y="60" width="320" height="70" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><rect x="14" y="30" width="120" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 45px; margin-left: 15px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Data Table Heap</div></div></div></foreignObject><text x="74" y="49" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Data Table Heap</text></switch></g><path d="M 49 130 Q 49 167.5 26.5 167.5 Q 4 167.5 4 198.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 4 203.88 L 0.5 196.88 L 4 198.63 L 7.5 196.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="49" y="60" width="45" height="70" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 43px; height: 1px; padding-top: 95px; margin-left: 50px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">tree</div></div></div></foreignObject><text x="72" y="99" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">tree</text></switch></g><rect x="134" y="60" width="100" height="70" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 95px; margin-left: 135px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">From<br />RBTree</div></div></div></foreignObject><text x="184" y="99" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">From...</text></switch></g><rect x="274" y="60" width="60" height="70" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 95px; margin-left: 275px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">To<br />RBTree</div></div></div></foreignObject><text x="304" y="99" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">To...</text></switch></g><rect x="4" y="0" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 15px; margin-left: 5px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Context</div></div></div></foreignObject><text x="34" y="19" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Context</text></switch></g><path d="M 4 235 L 4 205 L 124 205 L 124 235" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 4 235 L 4 325 L 124 325 L 124 235" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="none"/><path d="M 4 235 L 124 235" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 220px; margin-left: 5px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">Tree</div></div></div></foreignObject><text x="64" y="224" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Tree</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 110px; height: 1px; padding-top: 245px; margin-left: 9px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center; max-height: 16px; overflow: hidden;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">tree(RedBlackTree)</div></div></div></foreignObject><text x="64" y="249" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">tree(RedBlackTree)</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 110px; height: 1px; padding-top: 290px; margin-left: 9px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center; max-height: 66px; overflow: hidden;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">put()<br />get()<br />remove()<br />copy()</div></div></div></foreignObject><text x="64" y="294" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">put()...</text></switch></g><path d="M 124 245 Q 134.4 245 134.4 136.09" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="none"/><path d="M 134.4 130.84 L 137.9 137.84 L 134.4 136.09 L 130.9 137.84 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="none"/><path d="M 124 245 Q 274 245 274 136.37" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="none"/><path d="M 274 131.12 L 277.5 138.12 L 274 136.37 L 270.5 138.12 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="none"/><path d="M 144.5 190 L 144.5 180 L 224.5 180 L 224.5 169.5 L 243.5 185 L 224.5 200.5 L 224.5 190 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 185px; margin-left: 190px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; background-color: rgb(255, 255, 255); white-space: nowrap;">Swap</div></div></div></foreignObject><text x="190" y="188" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">Swap</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
\ No newline at end of file
--- a/marp-slide/slide.md	Wed Feb 14 11:02:08 2024 +0900
+++ b/marp-slide/slide.md	Wed Feb 14 11:38:01 2024 +0900
@@ -135,7 +135,7 @@
   - 分散ファイルシステムの通信機能
 - 非破壊RedBlackTreeで構成される
   - indexやi-nodeの木
-  - DataGearを保持するQueue
+  - DataGearを保持するQueueのリスト
 - ディスク上とメモリ上のデータ構造を統一する
 
 ---
@@ -239,13 +239,13 @@
 
 ---
 
-## コピーのアルゴリズム
+## コピーの    アルゴリズム
 
 - left方向へ深さ優先探索を行う
 - 2つのStackを使用する
-  - nodeStackは元の木を辿るため
-  - toStackは新しい木を操作するため
-- 
+  - nodeStackは元の木を辿る
+  - toStackは新しい木を操作
+- 大まかにleftDown, rightDown, upの3ステップ
 
 ![bg right:45% 65%](figs/copy_algo4.svg)
 
@@ -253,13 +253,54 @@
 
 ## アロケーション部分
 
-![w:1100](figs/)
+- leftDown、rightDownで新しい木のノードをアロケートする
+- newキーワードでアロケートしている
+
+```c
+struct Node* newNode = new Node();
+struct Node* data = (Node*)(stack->data);
+newNode->key = tree->current->left->key;
+newNode->value = (union Data*)new Integer();
+((Integer*)newNode->value)->value = ((Integer*)tree->current->left->value)->value;
+newNode->color = tree->current->left->color;
+
+if(data) {
+    data->left = newNode;
+}
+```
+---
+
+## ALLOCATEマクロ
+
+- newキーワードによってビルド時に挿入されるマクロ
+- Contextが持つヒープ領域にDataGearサイズの領域を確保する
+- リニアアロケートする
+
+```c
+#define ALLOCATE(context, t) ({ \
+    context->heap =  __builtin_align_up(context->heap + sizeof(Meta) , sizeof(void *)) - sizeof(Meta); \
+    Meta* meta = (Meta*)context->heap;\
+    context->heap += sizeof(Meta);\
+    union Data* data = context->heap; \
+    context->heap += sizeof(t); \
+    meta->type = D_##t; \
+    meta->size = sizeof(t);     \
+    meta->len = 1;\
+    meta->data = data; \
+    *context->metaData = meta; \
+    context->metaData++; \
+    data; })
+```
 
 ---
 
 ## swap
 
-![w:1100](figs/)
+- コピー完了後に木を切り替える
+- CopyingGCのFrom To切り替えを想定
+- 同一Context上での動作になっている
+
+![bg right:50% 90%](figs/swap.svg)
 
 ---
 
@@ -269,26 +310,28 @@
 
 ## 評価
 
-非破壊RedBlackTreeの増大抑制できる
-コピーで木の持続性を確保できる
+- 非破壊RedBlackTreeの増大抑制できる
+- コピーで木の持続性を確保できる
+
 課題点
-  同一Contextへコピーしている
-コピーの正しさ
-Stack使っているので余計なメモリを消費する
-Stackも非破壊であるという問題がある
--> 証明しやすさを優先しているから
-Stackが非破壊である意味があまりない?のでここを破壊でやる。
+
+- 同一Contextへコピーしている
+- Stack使っているので余計なメモリを消費する
+- Stackも非破壊であるという問題がある
+  - 証明しやすさを優先しているから
+  - 非破壊である意味があまりない
+- コピーの正しさ
 
 ---
 
 ## 今後の研究方針
 
-別Contextコピー
-GearsAgdaでの記述
-Stack領域の圧縮
+- 別Contextコピー
+- GearsAgdaでの記述
+- Stack領域の圧縮
 - Stackの再利用?
-GC,レプリケーションの実装
-多重性以外の機能
+- GC,レプリケーションの実装
+- 多重性以外の機能
 
 ---