Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ActiveSupport::Concernで開くメタプログラミングの扉 #heiseirubykaigi / The door of meta-programing is opened by ActiveSupport::Concern

Shu OGAWARA
December 14, 2019

ActiveSupport::Concernで開くメタプログラミングの扉 #heiseirubykaigi / The door of meta-programing is opened by ActiveSupport::Concern

2019/12/14の平成Ruby会議01で発表したスライドです。

複数の誤りが発見されたので、2020/05/03に修正しました。詳しくはスライド内の変更履歴をご覧ください。

Shu OGAWARA

December 14, 2019
Tweet

More Decks by Shu OGAWARA

Other Decks in Technology

Transcript

  1. "DUJWF4VQQPSU$PODFSO
    Ͱ։͘
    ϝλϓϩάϥϛϯάͷ൶
    ฏ੒3VCZձٞ
    4IV0("8"3" !FYQBKQ

    View full-size slide

  2. มߋཤྺ


    ❏ ฏ੒3VCZձٞ ॳ൛ެ։

    ❏ JODMVEFͱFYUFOEΛऔΓҧ͍͑ͯͨՕॴ͕
    ෳ਺͋ͬͨͷΛमਖ਼
    ❏ ޡͬͨαϯϓϧίʔυΛमਖ਼

    View full-size slide

  3. ࣗݾ঺հ
    ❑ 4IV0("8"3" !FYQBKQ

    ❏ ϦϯΧʔζגࣜձࣾ
    ❏ ग़਎ɿௗऔɺֶੜ࣌୅ɿਆށ
    ❏ झຯ͸ΫϥγοΫܥͷ߹এ
    ❏ ฏ੒2೥ੜ·Ε
    ❏ ઙాਅԝɺถ௡ݰࢣͱಉ͍೥

    View full-size slide


  4. ࠓ೔͸ਪ͠ͷ࿩Λ͠ʹ͖·ͨ͠

    View full-size slide


  5. "DUJWF4VQQPSU$PODFSO
    ʢ"4$ͱུ͠·͢ʣ

    View full-size slide

  6. "DUJWF4VQQPSU$PODFSO
    ❑ 3BJMT͔Βಋೖ͞Εͨػೳ
    ❑ ؔ৺ࣄΛ.PEVMFʹ෼཭͠΍͘͢͢Δ
    ❑ ϝλϓϩάϥϛϯά3VCZͰݸผͷষ
    ͕ઃ͚ΒΕ͍ͯΔ
    ❏ ࣮૷ʹ͸ϝλϓϩάϥϛϯά͕;ΜͩΜʹ
    ༻͍ΒΕ͍ͯΔ

    View full-size slide

  7. ͳͥਪ͍ͯ͠Δ͔
    ❑ ͨͬͨߦͷγϯϓϧͳίʔυͰ
    ੈքதͷ໰୊Λղܾ͍ͯ͠Δ
    ඒ͍͠࢓૊Έ͔ͩΒ

    View full-size slide


  8. Ҿ༻ɿ03FJMMZ+BQBO ϝλϓϩάϥϛϯά3VCZୈ൛
    IUUQTXXXPSFJMMZDPKQCPPLT

    View full-size slide



  9. ຊॻ͸ϝλϓϩάϥϛϯάͷ
    ੒ޭ෺ޠ͕ຬࡌͰ͋Δɻ
    "DUJWF4VQQPSU$PODFSO΋
    ͦ͏ͨ͠෺ޠͷͻͱͭͩɻ
    ϝλϓϩάϥϛϯά3VCZୈ൛ Q

    View full-size slide

  10. ϝλϓϩάϥϛϯά
    ❑ ݴޠཁૉΛ࣮ߦ࣌ʹૢ࡞͢ΔίʔυΛ
    هड़͢Δ͜ͱ
    ❏ ϝιου
    ❏ είʔϓ
    ❏ ܧঝπϦʔ

    View full-size slide

  11. "4$͸ϝλϓϩͷๅݿ
    ❑ ίʔυ͕ධՁ͞ΕΔείʔϓ͕
    Ί·͙Δ͘͠มΘΔ
    ❑ 3VCZඪ४ಈ࡞͕ॻ͖׵͑ΒΕΔ

    View full-size slide

  12. ͔͠͠
    ϝλϓϩάϥϛϯάͱ͍͏ͱ

    View full-size slide

  13. ϝλϓϩάϥϛϯά΁ͷҙݟ
    ❑ ॳ৺ऀ
    ❏ ೉ͦ͠͏ɺ͜Θ͍
    ❑ தڃऀҎ্
    ❏ ࢓ࣄͰॻ͍ͨΒౖΒΕΔ͔Βɺ
    ࢖͏ػձ͕ͳ͍

    View full-size slide

  14. ΋͍ͬͨͳ͍

    View full-size slide

  15. ϝλϓϩ࢖͍Λ૿΍͍ͨ͠ͷͰ
    ਪ͠Λ঺հ͠·͢

    View full-size slide

  16. ࠓ೔ͷ໨త
    ❑ "DUJWF4VQQPSU$PODFSOͷ࣮૷ͷ
    ੌ͞Λ஌ͬͯ΋Β͏
    ❑ ͦΕΛ௨ͯ͠ɺϝλϓϩάϥϛϯάΛ
    ֶͿͷʹ఍߅Λײ͍ͯ͡Δਓʹ
    ʮֶΜͰΈΑ͏ʯͱࢥͬͯ΋Β͏
    ❏ ಡΉͱ͜Ζ͔Β࢝Ίͯ΋Β͏

    View full-size slide

  17. Ͱ͸ɺ࢝Ί͍͖ͯ·͠ΐ͏

    View full-size slide

  18. "DUJWF4VQQPSU$PODFSO
    ͬͯͲΜͳػೳʁ

    View full-size slide

  19. ͦ΋ͦ΋Կʹࠔ͍͔ͬͯͨ
    ❑ ᶃݸͷϞδϡʔϧͰ͸ɺ
    Πϯελϯεϝιουɾ
    Ϋϥεϝιουͷยํ͔͠ఆٛͰ͖ͳ͍
    ❏ ਖ਼֬ʹ͸ʮ͢ΔͱಡΈͮΒ͘ͳΔʯ
    ❑ ᶄϞδϡʔϧ͕ґଘ͍ͯ͠ΔϞδϡʔϧ
    ΋FYUFOE͠ͳͯ͘͸ͳΒͳ͍

    View full-size slide

  20. Ϟδϡʔϧ͕ґଘ͢ΔϞδϡʔϧ
    module SecondLevelModule
    def second_method
    p 'second'
    end
    end
    module FirstLevelModule
    extend SecondLevelModule
    def first_method
    self.class.second_method
    p 'first'
    end
    end
    class BaseClass
    include FirstLevelModule
    end
    BaseClass.new.first_method
    # => NoMethodError
    JODMVEFͨ͠ϞδϡʔϧͷதͰ
    ͞ΒʹผͷϞδϡʔϧͰఆٛ͞Εͨ
    ΫϥεϝιουΛݺͼग़͢ͱ
    /P.FUIPE&SSPS

    View full-size slide

  21. Ϟδϡʔϧ͕ґଘ͢ΔϞδϡʔϧ
    module SecondLevelModule
    def second_method
    p 'second’
    end
    end
    module FirstLevelModule
    include SecondLevelModule
    def first_method
    self.class.second_method
    p 'first’
    end
    end
    class BaseClass
    extend SecondLevelModule
    include FirstLevelModule
    end
    BaseClass.new.first_method
    # => “second”
    # “first”
    ͜ΕͳΒͪΌΜͱಈ͘

    View full-size slide

  22. ΋ͱ΋ͱ
    Ͳ͏ղܾ͍͔ͯͨ͠

    View full-size slide

  23. ᶃΫϥεϝιουΛಉ࣌ʹఆٛ
    module M
    def self.included(base)
    base.extend ClassMethods
    base.class_eval do
    scope :disabled, -> { where(disabled: true) }
    end
    end
    module ClassMethods
    ...
    end
    end
    JODMVEF͞Εͨͱ͖ʹൃՐ
    Ҿ༻ɿ"DUJWF4VQQPSU$PODFSO
    IUUQTBQJSVCZPOSBJMTPSHDMBTTFT"DUJWF4VQQPSU$PODFSOIUNM

    View full-size slide

  24. ᶃΫϥεϝιουΛಉ࣌ʹఆٛ
    module M
    def self.included(base)
    base.extend ClassMethods
    base.class_eval do
    scope :disabled, -> { where(disabled: true) }
    end
    end
    module ClassMethods
    ...
    end
    end
    ΫϥεϚΫϩͱΫϥεϝιουΛ
    ແཧ΍ΓJODMVEF͞ΕͨઌͰ
    ఆٛ͢Δ

    View full-size slide

  25. ᶄϞδϡʔϧ͕ґଘ͢ΔϞδϡʔϧ
    module SecondLevelModule
    ...
    end
    module FirstLevelModule
    extend SecondLevelModule
    def self.included(base)
    base.send :extend, SecondLevelModule
    end
    ...
    end
    class BaseClass
    include FirstLevelModule
    ...
    end
    BaseClass.new.first_method
    # => “second”
    # “first”
    ґଘϞδϡʔϧΛແཧ΍Γ
    FYUFOE͢Δ

    View full-size slide

  26. "4$ͷػೳ
    ❑ ᶃϞδϡʔϧͰશ෦ੜ΍ͤΔ
    ❏ Πϯελϯεϝιουɾ
    ΫϥεϝιουɾΫϥεϚΫϩΛ
    ݸͷϞδϡʔϧͰੜ΍ͤΔ
    ❑ ᶄґଘϞδϡʔϧಡࠐෆཁ
    ❏ ϞδϡʔϧͷதͰFYUFOEͨ͠
    ผϞδϡʔϧΛಡΈࠐ·ͳ͍Ͱྑ͘ͳΔ

    View full-size slide

  27. ᶃ ϞδϡʔϧͰશ෦ੜ΍ͤΔ
    module M
    extend ActiveSupport::Concern
    included do
    scope :disabled, -> { where(disabled: true) }
    end
    class_methods do
    ...
    end
    end
    ΫϥεϚΫϩΛ
    *ODMVEFEͷϒϩοΫʹॻ͘

    View full-size slide

  28. ᶃ ϞδϡʔϧͰશ෦ੜ΍ͤΔ
    module M
    extend ActiveSupport::Concern
    included do
    scope :disabled, -> { where(disabled: true) }
    end
    class_methods do
    ...
    end
    end
    ΫϥεϝιουΛ
    DMBTT@NFUIPETͷϒϩοΫʹॻ͘
    $MBTT.FUIPETϞδϡʔϧ΋Մ

    View full-size slide

  29. ᶄ ґଘϞδϡʔϧಡࠐෆཁ
    module SecondLevelModule
    extend ActiveSupport::Concern
    def second_method
    p 'second'
    end
    end
    module FirstLevelModule
    extend ActiveSupport::Concern
    extend SecondLevelModule
    def first_method
    self.class.second_method
    p 'first'
    end
    end
    class BaseClass
    include FirstLevelModule
    end
    BaseClass.new.first_method
    # => “second”
    # “first”
    ґଘϞδϡʔϧΛ
    FYUFOE͠ͳͯ͘΋
    ͪΌΜͱಈ͘

    View full-size slide

  30. Կ͕͏Ε͍͔͠
    ❑ ᶃϞδϡʔϧͰશ෦ੜ΍ͤΔ
    ❏ Ϟδϡʔϧͷڽू౓্͕͕Δ
    ❏ ͜ͷಈ࡞Λॻͨ͘Ίͷ$POWFOUJPO͕ఆ·Δ
    ❑ ᶄґଘϞδϡʔϧಡࠐෆཁ
    ❏ Ϟδϡʔϧͷڽू౓্͕͕Δ
    ❏ %3:ʹͳΔ

    View full-size slide


  31. ΑΓΦϒδΣΫτࢦ޲ʹ஧࣮Ͱ
    ΑΓ3BJMTΒ͘͠ॻ͚Δ

    View full-size slide

  32. "4$͸͜ΕΛͨͬͨߦͰ࣮ݱ
    # frozen_string_literal: true
    module ActiveSupport
    module Concern
    class MultipleIncludedBlocks < StandardError
    def initialize
    super "Cannot define multiple 'included' blocks for a Concern"
    end
    end
    def self.extended(base)
    base.instance_variable_set(:@_dependencies, [])
    end
    def append_features(base)
    if base.instance_variable_defined?(:@_dependencies)
    base.instance_variable_get(:@_dependencies) << self
    false
    else
    return false if base < self
    @_dependencies.each { |dep| base.include(dep) }
    super
    base.extend const_get(:ClassMethods) if const_defined?(:ClassMethods)
    base.class_eval(&@_included_block) if instance_variable_defined?(:@_included_block)
    end
    end
    def included(base = nil, &block)
    if base.nil?
    if instance_variable_defined?(:@_included_block)
    if @_included_block.source_location != block.source_location
    raise MultipleIncludedBlocks
    end
    else
    @_included_block = block
    end
    else
    super
    end
    end
    def class_methods(&class_methods_module_definition)
    mod = const_defined?(:ClassMethods, false) ?
    const_get(:ClassMethods) :
    const_set(:ClassMethods, Module.new)
    mod.module_eval(&class_methods_module_definition)
    end
    end
    end

    View full-size slide

  33. ͘͢͝ͳ͍͔͢ʁ

    View full-size slide

  34. ͍͢͝ͱࢥͬͨਓ

    View full-size slide

  35. "DUJWF4VQQPSU$PODFSO
    ͷ࣮૷ΛಡΈղ͘

    View full-size slide

  36. ᶃϞδϡʔϧͰશ෦ੜ΍ͤΔ ͷίʔυ
    def included(base = nil, &block)
    if base.nil?
    if instance_variable_defined?(:@_included_block)
    if @_included_block.source_location != block.source_location
    raise MultipleIncludedBlocks
    end
    else
    @_included_block = block
    end
    else
    super
    end
    end
    def class_methods(&class_methods_module_definition)
    mod = const_defined?(:ClassMethods, false) ?
    const_get(:ClassMethods) :
    const_set(:ClassMethods, Module.new)
    mod.module_eval(&class_methods_module_definition)
    end

    View full-size slide

  37. ᶃϞδϡʔϧͰશ෦ੜ΍ͤΔ ͷίʔυ
    ❑ DMBTT@NFUIPETϝιου
    ❏ "4$Ͱಠࣗఆٛͷϝιου
    ❏ ΫϥεϝιουΛੜ΍͢
    ❑ JODMVEFEϝιου
    ❏ 3VCZ૊ࠐɿJODMVEF͞ΕΔͱൃՐ͢Δ
    ❏ ΫϥεϚΫϩΛੜ΍͢

    View full-size slide

  38. DMBTT@NFUIPET ϝιου
    def class_methods(&class_methods_module_definition)
    mod = const_defined?(:ClassMethods, false) ?
    const_get(:ClassMethods) :
    const_set(:ClassMethods, Module.new)
    mod.module_eval(&class_methods_module_definition)
    end

    View full-size slide

  39. DMBTT@NFUIPET ϝιου
    def class_methods(&class_methods_module_definition)
    mod = const_defined?(:ClassMethods, false) ?
    const_get(:ClassMethods) :
    const_set(:ClassMethods, Module.new)
    mod.module_eval(&class_methods_module_definition)
    end
    $MBTT.FUIPET͕͋Ε͹୅ೖ
    ͳ͚Ε͹ఆٛ

    View full-size slide

  40. DMBTT@NFUIPET ϝιου
    def class_methods(&class_methods_module_definition)
    mod = const_defined?(:ClassMethods, false) ?
    const_get(:ClassMethods) :
    const_set(:ClassMethods, Module.new)
    mod.module_eval(&class_methods_module_definition)
    end
    DMBTT@NFUIPET͕ಋ͘
    ϒϩοΫͷத਎Λ
    $MBTT.FUIPETͷείʔϓͰධՁ
    ʹ$MBTT.FUIPETʹϝιου͕ੜ͑Δ

    View full-size slide

  41. JODMVEFEϝιου
    def included(base = nil, &block)
    if base.nil?
    if instance_variable_defined?(:@_included_block)
    if @_included_block.source_location != block.source_location
    raise MultipleIncludedBlocks
    end
    else
    @_included_block = block
    end
    else
    super
    end
    end

    View full-size slide

  42. JODMVEFEͷຊདྷͷ࢖͍ํ
    module Foo
    def self.included(mod)
    p "#{mod} include #{self}"
    end
    end
    class Bar
    include Foo
    end
    # => "Bar include Foo"
    TFMGJODMVEFEͷܗͰɺ
    JODMVEF͞Εͨͱ͖ͷ
    ಈ࡞Λॻ͘
    Ҿ༻ɿJOTUBODFNFUIPE.PEVMFJODMVEFE 3VCZ

    IUUQTSVSFNBDMFBSDPEFDPNNFUIPE.PEVMFJJODMVEFEIUNM

    View full-size slide

  43. JODMVEFEϝιου
    def included(base = nil, &block)
    if base.nil?
    if instance_variable_defined?(:@_included_block)
    if @_included_block.source_location != block.source_location
    raise MultipleIncludedBlocks
    end
    else
    @_included_block = block
    end
    else
    super
    end
    end
    Ϩγʔό͕͋Δ
    ʹຊདྷͷ࢖͍ํΛ͍ͯ͠Δ

    View full-size slide

  44. JODMVEFEϝιου
    def included(base = nil, &block)
    if base.nil?
    if instance_variable_defined?(:@_included_block)
    if @_included_block.source_location != block.source_location
    raise MultipleIncludedBlocks
    end
    else
    @_included_block = block
    end
    else
    super
    end
    end
    Ϩγʔόͳ͠ͷJODMVEFE͕
    ݸҎ্͋ͬͨΒΤϥʔ

    View full-size slide

  45. JODMVEFEϝιου
    def included(base = nil, &block)
    if base.nil?
    if instance_variable_defined?(:@_included_block)
    if @_included_block.source_location != block.source_location
    raise MultipleIncludedBlocks
    end
    else
    @_included_block = block
    end
    else
    super
    end
    end
    !@JODMVEFE@CMPDL
    ʹϒϩοΫΛ֨ೲ

    View full-size slide

  46. ͜͜·Ͱͷ·ͱΊ
    ❑ ҎԼ͕ఆٛ͞Εͨ
    ❏ $MBTT.FUIPET ʹΫϥεϝιου
    ❏ !@JODMVEFE@CMPDL ʹΫϥεϚΫϩ
    ❑ ࣮ࡍʹੜ΍͢ಈ࡞͸
    BQQFOE@GFBUVSFTͷΦʔόϥΠυ
    Ͱߦ͏

    View full-size slide

  47. BQQFOE@GFBUVSFT
    ❑ Ϟδϡʔϧ͕JODMVEF͞Εͨͱ͖ʹ
    ݺ͹ΕΔϞδϡʔϧͷϝιου
    ❑ ΠϯελϯεϝιουΛੜ΍͢ಈ࡞
    ❑ ͜ΕΛΦʔόʔϥΠυ͢Ε͹ɺ
    JODMVEF͞Εͨͱ͖ͷಈ࡞Λ
    ॻ͖׵͑ΒΕΔ

    View full-size slide

  48. ΫϥεϝιουͱΫϥεϚΫϩΛ
    ੜ΍͢෦෼
    def append_features(base)
    if base.instance_variable_defined?(:@_dependencies)
    base.instance_variable_get(:@_dependencies) << self
    false
    else
    return false if base < self
    @_dependencies.each { |dep| base.include(dep) }
    super
    base.extend const_get(:ClassMethods) if const_defined?(:ClassMethods)
    base.class_eval(&@_included_block) if instance_variable_defined?(:@_included_block)
    end
    end
    CBTFFYUFOEͰ
    $MBTT.FUIPETΛΫϥεϝιουͱͯ͠ੜ΍͠
    CBTFDMBTT@FWBMͰ
    !@JODMVEFE@CMPDLΛΫϥεϚΫϩͱ࣮ͯ͠ߦͨ͠

    View full-size slide

  49. ᶄґଘϞδϡʔϧಡࠐෆཁ ͷίʔυ
    def self.extended(base)
    base.instance_variable_set(:@_dependencies, [])
    end
    def append_features(base)
    if base.instance_variable_defined?(:@_dependencies)
    base.instance_variable_get(:@_dependencies) << self
    false
    else
    return false if base < self
    @_dependencies.each { |dep| base.include(dep) }
    super
    base.extend const_get(:ClassMethods) if const_defined?(:ClassMethods)
    base.class_eval(&@_included_block) if instance_variable_defined?(:@_included_block)
    end
    end

    View full-size slide

  50. ᶄґଘϞδϡʔϧಡࠐෆཁ ͷίʔυ
    ❑ TFMGFYUFOEFE ϝιου
    ❏ 3VCZ૊ࠐɿFYUFOE͞ΕΔͱൃՐ͢Δ
    ❏ ʮ"4$ΛFYUFOEͨ͠ʯͱϚʔΩϯά
    ❑ BQQFOE@GFBUVSFT ϝιου
    ❏ 3VCZ૊ࠐɿJODMVEFͷ࣮ମ
    ❏ Ϟδϡʔϧͷಡࠐ࣌ʹґଘϞδϡʔϧ΋
    ҰॹʹJODMVEF͢Δ

    View full-size slide

  51. TFMGFYUFOEFE ϝιου
    ❑ ಡࠐݩʹ !@EFQFOEFODJFTੜ΍͚ͩ͢
    def self.extended(base)
    base.instance_variable_set(:@_dependencies, [])
    end

    View full-size slide

  52. BQQFOE@GFBUVSFT ϝιου
    def append_features(base)
    if base.instance_variable_defined?(:@_dependencies)
    base.instance_variable_get(:@_dependencies) << self
    false
    else
    return false if base < self
    @_dependencies.each { |dep| base.include(dep) }
    super
    base.extend const_get(:ClassMethods) if const_defined?(:ClassMethods)
    base.class_eval(&@_included_block) if instance_variable_defined?(:@_included_block)
    end
    end

    View full-size slide

  53. Α͘Θ͔Βͳ͍ͷͰ
    ਤʹͯ͠Έͨ

    View full-size slide


  54. "4$ΛFYUFOE
    ;ͭ͏ͷΫϥε
    " #
    $
    %
    NPEVMF
    NPEVMF
    NPEVMF
    DMBTT

    View full-size slide


  55. "4$ΛFYUFOE
    ;ͭ͏ͷΫϥε
    ᶃ $ΛJODMVEF
    ᶄ "ΛJODMVEF
    " #
    $
    %
    NPEVMF
    NPEVMF
    NPEVMF
    DMBTT

    View full-size slide


  56. "4$ΛFYUFOE
    ;ͭ͏ͷΫϥε
    ᶃ $ΛJODMVEF
    ᶄ "ΛJODMVEF
    ᶅ $ͷ!@EFQʹ
    "Λ௥Ճ
    !@EFQ
    <">
    " #
    $
    %
    NPEVMF
    NPEVMF
    NPEVMF
    DMBTT

    View full-size slide


  57. "4$ΛFYUFOE
    ;ͭ͏ͷΫϥε
    ᶃ $ΛJODMVEF
    ᶄ "ΛJODMVEF
    ᶅ $ͷ!@EFQʹ
    "Λ௥Ճ
    !@EFQ
    <"> ᶆ #ΛJODMVEF
    " #
    $
    %
    NPEVMF
    NPEVMF
    NPEVMF
    DMBTT

    View full-size slide


  58. "4$ΛFYUFOE
    ;ͭ͏ͷΫϥε
    !@EFQ
    <">
    " #
    $
    %
    NPEVMF
    NPEVMF
    NPEVMF
    DMBTT
    ͔͜͜Β͕ຊ൪

    View full-size slide


  59. "4$ΛFYUFOE
    ;ͭ͏ͷΫϥε
    !@EFQ
    <">
    ᶇ !@EFQΛ%ʹJODMVEF
    " #
    $
    %
    NPEVMF
    NPEVMF
    NPEVMF
    DMBTT

    View full-size slide


  60. "4$ΛFYUFOE
    ;ͭ͏ͷΫϥε
    !@EFQ
    <">
    ᶇ !@EFQΛ%ʹJODMVEF
    ᶈ $Λ%ʹJODMVEF
    " #
    $
    %
    NPEVMF
    NPEVMF
    NPEVMF
    DMBTT

    View full-size slide


  61. "4$ΛFYUFOE
    ;ͭ͏ͷΫϥε
    !@EFQ
    <">
    ᶇ !@EFQΛ%ʹJODMVEF
    ᶈ $Λ%ʹJODMVEF
    ᶉ $ͷ$MBTT.FUIPET
    !@JODMVEFE@CMPDLΛ
    %ʹੜ΍͢
    " #
    $
    %
    NPEVMF
    NPEVMF
    NPEVMF
    DMBTT

    View full-size slide


  62. • "ͷΠϯελϯεϝιου͕ݺ΂Δ
    • "ఆٛͷΫϥεϝιου͕ݺ΂Δ
    • #͕ݺ΂Δ
    " #
    $
    %
    NPEVMF
    NPEVMF
    NPEVMF
    DMBTT

    View full-size slide


  63. • $ఆٛͷΫϥεϝιου͕ݺ΂Δ
    • "ͷΠϯελϯεϝιου͕
    ݺ΂Δ
    • "ఆٛͷΫϥεϝιου͕ݺ΂Δ
    • #ͷΠϯελϯεϝιου͸
    ݺ΂ͳ͍
    " #
    $
    %
    NPEVMF
    NPEVMF
    NPEVMF
    DMBTT

    View full-size slide

  64. ͜Ε͚ͩͷίʔυ͕ͨͬͨߦ
    ͍͢͝Ͱ͢ΑͶʁ

    View full-size slide

  65. ֶΜͰΈΑ͏ͱࢥͬͨਓ
    ʢ·ͨ͸ֶΜͰ͍Δਓ ʣ

    View full-size slide

  66. ϝλϓϩΛֶͿਓ͕૿͑Ε͹
    ࠓ೔ͷൃද͸੒ޭͰ͢

    View full-size slide

  67. ͳͥϝλϓϩ࢖͍Λ૿΍͍͔ͨ͠ʁ

    View full-size slide

  68. ͳͥϝλϓϩ࢖͍Λ૿΍͍͔ͨ͠ʁ
    ❑ 3VCZΛ࢖͏ϓϩάϥϛϯάॳ৺ऀ͕
    ૿͍͑ͯΔ͔Β
    ❑ ϝλϓϩ͕Ͱ͖Δ͜ͱ͕
    3VCZΛ࢖͏ڧྗͳಈػʹͳΔ͔Β

    View full-size slide

  69. 3VCZΛ࢖Θͳ͘ͳΔཧ༝
    ❑ స৬ͨ͠Βผݴޠͩͬͨ
    ❑ ΄͍͠ϥΠϒϥϦ͕ͳ͔ͬͨ
    ❑ Θ͔Βͳ͍͜ͱ͕͋ͬͨͱ͖ɺ
    ฉ͚Δਓ͕͍ͳͯͦ͘ͷ··࠳ં

    View full-size slide


  70. ͲͷݴޠͰ΋Ͱ͖Δ͜ͱ͸
    ݪཧతʹ͸มΘΒͳ͍Ҏ্
    ͲΕΛ࢖͏͔͸޷Έͷ໰୊

    View full-size slide

  71. Ͱ΋ɺॳ৺ऀʹ࢖͍ଓ͚ͯ΋Β͑ͳ͍ͱ
    ❑ ͭΑ͍3VCZΤϯδχΞͱͳΓ͏Δਓ͕
    ผݴޠͷίϛϡχςΟʹ͍ͬͯ͠·͏
    ❏ ϓϩάϥϛϯάεΫʔϧͷོ੝Λ
    νϟϯεʹม͑ΒΕͳ͍

    View full-size slide


  72. ίϛϡχςΟʹͱͬͯ
    ॏେͳଛࣦ

    View full-size slide

  73. ࢖͍ଓ͚ͯ΋Β͏ʹ͸ʁ
    ❑ 3VCZͷίϯηϓτʹڞײͯ͠΋Β͏

    View full-size slide



  74. 3VCZ͸܅Λ৴པ͢Δɻ
    3VCZ͸܅Λ෼ผͷ͋ΔϓϩάϥϚͱ͠
    ͯѻ͏ɻ
    3VCZ͸ϝλϓϩάϥϛϯάͷΑ͏ͳڧ
    ྗͳྗΛ༩͑Δɻ
    ϝλϓϩάϥϛϯά3VCZୈ൛ ংจ ·ͭ΋ͱΏ͖ͻΖ

    View full-size slide


  75. ·ͭ΋ͱ͞Μͷ৴པʹ
    Ԡ͑ΒΕΔΑ͏ʹͳΔ͜ͱ͕
    3VCZΛ࢖͍ଓ͚Δ
    ཧ༝ʹͳΔͷͰ͸

    View full-size slide


  76. ϝλϓϩͷֶशΛ࢝ΊΔͷ͸
    ॳڃऀͷ࠷ޙͷน

    View full-size slide


  77. นͷதʹ൶Λݟग़ͤ͹
    Ͱ͖Δ͜ͱ͕૿͑Δ
    ΋ͬͱͨͷ͍͠

    View full-size slide



  78. ͦΕͰ͸ɺ
    3VCZͰͨͷ͍͠ϓϩάϥϛϯάΛɻ
    ϝλϓϩάϥϛϯά3VCZୈ൛ ংจ ·ͭ΋ͱΏ͖ͻΖ

    View full-size slide

  79. ϝλϓϩάϥϛϯάͷ
    ൶Λ։͍ͯ
    େ͍ͳΔྗΛखʹೖΕΑ͏
    'JO

    View full-size slide