Slide 1

Slide 1 text

iOSDC Japan 2018 @ukitaka SwiftͷܕγεςϜʹೖ໳͢Δ lib/Semaͷา͖ํ

Slide 2

Slide 2 text

ࣗݾ঺հ Yuki Takahashi @ukitaka ▸ iOS Engineer @ Mercari Fukuoka Office ▸ SwiftͷίϯύΠϥɺಛʹܕγεςϜʹڵຯ͕͋Γ·͢ɻ ▸ ͨ·ʹϒϩά΍QiitaΛॻ͍ͯ·͢ɻ

Slide 3

Slide 3 text

ࠓ೔ͷςʔϚ SwiftͷܕγεςϜʹೖ໳͢Δ ▸ Swiftͷܕͷ͜ͱΛ΋ͬͱਂ͘஌Γ͍ͨਓΛλʔ ήοτͱͯ͠ɺSwiftίϯύΠϥͷ࣮૷ΛಡΈ࢝ ΊΒΕΔͱ͜Ζ·Ͱ͍࣋ͬͯ͘͜ͱΛ໨ඪ ▸ 2ํ޲͔ΒͷΞϓϩʔν ▸ SwiftίϯύΠϥͷ࣮૷ΛಡΉ ▸ SwiftͷܕγεςϜͷཧ࿦Λ஌Δ → શମΛ၆ᛌ͠ɺ࠷ॳͷҰาͷ͓ख఻͍

Slide 4

Slide 4 text

ࠓ೔ͷςʔϚ ΞδΣϯμ ▸ SwiftͷܕγεςϜͷಛ௃Λ஌Δ ▸ Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ ▸ SwiftͷܕγεςϜͷ࣮૷ΛಡΉ ▸ SwiftͷܕγεςϜͷཧ࿦Λ஌Δ

Slide 5

Slide 5 text

Swiftͷ ܕγεςϜͷಛ௃Λ஌Δ

Slide 6

Slide 6 text

SwiftͷܕγεςϜͷಛ௃Λ஌Δ SwiftͷܕγεςϜͷಛ௃ ▸ ܕਪ࿦ ▸ δΣωϦΫε ▸ αϒλΠϐϯά ▸ ଘࡏܕ (Existential type) ▸ ܕΫϥεɾݶఆܕ (Qualified type)

Slide 7

Slide 7 text

SwiftͷܕγεςϜͷಛ௃Λ஌Δ ܕਪ࿦ ▸ Hindley-MilnerϥΠΫͳ੍໿(Constraint)ϕʔεͷܕਪ࿦ ▸ ྫ͑͹ม਺ͷܕΛ໌ࣔ͠ͳͯ͘΋ࠨล͔Βਪ࿦ͯ͘͠ΕΔ ▸ ӈล͔Βࠨล΋͍͚Δ ▸ ୅ೖʹݶΒͣɺ͍Ζ͍Ζͳͱ͜ΖͰܕΛ໌ࣔ͠ͳͯ͘΋Α͍ ❌ ؔ਺ͷҾ਺ɾฦ஋ͷܕ͸লུͰ͖ͳ͍ɺ1expression/1statementʹด͍ͯ͡Δ

Slide 8

Slide 8 text

SwiftͷܕγεςϜͷಛ௃Λ஌Δ δΣωϦΫε ▸ ίʔυੜ੒ϑΣʔζ·ͰؚΊͨίϯύΠϥͷ࣮ ૷ͱͯ͠͸໘ന͍ ▸ ܕγεςϜͱͯ͠͸͋Δҙຯཧ࿦௨Γ ▸ ܕਪ࿦Λ࢖ͬͯଟ૬ੑΛ࣮ݱ͢Δ ▸ ͨͩ͠ܕύϥϝʔλʹର͢Δ੍໿पΓ͸ޙड़ͷ ݶఆܕ(Qualified type)ͱؔ࿈ͯ͘͠Δ

Slide 9

Slide 9 text

SwiftͷܕγεςϜͷಛ௃Λ஌Δ ଘࡏܕ (Existential Type) ▸ = ܕͱͯ͠ͷprotocol ▸ Swift͸ଘࡏܕΛ͋Δҙຯ௚઀తʹѻ͑Δ௝͍͠ ݴޠ ▸ ଘࡏܕͩͱҙࣝͤͣʹ࢖͑Δݴޠઃܭ ▸ Opening existential౳͕ಋೖ͞ΕΔͱଘࡏܕͱ ͸ͳʹ͔Λ஌Βͳ͍ͱཧղͮ͠Β͍͜ͱ΋͋Δ ͔΋͠Εͳ͍ → গͳ͘ͱ΋protocolܕ = ଘࡏܕͰ͋Δͱ͍͏͜ͱΛ ಄ͷย۱ʹஔ͍͓ͯ͘ͱྑ͍

Slide 10

Slide 10 text

SwiftͷܕγεςϜͷಛ௃Λ஌Δ ܕΫϥεɾݶఆܕ(Qualified Type) ▸ = ܕύϥϝʔλͷ੍໿ͱͯ͠ͷprotocol ▸ T: Equatable ▸ Conditional Conformance ▸ ݶఆܕ͸ʮܕΫϥεΛܕγεςϜͰѻ͏ʯͨΊͷ ཧ࿦ ▸ ܕ্ͷड़ޠʹΑ੍ͬͯ໿Λ͔͚Δ ▸ Jones, Mark P. Qualified Types: Theory and Practice. Cambridge University Press, 1994.

Slide 11

Slide 11 text

SwiftͷܕγεςϜͷಛ௃Λ஌Δ αϒλΠϐϯά ▸ αϒλΠϐϯάࣗମ͸ଞͷݴޠʹ΋ݟΒΕΔ͕ɺSwiftͷͦΕ͸͔ͳΓಛ௃త ▸ classͱͦͷܧঝؔ܎͚ͩͰ͸ͳ͍ ▸ Optionalʹର͢ΔαϒλΠϐϯά ▸ T͸T?ͷαϒλΠϓ ▸ Existentialʹର͢ΔαϒλΠϐϯά ▸ T <: U, U: P 㱺 T <: P → ҉໧ม׵Λࢧ͑Δ࢓૊Έ

Slide 12

Slide 12 text

SwiftͷܕγεςϜͷಛ௃Λ஌Δ SwiftͷܕγεςϜ͕͍࣋ͬͯͳ͍΋ͷ (ൈਮ) ❌ ׬શͳܕਪ࿦ ❌ ߴΧΠϯυଟ૬ (Haskell, ScalaͳͲ) ❌ Rank2Ҏ্ͷଟ૬ ❌ ೚ҙͷδΣωϦοΫͳܕʹର͢Δڞมɾ൓มͷࢦఆ → Կ͔ͱͷτϨʔυΦϑͳͷͰɺ͋Δ͔Βྑ͍ͱ͍͏Θ͚Ͱ΋ͳ͍ Swift͸͜ͷลΓͷόϥϯε͕ͱΕ͍ͯΔྑ͍ݴޠ

Slide 13

Slide 13 text

Swiftͷܕਪ࿦ͱͦͷ σόοάํ๏Λ஌Δ

Slide 14

Slide 14 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ ҙຯղੳɾܕਪ࿦ɾܕݕࠪ ▸ ʮܕʯͷνΣοΫ͸ίϯύΠϥͷҙຯղੳϑΣʔζͰߦΘΕΔ ▸ SwiftίϯύΠϥͷҙຯղੳϑΣʔζͰ΍͍ͬͯΔ͜ͱͷ9ׂ͘Β͍͕ܕݕࠪ ▸ ܕਪ࿦ =ʮܕݕ͕ࠪ௨ΔΑ͏ͳܕΛ࠶ߏங͢Δ͜ͱʯͳͷͰ͋Δҙຯηοτ ▸ ܕਪ࿦͕ԿΛ͍ͯ͠Δͷ͔͕Θ͔Ε͹ܕγεςϜ͕Θ͔Δ

Slide 15

Slide 15 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ ίϯύΠϥͷίʔυΛಡΉલʹ ▸ ͍͖ͳΓίϯύΠϥͷίʔυΛಡΉͷ͸ͪΐͬͱେม ▸ ·ͣσόοάͷͨΊͷίϚϯυΛ஌͓ͬͯ͘ͱίʔυΛಡ·ͣʹڍಈΛ֬ೝͰ͖Δ ▸ લఏ஌ࣝͱͯ͠ίϯύΠϧͱASTͷϑΣʔζΛ֬ೝ͓ͯ͘͠ Swift AST AST (typed) lib/Parse lib/Sema ͕͜͜ܕʹؔ͢ΔΞϨίϨ͕ߦΘΕΔͱ͜Ζ

Slide 16

Slide 16 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ ASTΛग़ྗ͢ΔίϯύΠϥΦϓγϣϯ2ͭ % swiftc -help OVERVIEW: Swift compiler USAGE: swiftc [options] MODES: -dump-ast Parse and type-check input file(s) and dump AST(s) -dump-parse Parse input file(s) and dump AST(s) Swift AST AST (typed) -dump-parse -dump-ast lib/Sema

Slide 17

Slide 17 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ ASTΛग़ྗ͢ΔίϯύΠϥΦϓγϣϯ2ͭ % swiftc -help OVERVIEW: Swift compiler USAGE: swiftc [options] MODES: -dump-ast Parse and type-check input file(s) and dump AST(s) -dump-parse Parse input file(s) and dump AST(s) Swift AST AST (typed) ஌Γ͍ͨͷ͸͜ͷաఔͷdumpํ๏ lib/Sema

Slide 18

Slide 18 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ -debug-constraints ▸ ܕਪ࿦ɺܕݕࠪͷաఔΛग़ྗ͢ΔΦϓγϣϯ ▸ Constraints = ܕਪ࿦࣌ʹ࢖͏ʮAͱBͷܕ͸ಉ͡ʯͷΑ͏ͳ੍໿(Constraint)ͷ͜ͱ ▸ ܕγεςϜ΍lib/SemaΛཧղ͢Δ্Ͱͷ࠷ॏཁίϯύΠϥΦϓγϣϯ Swift AST AST (typed) lib/Parse lib/Sema -debug-constraints

Slide 19

Slide 19 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ -debug-constraints % swiftc \ -frontend \ -typecheck \ -debug-constraints \ test.swift

Slide 20

Slide 20 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ -debug-constraints let i = 42 → ग़ྗ͸Ͱ͖ΔΑ͏ʹͳͬͨͷͰ͔͜͜Β͸ಡΈํΛղઆ

Slide 21

Slide 21 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ ܕਪ࿦ɾܕݕࠪͷྲྀΕΛ஌Δ 1. ܕ͕໌ࣔ͞Ε͍ͯͳ͍ͱ͜ΖΛܕม਺(Type Variable)Ͱ͓͘ 2. ܕม਺ͷ੍໿(Constraint)Λੜ੒͢Δ 3. ੍໿Λղ͍ͯղ(Solution)Λݟ͚ͭΔ 4. ͦͷղΛݩͷASTʹద༻ͭͭ͠ඞཁͳॻ͖׵͑(Rewrite)Λߦ͏

Slide 22

Slide 22 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ ܕਪ࿦ɾܕݕࠪͷྲྀΕΛ஌Δ $T1 $T0 let i = 42 1. ܕ͕໌ࣔ͞Ε͍ͯͳ͍ͱ͜ΖΛܕม਺(Type Variable)Ͱ͓͘

Slide 23

Slide 23 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ ܕਪ࿦ɾܕݕࠪͷྲྀΕΛ஌Δ let i = 42 2. ܕม਺ͷ੍໿(Constraint)Λੜ੒͢Δ $T0 ͸੔਺Ϧςϥϧ $T0 ͸$T1ʹม׵Ͱ͖Δ

Slide 24

Slide 24 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ ܕਪ࿦ɾܕݕࠪͷྲྀΕΛ஌Δ let i = 42 3. ੍໿Λղ͍ͯղ(Solution)Λݟ͚ͭΔ $T1 = Int $T0 = Int

Slide 25

Slide 25 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ ܕਪ࿦ɾܕݕࠪͷྲྀΕΛ஌Δ let i: Int = Int2048(_builtinIntegerLiteral: 42) 4. ͦͷղΛݩͷASTʹద༻ͭͭ͠ඞཁͳॻ͖׵͑(Rewrite)Λߦ͏ Ϧςϥϧ͕ؔ਺builtinݺͼग़͠ʹ ܕ͕ܾ·ͬͨঢ়ଶ ※ ASTΛ۩৅จ๏ʹ໭ͨ͠Πϝʔδ

Slide 26

Slide 26 text

Swiftͷܕਪ࿦ͱͦͷσόοάํ๏Λ஌Δ ܕਪ࿦ɾܕݕࠪͷྲྀΕΛ஌Δ 1. ܕ͕໌ࣔ͞Ε͍ͯͳ͍ͱ͜ΖΛܕม਺(Type Variable)Ͱ͓͘ 2. ܕม਺ͷ੍໿(Constraint)Λੜ੒͢Δ 3. ੍໿Λղ͍ͯղ(Solution)Λݟ͚ͭΔ 4. ͦͷղΛݩͷASTʹద༻ͭͭ͠ඞཁͳॻ͖׵͑(Rewrite)Λߦ͏ → ͜ͷྲྀΕͰग़ྗ͞Ε͍ͯΔ

Slide 27

Slide 27 text

SwiftͷܕγεςϜ ͷ࣮૷ΛಡΉ

Slide 28

Slide 28 text

SwiftͷܕγεςϜͷ࣮૷ΛಡΉ lib/Sema ▸ Sema = ҙຯղੳ (Semantic Analysis) ▸ ओʹܕਪ࿦΍ܕݕࠪΛ୲౰͢ΔϞδϡʔϧ

Slide 29

Slide 29 text

SwiftͷܕγεςϜͷ࣮૷ΛಡΉ ओཁͳΫϥε ▸ TypeChecker → ܕݕࠪ୲౰ ▸ TypeCheck*.cppʹ࣮૷͕෼ׂ͞Ε͍ͯΔ ▸ ConstraintSystem → ܕਪ࿦୲౰ ▸ CS*.cpp ʹ࣮૷͕෼ׂ͞Ε͍ͯΔ

Slide 30

Slide 30 text

SwiftͷܕγεςϜͷ࣮૷ΛಡΉ ओཁͳΫϥε ▸ TypeChecker͕ࣜ͝ͱʹ ConstraintSystemΛΠϯελϯεԽ͠ ͯ࢖͍ͬͯΔΠϝʔδ

Slide 31

Slide 31 text

SwiftͷܕγεςϜͷ࣮૷ΛಡΉ ConstraintSystemͷ࢓ࣄ - ੍໿ੜ੒ ▸ createTypeVariableͰܕม਺Λ࡞Δ ▸ addConstraintͰ੍໿Λੜ੒ˍ؅ཧ͢ Δ ▸ ConstraintKindͰ੍໿ͷछྨΛࢦఆ ▸ ੍໿͸ConstraintGraphͱݺ͹ΕΔά ϥϑͰ؅ཧ ੍໿ੜ੒ͷྫ

Slide 32

Slide 32 text

SwiftͷܕγεςϜͷ࣮૷ΛಡΉ ConstraintSystemͷ࢓ࣄ - ੍໿ͷ୯ҰԽ ▸ solveͰ੍໿Λղ͘ ▸ جຊతʹ͸ղͷީิΛͲΜͲΜͨΊ͠ ͍ͯ͘

Slide 33

Slide 33 text

SwiftͷܕγεςϜͷ࣮૷ΛಡΉ ConstraintSystemͷ࢓ࣄ - ղͷద༻ͱॻ͖׵͑ ▸ applySolutionͷதͰExprRewriterͱ͍͏ΫϥεΛ࢖ͬͯASTΛॻ͖׵͑ ͯܕͷ৘ใΛຒΊΔ

Slide 34

Slide 34 text

SwiftͷܕγεςϜͷ࣮૷ΛಡΉ lib/SemaΛ΋ͬͱಡΉʹ͸ ▸ ͜͜ʹॻ͍ͨͷ͸େ·͔ͳྲྀΕͷΈ ▸ overloadͷղܾɺϝιουݺͼग़͠ͷղܾͳͲ·ͩ·ͩॏ͍࿩୊͸ͨ͘͞ Μ͋Δ ▸ ͦΕΒ΋جຊతʹ͸-debug-constraintsʹදΕΔ͜ͱ͕ଟ͍ͷͰɺग़ྗͱ ࣮૷ΛோΊͳ͕Β͕Μ͹Δ ▸ XcodeͰ্खʹσόοά͠Α͏ʂ

Slide 35

Slide 35 text

SwiftͷܕγεςϜ ͷཧ࿦Λ஌Δ

Slide 36

Slide 36 text

SwiftͷܕγεςϜͷཧ࿦Λ஌Δ SwiftͷܕγεςϜͷཧ࿦Λ஌Δ ▸ ཧ࿦Λ஌Ε͹࣮૷͕ಡΈ΍͘͢ͳΔ ▸ SwiftίϯύΠϥͷ࣮૷͸ෳࡶʹབྷΈ߹ͬͯ͸͍Δ͕ɺجຊతʹ͸͍͔ͭ͘ͷτϐοΫ ͷू·Γɻͦͯ͠୯ମͰݟΔͱཧ࿦௨Γ࣮૷͞Ε͍ͯΔ৔߹͕ଟ͍ɻ ▸ ֓೦Λ஌͍ͬͯΔ͚ͩͰ΋͍ͩͿೖΓ΍͍͢ ▸ Opening existentialͷΑ͏ʹͦ΋ͦ΋֓೦Λ஌Βͳ͍ͱҙຯ͕Θ͔Βͳ͍΋ͷ΋͋Δ → ৄࡉͳղઆ͸Ͱ͖ͳ͍ͷͰɺֶͼํͷΈ঺հ

Slide 37

Slide 37 text

SwiftͷܕγεςϜͷཧ࿦Λ஌Δ ܕγεςϜೖ໳(TaPL) ▸ Types and Programming Language (TaPL) ▸ ܕͳ͠ͷϥϜμܭࢉͷΑ͏ͳجૅతͳͱ͜Ζ͔ Βঃʑʹݱ୅ͷϓϩάϥϛϯάݴޠ͕࣋ͭΑ͏ ͳػೳΛ෇͚Ճ͍͑ͯ͘ ▸ 1ষ͸ແྉͰެ։͞Ε͍ͯΔʂʮܕʯͱ͸Կ͔Λ ஌Δʹ͸࠷ߴͷࢿྉ → SwiftΛ஌ΔͨΊʹ͸Ͳ͏ಡΊ͹ྑ͍ʁ

Slide 38

Slide 38 text

SwiftͷܕγεςϜͷཧ࿦Λ஌Δ TaPLͷา͖ํ ▸ લఏͱͯ͠ɺ͢΂ͯͷষΛಡΉඞཁ͸ͳ͍ ▸ 9ষ·Ͱ͸جૅͱͯ͠ಡΜͰ͓͘ͱΑͦ͞͏ ▸ લ൒͸ʮཧ࿦ͷষ → OCamlʹΑΔ࣮૷ͷষʯͷ ܁Γฦ͠ͳͷͰ࣮૷ΛSwiftͰ΍ͬͯΈΔͱ͍͏ ͷ͸ྑ͍ख ▸ ઌ΄ͲݟͨΑ͏ͳSwiftͷܕγεςϜͷಛ௃Λ ѻ͍ͬͯΔͷ͸15ষɺ22ষɺ24ষ͋ͨΓ ܕγεςϜೖ໳−ϓϩάϥϛϯάݴޠͱܕͷཧ࿦− ংจΑΓҾ༻

Slide 39

Slide 39 text

SwiftͷܕγεςϜͷཧ࿦Λ஌Δ ୈ22ষ ܕ࠶ߏங ▸ ܕ࠶ߏங = ܕਪ࿦ ▸ ܕਪ࿦ͱSwift͕࣋ͭΑ͏ͳδΣωϦΫεʹ͍ͭ ͯऔΓѻ͍ͬͯΔষ ▸ SwiftͷδΣωϦοΫͳؔ਺͸ܕਪ࿦ͱηοτͰ ఏڙ͞Ε͍ͯΔػೳ (letଟ૬) ͱ͍͏͜ͱ͕Θ͔ Δ The secret life of types in Swift https://medium.com/@slavapestov/the-secret-life-of-types-in-swift-ff83c3c000a5 ܕγεςϜೖ໳−ϓϩάϥϛϯάݴޠͱܕͷཧ࿦− ୈ22ষʮܕ࠶ߏஙʯΑΓҾ༻

Slide 40

Slide 40 text

SwiftͷܕγεςϜͷཧ࿦Λ஌Δ ୈ15ষ ෦෼ܕ෇͚ ▸ ෦෼ܕ෇͚ = αϒλΠϐϯά ▸ ͋Δܕͱ͋Δܕ͕αϒλΠϓؔ܎Ͱ͋Δ͔Ͳ͏ ͔͸ɺͦͷܕγεςϜͰͷʮܾΊʯͷ໰୊ͩͱ ͍͏͜ͱ͕Θ͔Ε͹Αͦ͞͏ ▸ 15.5અͷʮܕڧ੍ҙຯ࿦ʯͷͱ͜Ζ͸·͞ʹ SwiftίϯύΠϥͰߦΘΕ͍ͯΔ͜ͱ͕ॻ͍ͯ͋ ΔͷͰඞಡ ܕγεςϜೖ໳−ϓϩάϥϛϯάݴޠͱܕͷཧ࿦− ୈ15ষʮ෦෼ܕ෇͚ʯΑΓҾ༻

Slide 41

Slide 41 text

SwiftͷܕγεςϜͷཧ࿦Λ஌Δ ୈ24ষ ଘࡏܕ ▸ λΠτϧ௨Γଘࡏܕ(Existential type)Λѻ͏ষ ▸ ଘࡏܕ͕ʮ͋ΔܕͱͦͷܕΛ࢖ͬͨܕʯͷ૊ɺ ଘࡏܕͷ஋͸ʮ͋Δܕ͕۩ମతʹͳʹ͔ + ͦͷ ஋ʯͷϖΞͰ͋Δͱ͍͏ͱ͜Ζ͔͑ͭ͞ΊΕ͹ Swiftͷଘࡏܕ΋ා͘ͳ͍ ϖΞͬΆ͍งғؾ ܕγεςϜೖ໳−ϓϩάϥϛϯάݴޠͱܕͷཧ࿦− ୈ24ষʮଘࡏܕʯΑΓҾ༻

Slide 42

Slide 42 text

SwiftͷܕγεςϜͷཧ࿦Λ஌Δ Swiftʹؔ܎͋Γͦ͏Ͱؔ܎ͳ͍ষ ▸ ୈ23ষ શশܕ ▸ ͍ΘΏΔδΣωϦΫεͷ͜ͱͩͱࢥͬͯಡΉͱϋϚΔ ▸ Swift͸͜ͷষͰऔΓ্͛ΒΕ͍ͯΔΑ͏ͳλΠϓͷڧྗͳδΣωϦΫεΛ࣋ͨͳ͍ ▸ ୈ26ষ ༗քྔԽ ▸ ͺͬͱݟ T: EquatableͷΑ͏ͳ੍໿ʹ͍ͭͯͷཧ࿦తഎܠ͕ॻ͍ͯ͋ΔΑ͏ʹΈ͑Δ͕ɺ࣮͸ؔ܎ ͳ͍ (see: ݶఆܕ) ▸ ༗քྔԽ͸αϒλΠϐϯάʹΑ੍ͬͯ໿Λ͔͚Δɺݶఆܕ͸ܕ্ͷड़ޠͰ੍໿Λ͔͚Δͱ͍͏ҧ͍

Slide 43

Slide 43 text

SwiftͷܕγεςϜͷཧ࿦Λ஌Δ ΋͠ܕγεςϜͷೖ໳ʹ࠳ંͨ͠Β ▸ ࠳ં͚ͨ͠ͲͦΕͰ΋TaPLಡΈ͍ͨͱ͍͏ͱ͍͏ํ͸ɺ(ه߸)࿦ཧֶ͔Β͵Δͬͱೖ͍ͬͯ͘ ͱΑͦ͞͏ ▸ ๻͸࠳ંͯ͜͠ΜͳྲྀΕͰ࠶ೖ໳͠·ͨ͠

Slide 44

Slide 44 text

·ͱΊ

Slide 45

Slide 45 text

·ͱΊ SwiftͷܕγεςϜʹೖ໳͢Δʹ͸ ▸ -debug-constraintsΛ࢖͍͜ͳͯ͠ܕਪ࿦ͷڍಈΛ೺Ѳͭͭ͠ɺίϯύΠ ϥͷιʔείʔυΛಡΈਐΊΑ͏ ▸ ཧ࿦͸࣮૷ΛಡΈղ͘ώϯτͱͯ͠༗ޮͳ͜ͱ΋͋ΔɺTaPLΛಡΜͰΈΑ ͏

Slide 46

Slide 46 text

·ͱΊ SwiftͷܕγεςϜʹೖ໳͢Δʹ͸ ▸ ༏ͯ͘͠ฏ࿨Ͱ༗ҙٛͳswiftcษڧձ͋Γ·͢

Slide 47

Slide 47 text

͋Γ͕ͱ͏͍͟͝·ͨ͠