Mercurial > hg > Papers > 2024 > matac-master
changeset 75:c6d41c973c8a
algo(slide)
author | matac42 <matac@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 14 Feb 2024 11:02:08 +0900 |
parents | 8c087f2ae631 |
children | 13969295f118 |
files | marp-slide/figs/copy_algo4.drawio marp-slide/figs/copy_algo4.svg marp-slide/figs/copy_context.drawio marp-slide/figs/copy_context.svg marp-slide/slide.md |
diffstat | 5 files changed, 301 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/marp-slide/figs/copy_algo4.drawio Wed Feb 14 11:02:08 2024 +0900 @@ -0,0 +1,80 @@ +<mxfile host="65bd71144e"> + <diagram id="NWhsmsWKpHYXijNByeQC" name="Page-1"> + <mxGraphModel dx="438" dy="1036" 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="9" style="edgeStyle=none;html=1;exitX=0;exitY=1;exitDx=0;exitDy=0;fontSize=13;" parent="1" source="2" target="3" edge="1"> + <mxGeometry relative="1" as="geometry"/> + </mxCell> + <mxCell id="12" value="leftDown" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" parent="9" vertex="1" connectable="0"> + <mxGeometry x="0.0124" relative="1" as="geometry"> + <mxPoint as="offset"/> + </mxGeometry> + </mxCell> + <mxCell id="10" style="edgeStyle=none;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;endArrow=none;endFill=0;fontSize=13;" parent="1" source="2" target="4" edge="1"> + <mxGeometry relative="1" as="geometry"/> + </mxCell> + <mxCell id="2" value="3" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="160" y="120" width="40" height="40" as="geometry"/> + </mxCell> + <mxCell id="11" style="edgeStyle=none;html=1;exitX=0;exitY=1;exitDx=0;exitDy=0;fontSize=13;" parent="1" source="3" target="5" edge="1"> + <mxGeometry relative="1" as="geometry"/> + </mxCell> + <mxCell id="13" value="leftDown" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" parent="11" vertex="1" connectable="0"> + <mxGeometry x="-0.0132" y="2" relative="1" as="geometry"> + <mxPoint as="offset"/> + </mxGeometry> + </mxCell> + <mxCell id="3" value="2" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="100" y="200" width="40" height="40" as="geometry"/> + </mxCell> + <mxCell id="4" value="4" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="220" y="200" width="40" height="40" as="geometry"/> + </mxCell> + <mxCell id="5" value="1" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="40" y="280" width="40" height="40" as="geometry"/> + </mxCell> + <mxCell id="14" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="30" y="365" width="120" height="160" as="geometry"/> + </mxCell> + <mxCell id="16" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="170" y="365" width="120" height="160" as="geometry"/> + </mxCell> + <mxCell id="17" value="nodeStack" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="60" y="330" width="60" height="30" as="geometry"/> + </mxCell> + <mxCell id="18" value="toStack" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="200" y="330" width="60" height="30" as="geometry"/> + </mxCell> + <mxCell id="19" value="" style="shape=flexArrow;endArrow=classic;html=1;width=6.4;endSize=6.072;endWidth=9.28;fontSize=13;" parent="1" edge="1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="130" y="300" as="sourcePoint"/> + <mxPoint x="80" y="299.6" as="targetPoint"/> + </mxGeometry> + </mxCell> + <mxCell id="20" value="tree-&gt;current" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="130" y="285" width="80" height="30" as="geometry"/> + </mxCell> + <mxCell id="21" value="3" style="rounded=0;whiteSpace=wrap;html=1;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="30" y="495" width="120" height="30" as="geometry"/> + </mxCell> + <mxCell id="22" value="2" style="rounded=0;whiteSpace=wrap;html=1;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="30" y="465" width="120" height="30" as="geometry"/> + </mxCell> + <mxCell id="23" value="3" style="rounded=0;whiteSpace=wrap;html=1;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="170" y="495" width="120" height="30" as="geometry"/> + </mxCell> + <mxCell id="24" value="fromTree" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="50" y="130" width="60" height="30" as="geometry"/> + </mxCell> + <mxCell id="25" value="1" style="rounded=0;whiteSpace=wrap;html=1;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="170" y="435" width="120" height="30" as="geometry"/> + </mxCell> + <mxCell id="26" value="2" style="rounded=0;whiteSpace=wrap;html=1;fontSize=13;" parent="1" vertex="1"> + <mxGeometry x="170" y="465" width="120" height="30" as="geometry"/> + </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/copy_algo4.svg Wed Feb 14 11:02:08 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="261px" height="406px" viewBox="-0.5 -0.5 261 406" content="<mxfile><diagram id="NWhsmsWKpHYXijNByeQC" name="Page-1">5ZlNc5swEIZ/jY/xgIQxPiZ2kh7amc64M22PKgijiUAeIcc4v76SEQYh3JDEH3RyScSLEKtnV6sVHsF5WjxytE6+sQjTEXCiYgQXIwA8GMi/StiVgutAv1RWnERaq4UlecFVR61uSIRzo6NgjAqyNsWQZRkOhaEhztnW7BYzar51jVbYEpYhorb6k0QiKdUATGv9CyarpHqz68/KOymqOuuZ5AmK2LYhwfsRnHPGRNlKizmmCl7FpXzu4cjdg2EcZ6LPA9quXOyqueFITlVfZiyT/+4SkVJ55comLoj4JduObv9u6IuicWOx0xcxy4T2oAvltW2hNjpnGx5qI4B2KuIrrHvBUlLmNR7Ts3rELMWC72QHjikS5Nn0FNIOXx361UxkQ2M5wlQb84zoRo9KcSwWbJt1wvuK/shwN6ghSlaZbIdyzphL4RlzQWQ83eobKYkiNcYdxzl5QX/24yl6a0YysTd+cjeaLHrx1D5V78BF13rQ4xshZzDUTzljxwVe+WhvrHq078rwRhcWx7l0ZZv74aX9XOF0En89XN3e4Yqz6FZliHo4qTwQZdJJw9m7Vjjb0QxtqJTKVKomv02IwMs12s9kK7N5K7DzdZlfY1Lg6C14rOg8GoWur71e7RZV7tzWqdfTUtLIupX2obXv2myGkB+hHVCTq+VH+J/lR/dYCL45Qd6oDAmBEZ5gQPnS9gwY+Fp3zLUOnMutdc+C5Q0b1qGIvAKsiQWrI1MOCZbXYhVccBOxI8tixdkmi9Tc91ntFV5nwANNPNCfWHgO+26Tz2Fz/hAgf/iA3OlVCU0tQpk8VS8FCp8sVHJGwuSRC86e8JxRxuuqJZZFbUvqvw93OcB00Rl80CoEIbTXsN/hAXgKBwSWAwT7ZPiBc0X+M4u/BT5P0Fo1Y4oLfYZrHudCivKchKZrKtP9sVf21sz8sTMFpVJ94ZmNQfAWsK9W4g1skw5slfbeSrLyaTu1Oy13lOcK/RRofCpqDRS0dtDZbOybI5XHEWukdxSuVSJtLjeO8c0I+ChVwb5SSyzc8D31T7MC274Egb0JBWdagQdr//Xh4Nq7dIuPN+u5SZ8EkP1lZXhlTBtQ3yrmJIDs4+jwIqhd5102hOyTQsxZ+kOmvs+T5CamA9wLVhm9jrWDi1B4yQi1j2rDS3IWoTNmOXlZ/1pXVjr1b57w/i8=</diagram></mxfile>"><defs/><g><path d="M 135.86 34.14 L 105.03 78.33" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 102.02 82.64 L 103.16 74.9 L 105.03 78.33 L 108.9 78.9 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" 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: 1px; height: 1px; padding-top: 59px; margin-left: 119px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">leftDown</div></div></div></foreignObject><text x="119" y="63" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">leftDown</text></switch></g><path d="M 164.14 34.14 L 198.62 83.56" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><ellipse cx="150" cy="20" rx="20" ry="20" 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: 38px; height: 1px; padding-top: 20px; margin-left: 131px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">3</div></div></div></foreignObject><text x="150" y="24" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">3</text></switch></g><path d="M 75.86 114.14 L 45.03 158.33" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 42.02 162.64 L 43.16 154.9 L 45.03 158.33 L 48.9 158.9 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" 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: 1px; height: 1px; padding-top: 140px; margin-left: 61px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">leftDown</div></div></div></foreignObject><text x="61" y="144" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">leftDown</text></switch></g><ellipse cx="90" cy="100" rx="20" ry="20" 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: 38px; height: 1px; padding-top: 100px; margin-left: 71px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">2</div></div></div></foreignObject><text x="90" y="104" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">2</text></switch></g><ellipse cx="210" cy="100" rx="20" ry="20" 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: 38px; height: 1px; padding-top: 100px; margin-left: 191px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">4</div></div></div></foreignObject><text x="210" y="104" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">4</text></switch></g><ellipse cx="30" cy="180" rx="20" ry="20" 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: 38px; height: 1px; padding-top: 180px; margin-left: 11px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">1</div></div></div></foreignObject><text x="30" y="184" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">1</text></switch></g><rect x="0" y="245" width="120" height="160" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><rect x="140" y="245" width="120" height="160" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><rect x="30" y="210" 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: 225px; margin-left: 31px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">nodeStack</div></div></div></foreignObject><text x="60" y="229" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">nodeStack</text></switch></g><rect x="170" y="210" 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: 225px; margin-left: 171px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">toStack</div></div></div></foreignObject><text x="200" y="229" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">toStack</text></switch></g><path d="M 99.53 176.8 L 99.47 183.2 L 69.69 182.96 L 69.65 188.1 L 50.5 179.6 L 69.78 171.42 L 69.74 176.56 Z" fill="none" stroke="rgb(0, 0, 0)" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="all"/><rect x="100" y="165" width="80" 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: 78px; height: 1px; padding-top: 180px; margin-left: 101px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">tree->current</div></div></div></foreignObject><text x="140" y="184" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">tree->current</text></switch></g><rect x="0" y="375" width="120" height="30" 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: 118px; height: 1px; padding-top: 390px; margin-left: 1px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">3</div></div></div></foreignObject><text x="60" y="394" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">3</text></switch></g><rect x="0" y="345" width="120" height="30" 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: 118px; height: 1px; padding-top: 360px; margin-left: 1px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">2</div></div></div></foreignObject><text x="60" y="364" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">2</text></switch></g><rect x="140" y="375" width="120" height="30" 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: 118px; height: 1px; padding-top: 390px; margin-left: 141px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">3</div></div></div></foreignObject><text x="200" y="394" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">3</text></switch></g><rect x="20" y="10" 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: 25px; margin-left: 21px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">fromTree</div></div></div></foreignObject><text x="50" y="29" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">fromTree</text></switch></g><rect x="140" y="315" width="120" height="30" 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: 118px; height: 1px; padding-top: 330px; margin-left: 141px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">1</div></div></div></foreignObject><text x="200" y="334" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">1</text></switch></g><rect x="140" y="345" width="120" height="30" 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: 118px; height: 1px; padding-top: 360px; margin-left: 141px;"><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: 13px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">2</div></div></div></foreignObject><text x="200" y="364" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="13px" text-anchor="middle">2</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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/marp-slide/figs/copy_context.drawio Wed Feb 14 11:02:08 2024 +0900 @@ -0,0 +1,170 @@ +<mxfile host="app.diagrams.net" modified="2024-01-30T09:54:08.956Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" version="23.0.2" etag="ZrzQZc7nO3duAVoN60rr" type="device"> + <diagram id="x9Et9zQnZOJDZx9rMbiu" name="Page-1"> + <mxGraphModel dx="1026" dy="684" 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="44" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=classic;endFill=1;fontSize=14;" parent="1" source="2" target="12" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="2" value="C1" style="ellipse;whiteSpace=wrap;html=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="200" y="170" width="120" height="80" as="geometry" /> + </mxCell> + <mxCell id="8" style="edgeStyle=none;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;endArrow=none;endFill=0;fontSize=14;" parent="1" source="4" target="2" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="4" value="Code table" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="200" y="280" width="120" height="80" as="geometry" /> + </mxCell> + <mxCell id="9" style="edgeStyle=none;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;endArrow=none;endFill=0;fontSize=14;" parent="1" source="5" target="4" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="5" value="Data table" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="200" y="400" width="120" height="160" as="geometry" /> + </mxCell> + <mxCell id="45" style="edgeStyle=orthogonalEdgeStyle;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=classic;endFill=1;curved=1;fontSize=14;" parent="1" source="12" target="2" edge="1"> + <mxGeometry relative="1" as="geometry"> + <Array as="points"> + <mxPoint x="570" y="210" /> + <mxPoint x="570" y="120" /> + <mxPoint x="150" y="120" /> + <mxPoint x="150" y="210" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="12" value="C2" style="ellipse;whiteSpace=wrap;html=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="400" y="170" width="120" height="80" as="geometry" /> + </mxCell> + <mxCell id="13" style="edgeStyle=none;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;endArrow=none;endFill=0;fontSize=14;" parent="1" source="14" target="12" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="14" value="Code table" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="400" y="280" width="120" height="80" as="geometry" /> + </mxCell> + <mxCell id="15" style="edgeStyle=none;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;endArrow=none;endFill=0;fontSize=14;" parent="1" source="16" target="14" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="63" style="edgeStyle=orthogonalEdgeStyle;curved=1;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;startArrow=none;startFill=0;endArrow=classic;endFill=1;fontSize=14;" parent="1" source="16" target="53" edge="1"> + <mxGeometry relative="1" as="geometry"> + <Array as="points"> + <mxPoint x="430" y="600" /> + <mxPoint x="540" y="600" /> + <mxPoint x="540" y="440" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="16" value="Data table" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="400" y="400" width="120" height="160" as="geometry" /> + </mxCell> + <mxCell id="20" style="edgeStyle=none;html=1;entryX=0;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;endArrow=none;endFill=0;fontSize=14;" parent="1" source="17" target="19" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="21" style="edgeStyle=none;html=1;endArrow=none;endFill=0;fontSize=14;" parent="1" source="17" target="18" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="17" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="260" y="450" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="18" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="290" y="490" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="23" style="edgeStyle=none;html=1;entryX=0.75;entryY=0.7;entryDx=0;entryDy=0;entryPerimeter=0;endArrow=none;endFill=0;fontSize=14;" parent="1" source="19" target="22" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="25" style="edgeStyle=none;html=1;endArrow=none;endFill=0;fontSize=14;" parent="1" source="19" target="24" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="19" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="230" y="490" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="22" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="200" y="530" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="24" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="260" y="530" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="35" style="edgeStyle=none;html=1;entryX=0;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;endArrow=none;endFill=0;fontSize=14;" parent="1" source="37" target="41" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="36" style="edgeStyle=none;html=1;endArrow=none;endFill=0;fontSize=14;" parent="1" source="37" target="38" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="37" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="460" y="450" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="38" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="490" y="490" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="39" style="edgeStyle=none;html=1;entryX=0.75;entryY=0.7;entryDx=0;entryDy=0;entryPerimeter=0;endArrow=none;endFill=0;fontSize=14;" parent="1" source="41" target="42" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="40" style="edgeStyle=none;html=1;endArrow=none;endFill=0;fontSize=14;" parent="1" source="41" target="43" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="41" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="430" y="490" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="42" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="400" y="530" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="43" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="460" y="530" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="47" value="" style="endArrow=classic;html=1;curved=1;fontSize=14;" parent="1" edge="1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="340" y="469.62" as="sourcePoint" /> + <mxPoint x="380" y="469.62" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="48" value="" style="endArrow=none;html=1;curved=1;endFill=0;startArrow=classic;startFill=1;fontSize=14;" parent="1" edge="1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="340" y="489.62" as="sourcePoint" /> + <mxPoint x="380" y="489.62" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="49" value="Import" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="330" y="440" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="50" value="Export" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="330" y="490" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="52" style="edgeStyle=orthogonalEdgeStyle;curved=1;html=1;entryX=0.392;entryY=0.685;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=none;startFill=0;endArrow=classic;endFill=1;fontSize=14;" parent="1" source="51" target="24" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="51" value="ALLOCATE" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="240" y="580" width="60" height="10" as="geometry" /> + </mxCell> + <mxCell id="53" value="Data table" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="560" y="400" width="120" height="160" as="geometry" /> + </mxCell> + <mxCell id="54" style="edgeStyle=none;html=1;entryX=0;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;endArrow=none;endFill=0;fontSize=14;" parent="1" source="56" target="60" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="55" style="edgeStyle=none;html=1;endArrow=none;endFill=0;fontSize=14;" parent="1" source="56" target="57" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="56" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="620" y="450" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="57" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="650" y="490" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="58" style="edgeStyle=none;html=1;entryX=0.75;entryY=0.7;entryDx=0;entryDy=0;entryPerimeter=0;endArrow=none;endFill=0;fontSize=14;" parent="1" source="60" target="61" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="59" style="edgeStyle=none;html=1;endArrow=none;endFill=0;fontSize=14;" parent="1" source="60" target="62" edge="1"> + <mxGeometry relative="1" as="geometry" /> + </mxCell> + <mxCell id="60" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="590" y="490" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="61" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="560" y="530" width="20" height="20" as="geometry" /> + </mxCell> + <mxCell id="62" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;fontSize=14;" parent="1" vertex="1"> + <mxGeometry x="620" y="530" width="20" height="20" as="geometry" /> + </mxCell> + </root> + </mxGraphModel> + </diagram> +</mxfile>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/marp-slide/figs/copy_context.svg Wed Feb 14 11:02:08 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="531px" height="481px" viewBox="-0.5 -0.5 531 481" content="<mxfile><diagram id="x9Et9zQnZOJDZx9rMbiu" name="Page-1">7Vxdk6MoFP01ee2KIiZ57E4ys1s1WztVPVU7/chGOlpjxELytb9+MUL8gG4TNZLu8WVGEFHOPZx7L5Aegfnm8JWi2P+LeDgc2WPvMAKLkW07YMb/TSuOWYU1Bm5Ws6aBJ+ryiufgPywbitpt4OGk1JARErIgLleuSBThFSvVIUrJvtzslYTlt8ZojZWK5xUK1dp/Ao/5We3UnuT1f+Bg7cs3W64Y8QbJxmIkiY88si9UgeUIzCkhLLvaHOY4TMGTuGTPfXnj7vnDKI7YJQ84jvgOdpSDwx4fqyhGJOL/PflsE/KSxS95v/T4kxfGsvCSFh6gLC4OxZuL47nkPabI8+IqREkSrLLKL0Eou34lERO2thxeVscihpeQLV2Jr7WF+RFdY9lK1KUDKTwnAPiKyQbzL+MNKA4RC3ZloyLBjfW5XQ4fvxAI6tEUL96hcCs6nVsqvmHIeZrCuvcDhp9jdBrLnk+VMtQX47HDlOHDu0MVd+2x4J2ceRNR3uc0tiQ3/QKFp+P26EwbUy1n10vxXj3VRKc5z8ZNeeaoPDNGM0elGZfY09f9y7GsokzJNvKwJ0ZfQzoUBuuIX4f4lQ/zKaVWwIXvUVQzEvfDzDPj+mDm7CMzE6rMdEwxEyrMXCCGPhcznfGFzLTcDqjpwHe5SSjzyZpEKFzmtSWqHgL2s3Bd8Na8lPM0LeQ0vZmPX23p7mTwxg5fevebKvHpUT4WdCw0iEkQsaTQ8/e0IicKnFQkzKrEXjXtrWqsVmlvwXbtK9/DL7IR5jw8Q3URNaUlin7IvqtwxzEZ7ljgI3sVSxPwmAusrc8Y8lTZ2WvIY73vV+6dna6GncaiHvf9ma730SVPqHHY4wdbeumXwq3rPLZd57ITjiCr2OdUV7DQrVJ3nREhuAtX7oDy1HTHNa7cadfecTp2za6ilx8/EK/qZb+B+HnFrt1KWb1c8tJ3TAP+gZjeVEMnGg2dmdLQ8xdeDm9fmEyNRT0TZRYrICU+ik/TFB1Popbq9y/MVr6EgSMiQUxImHb9lGSwuPzy9Aymyx1O9TBDVogj7x4+jeBCdDInIaE52BTzXk5akr2HEoZYoRwXKLzC6TsKpH5KIhT/IJko3m6x063oBVT1QicXdhfh1XQwXRvTzSqmm/VnOrtF3jYphca8fD9qP1OVrft1k4sxvj776AsTY1mE/JpBMppJBjAoGepK2GC65ivsEPRoOnVlaTBd8xirT9OB5ktY95mRAU324Vim/JE8k2PWR+swAcYyMjBkZK1WcAxmZGDIyFqZzmBGJs8Lfq6MTCp7Se2NZWTO9cubfWHS+ZbAxZjIWTJIRiPJMJiRyYk0mK6Z6QxmZHK+D6brJMbq1XQXhMfa3eSCX2l2QqzWORRGDzWjl3XXbSsr+7qguq/rzh5cu9xL5u/Egzm2al/T+r4yP6n01WDH2LkgPFZd/lt2K4cCpUMGudGL5ww+hbGnHRpb01eHxlaXmv/cxIQyxeRcdFjZzgmj5Beu6KJGKuUpgUwGR+o5gU3geaeTMLrjBuUDCTeQSVANThxVJl0Nd0AHMin5V4B/efjN4dfEhjeDX6NszY9r5akmmNnlXNOd1p+Y1mSbJs9kQU0CZvDnBGoC9vjt29/zxx/L32eq2BU3AzXHRHVTxepiqqix+Mc/Rwarq5C9niOD3fzi8n52LaDmGKcEyoBk3MXJAh0mcGIME/U0qALSkFG/qReuXdGLHnct4LDh1Mp0sD7MvJnpWvze+X53LaSyl9Te2B41vH5nqC9MbFOYuGp2OUjGFdGhwY1OV813BtM1D+z7XPqW830wXScx1g1Nx4v539fJFk/zv1IElv8D</diagram></mxfile>"><defs/><g><path d="M 170 90 L 243.63 90" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 248.88 90 L 241.88 93.5 L 243.63 90 L 241.88 86.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="110" cy="90" rx="60" ry="40" 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: 118px; height: 1px; padding-top: 90px; margin-left: 51px;"><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: 14px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">C1</div></div></div></foreignObject><text x="110" y="94" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="14px" text-anchor="middle">C1</text></switch></g><path d="M 110 160 L 110 130" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><rect x="50" y="160" width="120" height="80" 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 flex-start; justify-content: unsafe flex-start; width: 118px; height: 1px; padding-top: 167px; margin-left: 52px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Code table</div></div></div></foreignObject><text x="52" y="181" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="14px">Code table</text></switch></g><path d="M 110 280 L 110 240" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><rect x="50" y="280" width="120" height="160" 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 flex-start; justify-content: unsafe flex-start; width: 118px; height: 1px; padding-top: 287px; margin-left: 52px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Data table</div></div></div></foreignObject><text x="52" y="301" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="14px">Data table</text></switch></g><path d="M 370 90 Q 420 90 420 45 Q 420 0 210 0 Q 0 0 0 45 Q 0 90 43.63 90" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 48.88 90 L 41.88 93.5 L 43.63 90 L 41.88 86.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="310" cy="90" rx="60" ry="40" 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: 118px; height: 1px; padding-top: 90px; margin-left: 251px;"><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: 14px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">C2</div></div></div></foreignObject><text x="310" y="94" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="14px" text-anchor="middle">C2</text></switch></g><path d="M 310 160 L 310 130" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><rect x="250" y="160" width="120" height="80" 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 flex-start; justify-content: unsafe flex-start; width: 118px; height: 1px; padding-top: 167px; margin-left: 252px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Code table</div></div></div></foreignObject><text x="252" y="181" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="14px">Code table</text></switch></g><path d="M 310 280 L 310 240" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 280 440 Q 280 480 335 480 Q 390 480 390 400 Q 390 320 403.63 320" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 408.88 320 L 401.88 323.5 L 403.63 320 L 401.88 316.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="250" y="280" width="120" height="160" 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 flex-start; justify-content: unsafe flex-start; width: 118px; height: 1px; padding-top: 287px; margin-left: 252px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Data table</div></div></div></foreignObject><text x="252" y="301" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="14px">Data table</text></switch></g><path d="M 120 340 L 90 380" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 120 340 L 150 380" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><ellipse cx="120" cy="340" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="110" y="330" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><ellipse cx="150" cy="380" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="140" y="370" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><path d="M 90 380 L 60 420" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 90 380 L 120 420" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><ellipse cx="90" cy="380" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="80" y="370" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><ellipse cx="60" cy="420" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="50" y="410" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><ellipse cx="120" cy="420" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="110" y="410" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><path d="M 320 340 L 290 380" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 320 340 L 350 380" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><ellipse cx="320" cy="340" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="310" y="330" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><ellipse cx="350" cy="380" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="340" y="370" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><path d="M 290 380 L 260 420" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 290 380 L 320 420" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><ellipse cx="290" cy="380" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="280" y="370" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><ellipse cx="260" cy="420" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="250" y="410" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><ellipse cx="320" cy="420" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="310" y="410" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><path d="M 190 349.62 Q 190 349.62 223.63 349.62" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 228.88 349.62 L 221.88 353.12 L 223.63 349.62 L 221.88 346.12 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 196.37 369.62 Q 196.37 369.62 230 369.62" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 191.12 369.62 L 198.12 366.12 L 196.37 369.62 L 198.12 373.12 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="180" y="320" 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: 335px; margin-left: 181px;"><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: 14px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Import</div></div></div></foreignObject><text x="210" y="339" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="14px" text-anchor="middle">Import</text></switch></g><rect x="180" y="370" 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: 385px; margin-left: 181px;"><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: 14px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Export</div></div></div></foreignObject><text x="210" y="389" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="14px" text-anchor="middle">Export</text></switch></g><path d="M 120 460 Q 120 460 120 426.37" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 120 421.12 L 123.5 428.12 L 120 426.37 L 116.5 428.12 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="90" y="460" width="60" height="10" 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: 465px; margin-left: 91px;"><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: 14px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">ALLOCATE</div></div></div></foreignObject><text x="120" y="469" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="14px" text-anchor="middle">ALLOCATE</text></switch></g><rect x="410" y="280" width="120" height="160" 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 flex-start; justify-content: unsafe flex-start; width: 118px; height: 1px; padding-top: 287px; margin-left: 412px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Data table</div></div></div></foreignObject><text x="412" y="301" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="14px">Data table</text></switch></g><path d="M 480 340 L 450 380" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 480 340 L 510 380" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><ellipse cx="480" cy="340" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="470" y="330" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><ellipse cx="510" cy="380" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="500" y="370" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><path d="M 450 380 L 420 420" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 450 380 L 480 420" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><ellipse cx="450" cy="380" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="440" y="370" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><ellipse cx="420" cy="420" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="410" y="410" width="20" height="20" fill="none" stroke="none" pointer-events="all"/><ellipse cx="480" cy="420" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="none" pointer-events="all"/><rect x="470" y="410" width="20" height="20" fill="none" stroke="none" pointer-events="all"/></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 09:44:07 2024 +0900 +++ b/marp-slide/slide.md Wed Feb 14 11:02:08 2024 +0900 @@ -108,7 +108,7 @@ - GearsOSのCodeGearと直接対応している - GearsAgdaでRedBlackTreeの証明が進められている - find完了、insert証明中 -- GearsOSの構造はRedBlackTreeが多くを占める +- GearsOSのファイルシステムの構造はRedBlackTreeが多くを占める GearsAgdaでRedBlackTreeが証明できれば、GearsOSのファイルシステムの大部分を証明したことになる @@ -134,6 +134,8 @@ - i-nodeによるディレクトリシステム - 分散ファイルシステムの通信機能 - 非破壊RedBlackTreeで構成される + - indexやi-nodeの木 + - DataGearを保持するQueue - ディスク上とメモリ上のデータ構造を統一する --- @@ -153,14 +155,13 @@ メモリ管理 -- アロケーション -- GC(ガベージコレクション) +- メモリ割り当てと保護、メモリリーク防止に必要 +- 例:アロケーション、GC(ガベージコレクション) 多重性 -- レプリケーション -- バックアップ - +- 単一障害点の排除、可用性の保証、災害復旧に必要 +- 例:レプリケーション、バックアップ --- @@ -180,58 +181,73 @@ --- -## GearsOSにおけるGC -<!-- --> -CopyingGCを採用する +## GearsOSのGC + +CopyingGCのような仕組み + - 新しいContextのメモリに新規にコピーする - 古いContextをそのまま全部解放する +![bg right:52% 95%](figs/copy_context.svg) + --- -## GearsOSにおけるレプリケーション - -<!-- --> +## GearsOSの レプリケーション -単純に木をコピーする -複数のストレージに同時に木を置く -そのうちの一部は持続的なストレージにする -システム起動時には必要な分をメモリにコピーする +- 複数のストレージに同時に木をコピーする +- そのうちの一部は持続的なストレージにする +- システム起動時には必要な分をメモリにコピーする トランザクションも考慮する +![bg right:48% 95%](figs/copy_context.svg) + --- -## RedBlackTreeのトランザクション +## RedBlackTreeの トランザクション -- 木のルートのすげ替えがトランザクションになる -- read -- write +- トランザクションはのルートの置き換え +- 複数の書き込みポイント +- 最新の情報が欲しい場合は書き込み停止処理が必要 + +![bg right:45% 65%](figs/transaction.svg) --- ## copyRedBlackTreeの実装をした -- RedBlackTreeのコピーを行う - GCやレプリケーションの機能のために木のコピーが必要 - ---- - -## copyRedBlackTreeによって出来ること - -多重性やメモリ管理に関する機能を追加できる -GC(defragmentation) -レプリケーション -バックアップ +- RedBlackTreeのコピーが出来るAPIを実装した --- ## Tree InterfaceのAPIとして実装 +```c +typedef struct Tree<> { + union Data* tree; + struct Node* node; + __code put(Impl* tree, Type* node, __code next(...)); + __code get(Impl* tree, Type* node, __code next(...)); + __code remove(Impl* tree, Type* node, __code next(...)); + __code copy(Impl* tree, __code next(...)); + __code next(...); +} Tree; +``` + +- `goto tree->copy(next);`という形で使用できる + --- -## コピーのアルゴリズム詳細 +## コピーのアルゴリズム -![w:1100](figs/) +- left方向へ深さ優先探索を行う +- 2つのStackを使用する + - nodeStackは元の木を辿るため + - toStackは新しい木を操作するため +- + +![bg right:45% 65%](figs/copy_algo4.svg) --- @@ -254,7 +270,7 @@ ## 評価 非破壊RedBlackTreeの増大抑制できる -コピーするだけなので木が持続的 +コピーで木の持続性を確保できる 課題点 同一Contextへコピーしている コピーの正しさ