Mercurial > hg > Papers > 2021 > anatofuz-master
comparison slide/index.html @ 130:22fc8ae31b50
...
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Feb 2021 00:07:56 +0900 |
parents | 84d494497c92 |
children | 988b3024d685 |
comparison
equal
deleted
inserted
replaced
129:84d494497c92 | 130:22fc8ae31b50 |
---|---|
6 * @author Yuki Hattori | 6 * @author Yuki Hattori |
7 * | 7 * |
8 * @auto-scaling true | 8 * @auto-scaling true |
9 * @size 4:3 960px 720px | 9 * @size 4:3 960px 720px |
10 */div#p>svg>foreignObject>section .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}div#p>svg>foreignObject>section .anchor{float:left;line-height:1;margin-left:-20px;padding-right:4px}div#p>svg>foreignObject>section .anchor:focus{outline:none}div#p>svg>foreignObject>section h1 .octicon-link,div#p>svg>foreignObject>section h2 .octicon-link,div#p>svg>foreignObject>section h3 .octicon-link,div#p>svg>foreignObject>section h4 .octicon-link,div#p>svg>foreignObject>section h5 .octicon-link,div#p>svg>foreignObject>section h6 .octicon-link{color:#1b1f23;vertical-align:middle;visibility:hidden}div#p>svg>foreignObject>section h1:hover .anchor,div#p>svg>foreignObject>section h2:hover .anchor,div#p>svg>foreignObject>section h3:hover .anchor,div#p>svg>foreignObject>section h4:hover .anchor,div#p>svg>foreignObject>section h5:hover .anchor,div#p>svg>foreignObject>section h6:hover .anchor{text-decoration:none}div#p>svg>foreignObject>section h1:hover .anchor .octicon-link,div#p>svg>foreignObject>section h2:hover .anchor .octicon-link,div#p>svg>foreignObject>section h3:hover .anchor .octicon-link,div#p>svg>foreignObject>section h4:hover .anchor .octicon-link,div#p>svg>foreignObject>section h5:hover .anchor .octicon-link,div#p>svg>foreignObject>section h6:hover .anchor .octicon-link{visibility:visible}div#p>svg>foreignObject>section h1:hover .anchor .octicon-link:before,div#p>svg>foreignObject>section h2:hover .anchor .octicon-link:before,div#p>svg>foreignObject>section h3:hover .anchor .octicon-link:before,div#p>svg>foreignObject>section h4:hover .anchor .octicon-link:before,div#p>svg>foreignObject>section h5:hover .anchor .octicon-link:before,div#p>svg>foreignObject>section h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:" ";display:inline-block;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' d='M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z'/%3E%3C/svg%3E")}div#p>svg>foreignObject>section{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#24292e;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:16px;line-height:1.5;word-wrap:break-word}div#p>svg>foreignObject>section{--marpit-root-font-size:16px}div#p>svg>foreignObject>section details{display:block}div#p>svg>foreignObject>section summary{display:list-item}div#p>svg>foreignObject>section a{background-color:initial}div#p>svg>foreignObject>section a:active,div#p>svg>foreignObject>section a:hover{outline-width:0}div#p>svg>foreignObject>section strong{font-weight:inherit;font-weight:bolder}div#p>svg>foreignObject>section h1{margin:.67em 0}div#p>svg>foreignObject>section img{border-style:none}div#p>svg>foreignObject>section code,div#p>svg>foreignObject>section kbd,div#p>svg>foreignObject>section pre{font-family:monospace,monospace;font-size:1em}div#p>svg>foreignObject>section hr{box-sizing:initial;overflow:visible}div#p>svg>foreignObject>section input{font:inherit;margin:0;overflow:visible}div#p>svg>foreignObject>section [type=checkbox]{padding:0}div#p>svg>foreignObject>section *,div#p>svg>foreignObject>section [type=checkbox]{box-sizing:border-box}div#p>svg>foreignObject>section input{font-family:inherit;font-size:inherit;line-height:inherit}div#p>svg>foreignObject>section a{color:#0366d6;text-decoration:none}div#p>svg>foreignObject>section a:hover{text-decoration:underline}div#p>svg>foreignObject>section strong{font-weight:600}div#p>svg>foreignObject>section hr{height:0;margin:15px 0;overflow:hidden;background:transparent;border-bottom:1px solid #dfe2e5}div#p>svg>foreignObject>section hr:after,div#p>svg>foreignObject>section hr:before{display:table;content:""}div#p>svg>foreignObject>section hr:after{clear:both}div#p>svg>foreignObject>section table{border-spacing:0;border-collapse:collapse}div#p>svg>foreignObject>section td,div#p>svg>foreignObject>section th{padding:0}div#p>svg>foreignObject>section details summary{cursor:pointer}div#p>svg>foreignObject>section h1,div#p>svg>foreignObject>section h2,div#p>svg>foreignObject>section h3,div#p>svg>foreignObject>section h4,div#p>svg>foreignObject>section h5,div#p>svg>foreignObject>section h6{margin-top:0;margin-bottom:0}div#p>svg>foreignObject>section h1{font-size:32px}div#p>svg>foreignObject>section h1,div#p>svg>foreignObject>section h2{font-weight:600}div#p>svg>foreignObject>section h2{font-size:24px}div#p>svg>foreignObject>section h3{font-size:20px}div#p>svg>foreignObject>section h3,div#p>svg>foreignObject>section h4{font-weight:600}div#p>svg>foreignObject>section h4{font-size:16px}div#p>svg>foreignObject>section h5{font-size:14px}div#p>svg>foreignObject>section h5,div#p>svg>foreignObject>section h6{font-weight:600}div#p>svg>foreignObject>section h6{font-size:12px}div#p>svg>foreignObject>section p{margin-top:0;margin-bottom:10px}div#p>svg>foreignObject>section blockquote{margin:0}div#p>svg>foreignObject>section ol,div#p>svg>foreignObject>section ul{padding-left:0;margin-top:0;margin-bottom:0}div#p>svg>foreignObject>section ol ol,div#p>svg>foreignObject>section ul ol{list-style-type:lower-roman}div#p>svg>foreignObject>section ol ol ol,div#p>svg>foreignObject>section ol ul ol,div#p>svg>foreignObject>section ul ol ol,div#p>svg>foreignObject>section ul ul ol{list-style-type:lower-alpha}div#p>svg>foreignObject>section dd{margin-left:0}div#p>svg>foreignObject>section code,div#p>svg>foreignObject>section pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12px}div#p>svg>foreignObject>section pre{margin-top:0;margin-bottom:0}div#p>svg>foreignObject>section input::-webkit-inner-spin-button,div#p>svg>foreignObject>section input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;appearance:none}div#p>svg>foreignObject>section :checked+.radio-label{position:relative;z-index:1;border-color:#0366d6}div#p>svg>foreignObject>section .border{border:1px solid #e1e4e8!important}div#p>svg>foreignObject>section .border-0{border:0!important}div#p>svg>foreignObject>section .border-bottom{border-bottom:1px solid #e1e4e8!important}div#p>svg>foreignObject>section .rounded-1{border-radius:3px!important}div#p>svg>foreignObject>section .bg-white{background-color:#fff!important}div#p>svg>foreignObject>section .bg-gray-light{background-color:#fafbfc!important}div#p>svg>foreignObject>section .text-gray-light{color:#6a737d!important}div#p>svg>foreignObject>section .pl-3,div#p>svg>foreignObject>section .px-3{padding-left:16px!important}div#p>svg>foreignObject>section .px-3{padding-right:16px!important}div#p>svg>foreignObject>section .f6{font-size:12px!important}div#p>svg>foreignObject>section div#p>svg>foreignObject>section section.f6{--marpit-root-font-size:12px!important}div#p>svg>foreignObject>section .lh-condensed{line-height:1.25!important}div#p>svg>foreignObject>section .text-bold{font-weight:600!important}div#p>svg>foreignObject>section .pl-c{color:#6a737d}div#p>svg>foreignObject>section .pl-c1,div#p>svg>foreignObject>section .pl-s .pl-v{color:#005cc5}div#p>svg>foreignObject>section .pl-e,div#p>svg>foreignObject>section .pl-en{color:#6f42c1}div#p>svg>foreignObject>section .pl-s .pl-s1,div#p>svg>foreignObject>section .pl-smi{color:#24292e}div#p>svg>foreignObject>section .pl-ent{color:#22863a}div#p>svg>foreignObject>section .pl-k{color:#d73a49}div#p>svg>foreignObject>section .pl-pds,div#p>svg>foreignObject>section .pl-s,div#p>svg>foreignObject>section .pl-s .pl-pse .pl-s1,div#p>svg>foreignObject>section .pl-sr,div#p>svg>foreignObject>section .pl-sr .pl-cce,div#p>svg>foreignObject>section .pl-sr .pl-sra,div#p>svg>foreignObject>section .pl-sr .pl-sre{color:#032f62}div#p>svg>foreignObject>section .pl-smw,div#p>svg>foreignObject>section .pl-v{color:#e36209}div#p>svg>foreignObject>section .pl-bu{color:#b31d28}div#p>svg>foreignObject>section .pl-ii{color:#fafbfc;background-color:#b31d28}div#p>svg>foreignObject>section .pl-c2{color:#fafbfc;background-color:#d73a49}div#p>svg>foreignObject>section .pl-c2:before{content:"^M"}div#p>svg>foreignObject>section .pl-sr .pl-cce{font-weight:700;color:#22863a}div#p>svg>foreignObject>section .pl-ml{color:#735c0f}div#p>svg>foreignObject>section .pl-mh,div#p>svg>foreignObject>section .pl-mh .pl-en,div#p>svg>foreignObject>section .pl-ms{font-weight:700;color:#005cc5}div#p>svg>foreignObject>section .pl-mi{font-style:italic;color:#24292e}div#p>svg>foreignObject>section .pl-mb{font-weight:700;color:#24292e}div#p>svg>foreignObject>section .pl-md{color:#b31d28;background-color:#ffeef0}div#p>svg>foreignObject>section .pl-mi1{color:#22863a;background-color:#f0fff4}div#p>svg>foreignObject>section .pl-mc{color:#e36209;background-color:#ffebda}div#p>svg>foreignObject>section .pl-mi2{color:#f6f8fa;background-color:#005cc5}div#p>svg>foreignObject>section .pl-mdr{font-weight:700;color:#6f42c1}div#p>svg>foreignObject>section .pl-ba{color:#586069}div#p>svg>foreignObject>section .pl-sg{color:#959da5}div#p>svg>foreignObject>section .pl-corl{text-decoration:underline;color:#032f62}div#p>svg>foreignObject>section .mb-0{margin-bottom:0!important}div#p>svg>foreignObject>section .my-2{margin-bottom:8px!important;margin-top:8px!important}div#p>svg>foreignObject>section .pl-0{padding-left:0!important}div#p>svg>foreignObject>section .py-0{padding-top:0!important;padding-bottom:0!important}div#p>svg>foreignObject>section .pl-1{padding-left:4px!important}div#p>svg>foreignObject>section .pl-2{padding-left:8px!important}div#p>svg>foreignObject>section .py-2{padding-top:8px!important;padding-bottom:8px!important}div#p>svg>foreignObject>section .pl-3{padding-left:16px!important}div#p>svg>foreignObject>section .pl-4{padding-left:24px!important}div#p>svg>foreignObject>section .pl-5{padding-left:32px!important}div#p>svg>foreignObject>section .pl-6{padding-left:40px!important}div#p>svg>foreignObject>section .pl-7{padding-left:48px!important}div#p>svg>foreignObject>section .pl-8{padding-left:64px!important}div#p>svg>foreignObject>section .pl-9{padding-left:80px!important}div#p>svg>foreignObject>section .pl-10{padding-left:96px!important}div#p>svg>foreignObject>section .pl-11{padding-left:112px!important}div#p>svg>foreignObject>section .pl-12{padding-left:128px!important}div#p>svg>foreignObject>section hr{border-bottom-color:#eee}div#p>svg>foreignObject>section kbd{display:inline-block;padding:3px 5px;font:11px SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;line-height:10px;color:#444d56;vertical-align:middle;background-color:#fafbfc;border:1px solid #d1d5da;border-radius:3px;box-shadow:inset 0 -1px 0 #d1d5da}div#p>svg>foreignObject>section:after,div#p>svg>foreignObject>section:before{display:table | 10 */div#p>svg>foreignObject>section .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}div#p>svg>foreignObject>section .anchor{float:left;line-height:1;margin-left:-20px;padding-right:4px}div#p>svg>foreignObject>section .anchor:focus{outline:none}div#p>svg>foreignObject>section h1 .octicon-link,div#p>svg>foreignObject>section h2 .octicon-link,div#p>svg>foreignObject>section h3 .octicon-link,div#p>svg>foreignObject>section h4 .octicon-link,div#p>svg>foreignObject>section h5 .octicon-link,div#p>svg>foreignObject>section h6 .octicon-link{color:#1b1f23;vertical-align:middle;visibility:hidden}div#p>svg>foreignObject>section h1:hover .anchor,div#p>svg>foreignObject>section h2:hover .anchor,div#p>svg>foreignObject>section h3:hover .anchor,div#p>svg>foreignObject>section h4:hover .anchor,div#p>svg>foreignObject>section h5:hover .anchor,div#p>svg>foreignObject>section h6:hover .anchor{text-decoration:none}div#p>svg>foreignObject>section h1:hover .anchor .octicon-link,div#p>svg>foreignObject>section h2:hover .anchor .octicon-link,div#p>svg>foreignObject>section h3:hover .anchor .octicon-link,div#p>svg>foreignObject>section h4:hover .anchor .octicon-link,div#p>svg>foreignObject>section h5:hover .anchor .octicon-link,div#p>svg>foreignObject>section h6:hover .anchor .octicon-link{visibility:visible}div#p>svg>foreignObject>section h1:hover .anchor .octicon-link:before,div#p>svg>foreignObject>section h2:hover .anchor .octicon-link:before,div#p>svg>foreignObject>section h3:hover .anchor .octicon-link:before,div#p>svg>foreignObject>section h4:hover .anchor .octicon-link:before,div#p>svg>foreignObject>section h5:hover .anchor .octicon-link:before,div#p>svg>foreignObject>section h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:" ";display:inline-block;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' d='M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z'/%3E%3C/svg%3E")}div#p>svg>foreignObject>section{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#24292e;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:16px;line-height:1.5;word-wrap:break-word}div#p>svg>foreignObject>section{--marpit-root-font-size:16px}div#p>svg>foreignObject>section details{display:block}div#p>svg>foreignObject>section summary{display:list-item}div#p>svg>foreignObject>section a{background-color:initial}div#p>svg>foreignObject>section a:active,div#p>svg>foreignObject>section a:hover{outline-width:0}div#p>svg>foreignObject>section strong{font-weight:inherit;font-weight:bolder}div#p>svg>foreignObject>section h1{margin:.67em 0}div#p>svg>foreignObject>section img{border-style:none}div#p>svg>foreignObject>section code,div#p>svg>foreignObject>section kbd,div#p>svg>foreignObject>section pre{font-family:monospace,monospace;font-size:1em}div#p>svg>foreignObject>section hr{box-sizing:initial;overflow:visible}div#p>svg>foreignObject>section input{font:inherit;margin:0;overflow:visible}div#p>svg>foreignObject>section [type=checkbox]{padding:0}div#p>svg>foreignObject>section *,div#p>svg>foreignObject>section [type=checkbox]{box-sizing:border-box}div#p>svg>foreignObject>section input{font-family:inherit;font-size:inherit;line-height:inherit}div#p>svg>foreignObject>section a{color:#0366d6;text-decoration:none}div#p>svg>foreignObject>section a:hover{text-decoration:underline}div#p>svg>foreignObject>section strong{font-weight:600}div#p>svg>foreignObject>section hr{height:0;margin:15px 0;overflow:hidden;background:transparent;border-bottom:1px solid #dfe2e5}div#p>svg>foreignObject>section hr:after,div#p>svg>foreignObject>section hr:before{display:table;content:""}div#p>svg>foreignObject>section hr:after{clear:both}div#p>svg>foreignObject>section table{border-spacing:0;border-collapse:collapse}div#p>svg>foreignObject>section td,div#p>svg>foreignObject>section th{padding:0}div#p>svg>foreignObject>section details summary{cursor:pointer}div#p>svg>foreignObject>section h1,div#p>svg>foreignObject>section h2,div#p>svg>foreignObject>section h3,div#p>svg>foreignObject>section h4,div#p>svg>foreignObject>section h5,div#p>svg>foreignObject>section h6{margin-top:0;margin-bottom:0}div#p>svg>foreignObject>section h1{font-size:32px}div#p>svg>foreignObject>section h1,div#p>svg>foreignObject>section h2{font-weight:600}div#p>svg>foreignObject>section h2{font-size:24px}div#p>svg>foreignObject>section h3{font-size:20px}div#p>svg>foreignObject>section h3,div#p>svg>foreignObject>section h4{font-weight:600}div#p>svg>foreignObject>section h4{font-size:16px}div#p>svg>foreignObject>section h5{font-size:14px}div#p>svg>foreignObject>section h5,div#p>svg>foreignObject>section h6{font-weight:600}div#p>svg>foreignObject>section h6{font-size:12px}div#p>svg>foreignObject>section p{margin-top:0;margin-bottom:10px}div#p>svg>foreignObject>section blockquote{margin:0}div#p>svg>foreignObject>section ol,div#p>svg>foreignObject>section ul{padding-left:0;margin-top:0;margin-bottom:0}div#p>svg>foreignObject>section ol ol,div#p>svg>foreignObject>section ul ol{list-style-type:lower-roman}div#p>svg>foreignObject>section ol ol ol,div#p>svg>foreignObject>section ol ul ol,div#p>svg>foreignObject>section ul ol ol,div#p>svg>foreignObject>section ul ul ol{list-style-type:lower-alpha}div#p>svg>foreignObject>section dd{margin-left:0}div#p>svg>foreignObject>section code,div#p>svg>foreignObject>section pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12px}div#p>svg>foreignObject>section pre{margin-top:0;margin-bottom:0}div#p>svg>foreignObject>section input::-webkit-inner-spin-button,div#p>svg>foreignObject>section input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;appearance:none}div#p>svg>foreignObject>section :checked+.radio-label{position:relative;z-index:1;border-color:#0366d6}div#p>svg>foreignObject>section .border{border:1px solid #e1e4e8!important}div#p>svg>foreignObject>section .border-0{border:0!important}div#p>svg>foreignObject>section .border-bottom{border-bottom:1px solid #e1e4e8!important}div#p>svg>foreignObject>section .rounded-1{border-radius:3px!important}div#p>svg>foreignObject>section .bg-white{background-color:#fff!important}div#p>svg>foreignObject>section .bg-gray-light{background-color:#fafbfc!important}div#p>svg>foreignObject>section .text-gray-light{color:#6a737d!important}div#p>svg>foreignObject>section .pl-3,div#p>svg>foreignObject>section .px-3{padding-left:16px!important}div#p>svg>foreignObject>section .px-3{padding-right:16px!important}div#p>svg>foreignObject>section .f6{font-size:12px!important}div#p>svg>foreignObject>section div#p>svg>foreignObject>section section.f6{--marpit-root-font-size:12px!important}div#p>svg>foreignObject>section .lh-condensed{line-height:1.25!important}div#p>svg>foreignObject>section .text-bold{font-weight:600!important}div#p>svg>foreignObject>section .pl-c{color:#6a737d}div#p>svg>foreignObject>section .pl-c1,div#p>svg>foreignObject>section .pl-s .pl-v{color:#005cc5}div#p>svg>foreignObject>section .pl-e,div#p>svg>foreignObject>section .pl-en{color:#6f42c1}div#p>svg>foreignObject>section .pl-s .pl-s1,div#p>svg>foreignObject>section .pl-smi{color:#24292e}div#p>svg>foreignObject>section .pl-ent{color:#22863a}div#p>svg>foreignObject>section .pl-k{color:#d73a49}div#p>svg>foreignObject>section .pl-pds,div#p>svg>foreignObject>section .pl-s,div#p>svg>foreignObject>section .pl-s .pl-pse .pl-s1,div#p>svg>foreignObject>section .pl-sr,div#p>svg>foreignObject>section .pl-sr .pl-cce,div#p>svg>foreignObject>section .pl-sr .pl-sra,div#p>svg>foreignObject>section .pl-sr .pl-sre{color:#032f62}div#p>svg>foreignObject>section .pl-smw,div#p>svg>foreignObject>section .pl-v{color:#e36209}div#p>svg>foreignObject>section .pl-bu{color:#b31d28}div#p>svg>foreignObject>section .pl-ii{color:#fafbfc;background-color:#b31d28}div#p>svg>foreignObject>section .pl-c2{color:#fafbfc;background-color:#d73a49}div#p>svg>foreignObject>section .pl-c2:before{content:"^M"}div#p>svg>foreignObject>section .pl-sr .pl-cce{font-weight:700;color:#22863a}div#p>svg>foreignObject>section .pl-ml{color:#735c0f}div#p>svg>foreignObject>section .pl-mh,div#p>svg>foreignObject>section .pl-mh .pl-en,div#p>svg>foreignObject>section .pl-ms{font-weight:700;color:#005cc5}div#p>svg>foreignObject>section .pl-mi{font-style:italic;color:#24292e}div#p>svg>foreignObject>section .pl-mb{font-weight:700;color:#24292e}div#p>svg>foreignObject>section .pl-md{color:#b31d28;background-color:#ffeef0}div#p>svg>foreignObject>section .pl-mi1{color:#22863a;background-color:#f0fff4}div#p>svg>foreignObject>section .pl-mc{color:#e36209;background-color:#ffebda}div#p>svg>foreignObject>section .pl-mi2{color:#f6f8fa;background-color:#005cc5}div#p>svg>foreignObject>section .pl-mdr{font-weight:700;color:#6f42c1}div#p>svg>foreignObject>section .pl-ba{color:#586069}div#p>svg>foreignObject>section .pl-sg{color:#959da5}div#p>svg>foreignObject>section .pl-corl{text-decoration:underline;color:#032f62}div#p>svg>foreignObject>section .mb-0{margin-bottom:0!important}div#p>svg>foreignObject>section .my-2{margin-bottom:8px!important;margin-top:8px!important}div#p>svg>foreignObject>section .pl-0{padding-left:0!important}div#p>svg>foreignObject>section .py-0{padding-top:0!important;padding-bottom:0!important}div#p>svg>foreignObject>section .pl-1{padding-left:4px!important}div#p>svg>foreignObject>section .pl-2{padding-left:8px!important}div#p>svg>foreignObject>section .py-2{padding-top:8px!important;padding-bottom:8px!important}div#p>svg>foreignObject>section .pl-3{padding-left:16px!important}div#p>svg>foreignObject>section .pl-4{padding-left:24px!important}div#p>svg>foreignObject>section .pl-5{padding-left:32px!important}div#p>svg>foreignObject>section .pl-6{padding-left:40px!important}div#p>svg>foreignObject>section .pl-7{padding-left:48px!important}div#p>svg>foreignObject>section .pl-8{padding-left:64px!important}div#p>svg>foreignObject>section .pl-9{padding-left:80px!important}div#p>svg>foreignObject>section .pl-10{padding-left:96px!important}div#p>svg>foreignObject>section .pl-11{padding-left:112px!important}div#p>svg>foreignObject>section .pl-12{padding-left:128px!important}div#p>svg>foreignObject>section hr{border-bottom-color:#eee}div#p>svg>foreignObject>section kbd{display:inline-block;padding:3px 5px;font:11px SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;line-height:10px;color:#444d56;vertical-align:middle;background-color:#fafbfc;border:1px solid #d1d5da;border-radius:3px;box-shadow:inset 0 -1px 0 #d1d5da}div#p>svg>foreignObject>section:after,div#p>svg>foreignObject>section:before{display:table |
11 /* content:""; */}div#p>svg>foreignObject>section:after{clear:both}div#p>svg>foreignObject>section>:first-child{margin-top:0!important}div#p>svg>foreignObject>section>:last-child{margin-bottom:0!important}div#p>svg>foreignObject>section a:not([href]){color:inherit;text-decoration:none}div#p>svg>foreignObject>section blockquote,div#p>svg>foreignObject>section details,div#p>svg>foreignObject>section dl,div#p>svg>foreignObject>section ol,div#p>svg>foreignObject>section p,div#p>svg>foreignObject>section pre,div#p>svg>foreignObject>section table,div#p>svg>foreignObject>section ul{margin-top:0;margin-bottom:16px}div#p>svg>foreignObject>section hr{height:.25em;padding:0;margin:24px 0;background-color:#e1e4e8;border:0}div#p>svg>foreignObject>section blockquote{padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}div#p>svg>foreignObject>section blockquote>:first-child{margin-top:0}div#p>svg>foreignObject>section blockquote>:last-child{margin-bottom:0}div#p>svg>foreignObject>section h1,div#p>svg>foreignObject>section h2,div#p>svg>foreignObject>section h3,div#p>svg>foreignObject>section h4,div#p>svg>foreignObject>section h5,div#p>svg>foreignObject>section h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}div#p>svg>foreignObject>section h1{font-size:2em}div#p>svg>foreignObject>section h1,div#p>svg>foreignObject>section h2{padding-bottom:.3em;border-bottom:1px solid #eaecef}div#p>svg>foreignObject>section h2{font-size:1.5em}div#p>svg>foreignObject>section h3{font-size:1.25em}div#p>svg>foreignObject>section h4{font-size:1em}div#p>svg>foreignObject>section h5{font-size:.875em}div#p>svg>foreignObject>section h6{font-size:.85em;color:#6a737d}div#p>svg>foreignObject>section ol,div#p>svg>foreignObject>section ul{padding-left:2em}div#p>svg>foreignObject>section ol ol,div#p>svg>foreignObject>section ol ul,div#p>svg>foreignObject>section ul ol,div#p>svg>foreignObject>section ul ul{margin-top:0;margin-bottom:0}div#p>svg>foreignObject>section li{word-wrap:break-all}div#p>svg>foreignObject>section li>p{margin-top:16px}div#p>svg>foreignObject>section li+li{margin-top:.25em}div#p>svg>foreignObject>section dl{padding:0}div#p>svg>foreignObject>section dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}div#p>svg>foreignObject>section dl dd{padding:0 16px;margin-bottom:16px}div#p>svg>foreignObject>section table{display:block;width:100%;overflow:auto}div#p>svg>foreignObject>section table th{font-weight:600}div#p>svg>foreignObject>section table td,div#p>svg>foreignObject>section table th{padding:6px 13px;border:1px solid #dfe2e5}div#p>svg>foreignObject>section table tr{background-color:#fff;border-top:1px solid #c6cbd1}div#p>svg>foreignObject>section table tr:nth-child(2n){background-color:#f6f8fa}div#p>svg>foreignObject>section img{max-width:100%;box-sizing:initial;background-color:#fff}div#p>svg>foreignObject>section img[align=right]{padding-left:20px}div#p>svg>foreignObject>section img[align=left]{padding-right:20px}div#p>svg>foreignObject>section code{padding:.2em .4em;margin:0;font-size:85%;background-color:rgba(27,31,35,.05);border-radius:3px}div#p>svg>foreignObject>section pre{word-wrap:normal}div#p>svg>foreignObject>section pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}div#p>svg>foreignObject>section .highlight{margin-bottom:16px}div#p>svg>foreignObject>section .highlight pre{margin-bottom:0;word-break:normal}div#p>svg>foreignObject>section pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px}div#p>svg>foreignObject>section pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:initial;border:0}div#p>svg>foreignObject>section .commit-tease-sha{display:inline-block;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:90%;color:#444d56}div#p>svg>foreignObject>section div#p>svg>foreignObject>section section.commit-tease-sha{--marpit-root-font-size:90%}div#p>svg>foreignObject>section .full-commit .btn-outline:not(:disabled):hover{color:#005cc5;border-color:#005cc5}div#p>svg>foreignObject>section .blob-wrapper{overflow-x:auto;overflow-y:hidden}div#p>svg>foreignObject>section .blob-wrapper-embedded{max-height:240px;overflow-y:auto}div#p>svg>foreignObject>section .blob-num{width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,.3);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div#p>svg>foreignObject>section div#p>svg>foreignObject>section section.blob-num{--marpit-root-font-size:12px}div#p>svg>foreignObject>section .blob-num:hover{color:rgba(27,31,35,.6)}div#p>svg>foreignObject>section .blob-num:before{content:attr(data-line-number)}div#p>svg>foreignObject>section .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}div#p>svg>foreignObject>section .blob-code-inner{overflow:visible;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12px;color:#24292e;word-wrap:normal;white-space:pre}div#p>svg>foreignObject>section div#p>svg>foreignObject>section section.blob-code-inner{--marpit-root-font-size:12px}div#p>svg>foreignObject>section .pl-token.active,div#p>svg>foreignObject>section .pl-token:hover{cursor:pointer;background:#ffea7f}div#p>svg>foreignObject>section .tab-size[data-tab-size="1"]{-moz-tab-size:1;-o-tab-size:1;tab-size:1}div#p>svg>foreignObject>section .tab-size[data-tab-size="2"]{-moz-tab-size:2;-o-tab-size:2;tab-size:2}div#p>svg>foreignObject>section .tab-size[data-tab-size="3"]{-moz-tab-size:3;-o-tab-size:3;tab-size:3}div#p>svg>foreignObject>section .tab-size[data-tab-size="4"]{-moz-tab-size:4;-o-tab-size:4;tab-size:4}div#p>svg>foreignObject>section .tab-size[data-tab-size="5"]{-moz-tab-size:5;-o-tab-size:5;tab-size:5}div#p>svg>foreignObject>section .tab-size[data-tab-size="6"]{-moz-tab-size:6;-o-tab-size:6;tab-size:6}div#p>svg>foreignObject>section .tab-size[data-tab-size="7"]{-moz-tab-size:7;-o-tab-size:7;tab-size:7}div#p>svg>foreignObject>section .tab-size[data-tab-size="8"]{-moz-tab-size:8;-o-tab-size:8;tab-size:8}div#p>svg>foreignObject>section .tab-size[data-tab-size="9"]{-moz-tab-size:9;-o-tab-size:9;tab-size:9}div#p>svg>foreignObject>section .tab-size[data-tab-size="10"]{-moz-tab-size:10;-o-tab-size:10;tab-size:10}div#p>svg>foreignObject>section .tab-size[data-tab-size="11"]{-moz-tab-size:11;-o-tab-size:11;tab-size:11}div#p>svg>foreignObject>section .tab-size[data-tab-size="12"]{-moz-tab-size:12;-o-tab-size:12;tab-size:12}div#p>svg>foreignObject>section .task-list-item{list-style-type:none}div#p>svg>foreignObject>section .task-list-item+.task-list-item{margin-top:3px}div#p>svg>foreignObject>section .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}div#p>svg>foreignObject>section .hljs{display:block;background:#fff;padding:.5em;color:#333;overflow-x:auto}div#p>svg>foreignObject>section .hljs-comment,div#p>svg>foreignObject>section .hljs-meta{color:#969896}div#p>svg>foreignObject>section .hljs-emphasis,div#p>svg>foreignObject>section .hljs-quote,div#p>svg>foreignObject>section .hljs-strong,div#p>svg>foreignObject>section .hljs-template-variable,div#p>svg>foreignObject>section .hljs-variable{color:#df5000}div#p>svg>foreignObject>section .hljs-keyword,div#p>svg>foreignObject>section .hljs-selector-tag,div#p>svg>foreignObject>section .hljs-type{color:#d73a49}div#p>svg>foreignObject>section .hljs-attribute,div#p>svg>foreignObject>section .hljs-bullet,div#p>svg>foreignObject>section .hljs-literal,div#p>svg>foreignObject>section .hljs-symbol{color:#0086b3}div#p>svg>foreignObject>section .hljs-name,div#p>svg>foreignObject>section .hljs-section{color:#63a35c}div#p>svg>foreignObject>section .hljs-tag{color:#333}div#p>svg>foreignObject>section .hljs-attr,div#p>svg>foreignObject>section .hljs-selector-attr,div#p>svg>foreignObject>section .hljs-selector-class,div#p>svg>foreignObject>section .hljs-selector-id,div#p>svg>foreignObject>section .hljs-selector-pseudo,div#p>svg>foreignObject>section .hljs-title{color:#6f42c1}div#p>svg>foreignObject>section .hljs-addition{color:#55a532;background-color:#eaffea}div#p>svg>foreignObject>section .hljs-deletion{color:#bd2c00;background-color:#ffecec}div#p>svg>foreignObject>section .hljs-link{text-decoration:underline}div#p>svg>foreignObject>section .hljs-number{color:#005cc5}div#p>svg>foreignObject>section .hljs-string{color:#032f62}div#p>svg>foreignObject>section svg[data-marp-fitting=svg]{max-height:563px}div#p>svg>foreignObject>section h1{color:#246;font-size:1.6em}div#p>svg>foreignObject>section h1,div#p>svg>foreignObject>section h2{border-bottom:none}div#p>svg>foreignObject>section h2{font-size:1.3em}div#p>svg>foreignObject>section h3{font-size:1.1em}div#p>svg>foreignObject>section h4{font-size:1.05em}div#p>svg>foreignObject>section h5{font-size:1em}div#p>svg>foreignObject>section h6{font-size:.9em}div#p>svg>foreignObject>section h1 strong,div#p>svg>foreignObject>section h2 strong,div#p>svg>foreignObject>section h3 strong,div#p>svg>foreignObject>section h4 strong,div#p>svg>foreignObject>section h5 strong,div#p>svg>foreignObject>section h6 strong{font-weight:inherit;color:#48c}div#p>svg>foreignObject>section hr{height:0;padding-top:.25em}div#p>svg>foreignObject>section pre{border:1px solid #999;line-height:1.15;overflow:visible}div#p>svg>foreignObject>section pre code svg[data-marp-fitting=svg]{max-height:529px}div#p>svg>foreignObject>section footer,div#p>svg>foreignObject>section header{margin:0;position:absolute;left:30px;color:hsla(0,0%,40%,.75);font-size:18px}div#p>svg>foreignObject>section header{top:21px}div#p>svg>foreignObject>section footer{bottom:21px}div#p>svg>foreignObject>section{align-items:stretch;background:#fff;display:flex;flex-direction:column;flex-wrap:nowrap;font-size:29px;height:720px;justify-content:center;padding:78.5px;width:1280px}div#p>svg>foreignObject>section{--marpit-root-font-size:29px}div#p>svg>foreignObject>section>:last-child,div#p>svg>foreignObject>section[data-footer]>:nth-last-child(2){margin-bottom:0}div#p>svg>foreignObject>section>:first-child,div#p>svg>foreignObject>section>header:first-child+*{margin-top:0}div#p>svg>foreignObject>section:after{position:absolute;padding:0;right:30px;bottom:21px;font-size:24px;color:#777}div#p>svg>foreignObject>section:after{--marpit-root-font-size:24px}div#p>svg>foreignObject>section.invert{background-color:#222;color:#e6eaf0}div#p>svg>foreignObject>section.invert:after{color:#999}div#p>svg>foreignObject>section.invert img{background-color:transparent}div#p>svg>foreignObject>section.invert a{color:#50b3ff}div#p>svg>foreignObject>section.invert h1{color:#a3c5e7}div#p>svg>foreignObject>section.invert h2,div#p>svg>foreignObject>section.invert h3,div#p>svg>foreignObject>section.invert h4,div#p>svg>foreignObject>section.invert h5{color:#ebeff5}div#p>svg>foreignObject>section.invert blockquote,div#p>svg>foreignObject>section.invert h6{border-color:#3d3f43;color:#939699}div#p>svg>foreignObject>section.invert h1 strong,div#p>svg>foreignObject>section.invert h2 strong,div#p>svg>foreignObject>section.invert h3 strong,div#p>svg>foreignObject>section.invert h4 strong,div#p>svg>foreignObject>section.invert h5 strong,div#p>svg>foreignObject>section.invert h6 strong{color:#7bf}div#p>svg>foreignObject>section.invert hr{background-color:#3d3f43}div#p>svg>foreignObject>section.invert footer,div#p>svg>foreignObject>section.invert header{color:hsla(0,0%,60%,.75)}div#p>svg>foreignObject>section.invert code,div#p>svg>foreignObject>section.invert kbd{background-color:#111}div#p>svg>foreignObject>section.invert kbd{border-color:#666;box-shadow:inset 0 -1px 0 #555;color:#e6eaf0}div#p>svg>foreignObject>section.invert table tr{background-color:#12181d;border-color:#60657b}div#p>svg>foreignObject>section.invert table tr:nth-child(2n){background-color:#1b2024}div#p>svg>foreignObject>section.invert table td,div#p>svg>foreignObject>section.invert table th{border-color:#5b5e61}div#p>svg>foreignObject>section.invert pre{background-color:#0a0e12;border-color:#777}div#p>svg>foreignObject>section.invert pre code{background-color:transparent}div#p>svg>foreignObject>section[data-color] h1,div#p>svg>foreignObject>section[data-color] h2,div#p>svg>foreignObject>section[data-color] h3,div#p>svg>foreignObject>section[data-color] h4,div#p>svg>foreignObject>section[data-color] h5,div#p>svg>foreignObject>section[data-color] h6{color:currentColor}div#p>svg>foreignObject>section[data-marpit-advanced-background=background]{display:block!important;padding:0!important}div#p>svg>foreignObject>section[data-marpit-advanced-background=background]:after,div#p>svg>foreignObject>section[data-marpit-advanced-background=background]:before,div#p>svg>foreignObject>section[data-marpit-advanced-background=content]:after,div#p>svg>foreignObject>section[data-marpit-advanced-background=content]:before{display:none!important}div#p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]{all:initial;display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%}div#p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container][data-marpit-advanced-background-direction=vertical]{flex-direction:column}div#p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split]>div[data-marpit-advanced-background-container]{width:var(--marpit-advanced-background-split,50%)}div#p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split=right]>div[data-marpit-advanced-background-container]{margin-left:calc(100% - var(--marpit-advanced-background-split, 50%))}div#p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure{all:initial;background-position:center;background-repeat:no-repeat;background-size:cover;flex:auto;margin:0}div#p>svg>foreignObject>section[data-marpit-advanced-background=content],div#p>svg>foreignObject>section[data-marpit-advanced-background=pseudo]{background:transparent!important}div#p>svg>foreignObject>section[data-marpit-advanced-background=pseudo],div#p>svg[data-marpit-svg]>foreignObject[data-marpit-advanced-background=pseudo]{pointer-events:none!important}div#p>svg>foreignObject>section[data-marpit-advanced-background-split]{width:100%;height:100%}</style></head><body><div class="bespoke-marp-osc"><button data-bespoke-marp-osc="prev" tabindex="-1" title="Previous slide">Previous slide</button><span data-bespoke-marp-osc="page"></span><button data-bespoke-marp-osc="next" tabindex="-1" title="Next slide">Next slide</button><button data-bespoke-marp-osc="fullscreen" tabindex="-1" title="Toggle fullscreen (f)">Toggle fullscreen</button><button data-bespoke-marp-osc="presenter" tabindex="-1" title="Open presenter view (p)">Open presenter view</button></div><div id="p"><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="1" data-paginate="true" data-marpit-pagination="1" data-marpit-pagination-total="42" style="--paginate:true;"> | 11 /* content:""; */}div#p>svg>foreignObject>section:after{clear:both}div#p>svg>foreignObject>section>:first-child{margin-top:0!important}div#p>svg>foreignObject>section>:last-child{margin-bottom:0!important}div#p>svg>foreignObject>section a:not([href]){color:inherit;text-decoration:none}div#p>svg>foreignObject>section blockquote,div#p>svg>foreignObject>section details,div#p>svg>foreignObject>section dl,div#p>svg>foreignObject>section ol,div#p>svg>foreignObject>section p,div#p>svg>foreignObject>section pre,div#p>svg>foreignObject>section table,div#p>svg>foreignObject>section ul{margin-top:0;margin-bottom:16px}div#p>svg>foreignObject>section hr{height:.25em;padding:0;margin:24px 0;background-color:#e1e4e8;border:0}div#p>svg>foreignObject>section blockquote{padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}div#p>svg>foreignObject>section blockquote>:first-child{margin-top:0}div#p>svg>foreignObject>section blockquote>:last-child{margin-bottom:0}div#p>svg>foreignObject>section h1,div#p>svg>foreignObject>section h2,div#p>svg>foreignObject>section h3,div#p>svg>foreignObject>section h4,div#p>svg>foreignObject>section h5,div#p>svg>foreignObject>section h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}div#p>svg>foreignObject>section h1{font-size:2em}div#p>svg>foreignObject>section h1,div#p>svg>foreignObject>section h2{padding-bottom:.3em;border-bottom:1px solid #eaecef}div#p>svg>foreignObject>section h2{font-size:1.5em}div#p>svg>foreignObject>section h3{font-size:1.25em}div#p>svg>foreignObject>section h4{font-size:1em}div#p>svg>foreignObject>section h5{font-size:.875em}div#p>svg>foreignObject>section h6{font-size:.85em;color:#6a737d}div#p>svg>foreignObject>section ol,div#p>svg>foreignObject>section ul{padding-left:2em}div#p>svg>foreignObject>section ol ol,div#p>svg>foreignObject>section ol ul,div#p>svg>foreignObject>section ul ol,div#p>svg>foreignObject>section ul ul{margin-top:0;margin-bottom:0}div#p>svg>foreignObject>section li{word-wrap:break-all}div#p>svg>foreignObject>section li>p{margin-top:16px}div#p>svg>foreignObject>section li+li{margin-top:.25em}div#p>svg>foreignObject>section dl{padding:0}div#p>svg>foreignObject>section dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}div#p>svg>foreignObject>section dl dd{padding:0 16px;margin-bottom:16px}div#p>svg>foreignObject>section table{display:block;width:100%;overflow:auto}div#p>svg>foreignObject>section table th{font-weight:600}div#p>svg>foreignObject>section table td,div#p>svg>foreignObject>section table th{padding:6px 13px;border:1px solid #dfe2e5}div#p>svg>foreignObject>section table tr{background-color:#fff;border-top:1px solid #c6cbd1}div#p>svg>foreignObject>section table tr:nth-child(2n){background-color:#f6f8fa}div#p>svg>foreignObject>section img{max-width:100%;box-sizing:initial;background-color:#fff}div#p>svg>foreignObject>section img[align=right]{padding-left:20px}div#p>svg>foreignObject>section img[align=left]{padding-right:20px}div#p>svg>foreignObject>section code{padding:.2em .4em;margin:0;font-size:85%;background-color:rgba(27,31,35,.05);border-radius:3px}div#p>svg>foreignObject>section pre{word-wrap:normal}div#p>svg>foreignObject>section pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}div#p>svg>foreignObject>section .highlight{margin-bottom:16px}div#p>svg>foreignObject>section .highlight pre{margin-bottom:0;word-break:normal}div#p>svg>foreignObject>section pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px}div#p>svg>foreignObject>section pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:initial;border:0}div#p>svg>foreignObject>section .commit-tease-sha{display:inline-block;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:90%;color:#444d56}div#p>svg>foreignObject>section div#p>svg>foreignObject>section section.commit-tease-sha{--marpit-root-font-size:90%}div#p>svg>foreignObject>section .full-commit .btn-outline:not(:disabled):hover{color:#005cc5;border-color:#005cc5}div#p>svg>foreignObject>section .blob-wrapper{overflow-x:auto;overflow-y:hidden}div#p>svg>foreignObject>section .blob-wrapper-embedded{max-height:240px;overflow-y:auto}div#p>svg>foreignObject>section .blob-num{width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,.3);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div#p>svg>foreignObject>section div#p>svg>foreignObject>section section.blob-num{--marpit-root-font-size:12px}div#p>svg>foreignObject>section .blob-num:hover{color:rgba(27,31,35,.6)}div#p>svg>foreignObject>section .blob-num:before{content:attr(data-line-number)}div#p>svg>foreignObject>section .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}div#p>svg>foreignObject>section .blob-code-inner{overflow:visible;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12px;color:#24292e;word-wrap:normal;white-space:pre}div#p>svg>foreignObject>section div#p>svg>foreignObject>section section.blob-code-inner{--marpit-root-font-size:12px}div#p>svg>foreignObject>section .pl-token.active,div#p>svg>foreignObject>section .pl-token:hover{cursor:pointer;background:#ffea7f}div#p>svg>foreignObject>section .tab-size[data-tab-size="1"]{-moz-tab-size:1;-o-tab-size:1;tab-size:1}div#p>svg>foreignObject>section .tab-size[data-tab-size="2"]{-moz-tab-size:2;-o-tab-size:2;tab-size:2}div#p>svg>foreignObject>section .tab-size[data-tab-size="3"]{-moz-tab-size:3;-o-tab-size:3;tab-size:3}div#p>svg>foreignObject>section .tab-size[data-tab-size="4"]{-moz-tab-size:4;-o-tab-size:4;tab-size:4}div#p>svg>foreignObject>section .tab-size[data-tab-size="5"]{-moz-tab-size:5;-o-tab-size:5;tab-size:5}div#p>svg>foreignObject>section .tab-size[data-tab-size="6"]{-moz-tab-size:6;-o-tab-size:6;tab-size:6}div#p>svg>foreignObject>section .tab-size[data-tab-size="7"]{-moz-tab-size:7;-o-tab-size:7;tab-size:7}div#p>svg>foreignObject>section .tab-size[data-tab-size="8"]{-moz-tab-size:8;-o-tab-size:8;tab-size:8}div#p>svg>foreignObject>section .tab-size[data-tab-size="9"]{-moz-tab-size:9;-o-tab-size:9;tab-size:9}div#p>svg>foreignObject>section .tab-size[data-tab-size="10"]{-moz-tab-size:10;-o-tab-size:10;tab-size:10}div#p>svg>foreignObject>section .tab-size[data-tab-size="11"]{-moz-tab-size:11;-o-tab-size:11;tab-size:11}div#p>svg>foreignObject>section .tab-size[data-tab-size="12"]{-moz-tab-size:12;-o-tab-size:12;tab-size:12}div#p>svg>foreignObject>section .task-list-item{list-style-type:none}div#p>svg>foreignObject>section .task-list-item+.task-list-item{margin-top:3px}div#p>svg>foreignObject>section .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}div#p>svg>foreignObject>section .hljs{display:block;background:#fff;padding:.5em;color:#333;overflow-x:auto}div#p>svg>foreignObject>section .hljs-comment,div#p>svg>foreignObject>section .hljs-meta{color:#969896}div#p>svg>foreignObject>section .hljs-emphasis,div#p>svg>foreignObject>section .hljs-quote,div#p>svg>foreignObject>section .hljs-strong,div#p>svg>foreignObject>section .hljs-template-variable,div#p>svg>foreignObject>section .hljs-variable{color:#df5000}div#p>svg>foreignObject>section .hljs-keyword,div#p>svg>foreignObject>section .hljs-selector-tag,div#p>svg>foreignObject>section .hljs-type{color:#d73a49}div#p>svg>foreignObject>section .hljs-attribute,div#p>svg>foreignObject>section .hljs-bullet,div#p>svg>foreignObject>section .hljs-literal,div#p>svg>foreignObject>section .hljs-symbol{color:#0086b3}div#p>svg>foreignObject>section .hljs-name,div#p>svg>foreignObject>section .hljs-section{color:#63a35c}div#p>svg>foreignObject>section .hljs-tag{color:#333}div#p>svg>foreignObject>section .hljs-attr,div#p>svg>foreignObject>section .hljs-selector-attr,div#p>svg>foreignObject>section .hljs-selector-class,div#p>svg>foreignObject>section .hljs-selector-id,div#p>svg>foreignObject>section .hljs-selector-pseudo,div#p>svg>foreignObject>section .hljs-title{color:#6f42c1}div#p>svg>foreignObject>section .hljs-addition{color:#55a532;background-color:#eaffea}div#p>svg>foreignObject>section .hljs-deletion{color:#bd2c00;background-color:#ffecec}div#p>svg>foreignObject>section .hljs-link{text-decoration:underline}div#p>svg>foreignObject>section .hljs-number{color:#005cc5}div#p>svg>foreignObject>section .hljs-string{color:#032f62}div#p>svg>foreignObject>section svg[data-marp-fitting=svg]{max-height:563px}div#p>svg>foreignObject>section h1{color:#246;font-size:1.6em}div#p>svg>foreignObject>section h1,div#p>svg>foreignObject>section h2{border-bottom:none}div#p>svg>foreignObject>section h2{font-size:1.3em}div#p>svg>foreignObject>section h3{font-size:1.1em}div#p>svg>foreignObject>section h4{font-size:1.05em}div#p>svg>foreignObject>section h5{font-size:1em}div#p>svg>foreignObject>section h6{font-size:.9em}div#p>svg>foreignObject>section h1 strong,div#p>svg>foreignObject>section h2 strong,div#p>svg>foreignObject>section h3 strong,div#p>svg>foreignObject>section h4 strong,div#p>svg>foreignObject>section h5 strong,div#p>svg>foreignObject>section h6 strong{font-weight:inherit;color:#48c}div#p>svg>foreignObject>section hr{height:0;padding-top:.25em}div#p>svg>foreignObject>section pre{border:1px solid #999;line-height:1.15;overflow:visible}div#p>svg>foreignObject>section pre code svg[data-marp-fitting=svg]{max-height:529px}div#p>svg>foreignObject>section footer,div#p>svg>foreignObject>section header{margin:0;position:absolute;left:30px;color:hsla(0,0%,40%,.75);font-size:18px}div#p>svg>foreignObject>section header{top:21px}div#p>svg>foreignObject>section footer{bottom:21px}div#p>svg>foreignObject>section{align-items:stretch;background:#fff;display:flex;flex-direction:column;flex-wrap:nowrap;font-size:29px;height:720px;justify-content:center;padding:78.5px;width:1280px}div#p>svg>foreignObject>section{--marpit-root-font-size:29px}div#p>svg>foreignObject>section>:last-child,div#p>svg>foreignObject>section[data-footer]>:nth-last-child(2){margin-bottom:0}div#p>svg>foreignObject>section>:first-child,div#p>svg>foreignObject>section>header:first-child+*{margin-top:0}div#p>svg>foreignObject>section:after{position:absolute;padding:0;right:30px;bottom:21px;font-size:24px;color:#777}div#p>svg>foreignObject>section:after{--marpit-root-font-size:24px}div#p>svg>foreignObject>section.invert{background-color:#222;color:#e6eaf0}div#p>svg>foreignObject>section.invert:after{color:#999}div#p>svg>foreignObject>section.invert img{background-color:transparent}div#p>svg>foreignObject>section.invert a{color:#50b3ff}div#p>svg>foreignObject>section.invert h1{color:#a3c5e7}div#p>svg>foreignObject>section.invert h2,div#p>svg>foreignObject>section.invert h3,div#p>svg>foreignObject>section.invert h4,div#p>svg>foreignObject>section.invert h5{color:#ebeff5}div#p>svg>foreignObject>section.invert blockquote,div#p>svg>foreignObject>section.invert h6{border-color:#3d3f43;color:#939699}div#p>svg>foreignObject>section.invert h1 strong,div#p>svg>foreignObject>section.invert h2 strong,div#p>svg>foreignObject>section.invert h3 strong,div#p>svg>foreignObject>section.invert h4 strong,div#p>svg>foreignObject>section.invert h5 strong,div#p>svg>foreignObject>section.invert h6 strong{color:#7bf}div#p>svg>foreignObject>section.invert hr{background-color:#3d3f43}div#p>svg>foreignObject>section.invert footer,div#p>svg>foreignObject>section.invert header{color:hsla(0,0%,60%,.75)}div#p>svg>foreignObject>section.invert code,div#p>svg>foreignObject>section.invert kbd{background-color:#111}div#p>svg>foreignObject>section.invert kbd{border-color:#666;box-shadow:inset 0 -1px 0 #555;color:#e6eaf0}div#p>svg>foreignObject>section.invert table tr{background-color:#12181d;border-color:#60657b}div#p>svg>foreignObject>section.invert table tr:nth-child(2n){background-color:#1b2024}div#p>svg>foreignObject>section.invert table td,div#p>svg>foreignObject>section.invert table th{border-color:#5b5e61}div#p>svg>foreignObject>section.invert pre{background-color:#0a0e12;border-color:#777}div#p>svg>foreignObject>section.invert pre code{background-color:transparent}div#p>svg>foreignObject>section[data-color] h1,div#p>svg>foreignObject>section[data-color] h2,div#p>svg>foreignObject>section[data-color] h3,div#p>svg>foreignObject>section[data-color] h4,div#p>svg>foreignObject>section[data-color] h5,div#p>svg>foreignObject>section[data-color] h6{color:currentColor}div#p>svg>foreignObject>section[data-marpit-advanced-background=background]{display:block!important;padding:0!important}div#p>svg>foreignObject>section[data-marpit-advanced-background=background]:after,div#p>svg>foreignObject>section[data-marpit-advanced-background=background]:before,div#p>svg>foreignObject>section[data-marpit-advanced-background=content]:after,div#p>svg>foreignObject>section[data-marpit-advanced-background=content]:before{display:none!important}div#p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]{all:initial;display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%}div#p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container][data-marpit-advanced-background-direction=vertical]{flex-direction:column}div#p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split]>div[data-marpit-advanced-background-container]{width:var(--marpit-advanced-background-split,50%)}div#p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split=right]>div[data-marpit-advanced-background-container]{margin-left:calc(100% - var(--marpit-advanced-background-split, 50%))}div#p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure{all:initial;background-position:center;background-repeat:no-repeat;background-size:cover;flex:auto;margin:0}div#p>svg>foreignObject>section[data-marpit-advanced-background=content],div#p>svg>foreignObject>section[data-marpit-advanced-background=pseudo]{background:transparent!important}div#p>svg>foreignObject>section[data-marpit-advanced-background=pseudo],div#p>svg[data-marpit-svg]>foreignObject[data-marpit-advanced-background=pseudo]{pointer-events:none!important}div#p>svg>foreignObject>section[data-marpit-advanced-background-split]{width:100%;height:100%}</style></head><body><div class="bespoke-marp-osc"><button data-bespoke-marp-osc="prev" tabindex="-1" title="Previous slide">Previous slide</button><span data-bespoke-marp-osc="page"></span><button data-bespoke-marp-osc="next" tabindex="-1" title="Next slide">Next slide</button><button data-bespoke-marp-osc="fullscreen" tabindex="-1" title="Toggle fullscreen (f)">Toggle fullscreen</button><button data-bespoke-marp-osc="presenter" tabindex="-1" title="Open presenter view (p)">Open presenter view</button></div><div id="p"><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="1" data-paginate="true" data-marpit-pagination="1" data-marpit-pagination-total="53" style="--paginate:true;"> |
12 <h1>GearsOSのメタ計算</h1> | 12 <h1>GearsOSのメタ計算</h1> |
13 <ul> | 13 <ul> |
14 <li>清水 隆博 | 14 <li>清水 隆博 |
15 <ul> | 15 <ul> |
16 <li>琉球大学理工学研究科</li> | 16 <li>琉球大学理工学研究科</li> |
18 <li>河野研</li> | 18 <li>河野研</li> |
19 </ul> | 19 </ul> |
20 </li> | 20 </li> |
21 </ul> | 21 </ul> |
22 </section> | 22 </section> |
23 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="2" data-paginate="true" data-marpit-pagination="2" data-marpit-pagination-total="42" style="--paginate:true;"> | 23 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="2" data-paginate="true" data-marpit-pagination="2" data-marpit-pagination-total="53" style="--paginate:true;"> |
24 <h1>研究発表の構成</h1> | 24 <h1>研究発表の構成</h1> |
25 <ul> | 25 <ul> |
26 <li>研究目的</li> | 26 <li>研究目的</li> |
27 <li>CbC、GearsOSの基礎概念</li> | 27 <li>CbC、GearsOSの基礎概念</li> |
28 <li>GearsOSの新機能</li> | 28 <li>GearsOSの新機能</li> |
32 <li>Perlトランスパイラの改善</li> | 32 <li>Perlトランスパイラの改善</li> |
33 </ul> | 33 </ul> |
34 </li> | 34 </li> |
35 </ul> | 35 </ul> |
36 </section> | 36 </section> |
37 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="3" data-paginate="true" data-marpit-pagination="3" data-marpit-pagination-total="42" style="--paginate:true;"> | 37 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="3" data-paginate="true" data-marpit-pagination="3" data-marpit-pagination-total="53" style="--paginate:true;"> |
38 <h1>研究目的</h1> | 38 <h1>研究目的</h1> |
39 <ul> | 39 <ul> |
40 <li>OSとアプリケーションの信頼性の保証したい</li> | 40 <li>OSとアプリケーションの信頼性の保証したい</li> |
41 <li>OSそのものも巨大なプログラム | 41 <li>OSそのものも巨大なプログラム |
42 <ul> | 42 <ul> |
53 <li>既存のソースコードに形式手法を導入できるフレームワークを構築したい</li> | 53 <li>既存のソースコードに形式手法を導入できるフレームワークを構築したい</li> |
54 </ul> | 54 </ul> |
55 </li> | 55 </li> |
56 </ul> | 56 </ul> |
57 </section> | 57 </section> |
58 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="4" data-paginate="true" data-marpit-pagination="4" data-marpit-pagination-total="42" style="--paginate:true;"> | 58 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="4" data-paginate="true" data-marpit-pagination="4" data-marpit-pagination-total="53" style="--paginate:true;"> |
59 <h1>ノーマルレベルとメタレベルを用いた信頼性の向上</h1> | 59 <h1>ノーマルレベルとメタレベルを用いた信頼性の向上</h1> |
60 <ul> | 60 <ul> |
61 <li>プログラムの実行部分は以下の2つからなる | 61 <li>プログラムの実行部分は以下の2つからなる |
62 <ul> | 62 <ul> |
63 <li>入力と出力の関係を決める計算(ノーマルレベル)</li> | 63 <li>入力と出力の関係を決める計算(ノーマルレベル)</li> |
74 </ul> | 74 </ul> |
75 </li> | 75 </li> |
76 <li>メタレベルの計算として信頼性を保証する</li> | 76 <li>メタレベルの計算として信頼性を保証する</li> |
77 </ul> | 77 </ul> |
78 </section> | 78 </section> |
79 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="5" data-paginate="true" data-marpit-pagination="5" data-marpit-pagination-total="42" style="--paginate:true;"> | 79 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="5" data-paginate="true" data-marpit-pagination="5" data-marpit-pagination-total="53" style="--paginate:true;"> |
80 <h1>メタレベルの計算とGearsOS</h1> | 80 <h1>ノーマル、メタレベルの計算とGearsOS</h1> |
81 <ul> | 81 <ul> |
82 <li>ノーマルレベル、メタレベルを一貫して記述できる言語CbCを用いてGearsOSを開発している</li> | 82 <li>ノーマルレベル、メタレベルを一貫して記述できる言語CbCを用いてGearsOSを開発している</li> |
83 <li>CbCを使うとメタレベルの処理を分離して書ける</li> | |
84 <li>メタレベルの処理を全部手で書くのは面倒 | |
85 <ul> | |
86 <li>メタレベルの処理を自動生成してくれるフレームワークを導入したい</li> | |
87 </ul> | |
88 </li> | |
89 <li>フレームワークに乗って実装すると等価なCbCに変換される | |
90 <ul> | |
91 <li>CbCレベルではメタレベルの処理とノーマルレベルの処理が見れる</li> | |
92 </ul> | |
93 </li> | |
94 <li>メタ計算を自分で定義できるようにしたい | |
95 <ul> | |
96 <li>実装のコードをほとんど変えずにモデル検査を導入できるようにしたい</li> | |
97 </ul> | |
98 </li> | |
99 </ul> | |
100 </section> | |
101 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="6" data-paginate="true" data-marpit-pagination="6" data-marpit-pagination-total="42" style="--paginate:true;"> | |
102 <h1>GearsOSのメタ計算フレームワーク</h1> | |
103 <ul> | |
104 <li>GearsOSはPerlを中心としたメタコード生成のフレームワークが構築されている | |
105 <ul> | |
106 <li>計算に必要なデータの入出力のメタ計算を主に生成していた</li> | |
107 </ul> | |
108 </li> | |
109 <li>メタレベルの処理は従来のものは手動で作る方が多かった | |
110 <ul> | |
111 <li>計算で使うすべてのデータ構造の管理</li> | |
112 <li>別のInterfaceの出力を受けるメタレベルのデータ管理など</li> | |
113 </ul> | |
114 </li> | |
115 <li>Perlでメタレベルに変換された後で気づくエラーも多い | |
116 <ul> | |
117 <li>変換する前の時点でコード自体は間違えている</li> | |
118 <li>変換されてしまった後なのでコードを見比べないと原因が不明</li> | |
119 </ul> | |
120 </li> | |
121 </ul> | |
122 </section> | |
123 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="7" data-paginate="true" data-marpit-pagination="7" data-marpit-pagination-total="42" style="--paginate:true;"> | |
124 <h1>GearsOSのメタ計算フレームワークとInterface</h1> | |
125 <ul> | |
126 <li>CbCには無いモジュール化の仕組みとしてInterfaceがある | |
127 <ul> | |
128 <li>Perlフレームワーク上に構築</li> | |
129 <li>コンパイル時に等価な純粋なCbCに変換する</li> | |
130 </ul> | |
131 </li> | |
132 <li>Interfaceの機能が他の言語のInterfaceの機能とギャップがあった | |
133 <ul> | |
134 <li>実装していないAPIがあっても、変換前の時点でエラーが出ないなど</li> | |
135 </ul> | |
136 </li> | |
137 <li>Interfaceの定義ファイルもあるものと無いものがあった | |
138 <ul> | |
139 <li>トランスパイラで統一な処理が出来ない</li> | |
140 </ul> | |
141 </li> | |
142 </ul> | |
143 </section> | |
144 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="8" data-paginate="true" data-marpit-pagination="8" data-marpit-pagination-total="42" style="--paginate:true;"> | |
145 <h1>Perlを中心としたフレームワークによるメタ計算の生成</h1> | |
146 <ul> | |
147 <li>GearsOSの例題を作製する場合も、コピペや手書きが多発していた | |
148 <ul> | |
149 <li>フレームワークに実装したAPIを使って自動生成に変更したい</li> | |
150 </ul> | |
151 </li> | |
152 <li>Interfaceの機能充実も、 メタ計算の生成もCbCで行うのは難しい | |
153 <ul> | |
154 <li>Perlを中心としたフレームワークを活用したい</li> | |
155 </ul> | |
156 </li> | |
157 <li>コード変換(トランスパイル)を行うために必要な環境の整備もする必要がある</li> | |
158 <li>Perlを中心としたトランスパイルシステムの整備、拡張を行った | |
159 <ul> | |
160 <li>GearsOSのメタ計算の生成がより柔軟かつ高い信頼性で可能となった</li> | |
161 </ul> | |
162 </li> | |
163 </ul> | |
164 </section> | |
165 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="9" data-paginate="true" data-marpit-pagination="9" data-marpit-pagination-total="42" style="--paginate:true;"> | |
166 <h1>GearsOSの基礎概念</h1> | |
167 <ul> | |
168 <li>CodeGear、DataGear</li> | |
169 <li>Interface</li> | |
170 <li>GearsOSのビルドシステム | |
171 <ul> | |
172 <li>cmake</li> | |
173 <li>Perlトランスパイラ</li> | |
174 </ul> | |
175 </li> | |
176 </ul> | |
177 </section> | |
178 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="10" data-paginate="true" data-marpit-pagination="10" data-marpit-pagination-total="42" style="--paginate:true;"> | |
179 <h1>CbCとCodeGear(ノーマルレベル)</h1> | |
180 <ul> | |
181 <li>CbCで定義する軽量継続で表現する単位をCodeGearと呼ぶ | 83 <li>CbCで定義する軽量継続で表現する単位をCodeGearと呼ぶ |
182 <ul> | 84 <ul> |
183 <li>呼び出すと元の関数に戻れない</li> | 85 <li>呼び出すと元の関数に戻れない</li> |
184 <li>スタックは都度捨てて継続する</li> | |
185 </ul> | 86 </ul> |
186 </li> | 87 </li> |
187 <li>Cの関数とアセンブラの中間の様に使える</li> | 88 <li>Cの関数とアセンブラの中間の様に使える</li> |
188 <li>CodeGearは返り値の型の代わりに<code>__code</code>で宣言する</li> | 89 <li>CodeGearは返り値の型の代わりに<code>__code</code>で宣言する</li> |
189 <li>メタ計算を行うCodeGearをMetaCodeGearと呼ぶ</li> | 90 <li><code>goto CodeGear()</code>でCodeGearに継続する</li> |
190 </ul> | 91 </ul> |
191 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-function">__code <span class="hljs-title">meta</span><span class="hljs-params">(struct Context* context, <span class="hljs-keyword">enum</span> Code next)</span> </span>{ | 92 </section> |
192 <span class="hljs-keyword">goto</span> (context->code[next])(context); | 93 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="6" data-paginate="true" data-marpit-pagination="6" data-marpit-pagination-total="53" style="--paginate:true;"> |
193 } | 94 <h1>ノーマルレベルでのGearsOSの実装</h1> |
194 </span></span></foreignObject></svg></code></pre> | 95 <ul> |
195 </section> | 96 <li>次に継続するCodeGearを引数で受け取れる |
196 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="11" data-paginate="true" data-marpit-pagination="11" data-marpit-pagination-total="42" style="--paginate:true;"> | 97 <ul> |
98 <li>この場合は次のCodeGear(<code>next</code>)に値(<code>data</code>)を書き込む</li> | |
99 </ul> | |
100 </li> | |
101 </ul> | |
102 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-function">__code <span class="hljs-title">pop</span><span class="hljs-params">(struct SingleLinkedStack* <span class="hljs-built_in">stack</span>, __code next(<span class="hljs-keyword">union</span> Data* data, ...))</span> </span>{ | |
103 <span class="hljs-keyword">if</span> (<span class="hljs-built_in">stack</span>->top) { | |
104 data = <span class="hljs-built_in">stack</span>->top->data; | |
105 <span class="hljs-built_in">stack</span>->top = <span class="hljs-built_in">stack</span>->top->next; | |
106 } <span class="hljs-keyword">else</span> { | |
107 data = <span class="hljs-literal">NULL</span>; | |
108 } | |
109 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">next</span><span class="hljs-params">(data, ...)</span></span>; | |
110 } | |
111 </span></span></foreignObject></svg></code></pre> | |
112 </section> | |
113 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="7" data-paginate="true" data-marpit-pagination="7" data-marpit-pagination-total="53" style="--paginate:true;"> | |
114 <h1>ノーマルレベルでのGearsOSの実装</h1> | |
115 <ul> | |
116 <li>通常のプログラミング言語のように引数を受け取れる</li> | |
117 <li>引数を受け取り、次のCodeGearに継続する | |
118 <ul> | |
119 <li><code>right_fork->checkAndSet</code>はInterfaceのAPI呼び出し</li> | |
120 </ul> | |
121 </li> | |
122 </ul> | |
123 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-function">__code <span class="hljs-title">pickup_rfork</span><span class="hljs-params">(struct PhilsImpl* phils, __code next(...))</span> </span>{ | |
124 <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">AtomicT_int</span>* <span class="hljs-title">right_fork</span> =</span> phils->Rightfork; | |
125 <span class="hljs-keyword">goto</span> right_fork->checkAndSet(<span class="hljs-number">-1</span>, phils->self, pickup_lfork, pickup_rfork); | |
126 } | |
127 </span></span></foreignObject></svg></code></pre> | |
128 </section> | |
129 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="8" data-paginate="true" data-marpit-pagination="8" data-marpit-pagination-total="53" style="--paginate:true;"> | |
197 <h1>DataGear</h1> | 130 <h1>DataGear</h1> |
198 <ul> | 131 <ul> |
199 <li>GearsOSで扱うデータの単位</li> | 132 <li>GearsOSで扱うデータの単位</li> |
200 <li>Cの構造体の形でメタレベルでは表現される</li> | 133 <li>Cの構造体の形でメタレベルでは表現される</li> |
201 <li>InterfaceもDataGearで表現される</li> | 134 <li>InterfaceもDataGearで表現される</li> |
207 <li>...</li> | 140 <li>...</li> |
208 </ul> | 141 </ul> |
209 </li> | 142 </li> |
210 </ul> | 143 </ul> |
211 </section> | 144 </section> |
212 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="12" data-paginate="true" data-marpit-pagination="12" data-marpit-pagination-total="42" style="--paginate:true;"> | 145 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="9" data-paginate="true" data-marpit-pagination="9" data-marpit-pagination-total="53" style="--paginate:true;"> |
213 <h1>Context(1)</h1> | 146 <h1>CodeGear、DataGearの番号</h1> |
214 <ul> | 147 <ul> |
215 <li>従来のOSのプロセスに相当するMetaDataGear</li> | 148 <li>Perlで変換すると番号の形に抽象化される |
216 <li>GearsOSでのプログラム実行に必要な情報を持っている | 149 <ul> |
217 <ul> | 150 <li>番号から具体的なCodeGear/DataGearを取り出すのはメタレベル</li> |
218 <li>DataGearの型定義</li> | 151 </ul> |
219 <li>CodeGearの名前とStubCodeGearへの対応</li> | 152 </li> |
220 <li>goto時に引数を書き込むDataGearごとの場所</li> | 153 </ul> |
221 <li>DataGearを管理するヒープ情報</li> | 154 </section> |
222 </ul> | 155 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="10" data-paginate="true" data-marpit-pagination="10" data-marpit-pagination-total="53" style="--paginate:true;"> |
223 </li> | 156 <h1>メタレベルに変換されたGearsOSの実装</h1> |
224 </ul> | 157 <ul> |
225 </section> | 158 <li> |
226 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="13" data-paginate="true" data-marpit-pagination="13" data-marpit-pagination-total="42" style="--paginate:true;"> | 159 <p>ノーマルレベルのCodeGearの継続は、contextとCodeGearの番号のみ指定する</p> |
227 <h1>Context(2)</h1> | 160 <ul> |
228 <ul> | 161 <li>次の継続を番号で指定する</li> |
229 <li>GearsOSでcontextを触るのはメタ計算部分だけ | 162 <li>次の継続への引数も値をcontextに書き込むように変更される</li> |
230 <ul> | 163 </ul> |
231 <li>ノーマルレベルではcontextに触れない</li> | 164 </li> |
232 </ul> | 165 <li> |
233 </li> | 166 <p>CodeGearの継続は直接行かず、MetaCodeGearを経由して継続する</p> |
234 <li>従来は手書きでcontext.hの中で定義</li> | 167 <ul> |
235 <li>Context自体は構造体で定義されている | 168 <li>呼び出したいCodeGearはMetaCodeGearが番号から取り出す</li> |
236 <ul> | 169 <li>アドレスを直接使うのはメタ計算のみ</li> |
237 <li>Contextの要素にDataGearの型がすべて揃った共用体がある<br /> | 170 <li>各CodeGearはContextのみ持ち歩き、入力はStubCodeGearから与えられる</li> |
238 <img src="./context.svg" alt="w:532 h:10cm" style="width:532px;height:10cm;" /></li> | 171 </ul> |
239 </ul> | 172 </li> |
240 </li> | 173 </ul> |
241 </ul> | 174 </section> |
242 </section> | 175 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="11" data-paginate="true" data-marpit-pagination="11" data-marpit-pagination-total="53" style="--paginate:true;"> |
243 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="14" data-paginate="true" data-marpit-pagination="14" data-marpit-pagination-total="42" style="--paginate:true;"> | 176 <h1>メタレベルに変換されたGearsOSの実装</h1> |
244 <h1>Interface</h1> | 177 <ul> |
245 <ul> | 178 <li>継続先は<code>goto meta</code>に変更されている |
246 <li>GearsOSのモジュール化の仕組み</li> | 179 <ul> |
247 <li>Interface はある Data Gear と、それに対する操作(API)を行う Code Gear とその操作に用いる Data Gear の集合を表現する。</li> | 180 <li>継続先は<code>next</code>に代入されている番号で決まる</li> |
248 <li>JavaのInteface、Haskellの型クラスに相当する</li> | 181 </ul> |
249 <li>ContextにInterfaceの引数の保存場所がある | 182 </li> |
250 <ul> | 183 <li>出力の<code>data</code>は引数でもらったアドレスに書き込まれる |
251 <li>goto時にStubCodeGearでデータをとってくる</li> | 184 <ul> |
252 </ul> | 185 <li>この引数はStubCodeGearで渡される</li> |
253 </li> | 186 </ul> |
254 <li><code>goto interfaceName->method()</code>のようにAPIを呼び出す | 187 </li> |
255 <ul> | 188 </ul> |
256 <li>Perlトランスパイラが<code>goto meta()</code>に書き直す</li> | 189 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-function">__code <span class="hljs-title">popSingleLinkedStack</span><span class="hljs-params">(struct Context *context,struct SingleLinkedStack* <span class="hljs-built_in">stack</span>, |
257 <li><code>goto meta</code>はcontextから引数を取り出すMetaCodeGearに継続させるもの</li> | 190 <span class="hljs-keyword">enum</span> Code next,<span class="hljs-keyword">union</span> Data **O_data)</span> </span>{ |
258 </ul> | 191 Data* data __attribute__((unused)) = *O_data; |
259 </li> | 192 <span class="hljs-keyword">if</span> (<span class="hljs-built_in">stack</span>->top) { |
260 </ul> | 193 data = <span class="hljs-built_in">stack</span>->top->data; |
261 </section> | 194 <span class="hljs-built_in">stack</span>->top = <span class="hljs-built_in">stack</span>->top->next; |
262 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="15" data-paginate="true" data-marpit-pagination="15" data-marpit-pagination-total="42" style="--paginate:true;"> | 195 } <span class="hljs-keyword">else</span> { |
263 <h1>GearsOSのビルドシステム</h1> | 196 data = <span class="hljs-literal">NULL</span>; |
264 <ul> | 197 } |
265 <li>CMakeとPerlを使ってビルドする | 198 *O_data = data; |
266 <ul> | 199 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">meta</span><span class="hljs-params">(context, next)</span></span>; |
267 <li>CMakeはMakefileやbuild.ninjaを生成する</li> | 200 } |
268 <li>Perlは2種類のスクリプトが自動的に呼ばれる</li> | 201 </span></span></foreignObject></svg></code></pre> |
269 </ul> | 202 </section> |
270 </li> | 203 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="12" data-paginate="true" data-marpit-pagination="12" data-marpit-pagination-total="53" style="--paginate:true;"> |
271 <li>Perlでエラーを出すとCMakeがビルドを止める | 204 <h1>メタに変換されたGearsOSの実装</h1> |
272 <ul> | 205 <ul> |
273 <li>従来はエラーを出していなかったので怪しいコードを生成しても止まらない<br /> | 206 <li>直接checkAndSetに行かずにmetaに飛ぶ</li> |
274 <img src="./geasflow1.svg" alt="w:632 h:10cm" style="width:632px;height:10cm;" /></li> | 207 <li>もとのコードは<code>goto right_fork->checkAndSet()</code>なので、Interfaceを使った継続 |
275 </ul> | 208 <ul> |
276 </li> | 209 <li>context内の継続先のInterfaceの引数格納用の配列に書き込まれる</li> |
277 </ul> | 210 <li><code>right_fork->checkAndSet</code>には数値が入ってる</li> |
278 </section> | 211 </ul> |
279 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="16" data-paginate="true" data-marpit-pagination="16" data-marpit-pagination-total="42" style="--paginate:true;"> | 212 </li> |
280 <h1>GearsOSのビルドシステム</h1> | 213 </ul> |
281 <ul> | 214 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-function">__code <span class="hljs-title">pickup_rforkPhilsImpl</span><span class="hljs-params">(struct Context *context,struct PhilsImpl* phils, <span class="hljs-keyword">enum</span> Code next)</span> </span>{ |
282 <li>generate_stub.pl | 215 <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">AtomicT_int</span>* <span class="hljs-title">right_fork</span> =</span> phils->Rightfork; |
283 <ul> | 216 Gearef(context, AtomicT_int)->atomicT_int = (<span class="hljs-keyword">union</span> Data*) right_fork; |
284 <li>GearsOSで拡張したCbCを1行ずつ読む</li> | 217 Gearef(context, AtomicT_int)->oldData = <span class="hljs-number">-1</span>; |
285 <li>純粋なCbCに変形したものを生成する</li> | 218 Gearef(context, AtomicT_int)->newData = phils->self; |
286 <li>CbCコンパイラがコンパイルする前にコードを変換する | 219 Gearef(context, AtomicT_int)->next = C_pickup_lforkPhilsImpl; |
287 <ul> | 220 (cGearefontext, AtomicT_int)->fail = C_pickup_rforkPhilsImpl; |
288 <li>ユーザーが書いたGearsOSのソースコードにメタ情報をつける</li> | 221 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">meta</span><span class="hljs-params">(context, right_fork->checkAndSet)</span></span>; |
289 <li>コードからコードを生成する、トランスパイラ</li> | 222 } |
290 </ul> | 223 </span></span></foreignObject></svg></code></pre> |
291 </li> | 224 </section> |
292 </ul> | 225 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="13" data-paginate="true" data-marpit-pagination="13" data-marpit-pagination-total="53" style="--paginate:true;"> |
293 </li> | 226 <h1>メタに変換されたGearsOSの実装</h1> |
294 <li>generate_context.pl | 227 <ul> |
295 <ul> | 228 <li>変換前</li> |
296 <li>Contextに関係するファイルを生成する | 229 </ul> |
297 <ul> | 230 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-function">__code <span class="hljs-title">pickup_rfork</span><span class="hljs-params">(struct PhilsImpl* phils, __code next(...))</span> </span>{ |
298 <li>Contextの初期化ルーチン</li> | 231 <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">AtomicT_int</span>* <span class="hljs-title">right_fork</span> =</span> phils->Rightfork; |
299 <li>CodeGear/DataGearの番号(enum)</li> | 232 <span class="hljs-keyword">goto</span> right_fork->checkAndSet(<span class="hljs-number">-1</span>, phils->self, pickup_lfork, pickup_rfork); |
300 </ul> | 233 } |
301 </li> | 234 </span></span></foreignObject></svg></code></pre> |
302 <li>変換したプロジェクトで使うすべてのCbCファイルを入力で受け取る</li> | 235 <ul> |
303 <li>すべてのCbCファイルを読み込み、使用しているCodeGearなどの情報を取得</li> | 236 <li>変換後</li> |
304 </ul> | 237 </ul> |
305 </li> | 238 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-function">__code <span class="hljs-title">pickup_rforkPhilsImpl</span><span class="hljs-params">(struct Context *context,struct PhilsImpl* phils, <span class="hljs-keyword">enum</span> Code next)</span> </span>{ |
306 </ul> | 239 <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">AtomicT_int</span>* <span class="hljs-title">right_fork</span> =</span> phils->Rightfork; |
307 </section> | 240 Gearef(context, AtomicT_int)->atomicT_int = (<span class="hljs-keyword">union</span> Data*) right_fork; |
308 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="17" data-paginate="true" data-marpit-pagination="17" data-marpit-pagination-total="42" style="--paginate:true;"> | 241 Gearef(context, AtomicT_int)->oldData = <span class="hljs-number">-1</span>; |
309 <h1>主なGearsOSに導入された新機能</h1> | 242 Gearef(context, AtomicT_int)->newData = phils->self; |
310 <ul> | 243 Gearef(context, AtomicT_int)->next = C_pickup_lforkPhilsImpl; |
311 <li>Interfaceシステムの強化</li> | 244 (cGearefontext, AtomicT_int)->fail = C_pickup_rforkPhilsImpl; |
312 <li>手書きからの解放</li> | 245 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">meta</span><span class="hljs-params">(context, right_fork->checkAndSet)</span></span>; |
313 <li>MetaCodeGearの入れ替え機能の追加</li> | 246 } |
314 </ul> | 247 </span></span></foreignObject></svg></code></pre> |
315 </section> | 248 </section> |
316 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="18" data-paginate="true" data-marpit-pagination="18" data-marpit-pagination-total="42" style="--paginate:true;"> | 249 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="14" data-paginate="true" data-marpit-pagination="14" data-marpit-pagination-total="53" style="--paginate:true;"> |
317 <h1>Interfaceシステムの強化</h1> | 250 <h1>ノーマルレベルでのInterface</h1> |
318 <ul> | 251 <ul> |
319 <li>Interface構文の簡素化 | 252 <li>GearsOSのモジュール化の仕組みにInterfaceがある</li> |
320 <ul> | 253 <li>JavaのIntefaceに相当する機能</li> |
321 <li>より簡潔に明確に記述できるように定義した。</li> | 254 <li>実装したいInterfaceのCodeGearの名前と引数を列挙する</li> |
322 </ul> | |
323 </li> | |
324 <li>Interfaceの実装の型の導入 | |
325 <ul> | |
326 <li>GearsOSでの型定義の方法に一貫性が生まれた</li> | |
327 </ul> | |
328 </li> | |
329 <li>Interfaceの引数の確認</li> | |
330 <li>Interfaceで未定義のAPIの検知</li> | |
331 <li>InterfaceにないAPIの呼び出しの検知 | |
332 <ul> | |
333 <li>コード変換前にPerlレベルでエラーを発生させた</li> | |
334 </ul> | |
335 </li> | |
336 </ul> | |
337 </section> | |
338 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="19" data-paginate="true" data-marpit-pagination="19" data-marpit-pagination-total="42" style="--paginate:true;"> | |
339 <h1>手書きからの解放</h1> | |
340 <ul> | |
341 <li>Interfaceの雛形ファイルの作製スクリプトの導入</li> | |
342 <li>別のInterfaceからの出力を取得するStubの自動生成</li> | |
343 <li>実装のCodeGear名からメタ情報の切り離し | |
344 <ul> | |
345 <li>メタな型情報はビルド時に付与される</li> | |
346 </ul> | |
347 </li> | |
348 <li>DataGearの型集合ファイルであるcontext.hの自動生成</li> | |
349 <li>GearsOSの初期化ルーチンの自動生成</li> | |
350 </ul> | |
351 </section> | |
352 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="20" data-paginate="true" data-marpit-pagination="20" data-marpit-pagination-total="42" style="--paginate:true;"> | |
353 <h1>GearsOSの新機能</h1> | |
354 <ul> | |
355 <li><strong>自由なMetaCodeGearの作製、継続の入れ替え機能</strong></li> | |
356 <li>Perlトランスパイラの変換ルーチンのデバッグ機能の追加</li> | |
357 <li>ジェネリクスのサポート</li> | |
358 </ul> | |
359 </section> | |
360 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="21" data-paginate="true" data-marpit-pagination="21" data-marpit-pagination-total="42" style="--paginate:true;"> | |
361 <h1>Interfaceの改良</h1> | |
362 <ul> | |
363 <li>従来のInterfaceにまつわるPerlのフレームワークを改良した | |
364 <ul> | |
365 <li>CbCの変換後のコードでなく、Perlレベルでエラー検知可能になった</li> | |
366 </ul> | |
367 </li> | |
368 </ul> | |
369 </section> | |
370 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="22" data-paginate="true" data-marpit-pagination="22" data-marpit-pagination-total="42" style="--paginate:true;"> | |
371 <h1>Interfaceの定義構文の改良</h1> | |
372 <ul> | |
373 <li>従来は引数とCodeGearの定義を別けて記述していた | |
374 <ul> | |
375 <li>Interfaceの宣言なので、書ける変数は引数/出力のもののみ</li> | |
376 </ul> | |
377 </li> | |
378 <li>Javaのクラス変数やインスタンス変数のようなものだと思われてしまった | |
379 <ul> | |
380 <li>GearsOSに慣れてない</li> | |
381 <li>シンタックスが問題</li> | |
382 </ul> | |
383 </li> | |
384 <li>シンタックスをgolangやJavaのInterfaceを参考に簡潔なものにした</li> | |
385 </ul> | |
386 </section> | |
387 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="23" data-paginate="true" data-marpit-pagination="23" data-marpit-pagination-total="42" style="--paginate:true;"> | |
388 <h1>従来のInterface</h1> | |
389 <ul> | |
390 <li>引数の組とAPI(CodeGear)は別けて記述する必要があった</li> | |
391 </ul> | |
392 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-keyword">typedef</span> <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">Stack</span><</span>Type, Impl>{ | |
393 <span class="hljs-class"><span class="hljs-keyword">union</span> <span class="hljs-title">Data</span>* <span class="hljs-title">stack</span>;</span> | |
394 <span class="hljs-class"><span class="hljs-keyword">union</span> <span class="hljs-title">Data</span>* <span class="hljs-title">data</span>;</span> | |
395 <span class="hljs-class"><span class="hljs-keyword">union</span> <span class="hljs-title">Data</span>* <span class="hljs-title">data1</span>;</span> | |
396 | |
397 | |
398 <span class="hljs-function">__code <span class="hljs-title">whenEmpty</span><span class="hljs-params">(...)</span></span>; | |
399 <span class="hljs-function">__code <span class="hljs-title">clear</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>,__code next(...))</span></span>; | |
400 <span class="hljs-function">__code <span class="hljs-title">push</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>,Type* data, __code next(...))</span></span>; | |
401 <span class="hljs-function">__code <span class="hljs-title">pop</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>, __code next(Type* data, ...))</span></span>; | |
402 <span class="hljs-function">__code <span class="hljs-title">pop2</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>, __code next(Type* data, Type* data1, ...))</span></span>; | |
403 <span class="hljs-function">__code <span class="hljs-title">isEmpty</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>, __code next(...), __code whenEmpty(...))</span></span>; | |
404 <span class="hljs-function">__code <span class="hljs-title">get</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>, __code next(Type* data, ...))</span></span>; | |
405 <span class="hljs-function">__code <span class="hljs-title">get2</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>, __code next(Type* data, Type* data1, ...))</span></span>; | |
406 <span class="hljs-function">__code <span class="hljs-title">next</span><span class="hljs-params">(...)</span></span>; | |
407 } Stack; | |
408 </span></span></foreignObject></svg></code></pre> | |
409 </section> | |
410 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="24" data-paginate="true" data-marpit-pagination="24" data-marpit-pagination-total="42" style="--paginate:true;"> | |
411 <h1>定義し直したInterface構文</h1> | |
412 <ul> | |
413 <li>APIのみを記述すれば良くなった</li> | |
414 </ul> | 255 </ul> |
415 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-keyword">typedef</span> <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">Stack</span><</span>>{ | 256 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-keyword">typedef</span> <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">Stack</span><</span>>{ |
416 <span class="hljs-function">__code <span class="hljs-title">whenEmpty</span><span class="hljs-params">(...)</span></span>; | 257 <span class="hljs-function">__code <span class="hljs-title">whenEmpty</span><span class="hljs-params">(...)</span></span>; |
417 <span class="hljs-function">__code <span class="hljs-title">clear</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>,__code next(...))</span></span>; | 258 <span class="hljs-function">__code <span class="hljs-title">clear</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>,__code next(...))</span></span>; |
418 <span class="hljs-function">__code <span class="hljs-title">push</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>,Type* data, __code next(...))</span></span>; | 259 <span class="hljs-function">__code <span class="hljs-title">push</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>,Type* data, __code next(...))</span></span>; |
423 <span class="hljs-function">__code <span class="hljs-title">get2</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>, __code next(Type* data, Type* data1, ...))</span></span>; | 264 <span class="hljs-function">__code <span class="hljs-title">get2</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>, __code next(Type* data, Type* data1, ...))</span></span>; |
424 <span class="hljs-function">__code <span class="hljs-title">next</span><span class="hljs-params">(...)</span></span>; | 265 <span class="hljs-function">__code <span class="hljs-title">next</span><span class="hljs-params">(...)</span></span>; |
425 } Stack; | 266 } Stack; |
426 </span></span></foreignObject></svg></code></pre> | 267 </span></span></foreignObject></svg></code></pre> |
427 </section> | 268 </section> |
428 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="25" data-paginate="true" data-marpit-pagination="25" data-marpit-pagination-total="42" style="--paginate:true;"> | 269 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="15" data-paginate="true" data-marpit-pagination="15" data-marpit-pagination-total="53" style="--paginate:true;"> |
270 <h1>ノーマルレベルのInterfaceの呼び出し</h1> | |
271 <ul> | |
272 <li><code>goto interface->method</code>で呼び出せる</li> | |
273 </ul> | |
274 </section> | |
275 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="16" data-paginate="true" data-marpit-pagination="16" data-marpit-pagination-total="53" style="--paginate:true;"> | |
276 <h1>データを取り出すStubCodeGear</h1> | |
277 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-function">__code <span class="hljs-title">pickup_rforkPhilsImpl_stub</span><span class="hljs-params">(struct Context* context)</span> </span>{ | |
278 PhilsImpl* phils = (PhilsImpl*)GearImpl(context, Phils, phils); | |
279 <span class="hljs-class"><span class="hljs-keyword">enum</span> <span class="hljs-title">Code</span> <span class="hljs-title">next</span> =</span> Gearef(context, Phils)->next; | |
280 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">pickup_rforkPhilsImpl</span><span class="hljs-params">(context, phils, next)</span></span>; | |
281 } | |
282 </span></span></foreignObject></svg></code></pre> | |
283 </section> | |
284 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="17" data-paginate="true" data-marpit-pagination="17" data-marpit-pagination-total="53" style="--paginate:true;"> | |
285 <ul> | |
286 <li>メタレベルの処理を全部手で書くのは面倒 | |
287 <ul> | |
288 <li>メタレベルの処理を自動生成してくれるフレームワークを導入したい</li> | |
289 </ul> | |
290 </li> | |
291 <li>フレームワークに乗って実装すると等価なCbCに変換される | |
292 <ul> | |
293 <li>CbCレベルではメタレベルの処理とノーマルレベルの処理が見れる</li> | |
294 </ul> | |
295 </li> | |
296 <li>メタ計算を自分で定義できるようにしたい | |
297 <ul> | |
298 <li>実装のコードをほとんど変えずにモデル検査を導入できるようにしたい</li> | |
299 </ul> | |
300 </li> | |
301 </ul> | |
302 </section> | |
303 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="18" data-paginate="true" data-marpit-pagination="18" data-marpit-pagination-total="53" style="--paginate:true;"> | |
304 <h1>GearsOSのメタ計算フレームワーク</h1> | |
305 <ul> | |
306 <li>GearsOSはPerlを中心としたメタコード生成のフレームワークが構築されている | |
307 <ul> | |
308 <li>計算に必要なデータの入出力のメタ計算を主に生成していた</li> | |
309 </ul> | |
310 </li> | |
311 <li>メタレベルの処理は従来のものは手動で作る方が多かった | |
312 <ul> | |
313 <li>計算で使うすべてのデータ構造の管理</li> | |
314 <li>別のInterfaceの出力を受けるメタレベルのデータ管理など</li> | |
315 </ul> | |
316 </li> | |
317 <li>Perlでメタレベルに変換された後で気づくエラーも多い | |
318 <ul> | |
319 <li>変換する前の時点でコード自体は間違えている</li> | |
320 <li>変換されてしまった後なのでコードを見比べないと原因が不明</li> | |
321 </ul> | |
322 </li> | |
323 </ul> | |
324 </section> | |
325 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="19" data-paginate="true" data-marpit-pagination="19" data-marpit-pagination-total="53" style="--paginate:true;"> | |
326 <h1>GearsOSのメタ計算フレームワークとInterface</h1> | |
327 <ul> | |
328 <li>CbCには無いモジュール化の仕組みとしてInterfaceがある | |
329 <ul> | |
330 <li>Perlフレームワーク上に構築</li> | |
331 <li>コンパイル時に等価な純粋なCbCに変換する</li> | |
332 </ul> | |
333 </li> | |
334 <li>Interfaceの機能が他の言語のInterfaceの機能とギャップがあった | |
335 <ul> | |
336 <li>実装していないAPIがあっても、変換前の時点でエラーが出ないなど</li> | |
337 </ul> | |
338 </li> | |
339 <li>Interfaceの定義ファイルもあるものと無いものがあった | |
340 <ul> | |
341 <li>トランスパイラで統一な処理が出来ない</li> | |
342 </ul> | |
343 </li> | |
344 </ul> | |
345 </section> | |
346 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="20" data-paginate="true" data-marpit-pagination="20" data-marpit-pagination-total="53" style="--paginate:true;"> | |
347 <h1>Interfaceの実装</h1> | |
348 <ul> | |
349 <li>実装したいInterfaceで定義されたAPIを実装する | |
350 <ul> | |
351 <li>従来はすべて手書きしていた</li> | |
352 </ul> | |
353 </li> | |
354 </ul> | |
355 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">"../../../context.h"</span></span> | |
356 <span class="hljs-meta">#interface <span class="hljs-meta-string">"Stack.h"</span></span> | |
357 | |
358 ... | |
359 | |
360 <span class="hljs-function">__code <span class="hljs-title">push</span><span class="hljs-params">(struct SingleLinkedStack* <span class="hljs-built_in">stack</span>, <span class="hljs-keyword">union</span> Data* data, __code next(...))</span> </span>{ | |
361 Element* element = <span class="hljs-keyword">new</span> Element(); | |
362 element->next = <span class="hljs-built_in">stack</span>->top; | |
363 element->data = data; | |
364 <span class="hljs-built_in">stack</span>->top = element; | |
365 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">next</span><span class="hljs-params">(...)</span></span>; | |
366 } | |
367 </span></span></foreignObject></svg></code></pre> | |
368 </section> | |
369 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="21" data-paginate="true" data-marpit-pagination="21" data-marpit-pagination-total="53" style="--paginate:true;"> | |
370 <h1>Perlを中心としたフレームワークによるメタ計算の生成</h1> | |
371 <ul> | |
372 <li>GearsOSの例題を作製する場合も、コピペや手書きが多発していた | |
373 <ul> | |
374 <li>フレームワークに実装したAPIを使って自動生成に変更したい</li> | |
375 </ul> | |
376 </li> | |
377 <li>Interfaceの機能充実も、 メタ計算の生成もCbCで行うのは難しい | |
378 <ul> | |
379 <li>Perlを中心としたフレームワークを活用したい</li> | |
380 </ul> | |
381 </li> | |
382 <li>コード変換(トランスパイル)を行うために必要な環境の整備もする必要がある</li> | |
383 <li>Perlを中心としたトランスパイルシステムの整備、拡張を行った | |
384 <ul> | |
385 <li>GearsOSのメタ計算の生成がより柔軟かつ高い信頼性で可能となった</li> | |
386 </ul> | |
387 </li> | |
388 </ul> | |
389 </section> | |
390 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="22" data-paginate="true" data-marpit-pagination="22" data-marpit-pagination-total="53" style="--paginate:true;"> | |
391 <h1>GearsOSの基礎概念</h1> | |
392 <ul> | |
393 <li>CodeGear、DataGear</li> | |
394 <li>Interface</li> | |
395 <li>GearsOSのビルドシステム | |
396 <ul> | |
397 <li>cmake</li> | |
398 <li>Perlトランスパイラ</li> | |
399 </ul> | |
400 </li> | |
401 </ul> | |
402 </section> | |
403 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="23" data-paginate="true" data-marpit-pagination="23" data-marpit-pagination-total="53" style="--paginate:true;"> | |
404 <h1>Context(1)</h1> | |
405 <ul> | |
406 <li>従来のOSのプロセスに相当するMetaDataGear</li> | |
407 <li>GearsOSでのプログラム実行に必要な情報を持っている | |
408 <ul> | |
409 <li>DataGearの型定義</li> | |
410 <li>CodeGearの名前とStubCodeGearへの対応</li> | |
411 <li>goto時に引数を書き込むDataGearごとの場所</li> | |
412 <li>DataGearを管理するヒープ情報</li> | |
413 </ul> | |
414 </li> | |
415 </ul> | |
416 </section> | |
417 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="24" data-paginate="true" data-marpit-pagination="24" data-marpit-pagination-total="53" style="--paginate:true;"> | |
418 <h1>Context(2)</h1> | |
419 <ul> | |
420 <li>GearsOSでcontextを触るのはメタ計算部分だけ | |
421 <ul> | |
422 <li>ノーマルレベルではcontextに触れない</li> | |
423 </ul> | |
424 </li> | |
425 <li>従来は手書きでcontext.hの中で定義</li> | |
426 <li>Context自体は構造体で定義されている | |
427 <ul> | |
428 <li>Contextの要素にDataGearの型がすべて揃った共用体がある<br /> | |
429 <img src="./context.svg" alt="w:532 h:10cm" style="width:532px;height:10cm;" /></li> | |
430 </ul> | |
431 </li> | |
432 </ul> | |
433 </section> | |
434 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="25" data-paginate="true" data-marpit-pagination="25" data-marpit-pagination-total="53" style="--paginate:true;"> | |
435 <h1>Interface</h1> | |
436 <ul> | |
437 <li>GearsOSのモジュール化の仕組み</li> | |
438 <li>Interface はある Data Gear と、それに対する操作(API)を行う Code Gear とその操作に用いる Data Gear の集合を表現する。</li> | |
439 <li>JavaのInteface、Haskellの型クラスに相当する</li> | |
440 <li>ContextにInterfaceの引数の保存場所がある | |
441 <ul> | |
442 <li>goto時にStubCodeGearでデータをとってくる</li> | |
443 </ul> | |
444 </li> | |
445 <li><code>goto interfaceName->method()</code>のようにAPIを呼び出す | |
446 <ul> | |
447 <li>Perlトランスパイラが<code>goto meta()</code>に書き直す</li> | |
448 <li><code>goto meta</code>はcontextから引数を取り出すMetaCodeGearに継続させるもの</li> | |
449 </ul> | |
450 </li> | |
451 </ul> | |
452 </section> | |
453 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="26" data-paginate="true" data-marpit-pagination="26" data-marpit-pagination-total="53" style="--paginate:true;"> | |
454 <h1>GearsOSのビルドシステム</h1> | |
455 <ul> | |
456 <li>CMakeとPerlを使ってビルドする | |
457 <ul> | |
458 <li>CMakeはMakefileやbuild.ninjaを生成する</li> | |
459 <li>Perlは2種類のスクリプトが自動的に呼ばれる</li> | |
460 </ul> | |
461 </li> | |
462 <li>Perlでエラーを出すとCMakeがビルドを止める | |
463 <ul> | |
464 <li>従来はエラーを出していなかったので怪しいコードを生成しても止まらない<br /> | |
465 <img src="./geasflow1.svg" alt="w:632 h:10cm" style="width:632px;height:10cm;" /></li> | |
466 </ul> | |
467 </li> | |
468 </ul> | |
469 </section> | |
470 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="27" data-paginate="true" data-marpit-pagination="27" data-marpit-pagination-total="53" style="--paginate:true;"> | |
471 <h1>GearsOSのビルドシステム</h1> | |
472 <ul> | |
473 <li>generate_stub.pl | |
474 <ul> | |
475 <li>GearsOSで拡張したCbCを1行ずつ読む</li> | |
476 <li>純粋なCbCに変形したものを生成する</li> | |
477 <li>CbCコンパイラがコンパイルする前にコードを変換する | |
478 <ul> | |
479 <li>ユーザーが書いたGearsOSのソースコードにメタ情報をつける</li> | |
480 <li>コードからコードを生成する、トランスパイラ</li> | |
481 </ul> | |
482 </li> | |
483 </ul> | |
484 </li> | |
485 <li>generate_context.pl | |
486 <ul> | |
487 <li>Contextに関係するファイルを生成する | |
488 <ul> | |
489 <li>Contextの初期化ルーチン</li> | |
490 <li>CodeGear/DataGearの番号(enum)</li> | |
491 </ul> | |
492 </li> | |
493 <li>変換したプロジェクトで使うすべてのCbCファイルを入力で受け取る</li> | |
494 <li>すべてのCbCファイルを読み込み、使用しているCodeGearなどの情報を取得</li> | |
495 </ul> | |
496 </li> | |
497 </ul> | |
498 </section> | |
499 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="28" data-paginate="true" data-marpit-pagination="28" data-marpit-pagination-total="53" style="--paginate:true;"> | |
500 <h1>主なGearsOSに導入された新機能</h1> | |
501 <ul> | |
502 <li>Interfaceシステムの強化</li> | |
503 <li>手書きからの解放</li> | |
504 <li>MetaCodeGearの入れ替え機能の追加</li> | |
505 </ul> | |
506 </section> | |
507 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="29" data-paginate="true" data-marpit-pagination="29" data-marpit-pagination-total="53" style="--paginate:true;"> | |
508 <h1>Interfaceシステムの強化</h1> | |
509 <ul> | |
510 <li>Interface構文の簡素化 | |
511 <ul> | |
512 <li>より簡潔に明確に記述できるように定義した。</li> | |
513 </ul> | |
514 </li> | |
515 <li>Interfaceの実装の型の導入 | |
516 <ul> | |
517 <li>GearsOSでの型定義の方法に一貫性が生まれた</li> | |
518 </ul> | |
519 </li> | |
520 <li>Interfaceの引数の確認</li> | |
521 <li>Interfaceで未定義のAPIの検知</li> | |
522 <li>InterfaceにないAPIの呼び出しの検知 | |
523 <ul> | |
524 <li>コード変換前にPerlレベルでエラーを発生させた</li> | |
525 </ul> | |
526 </li> | |
527 </ul> | |
528 </section> | |
529 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="30" data-paginate="true" data-marpit-pagination="30" data-marpit-pagination-total="53" style="--paginate:true;"> | |
530 <h1>手書きからの解放</h1> | |
531 <ul> | |
532 <li>Interfaceの雛形ファイルの作製スクリプトの導入</li> | |
533 <li>別のInterfaceからの出力を取得するStubの自動生成</li> | |
534 <li>実装のCodeGear名からメタ情報の切り離し | |
535 <ul> | |
536 <li>メタな型情報はビルド時に付与される</li> | |
537 </ul> | |
538 </li> | |
539 <li>DataGearの型集合ファイルであるcontext.hの自動生成</li> | |
540 <li>GearsOSの初期化ルーチンの自動生成</li> | |
541 </ul> | |
542 </section> | |
543 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="31" data-paginate="true" data-marpit-pagination="31" data-marpit-pagination-total="53" style="--paginate:true;"> | |
544 <h1>GearsOSの新機能</h1> | |
545 <ul> | |
546 <li><strong>自由なMetaCodeGearの作製、継続の入れ替え機能</strong></li> | |
547 <li>Perlトランスパイラの変換ルーチンのデバッグ機能の追加</li> | |
548 <li>ジェネリクスのサポート</li> | |
549 </ul> | |
550 </section> | |
551 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="32" data-paginate="true" data-marpit-pagination="32" data-marpit-pagination-total="53" style="--paginate:true;"> | |
552 <h1>Interfaceの改良</h1> | |
553 <ul> | |
554 <li>従来のInterfaceにまつわるPerlのフレームワークを改良した | |
555 <ul> | |
556 <li>CbCの変換後のコードでなく、Perlレベルでエラー検知可能になった</li> | |
557 </ul> | |
558 </li> | |
559 </ul> | |
560 </section> | |
561 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="33" data-paginate="true" data-marpit-pagination="33" data-marpit-pagination-total="53" style="--paginate:true;"> | |
562 <h1>Interfaceの定義構文の改良</h1> | |
563 <ul> | |
564 <li>従来は引数とCodeGearの定義を別けて記述していた | |
565 <ul> | |
566 <li>Interfaceの宣言なので、書ける変数は引数/出力のもののみ</li> | |
567 </ul> | |
568 </li> | |
569 <li>Javaのクラス変数やインスタンス変数のようなものだと思われてしまった | |
570 <ul> | |
571 <li>GearsOSに慣れてない</li> | |
572 <li>シンタックスが問題</li> | |
573 </ul> | |
574 </li> | |
575 <li>シンタックスをgolangやJavaのInterfaceを参考に簡潔なものにした</li> | |
576 </ul> | |
577 </section> | |
578 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="34" data-paginate="true" data-marpit-pagination="34" data-marpit-pagination-total="53" style="--paginate:true;"> | |
579 <h1>従来のInterface</h1> | |
580 <ul> | |
581 <li>引数の組とAPI(CodeGear)は別けて記述する必要があった</li> | |
582 </ul> | |
583 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-keyword">typedef</span> <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">Stack</span><</span>Type, Impl>{ | |
584 <span class="hljs-class"><span class="hljs-keyword">union</span> <span class="hljs-title">Data</span>* <span class="hljs-title">stack</span>;</span> | |
585 <span class="hljs-class"><span class="hljs-keyword">union</span> <span class="hljs-title">Data</span>* <span class="hljs-title">data</span>;</span> | |
586 <span class="hljs-class"><span class="hljs-keyword">union</span> <span class="hljs-title">Data</span>* <span class="hljs-title">data1</span>;</span> | |
587 | |
588 | |
589 <span class="hljs-function">__code <span class="hljs-title">whenEmpty</span><span class="hljs-params">(...)</span></span>; | |
590 <span class="hljs-function">__code <span class="hljs-title">clear</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>,__code next(...))</span></span>; | |
591 <span class="hljs-function">__code <span class="hljs-title">push</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>,Type* data, __code next(...))</span></span>; | |
592 <span class="hljs-function">__code <span class="hljs-title">pop</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>, __code next(Type* data, ...))</span></span>; | |
593 <span class="hljs-function">__code <span class="hljs-title">pop2</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>, __code next(Type* data, Type* data1, ...))</span></span>; | |
594 <span class="hljs-function">__code <span class="hljs-title">isEmpty</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>, __code next(...), __code whenEmpty(...))</span></span>; | |
595 <span class="hljs-function">__code <span class="hljs-title">get</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>, __code next(Type* data, ...))</span></span>; | |
596 <span class="hljs-function">__code <span class="hljs-title">get2</span><span class="hljs-params">(Impl* <span class="hljs-built_in">stack</span>, __code next(Type* data, Type* data1, ...))</span></span>; | |
597 <span class="hljs-function">__code <span class="hljs-title">next</span><span class="hljs-params">(...)</span></span>; | |
598 } Stack; | |
599 </span></span></foreignObject></svg></code></pre> | |
600 </section> | |
601 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="35" data-paginate="true" data-marpit-pagination="35" data-marpit-pagination-total="53" style="--paginate:true;"> | |
602 <h1>定義し直したInterface構文</h1> | |
603 <ul> | |
604 <li>APIのみを記述すれば良くなった</li> | |
605 </ul> | |
606 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap></span></span></foreignObject></svg></code></pre> | |
607 </section> | |
608 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="36" data-paginate="true" data-marpit-pagination="36" data-marpit-pagination-total="53" style="--paginate:true;"> | |
429 <h1>Implementの型定義ファイルの導入</h1> | 609 <h1>Implementの型定義ファイルの導入</h1> |
430 <ul> | 610 <ul> |
431 <li>Interfaceは型定義ファイルがあったが、実装側はなかった</li> | 611 <li>Interfaceは型定義ファイルがあったが、実装側はなかった</li> |
432 <li>context.h上にメタな構造体に直した実装の型を手で書いていた | 612 <li>context.h上にメタな構造体に直した実装の型を手で書いていた |
433 <ul> | 613 <ul> |
440 <li>Perlトランスパイラフレームワークで利用可能</li> | 620 <li>Perlトランスパイラフレームワークで利用可能</li> |
441 </ul> | 621 </ul> |
442 </li> | 622 </li> |
443 </ul> | 623 </ul> |
444 </section> | 624 </section> |
445 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="26" data-paginate="true" data-marpit-pagination="26" data-marpit-pagination-total="42" style="--paginate:true;"> | 625 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="37" data-paginate="true" data-marpit-pagination="37" data-marpit-pagination-total="53" style="--paginate:true;"> |
446 <h1>Implementの型定義</h1> | 626 <h1>Implementの型定義</h1> |
447 <ul> | 627 <ul> |
448 <li>基本はInterfaceと同じシンタックス | 628 <li>基本はInterfaceと同じシンタックス |
449 <ul> | 629 <ul> |
450 <li>どのInterfaceを実装しているかを<code>Impl</code>の後ろに書く</li> | 630 <li>どのInterfaceを実装しているかを<code>Impl</code>の後ろに書く</li> |
459 <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">AtomicT_int</span>* <span class="hljs-title">Rightfork</span>;</span> | 639 <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">AtomicT_int</span>* <span class="hljs-title">Rightfork</span>;</span> |
460 <span class="hljs-function">__code <span class="hljs-title">next</span><span class="hljs-params">(...)</span></span>; | 640 <span class="hljs-function">__code <span class="hljs-title">next</span><span class="hljs-params">(...)</span></span>; |
461 } PhilsImpl; | 641 } PhilsImpl; |
462 </span></span></foreignObject></svg></code></pre> | 642 </span></span></foreignObject></svg></code></pre> |
463 </section> | 643 </section> |
464 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="27" data-paginate="true" data-marpit-pagination="27" data-marpit-pagination-total="42" style="--paginate:true;"> | 644 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="38" data-paginate="true" data-marpit-pagination="38" data-marpit-pagination-total="53" style="--paginate:true;"> |
465 <h1>Interfaceの実装時の型名の省略</h1> | 645 <h1>Interfaceの実装時の型名の省略</h1> |
466 <ul> | 646 <ul> |
467 <li>従来は型名を必ず書かなければならなかった | 647 <li>従来は型名を必ず書かなければならなかった |
468 <ul> | 648 <ul> |
469 <li>これはメタ情報なので変換時に書き換える</li> | 649 <li>これはメタ情報なので変換時に書き換える</li> |
483 <span class="hljs-keyword">goto</span> left_fork->checkAndSet(<span class="hljs-number">-1</span>, phils->self, pickup_rfork, eating); | 663 <span class="hljs-keyword">goto</span> left_fork->checkAndSet(<span class="hljs-number">-1</span>, phils->self, pickup_rfork, eating); |
484 | 664 |
485 } | 665 } |
486 </span></span></foreignObject></svg></code></pre> | 666 </span></span></foreignObject></svg></code></pre> |
487 </section> | 667 </section> |
488 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="28" data-paginate="true" data-marpit-pagination="28" data-marpit-pagination-total="42" style="--paginate:true;"> | 668 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="39" data-paginate="true" data-marpit-pagination="39" data-marpit-pagination-total="53" style="--paginate:true;"> |
489 <h3>トランスパイル前</h3> | 669 <h3>トランスパイル前</h3> |
490 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-function">__code <span class="hljs-title">pickup_lfork</span><span class="hljs-params">(struct PhilsImpl* phils, __code next(...))</span> </span>{ | 670 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-function">__code <span class="hljs-title">pickup_lfork</span><span class="hljs-params">(struct PhilsImpl* phils, __code next(...))</span> </span>{ |
491 <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">AtomicT_int</span>* <span class="hljs-title">left_fork</span> =</span> phils->Leftfork; | 671 <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">AtomicT_int</span>* <span class="hljs-title">left_fork</span> =</span> phils->Leftfork; |
492 <span class="hljs-keyword">goto</span> left_fork->checkAndSet(<span class="hljs-number">-1</span>, phils->self, pickup_rfork, eating); | 672 <span class="hljs-keyword">goto</span> left_fork->checkAndSet(<span class="hljs-number">-1</span>, phils->self, pickup_rfork, eating); |
493 | 673 |
504 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">meta</span><span class="hljs-params">(context, left_fork->checkAndSet)</span></span>; | 684 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">meta</span><span class="hljs-params">(context, left_fork->checkAndSet)</span></span>; |
505 | 685 |
506 } | 686 } |
507 </span></span></foreignObject></svg></code></pre> | 687 </span></span></foreignObject></svg></code></pre> |
508 </section> | 688 </section> |
509 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="29" data-paginate="true" data-marpit-pagination="29" data-marpit-pagination-total="42" style="--paginate:true;"> | 689 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="40" data-paginate="true" data-marpit-pagination="40" data-marpit-pagination-total="53" style="--paginate:true;"> |
510 <h1>Interfaceのパーサーの導入</h1> | 690 <h1>Interfaceのパーサーの導入</h1> |
511 <ul> | 691 <ul> |
512 <li>PerlでのInterfaceの情報の取得は、CbC自体のファイルの解析処理と共通だった | 692 <li>PerlでのInterfaceの情報の取得は、CbC自体のファイルの解析処理と共通だった |
513 <ul> | 693 <ul> |
514 <li>Interfaceならではの情報が取れない</li> | 694 <li>Interfaceならではの情報が取れない</li> |
525 </li> | 705 </li> |
526 </ul> | 706 </ul> |
527 </li> | 707 </li> |
528 </ul> | 708 </ul> |
529 </section> | 709 </section> |
530 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="30" data-paginate="true" data-marpit-pagination="30" data-marpit-pagination-total="42" style="--paginate:true;"> | 710 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="41" data-paginate="true" data-marpit-pagination="41" data-marpit-pagination-total="53" style="--paginate:true;"> |
711 <h1>今回の修論での変更点/追加点の一覧</h1> | |
712 <table> | |
713 <thead> | |
714 <tr> | |
715 <th>項目</th> | |
716 <th>従来</th> | |
717 <th>今回の修論</th> | |
718 </tr> | |
719 </thead> | |
720 <tbody> | |
721 <tr> | |
722 <td>実装の型ファイル</td> | |
723 <td>無し</td> | |
724 <td>新たに導入</td> | |
725 </tr> | |
726 <tr> | |
727 <td>union Dataの定義</td> | |
728 <td>手書き</td> | |
729 <td>自動生成</td> | |
730 </tr> | |
731 <tr> | |
732 <td>実装のCodeGearの型名</td> | |
733 <td>手書き</td> | |
734 <td>自動生成</td> | |
735 </tr> | |
736 <tr> | |
737 <td>実装のCbCファイル</td> | |
738 <td>手書き</td> | |
739 <td>雛形を自動生成</td> | |
740 </tr> | |
741 <tr> | |
742 <td>別のInterfaceの出力を取得するStub</td> | |
743 <td>手書き</td> | |
744 <td>自動生成</td> | |
745 </tr> | |
746 <tr> | |
747 <td>Interfaceの未実装の場合の警告</td> | |
748 <td>無し</td> | |
749 <td>新たに導入</td> | |
750 </tr> | |
751 <tr> | |
752 <td>Interfaceのparser</td> | |
753 <td>スクリプトに埋め込み</td> | |
754 <td>モジュール化</td> | |
755 </tr> | |
756 <tr> | |
757 <td>MetaCodeGearの差し替え処理</td> | |
758 <td>手書き</td> | |
759 <td>meta.pmによって自動化</td> | |
760 </tr> | |
761 </tbody> | |
762 </table> | |
763 </section> | |
764 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="42" data-paginate="true" data-marpit-pagination="42" data-marpit-pagination-total="53" style="--paginate:true;"> | |
531 <h1>Interfaceの実装の雛形生成コマンドの実装</h1> | 765 <h1>Interfaceの実装の雛形生成コマンドの実装</h1> |
532 <ul> | 766 <ul> |
533 <li>Interfaceと実装する型が決まると、最低限書かないといけないCodeGearが決まる</li> | 767 <li>Interfaceと実装する型が決まると、最低限書かないといけないCodeGearが決まる</li> |
534 <li>従来は手作業でCbCファイルにCodeGearの定義を書いて実装していた | 768 <li>従来は手作業でCbCファイルにCodeGearの定義を書いて実装していた |
535 <ul> | 769 <ul> |
544 <li>実装の型ファイルを引数で渡すと雛形を生成する</li> | 778 <li>実装の型ファイルを引数で渡すと雛形を生成する</li> |
545 </ul> | 779 </ul> |
546 <pre><code class="language-shell"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-meta">$</span><span class="bash">perl too/impl2cbc.pl SingleLinkedStack.h</span> | 780 <pre><code class="language-shell"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-meta">$</span><span class="bash">perl too/impl2cbc.pl SingleLinkedStack.h</span> |
547 </span></span></foreignObject></svg></code></pre> | 781 </span></span></foreignObject></svg></code></pre> |
548 </section> | 782 </section> |
549 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="31" data-paginate="true" data-marpit-pagination="31" data-marpit-pagination-total="42" style="--paginate:true;"> | 783 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="43" data-paginate="true" data-marpit-pagination="43" data-marpit-pagination-total="53" style="--paginate:true;"> |
550 <h1>生成された雛形cbcの一部</h1> | |
551 <ul> | |
552 <li>各CodeGearに実装したい内容をすぐに書き始めることが可能になった | |
553 <ul> | |
554 <li>自動生成されるのでエラーの発生も抑えられる</li> | |
555 </ul> | |
556 </li> | |
557 </ul> | |
558 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">"../../../context.h"</span></span> | |
559 <span class="hljs-meta">#interface <span class="hljs-meta-string">"Stack.h"</span></span> | |
560 | |
561 <span class="hljs-function">Stack* <span class="hljs-title">createSingleLinkedStack</span><span class="hljs-params">(struct Context* context)</span> </span>{ | |
562 <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">Stack</span>* <span class="hljs-title">stack</span> =</span> <span class="hljs-keyword">new</span> Stack(); | |
563 <span class="hljs-class"><span class="hljs-keyword">struct</span> <span class="hljs-title">SingleLinkedStack</span>* <span class="hljs-title">single_linked_stack</span> =</span> <span class="hljs-keyword">new</span> SingleLinkedStack(); | |
564 <span class="hljs-built_in">stack</span>-><span class="hljs-built_in">stack</span> = (<span class="hljs-keyword">union</span> Data*)single_linked_stack; | |
565 ... | |
566 <span class="hljs-built_in">stack</span>->pop2 = C_pop2SingleLinkedStack; | |
567 <span class="hljs-built_in">stack</span>->get2 = C_get2SingleLinkedStack; | |
568 <span class="hljs-keyword">return</span> <span class="hljs-built_in">stack</span>; | |
569 } | |
570 ... | |
571 | |
572 <span class="hljs-function">__code <span class="hljs-title">push</span><span class="hljs-params">(struct SingleLinkedStack* <span class="hljs-built_in">stack</span>,<span class="hljs-keyword">union</span> Data* data, __code next(...))</span> </span>{ | |
573 | |
574 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">next</span><span class="hljs-params">(...)</span></span>; | |
575 } | |
576 </span></span></foreignObject></svg></code></pre> | |
577 </section> | |
578 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="32" data-paginate="true" data-marpit-pagination="32" data-marpit-pagination-total="42" style="--paginate:true;"> | |
579 <h1>PerlトランスパイラでのInterfaceのエラー生成</h1> | 784 <h1>PerlトランスパイラでのInterfaceのエラー生成</h1> |
580 <ul> | 785 <ul> |
581 <li>Interfaceの実装時に様々なミスをする可能性がある | 786 <li>Interfaceの実装時に様々なミスをする可能性がある |
582 <ul> | 787 <ul> |
583 <li>APIを完全に実装していない</li> | 788 <li>APIを完全に実装していない</li> |
591 <li>CbCコンパイラがコンパイルする前にトランスパイラで検知したい</li> | 796 <li>CbCコンパイラがコンパイルする前にトランスパイラで検知したい</li> |
592 </ul> | 797 </ul> |
593 </li> | 798 </li> |
594 </ul> | 799 </ul> |
595 </section> | 800 </section> |
596 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="33" data-paginate="true" data-marpit-pagination="33" data-marpit-pagination-total="42" style="--paginate:true;"> | 801 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="44" data-paginate="true" data-marpit-pagination="44" data-marpit-pagination-total="53" style="--paginate:true;"> |
597 <h1>実装をし忘れているAPIがあった場合のエラー終了</h1> | 802 <h1>実装をし忘れているAPIがあった場合のエラー終了</h1> |
598 <ul> | 803 <ul> |
599 <li>PerlトランスパイラでのInterfaceのエラー生成 | 804 <li>PerlトランスパイラでのInterfaceのエラー生成 |
600 <ul> | 805 <ul> |
601 <li>CbCコンパイラが動く前にエラーを検知</li> | 806 <li>CbCコンパイラが動く前にエラーを検知</li> |
608 make[2]: *** [CMakeFiles/Makefile2:442: CMakeFiles/DPP2.dir/all] Error 2 | 813 make[2]: *** [CMakeFiles/Makefile2:442: CMakeFiles/DPP2.dir/all] Error 2 |
609 make[1]: *** [CMakeFiles/Makefile2:450: CMakeFiles/DPP2.dir/rule] Error 2 | 814 make[1]: *** [CMakeFiles/Makefile2:450: CMakeFiles/DPP2.dir/rule] Error 2 |
610 make: *** [Makefile:293: DPP2] Error 2 | 815 make: *** [Makefile:293: DPP2] Error 2 |
611 </span></span></foreignObject></svg></code></pre> | 816 </span></span></foreignObject></svg></code></pre> |
612 </section> | 817 </section> |
613 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="34" data-paginate="true" data-marpit-pagination="34" data-marpit-pagination-total="42" style="--paginate:true;"> | 818 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="45" data-paginate="true" data-marpit-pagination="45" data-marpit-pagination-total="53" style="--paginate:true;"> |
614 <h1>Context定義ファイルの自動生成</h1> | 819 <h1>Context定義ファイルの自動生成</h1> |
615 <ul> | 820 <ul> |
616 <li>ContextはすべてのDataGearの型情報をunion Dataとして持つ必要がある | 821 <li>ContextはすべてのDataGearの型情報をunion Dataとして持つ必要がある |
617 <ul> | 822 <ul> |
618 <li>すべてのDataGearの定義をunion Dataの定義内に書く</li> | 823 <li>すべてのDataGearの定義をunion Dataの定義内に書く</li> |
633 ... | 838 ... |
634 } SingleLinkedStack; | 839 } SingleLinkedStack; |
635 } | 840 } |
636 </span></span></foreignObject></svg></code></pre> | 841 </span></span></foreignObject></svg></code></pre> |
637 </section> | 842 </section> |
638 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="35" data-paginate="true" data-marpit-pagination="35" data-marpit-pagination-total="42" style="--paginate:true;"> | 843 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="46" data-paginate="true" data-marpit-pagination="46" data-marpit-pagination-total="53" style="--paginate:true;"> |
639 <h1>StubCodeGear</h1> | 844 <h1>StubCodeGear</h1> |
640 <ul> | 845 <ul> |
641 <li>実行したいCodeGearの直前に実行されるMetaCodeGear</li> | 846 <li>実行したいCodeGearの直前に実行されるMetaCodeGear</li> |
642 <li>contextからDataGearを取り出す操作をする</li> | 847 <li>contextからDataGearを取り出す操作をする</li> |
643 <li>すべてのノーマルレベルのCodeGearに付随する | 848 <li>すべてのノーマルレベルのCodeGearに付随する |
646 <img src="./stubCodeGear.svg" alt="w:632 h:10cm" style="width:632px;height:10cm;" /></li> | 851 <img src="./stubCodeGear.svg" alt="w:632 h:10cm" style="width:632px;height:10cm;" /></li> |
647 </ul> | 852 </ul> |
648 </li> | 853 </li> |
649 </ul> | 854 </ul> |
650 </section> | 855 </section> |
651 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="36" data-paginate="true" data-marpit-pagination="36" data-marpit-pagination-total="42" style="--paginate:true;"> | 856 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="47" data-paginate="true" data-marpit-pagination="47" data-marpit-pagination-total="53" style="--paginate:true;"> |
652 <h2>別のInterfaceの出力を受けるCodeGearのメタ計算部分の自動生成</h2> | 857 <h2>別のInterfaceの出力を受けるCodeGearのメタ計算部分の自動生成</h2> |
653 <ul> | 858 <ul> |
654 <li>Stackから<code>data</code>と<code>data1</code>を受け取ろうとする例 | 859 <li>Stackから<code>data</code>と<code>data1</code>を受け取ろうとする例 |
655 <ul> | 860 <ul> |
656 <li>意図した通りに動かない</li> | 861 <li>意図した通りに動かない</li> |
670 <span class="hljs-built_in">printf</span>(<span class="hljs-string">"%d\n"</span>, str2->size); | 875 <span class="hljs-built_in">printf</span>(<span class="hljs-string">"%d\n"</span>, str2->size); |
671 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">next</span><span class="hljs-params">(...)</span></span>; | 876 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">next</span><span class="hljs-params">(...)</span></span>; |
672 } | 877 } |
673 </span></span></foreignObject></svg></code></pre> | 878 </span></span></foreignObject></svg></code></pre> |
674 </section> | 879 </section> |
675 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="37" data-paginate="true" data-marpit-pagination="37" data-marpit-pagination-total="42" style="--paginate:true;"> | 880 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="48" data-paginate="true" data-marpit-pagination="48" data-marpit-pagination-total="53" style="--paginate:true;"> |
676 <h2>別のInterfaceの出力を受けるCodeGearのメタ計算部分の自動生成</h2> | 881 <h2>別のInterfaceの出力を受けるCodeGearのメタ計算部分の自動生成</h2> |
677 <ul> | 882 <ul> |
678 <li>Interfaceの継続に別のInterfaceを渡すと値の受け渡しが上手くいかない | 883 <li>Interfaceの継続に別のInterfaceを渡すと値の受け渡しが上手くいかない |
679 <ul> | 884 <ul> |
680 <li>StubCodeGearがおかしい</li> | 885 <li>StubCodeGearがおかしい</li> |
689 <span class="hljs-class"><span class="hljs-keyword">enum</span> <span class="hljs-title">Code</span> <span class="hljs-title">next</span> =</span> Gearef(context, StackTest)->next; | 894 <span class="hljs-class"><span class="hljs-keyword">enum</span> <span class="hljs-title">Code</span> <span class="hljs-title">next</span> =</span> Gearef(context, StackTest)->next; |
690 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">pop2Test1StackTestImpl3</span><span class="hljs-params">(context, stackTest, data, data1, <span class="hljs-built_in">stack</span>, next)</span></span>; | 895 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">pop2Test1StackTestImpl3</span><span class="hljs-params">(context, stackTest, data, data1, <span class="hljs-built_in">stack</span>, next)</span></span>; |
691 } | 896 } |
692 </span></span></foreignObject></svg></code></pre> | 897 </span></span></foreignObject></svg></code></pre> |
693 </section> | 898 </section> |
694 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="38" data-paginate="true" data-marpit-pagination="38" data-marpit-pagination-total="42" style="--paginate:true;"> | 899 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="49" data-paginate="true" data-marpit-pagination="49" data-marpit-pagination-total="53" style="--paginate:true;"> |
695 <ul> | 900 <ul> |
696 <li>メタ計算部分で取得するcontextの場所が異なっているのが問題 | 901 <li>メタ計算部分で取得するcontextの場所が異なっているのが問題 |
697 <ul> | 902 <ul> |
698 <li>取得する場所を手書きする必要があった</li> | 903 <li>取得する場所を手書きする必要があった</li> |
699 </ul> | 904 </ul> |
700 </li> | 905 </li> |
701 </ul> | 906 </ul> |
702 <p><img src="./stackTest1.svg" alt="w:732 h:13cm" style="width:732px;height:13cm;" /></p> | 907 <p><img src="./stackTest1.svg" alt="w:732 h:13cm" style="width:732px;height:13cm;" /></p> |
703 </section> | 908 </section> |
704 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="39" data-paginate="true" data-marpit-pagination="39" data-marpit-pagination-total="42" style="--paginate:true;"> | 909 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="50" data-paginate="true" data-marpit-pagination="50" data-marpit-pagination-total="53" style="--paginate:true;"> |
705 <h2>別のInterfaceの出力を受けるCodeGearのメタ計算部分の自動生成</h2> | 910 <h2>別のInterfaceの出力を受けるCodeGearのメタ計算部分の自動生成</h2> |
706 <ul> | 911 <ul> |
707 <li><code>goto interface->method()</code>している箇所を読み取る | 912 <li><code>goto interface->method()</code>している箇所を読み取る |
708 <ul> | 913 <ul> |
709 <li><code>interface</code>がどのInterfaceなのかをPerlトランスパイラで特定させた</li> | 914 <li><code>interface</code>がどのInterfaceなのかをPerlトランスパイラで特定させた</li> |
716 <li>データの取り出しはStubでしているので、新たなStubを作製した</li> | 921 <li>データの取り出しはStubでしているので、新たなStubを作製した</li> |
717 </ul> | 922 </ul> |
718 </li> | 923 </li> |
719 </ul> | 924 </ul> |
720 </section> | 925 </section> |
721 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="40" data-paginate="true" data-marpit-pagination="40" data-marpit-pagination-total="42" style="--paginate:true;"> | 926 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="51" data-paginate="true" data-marpit-pagination="51" data-marpit-pagination-total="53" style="--paginate:true;"> |
722 <h2>元のStub</h2> | 927 <h2>元のStub</h2> |
723 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-function">__code <span class="hljs-title">pop2Test1StackTestImpl3_stub</span><span class="hljs-params">(struct Context* context)</span> </span>{ | 928 <pre><code class="language-c"><svg data-marp-fitting="svg" data-marp-fitting-code><foreignObject><span data-marp-fitting-svg-content><span data-marp-fitting-svg-content-wrap><span class="hljs-function">__code <span class="hljs-title">pop2Test1StackTestImpl3_stub</span><span class="hljs-params">(struct Context* context)</span> </span>{ |
724 StackTestImpl3* stackTest = (StackTestImpl3*)GearImpl(context, StackTest, stackTest); | 929 StackTestImpl3* stackTest = (StackTestImpl3*)GearImpl(context, StackTest, stackTest); |
725 Data* data = Gearef(context, StackTest)->data; | 930 Data* data = Gearef(context, StackTest)->data; |
726 Data* data1 = Gearef(context, StackTest)->data1; | 931 Data* data1 = Gearef(context, StackTest)->data1; |
738 <span class="hljs-class"><span class="hljs-keyword">enum</span> <span class="hljs-title">Code</span> <span class="hljs-title">next</span> =</span> Gearef(context, StackTest)->next; | 943 <span class="hljs-class"><span class="hljs-keyword">enum</span> <span class="hljs-title">Code</span> <span class="hljs-title">next</span> =</span> Gearef(context, StackTest)->next; |
739 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">pop2Test1StackTestImpl3</span><span class="hljs-params">(context, stackTest, data, data1, <span class="hljs-built_in">stack</span>, next)</span></span>; | 944 <span class="hljs-function"><span class="hljs-keyword">goto</span> <span class="hljs-title">pop2Test1StackTestImpl3</span><span class="hljs-params">(context, stackTest, data, data1, <span class="hljs-built_in">stack</span>, next)</span></span>; |
740 } | 945 } |
741 </span></span></foreignObject></svg></code></pre> | 946 </span></span></foreignObject></svg></code></pre> |
742 </section> | 947 </section> |
743 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="41" data-paginate="true" data-marpit-pagination="41" data-marpit-pagination-total="42" style="--paginate:true;"> | 948 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="52" data-paginate="true" data-marpit-pagination="52" data-marpit-pagination-total="53" style="--paginate:true;"> |
744 <h1>メタ計算の切り替えAPI</h1> | 949 <h1>メタ計算の切り替えAPI</h1> |
745 <ul> | 950 <ul> |
746 <li>CodeGearが継続するMetaCodeGearを自由に選択できるPerlモジュールを導入した | 951 <li>CodeGearが継続するMetaCodeGearを自由に選択できるPerlモジュールを導入した |
747 <ul> | 952 <ul> |
748 <li>従来はデフォルトで設定されるMetaCodeGearにしか継続しなかった</li> | 953 <li>従来はデフォルトで設定されるMetaCodeGearにしか継続しなかった</li> |
755 </ul> | 960 </ul> |
756 </li> | 961 </li> |
757 </ul> | 962 </ul> |
758 <p><img src="./metapm.svg" alt="w:932 h:10cm" style="width:932px;height:10cm;" /></p> | 963 <p><img src="./metapm.svg" alt="w:932 h:10cm" style="width:932px;height:10cm;" /></p> |
759 </section> | 964 </section> |
760 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="42" data-paginate="true" data-marpit-pagination="42" data-marpit-pagination-total="42" style="--paginate:true;"> | 965 </foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="53" data-paginate="true" data-marpit-pagination="53" data-marpit-pagination-total="53" style="--paginate:true;"> |
761 <h1>まとめ</h1> | 966 <h1>まとめ</h1> |
762 <ul> | 967 <ul> |
763 <li>Perlトランスパイラのフレームワークの機能を充実させた</li> | 968 <li>Perlトランスパイラのフレームワークの機能を充実させた</li> |
764 <li>Interfaceシステムを改良した | 969 <li>Interfaceシステムを改良した |
765 <ul> | 970 <ul> |