Save 37% off PRO during our Black Friday Sale! »

Cookpad 2016 Summer Intern: Programming Paradigm

Cookpad 2016 Summer Intern: Programming Paradigm

クックパッド2016夏インターン講義5日目: プログラミングパラダイム

0d9e60b12d0a40841b1a746b112ad36b?s=128

Minero Aoki

August 19, 2016
Tweet

Transcript

  1. ϓϩάϥϛϯάύϥμΠϜ .JOFSP"PLJ

  2. ࢒೦ͳ͓஌Βͤ

  3. ϓϩάϥϛϯά
 ύϥμΠϜͷ
 ࿩ͳΜͯ
 Ұ੾͠·ͤΜ

  4. ͙͢ʹ໾ʹཱͨͳ͍ ͜ͱΛֶͿ

  5. ͙͢ʹ໾ཱͭ஌ࣝ͸ ͙͢໾ʹཱͨͳ͘ͳΔ

  6. ՝୊આ໌

  7. ՝୊ +BWB4DSJQUίϯύΠϥΛ࣮૷ͤΑ

  8. ʜʜͱ͍͏ͷ͸
 ͕͢͞ʹ࣌ؒతʹແཧͳͷͰɺ

  9. ՝୊ +BWB4DSJQUίϯύΠϥͷ
 ίʔυδΣωϨʔλʔΛ࣮૷ͤΑ

  10. +BWB4DSJQUʹ͍ͭͯ͸ͪ͜Β l&$."4DSJQU-BOHVBHF4QFDJpDBUJPOz IUUQXXXFDNBJOUFSOBUJPOBMPSHQVCMJDBUJPOT pMFT&$."45&DNBQEG

  11. ࠓ೔࣮૷͢Δػೳ w ੔਺Ϧςϥϧʢ   ʣ w Ճࢉʢ ʣ w

    ৚݅ԋࢉࢠʢD UFʣͱJGจ w ؔ਺ݺͼग़͠ͱҾ਺ͷࢀরɺSFUVSOจ w ؆୯ͳ࠷దԽ w BOENPSF
  12. ίϯύΠϥͷجૅͱ +FU4QJEFS

  13. +FU4QJEFS w +FU4QJEFS͸ࠓճͷΠϯλʔϯઐ༻ʹ։ൃͨ͠ +BWB4DSJQUίϯύΠϥ w 'JSFGPYͷ+BWB4DSJQU࣮૷Ͱ͋Δ4QJEFS.POLFZ 7.༻ͷόΠτίʔυΛੜ੒͢Δ w ίϯύΠϥͷKFUTQJEFSίϚϯυͱɺ7.ͷKTWNί Ϛϯυ͔Β੒Δ

  14. ΠϯλʔϓϦλʔʹΑΔ࣮ߦ ίϯύΠϥʔʹΑΔ࣮ߦ ίϯύΠϥʔͱΠϯλϓϦλʔ ػցޠίʔυ ιʔείʔυ ίϯύΠϥʔ ίϯϐϡʔλʔ ιʔείʔυ ධՁث ࣮ߦ

    ࣮ߦ
  15. 7.ʹΑΔ࣮ߦ όʔνϟϧϚγϯ w ιϑτ΢ΣΞͰߏஙͨ͠ί ϯϐϡʔλʔ͕όʔνϟϧ Ϛγϯʢ7.7JSUVBM .BDIJOFʣ w +BWB7.͕༗໊͕ͩɺ࠷ۙ ͷΠϯλʔϓϦλʔ͸΄΅

    ͜Ε w +BWB7.ͷίʔυ͸όΠτ ίʔυͱݺ͹ΕΔ ಺෦ίʔυ ιʔείʔυ ίϯύΠϥʔ 7. ࣮ߦ
  16. 4QJEFS.POLFZʢ$ ʣ ಠࣗʹ࡞ͬͨ෦෼ʢ3VCZ$ ʣ +FU4QJEFSͷΞʔΩςΫνϟ όʔνϟϧϚγϯ ίϯύΠϥʔ +BWB4DSJQU όΠτίʔυ KTDϑΝΠϧ

    +BWB4DSJQU ίϯύΠϥʔ ϩʔμʔ KTWNίϚϯυ KFUTQJEFSίϚϯυ
  17. +FU4QJEFSͷೖख w ҎԼͷϨϙδτϦΛ֎ͷ(JU)VCʢ()&Ͱ͸ͳ͍ʣ ͰGPSLɺDMPOF͍ͯͩ͘͠͞ w IUUQTHJUIVCDPNBBNJOFKFUTQJEFSDPVSTFHJU w DMPOFઌʹDEͯ͠CVOEMFJOTUBMM

  18. Φϓγϣϯ͸IFMQʹฉ͚ % ./bin/jetspider --help jetspider [options] {JS_FILE | -e SOURCE}

    --dump-tokens Dumps lexical tokens and quit. --dump-ast Dumps AST and quit. --dump-semantic Dumps semantic tree and quit. --dump-object Dumps object file and quit. -e, --source=TEXT Give source code from option. --help Prints this message and quit. % ./bin/jsvm --help Usage: ./bin/jsvm [options] SOURCE Options: -p, --print Executes source and print the last result. -t, --trace Executes source with tracing. -d, --disassemble Disassembles source.
  19. ίϯύΠϥͷҰൠతͳߏ੒ ύʔαʔʢQBSTFSʣ ҙຯղੳثʢTFNBOUJDBOBMZ[FSʣ ΦϓςΟϚΠβʔʢPQUJNJ[FSʣ ίʔυδΣωϨʔλʔʢDPEFHFOFSBUPSʣ ιʔείʔυ ࣮ߦՄೳίʔυ ϑΣΠζߏจղੳ ϑΣΠζҙຯղੳ ϑΣΠζ࠷దԽ

    ϑΣΠζίʔυੜ੒
  20. +FU4QJEFSͷ࣮૷ঢ়گ ύʔαʔʢQBSTFSʣ ҙຯղੳثʢTFNBOUJDBOBMZ[FSʣ ΦϓςΟϚΠβʔʢPQUJNJ[FSʣ ίʔυδΣωϨʔλʔʢDPEFHFOFSBUPSʣ +BWB4DSJQUʢ KTʣ 4QJEFS.POLFZόΠτίʔυʢ KTDʣ ະ׬੒

    ͳ͍
  21. +FU4QJEFSͷιʔεπϦʔ w CJO w KFUTQJEFSίϯύΠϥʔ w KTWN7. w MJCKFUTQJEFS w

    DPNQJMFSSCίϯύΠϥυϥΠόʔ w QBSTFSSCύʔαʔ w SFTPMWFSSCҙຯղੳث w DPEF@HFOFSBUPSSCίʔυδΣωϨʔλʔ w BTTFNCMFSSCόΠτίʔυ%4- w PCKFDU@pMFSC+4$ϑΝΠϧ ͜͜Λॻ͘
  22. ίϯύΠϧͷաఔ

  23. ϑΣΠζߏจղੳ w ιʔείʔυʢςΩετʣ ͷߏจΛνΣοΫ͢Δ ͱಉ࣌ʹɺѻ͍΍͍͢ Α͏πϦʔߏ଄ʢ"45  "CTUSBDU4ZOUBY5SFFʣ ΁ม׵͢Δ JG

    J \ QSJOU J  ^FMTF\ J ^ JG DBMM QSJOU J  J  UIFO FMTF MIT SIT GVODUJPO BSHT  J  MFGU SJHIU DPOE
  24. ࣈ۟ղੳ w ߏจղੳͰ͸·ͣιʔε ίʔυʢจࣈͷྻʣΛ τʔΫϯʢ୯ޠʣͷྻ ʹ෼ׂ͢Δ w ίϝϯτ΍ۭന͸͜ͷ ஈ֊Ͱফͯ͠͠·͏
 ʢ͜ͱ͕ଟ͍ɻ+4΍3VCZʹ͸҉໧ͷจ

    ऴ୺͕͋ΔͨΊվߦͷ৘ใ͸࢒͢ඞཁ ͕͋Δɻ+BWB%PD΍42-ώϯτͳͲί ϝϯτ͕ඞཁͳ৔߹΋͋Δʣ lJG J \aOQSJOU J aO^FMTF \aOJaO^z JG lz J   lz \ laOz QSJOU J  laOz ^ lz FMTF lz \ laOl J ll ʜʜ
  25. <PQ>τʔΫϯྻΛݟΔ % ./bin/jetspider js/arith.js --dump-tokens FUNCTION function S " "

    IDENT f ( ( IDENT x ) ) S " " { { S "\n " RETURN return S " " NUMBER 1 S " " + + S " " IDENT x S " " * * S " " NUMBER 3 ; ; S "\n" } } S "\n" KFUTQJEFSEVNQUPLFOT'*-&KT GVODUJPOG Y \ SFUVSO Y  ^ ˝ιʔείʔυʢKTBSJUIKTʣ
  26. JGจ จ ؔ਺ݺͼग़͠ ൺֱࣜ ڱٛͷߏจղੳ w τʔΫϯྻͷύλʔϯ͔ΒɺΑΓେ͖ͳߏ଄Λൃݟ ͍ͯ͘͠ w ൃݟͨ͠ΒπϦʔʹ͢Δ

    JG J   \ QSJOU J  ʜʜ
  27. <PQ>"45ΛݟΔ % ./bin/jetspider --dump-ast js/arith.js type: SourceElementsNode value: - type:

    FunctionDeclNode value: f arguments: - type: ParameterNode value: x function_body: type: FunctionBodyNode value: type: SourceElementsNode value: - type: ReturnNode value: type: AddNode left: type: NumberNode value: 1 value: type: MultiplyNode left: type: ResolveNode value: x value: type: NumberNode value: 3 KFUTQJEFSEVNQBTU'*-&KT GVODUJPOG Y \ SFUVSO Y  ^ ˝ιʔείʔυʢKTBSJUIKTʣ WBMVF "EE/PEF /VNCFS/PEF .VMUJQMZ/PEF 3FTPMWF/PEF /VNCFS/PEF 3FUVSO/PEF WBMVF MFGU WBMVF MFGU WBMVF WBMVFY WBMVF
  28. ϑΣΠζҙຯղੳ w ม਺ࢀরͱม਺એݴΛ݁ͼ͚ͭͨΓɺܕνΣοΫΛ ͨ͠Γ͢Δ w "45ʹ্هͷ৘ใΛ෇Ճͨ͠σʔλߏ଄ʢதؒίʔ υʣΛग़ྗ͢Δɻ"45Λͦͷ··࢖͏৔߹΋͋Ε͹ɺ όΠτίʔυʹ͍ۙίʔυΛ࢖͏͜ͱ΋͋Δ w +FU4QJEFSͰ͸ࢀর৘ใ෇͖ͷ"45Λग़ྗ͢Δ

  29. <PQ>தؒίʔυΛݟΔ % ./bin/jetspider --dump-sem js/arith.js - type: FunctionDeclNode value: f

    arguments: - type: ParameterNode value: x function_body: type: FunctionBodyNode value: type: SourceElementsNode value: - type: ReturnNode value: type: AddNode left: type: NumberNode value: 1 value: type: MultiplyNode left: type: ResolveNode value: x ref: "[function f]:param:x" value: type: NumberNode value: 3 - type: SourceElementsNode value: - KFUTQJEFSEVNQTFNBOUJD'*-&KT "EE/PEF /VNCFS/PEF .VMUJQMZ/PEF 3FTPMWF/PEF /VNCFS/PEF 3FUVSO/PEF WBMVF MFGU WBMVF MFGU WBMVF WBMVF WBMVFY WBMVF WBMVFY QBSBNY 1BSBNFUFS/PEF 'VODUJPO%FDM/PEF BSHVNFOUT 7BSJBCMFΦϒδΣΫτ
  30. ϑΣΠζ࠷దԽ w ϓϩάϥϜͷҙຯΛม͑ͣʹ࣮ߦ଎౓Λ଎͘͠ ͨΓɺ࢖༻ϝϞϦྔΛݮΒ͢ͳͲͷվળΛߦ͏ w ఻౷తʹ͸ҙຯղੳͱίʔυੜ੒ͷؒʹҐஔ෇͚Β ΕΔ͕ɺίϯύΠϧͷ͋ΒΏΔஈ֊Ͱߦ͏͜ͱ͕Ͱ ͖Δ w ࠷ۙ͸ϦϯΫ࣌࠷దԽͱ͍͏΋ͷ΋͋ΔFH--7.

    w +FU4QJEFSͰ͸࠷దԽΛʢ·ͩʣߦ͍ͬͯͳ͍
  31. ϑΣΠζίʔυੜ੒ w ҙຯղੳࡁΈͷσʔλ Λݩʹɺػցޠ΍7.ίʔ υΛੜ੒͢Δ w ࣮ࡍ͸ίʔυ͚ͩͰ͸ ͳ͘ɺγϯϘϧςʔϒϧ ʢม਺දʣ΍ϦϯΫ৘ ใ΋ؚΉΦϒδΣΫτϑΝ

    ΠϧΛੜ੒͢Δ "EE/PEF /VNCFS/PEF .VMUJQMZ/PEF 3FTPMWF/PEF /VNCFS/PEF 3FUVSO/PEF WBMVF MFGU WBMVF MFGU WBMVF WBMVF WBMVFY YQBSBN WBMVF dd 01 int8 1 54 00 00 getarg 0 dd 03 int8 3 1d mul 1b add 05 return
  32. <PQ>ίϯύΠϧ͢Δ KFUTQJEFS'*-&KT % ./bin/jetspider js/arith.js % ls -l js/arith.jsc -rw-r--r--

    1 minero-aoki staff 228 Aug 25 10:59 js/arith.jsc w KTϑΝΠϧΛࢦఆ͢Δ͚ͩ Ͱ0, w ֦ுࢠΛ KTDʹม͑ͨϑΝ Πϧʢ+4$ϑΝΠϧʣ͕ੜ੒ ͞ΕΔ
  33. <PQ>+4$ϑΝΠϧΛݟΔ KFUTQJEFSEVNQPCKFDU'*-&KT % ./bin/jetspider --dump-obj js/arith.js - n_vars: 0 n_args:

    1 vars: - x prolog_length: 0 js_version: 185 n_fixed: 0 script_bits: 32 code: - dd 01 int8 1 - 54 00 00 getarg 0 - dd 03 int8 3 - 1d mul - 1b add - 05 return - c5 stop srcnotes: '' filename: js/arith.js lineno: 1 n_slots: 3 static_level: 1 atoms: [] blocks: [] upvars: [] regexps: [] closed_args: [] closed_vars: [] trynotes: [] consts: [] - n_vars: 0 n_args: 0 ҎԼུ w όΠτίʔυ͚ͩͰ͸ͳ͘ɺ +4$ϑΝΠϧͷ߲໨͕͢΂ͯ දࣔ͞ΕΔ w ౰વ͚ͩͲίʔυδΣωϨʔ λʔ͕׬੒͍ͯ͠ͳ͍ͱΤ ϥʔʹͳͬͯ͠·͏ w ࣮૷ͨ݁͠ՌΛ֬ೝ͢Δͨ Ίʹ࢖༻
  34. +4$ϑΝΠϧͷߏ଄ w 4QJEFS.POLFZ಺Ͱ͸ؔ਺ ఆٛͭʹରͯ͠TUSVDU +4'VODUJPO͕ͭੜ੒͞Ε Δ w +4$ϑΝΠϧʹ͸ιʔεϑΝ ΠϧͰఆٛ͞Εͨ͢΂ͯͷؔ ਺ʹରԠ͢ΔTUSVDU

    +4'VODUJPO͕֨ೲ͞ΕΔ w ࠷ޙͷͭ͸ৗʹTUSVDU +44DSJQUͰϝϯόʔ͕গͳ͍ +4$ϑΝΠϧ TUSVDU+4'VODUJPO TUSVDU+4'VODUJPO TUSVDU+44DSJQU UPQMFWFM NBHJD Y%&"%# ؔ਺ͷ਺ ʢ ͸τοϓϨϕϧʣ
  35. +FU4QJEFSͰ ίʔυΛੜ੒͢Δ

  36. ࿅श໰୊ w ੔਺ఆ਺ʢ/VNCFS/PEFʣΛ࣮૷ͤΑ w KTOVNCFSKT͕ಈ࡞͢ΔΑ͏ʹ࣮૷͠Α͏ w ූ߸෇͖Ϗοτ੔਺ΛQVTI͢ΔzJOUz໋ྩΛ࢖͏

  37. ՝୊ͷ࣮૷εςοϓ  ࣮૷͢΂͖+BWB4DSJQUͷίʔυΛ֬ೝ͢Δ
 ʢͰ͖Δ͚ͩγϯϓϧͳ+4ίʔυΛ༻ҙ͠Α͏ʂʣ  KFUTQJEFSEVNQBTU TFNͰ"45ΛݟΔ  KTWNE EJTBTTFNCMF

    Ͱʮ౴͑ʯͷόΠτίʔυΛݟΔ  $PEF(FOFSBUPSͷϝιουΛ࣮૷͢Δ  KFUTQJEFSEVNQPCKͰग़ྗ݁ՌΛ֬ೝ͢Δ  ίϯύΠϧ͠ɺKTWNQSJOUͰ࣮ߦ͢Δ
  38. "45ΛݟΔ % ./bin/jetspider --dump-ast js/number.js type: SourceElementsNode value: - type:

    ExpressionStatementNode value: type: NumberNode value: 77 ʮจʯͷϦετΛද͢ϊʔυ ͭͷ͔ࣜΒͳΔ ʮจʯͷϊʔυ ੔਺Ϧςϥϧ
 ͷϊʔυ
  39. ʮਖ਼ղʯΛݟΔ w KTWNE EJTBTTFNCMF ίϚϯυͰ4QJEFS.POLFZ ʹΑΔίϯύΠϧ݁ՌΛݟΔ͜ͱ͕Ͱ͖Δ w τοϓϨϕϧΛٯΞηϯϒϧ w ಛఆͷؔ਺ΛٯΞηϯϒϧ

    jsvm -d ϑΝΠϧ໊.js jsvm -d ϑΝΠϧ໊.js ؔ਺໊
  40. OVNCFSKTͷٯΞηϯϒϧ % ./bin/jsvm -d js/number.js main: 00000: dd 4d int8

    77 00002: 02 popv 00003: c5 stop ‣ Θ͔Βͳ໋͍ྩ͕͋ͬͨΒ(3061"%ͷόΠτ ίʔυϦϑΝϨϯεͰ֬ೝ /VNCFS/PEFͰग़ྗ͢΂͖෦෼ &YQSFTTJPO4UBUFNFOU/PEF͕ग़ྗ τοϓϨϕϧͱؔ਺ͷ຤ඌͰࣗಈग़ྗ
  41. "45ͷτϥόʔε w USBWFSTFπϦʔͷϊʔ υΛॱ൪ʹͨͲ͍ͬͯ ͘ૢ࡞ w खଓ͖ܕݴޠͳΒ࠶ؼ ݺͼग़͠ɺ001Ͱ͸ 7JTJUPSύλʔϯΛ࢖͏ ͷ͕ఆੴ

    τϥόʔεʢUSBWFSTFʣ "EE/PEF /VNCFS/PEF .VMUJQMZ/PEF 3FTPMWF/PEF /VNCFS/PEF 3FUVSO/PEF ̍ ̎ ̏ ̐ ̑ ̒
  42. 7JTJUPSύλʔϯͰ
 "45Λτϥόʔε͢Δ DMBTT"457JTJUPS EFGWJTJU@3FUVSO/PEF OPEF  WJTJUOPEFWBMVFˡSFUVSOจͷࣜΛτϥόʔε FOE EFGWJTJU@"EE/PEF OPEF

     WJTJUOPEFMFGUˡl zͷࠨଆͷࢬΛτϥόʔε WJTJUOPEFWBMVFˡl zͷӈଆͷࢬΛτϥόʔε FOE EFGWJTJU@/VNCFS/PEF OPEF  ੔਺Ϧςϥϧʹ͸ͨͲΔࢬ͕ͳ͍ʢMFBGʣ FOE FOE "EE/PEF /VNCFS/PEF /VNCFS/PEF 3FUVSO/PEF
  43. WJTJUϝιουͷ࣮૷ w ଞͷݴޠͩͱେม͕ͩ3VCZͳΒ@@TFOE@@ͰҰൃ EFGWJTJU OPEF  @@TFOE@@ lWJTJU@\OPEFDMBTT^z  FOE

  44. όΠτίʔυͷग़ྗ w "TTFNCMFSΦϒδΣΫτʹఆٛ͞Ε͍ͯΔɺόΠ τίʔυͱಉ໊ͷϝιουΛݺ΂͹Α͍ w $PEF(FOFSBUPSΫϥε಺Ͱ͸!BTNʹ"TTFNCMFS ΦϒδΣΫτ͕ೖ͍ͬͯΔ w ྫ w

    !BTNQPQ w !BTNHFUBSH
  45. <PQ>+4$ϑΝΠϧΛ࣮ߦ͢Δ w KTWNίϚϯυʹ KTDϑΝΠϧΛࢦఆ͢Δͱɺͦͷ ίʔυΛ࣮ߦ͢Δ w QSJOUΦϓγϣϯ෇͖ͩͱɺ࣮ߦͨ͋͠ͱ࠷ޙͷࣜ ͷ஋Λදࣔ͢Δ w ؔ਺ݺͼग़͠Λ࣮૷͢Δ·Ͱ͸஋ΛදࣔͰ͖ͳ͍

    ͷͰɺ͜ͷΦϓγϣϯͰ݁ՌΛ֬ೝ͢Δ KTWN'*-&KTD KTWNQSJOU'*-&KTD
  46. ࿅श໰୊ w l lԋࢉࢠʢ"EE/PEFʣΛ࣮૷ͤΑ w KTBEEKT KTBEEKTΛಈ࡞ͤ͞Α͏ w lzԋࢉࢠʢ4VCUSBDU/PEFʣͷ࣮૷͕ࢀߟʹͳΔ w

    BEEKT BEEKTͰొ৔͢Δάϩʔόϧม਺POF UXP UISFFʹ͸ͦΕͧΕ ੔਺  ͕ࣄલʹ୅ೖͯ͋͠ΔʢKTWNͷಠࣗ࢓༷ʣ w  ͷΑ͏ʹϦςϥϧ͚ͩͷՃࢉͩͱɺ࠷దԽ͞ΕͯՃࢉࣗମ͕ফ໓ ͯ͠͠·͏ͷͰɺม਺Λ࢖ͬͯ࠷దԽΛճආ͍ͯ͠Δʜʜ
  47. 4QJEFS.POLFZ7. ࣮ߦͷ࢓૊ΈʢʣελοΫ w 4QJEFS.POLFZͷ7.͸ελο ΫϚγϯ w ໋֤ྩ͸ɺ7.ελοΫͷઌ ಄ʹ஋ΛੵΉʢQVTIʣɺऔ Γग़ͯ͠ܭࢉ͢ΔʢQPQʣɺ ࢀরͯ͠ܭࢉ͢Δɺͷ͍ͣ

    Ε͔ͷॲཧΛߦ͏ʢ૊Έ߹ Θͤ΋ΞϦʣ w DGϨδελϚγϯ int8 5 add int8 3 return      QPQ QVTI QVTI QVTI HFU
  48. <PQ>7.ͷಈ࡞ΛݟΔ w KTWNʹUSBDFΦϓγϣ ϯΛ෇͚࣮ͯߦ͢ΔͱҎ Լͷ಺༰΋ग़ྗͰ͖Δ w ࣮ߦ͠Α͏ͱ͍ͯ͠Δ όΠτίʔυ w QVTIͱQPQ

    w มԽޙͷ7.ελοΫ KTWNUSBDF'*-&KTD % ./bin/jsvm --trace js/lvar.js 1: 00000: 00 nop stack: 6: 00001: f1 00 00 callglobal "f" stack: function f() {\n var a = 1, b;\n p(a);\n} undefined 6: 00004: 3a 00 00 call 0 inputs: f, f @ 2 output: (void 0) @ 0 stack: 2: 00000: 3f one output: 1 @ 1 stack: 1 2: 00001: 57 00 00 setlocal 0 inputs: 1 @ 1 output: (void 0) @ 0 stack: 2: 00005: 56 00 01 getlocal 1 output: b @ 1 stack: undefined 2: 00008: 51 pop inputs: b @ 1 stack: 3: 00009: d9 00 00 callgname "p" ....
  49. ࿅श໰୊ w &YQSFTTJPO4UBUFNFOUϊʔυʢͭ·ΓʮจʯʣͰ QPQ໋ྩʢQPQW໋ྩʣΛൃߦ͍ͯ͠Δͷ͸Կͷͨ Ί͔ʁ w QPQ໋ྩΛൃߦ͠ͳ͔ͬͨΒԿ͕ى͖Δͷ͔͔֬Ί Α͏

  50. ৚݅෼ذͱ δϟϯϓ໋ྩ

  51. ՝୊ w ৚݅ԋࢉࢠʢB CDʣΛ࣮૷ͤΑ w KTDPOEFYQSKTΛಈ͔ͦ͏ w ͏·͘ॻ͘ͱδϟϯϓ໋ྩʢJGFR HPUPʣͭͰࡁΉ

  52. 4QJEFS.POLFZ7.
 ࣮ߦͷ࢓૊Έʢʣ1$ w ໋ྩ͸όΠτҎ্ͰɺՄม௕ɻ ྫ͑͹͔͚ࢉΛ͢ΔNVM໋ྩ͸ Y%ͷόΠτ w 1$ 1SPHSBN$PVOUFS Ϩδε

    λʔ͸ݱࡏ࣮ߦதͷʢ͜Ε͔Β ࣮ߦ͢ΔʣόΠτίʔυҐஔΛ ࢦ͢ w 1$͕ࢦ໋͢ྩΛ࣮ߦͯ͠1$Λ ࣍ʹਐΊΔɺ͕7.ͷجຊͷಈ͖ dd 01 int8 1 54 00 00 getarg 0 dd 03 int8 3 1d mul 1b add 05 return 1$ dd 01 int8 1 54 00 00 getarg 0 dd 03 int8 3 1d mul 1b add 05 return 1$ ஋ ஋ HFUBSHΛ࣮ߦ
  53. 4QJEFS.POLFZ7. ࣮ߦͷ࢓૊Έʢʣແ৚݅δϟϯϓ w ແ৚݅δϟϯϓ໋ྩ HPUP͸1$Λมߋ͢Δ w ʮHPUPʯ͸
 ʮ1$Λ ʯ͢ΔޮՌ ͕͋Δ

    .... 07 00 0f ifeq 15 d9 00 00 callgname 0 dd 07 int8 7 3a 00 01 call 1 51 pop 06 00 0c goto 12 d9 00 00 callgname 0 dd 09 int8 9 3a 00 01 call 1 51 pop c5 stop 1$ ஋ .... 07 00 0f ifeq 15 d9 00 00 callgname 0 dd 07 int8 7 3a 00 01 call 1 51 pop 06 00 0c goto 12 d9 00 00 callgname 0 dd 09 int8 9 3a 00 01 call 1 51 pop c5 stop 1$ ஋
  54. 4QJEFS.POLFZ7. ࣮ߦͷ࢓૊Έʢʣ৚݅෇͖δϟϯϓ w ʮJGFRʯ͸ʮελο Ϋઌ಄͕GBMTFͳΒ1$ Λ ʯ
 ͨͿΜɺʮUSVFͳΒͦͷ··࣍ͷ໋ྩʹߦ͖ɺGBMTFͳ Βඈ΂ʯͱ͍͏ҙਤͩͱࢥ͏͚Ͳʜʜɻ
 ͪͳΈʹJGFRͱ͍͏໊લͷͤ͘ʹ౳Ձൺֱ΋͠ͳ͍ɻ

    .... 07 00 0f ifeq 15 d9 00 00 callgname 0 dd 07 int8 7 3a 00 01 call 1 51 pop 06 00 0c goto 12 d9 00 00 callgname 0 dd 09 int8 9 3a 00 01 call 1 51 pop c5 stop 1$ ஋ .... 07 00 0f ifeq 15 d9 00 00 callgname 0 dd 07 int8 7 3a 00 01 call 1 51 pop 06 00 0c goto 12 d9 00 00 callgname 0 dd 09 int8 9 3a 00 01 call 1 51 pop c5 stop 1$ ஋
  55. +FU4QJEFSͰͷ ٯॱํ޲΁ͷδϟϯϓ w ਐߦํ޲ͱٯ΁δϟϯϓ͢Δͱ͖͸ɺ !BTNMPDBUJPOΛ࢖͏ MPD!BTNMPDBUJPO ʢͳʹ໋͔ྩʣˡMPD͸͜ͷ໋ྩͷΦϑηοτΛࢦ͢-PDBUJPO  !BTNHPUPMPDˡMPDͷҐஔ΁δϟϯϓʢ໭Δʣ

  56. +FU4QJEFSͰͷ ਐߦํ޲΁ͷδϟϯϓ w ਐߦํ޲΁δϟϯϓ͢Δͱ͖͸ɺ·ͩੜ੒͍ͯ͠ͳ͍ίʔ υͷҐஔ͕ඞཁʹͳΔ w !BTNMB[Z@MPDBUJPOͰ۩ମతͳ஋ͷຒ·͍ͬͯͳ͍ -PDBUJPOΦϒδΣΫτΛੜ੒͠ɺδϟϯϓ͍ͨ͠ઌͰ pY@MPDBUJPOΛݺΜͰ஋ΛຒΊΔ MPD!BTNMB[Z@MPDBUJPO


    !BTNHPUPMPDˡMPD΁δϟϯϓ
 
 !BTNpY@MPDBUJPO MPD ˡMPDͷҐஔΛఆٛ
 ʢԿ໋͔ྩʣ
  57. ؔ਺ͷݺͼग़͠

  58. ՝୊ w ؔ਺ݺͼग़͠ʢ'VODUJPO$BMM/PEFʣΛ࣮૷ͤΑɻ ·ͣ͸άϩʔόϧؔ਺ͷΈαϙʔτ͠Α͏ɻ w KTGVODBMMKTΛಈ͔ͦ͏ɻ w Q͸ࣄલʹఆٛ͞Εͨؔ਺Ͱɺ3VCZͷQͱಉ͘͡ΦϒδΣΫτΛ͍͍ײ͡ʹ දࣔ͢Δಇ͖͕͋Δɻ w

    ώϯτ໋ྩͷγʔέϯε͸࣍ͷͱ͓Γɻ  DBMMHOBNFlؔ਺໊zˡؔ਺Λऔಘͯ͠ελοΫʹϓογϡ  ୈҾ਺ΛελοΫʹϓογϡ  ୈҾ਺ΛελοΫʹϓογϡ  ʜʜ  DBMMҾ਺ͷ਺
  59. ՝୊ w Ҿ਺ͷࢀরͱɺSFUVSOจΛ࣮૷ͤΑɻ w KTSFUVSOKT KTQBSBNKT͕ಈ࡞͢ΔΑ͏ʹ͠Α͏ɻ w ؔ਺ఆٛࣗମ͸͢Ͱʹ࣮૷͞Ε͍ͯΔɻ w ϩʔΧϧม਺͸·ͬͨ͘ҧ͏ରԠ͕ඞཁɻ·࣮ͩ૷͠ͳͯ͘Α͍ɻ

    w HFUBSH໋ྩͷҾ਺͸ม਺໊Ͱ͸ͳ͘ύϥϝʔλʔ*%ɻ
 ύϥϝʔλʔ*%͸ɺ3FTPMWF/PEF͔ΒOPEFWBSJBCMFJOEFYͰऔΕΔɻ
  60. ࠷దԽͱ ϓϩάϥϜͷҙຯ

  61. ՝୊ w ੔਺Ϧςϥϧ͕zzͷͱ͖͸JOU໋ྩͰ͸ͳ͘POF ໋ྩΛ࢖͏Α͏࠷దԽͤΑ w KTPQUPOFKT͕࠷దԽ͞ΕΔΑ͏ʹ͠Α͏ w l zԋࢉͷఆ਺৞ΈࠐΈΛ࣮૷ͤΑ w

    "45ϨϕϧͰॲཧ͢Δํ๏ͱɺόΠτίʔυϨϕϧͰॲཧ͢Δํ๏ͷͭ ͕ߟ͑ΒΕΔɻ"45ϨϕϧͰॲཧͯ͠͠·͏ͷָ͕ɻ w KTPQUBEEKTͰBEE໋ྩ͕ൃߦ͞Εͳ͍Α͏ʹ͠Α͏
  62. ୅දతͳ࣮ߦ଎౓࠷దԽ w ໋ྩڧ౓ͷ௿ݮ w JOU EE ˠPOF G  w

    Y ˠY w ఆ਺ͷίϯύΠϧ࣌ܭࢉʢఆ਺৞ΈࠐΈʣ w QSJOU J    ˠQSJOU J   w ॲཧͷϧʔϓ֎΁ͷҠಈ w GPS WBSJJJ \QSJOU Y  J ^
 ˣ
 WBSOY 
 GPS WBSJJJ \QSJOU O J ^
  63. ϓϩάϥϜͷҙຯͱ͸ w ϓϩάϥϜͷҙຯ͸มΘ͍ͬͯͳ͍Α͏ʹࢥ͑Δ w มΘ͍ͬͯͳ͍΋ͷʢ㲈ҙຯʣ w ࣜͷ஋ʢʣ w ϓϩάϥϜ֎ʹݟ͑ΔมԽʢʮʯͱදࣔ͞ΕΔʣ w

    มΘͬͨ΋ͷʢ㱠ҙຯʣ w ܭࢉաఔ w ϝϞϦ্ͷ஋ͷมߋύλʔϯ QSJOU    QSJOU   ࠷దԽͷͨΊ࣍ͷΑ͏ͳఆ਺৞ΈࠐΈΛͨ͠ͱ͢Δ ˞ͨͩ͠ݴޠʹΑΓʮҙຯʯ͸ҟͳΔ
  64. ϓϩάϥϜͷҙຯΛ ఆٛɾදݱ͢Δͭͷํ๏ w ૢ࡞తҙຯ࿦ʢ0QFSBUJPOBM4FNBOUJDTʣ w ͋ΔݴޠͷදݱΛɺΑΓܗࣜతͳݴޠʹม׵͢Δ͜ͱ ͰҙຯΛදݱ͢ΔɻίϯύΠϥʔͷఆٛʹ͍ۙ
 ˠDGνϡʔϦϯάϚγϯɺϥϜμܭࢉ w දࣔతҙຯ࿦ʢ%FOPUBUJPOBM4FNBOUJDTʣ

    w ू߹΍ؔ਺ͳͲ਺ֶతͳ֓೦Λ༻͍ͯҙຯΛදݱ͢Δɻ ΠϯλϓϦλʔͷఆٛʹ͍ۙɻ w ެཧతҙຯ࿦ʢ"YJPNBUJDT4FNBOUJDTʣ w ͳΜ͔࿦ཧࣜͰදݱ͢ΔΒ͍͠
  65. ͖ͭͮ͸ຊͰ ʰΞϯμʔελϯσΟϯάίϯ ϐϡςʔγϣϯʱ IUUQXXXBNB[PODPKQEQ 9

  66. ˞͔͜͜Βઌʹ͸ߨٛ͸ ͳ͍ͷͰ࣮૷͋ΔͷΈ

  67. ՝୊ w ූ߸෇͖Ϗοτ੔਺·Ͱѻ͑ΔΑ͏ʹͤΑ w จࣈྻϦςϥϧΛ࣮૷ͤΑ

  68. ՝୊ w XIJMFจΛ࣮૷ͤΑ w CSFBLจͱDPOUJOVFจΛ࣮૷ͤΑ

  69. ՝୊ w ϩʔΧϧม਺ͷࢀরͱ୅ೖΛ࣮૷ͤΑ w 3FTPMWF/PEFͷOWBSJBCMFʹ͸7BSJBCMFΦϒδΣΫτ͕ೖ͍ͬͯͯɺͦͷ 7BSJBCMFΦϒδΣΫτ͔Β͸OWBSJBCMFJOEFYͰϩʔΧϧม਺*%͕औΕΔ

  70. ՝୊ w ޙஔΠϯΫϦϝϯτʢJ ʣΛ࣮૷ͤΑ

  71. ՝୊ w ҎԼͷΦϒδΣΫτࢦ޲ػೳΛ࣮૷ͤΑ w OFXࣜ w ϓϩύςΟͷಡΈॻ͖ w PCKQSPQܗ͚ࣜͩͰΑ͍ɻPCK<bQSPQ`>͸ෆཁʢจࣈྻϦςϥϧΛ࣮૷ ͍ͯ͠ͳ͍ͱҙຯͳ͍ͨΊʣ

    w ϝιουݺͼग़͠ w ϝιουఆٛ͸͢Ͱʹఆٛ͞Ε͍ͯΔؔ਺ΛϓϩύςΟʹηοτ͢Δ ͜ͱͰ୅ସ͢ΔʢԼهࢀরʣͷͰɺݺͼग़͚ͩ͠ͰΑ͍
 GVODUJPOPCK@N \SFUVSO^
 PCKNPCK@N
  72. ՝୊ w ഑ྻϦςϥϧΛ࣮૷ͤΑ

  73. ࠷ऴ՝୊ w ແ໊ؔ਺Λ࣮૷ͤΑ w ͜ͷ՝୊ʹݶΓ$PEF(FOFSBUPSҎ֎ͷίʔυมߋ͕ඞཁͳՄೳੑ͕͋Δ