Documentation

VerifiedMBSE.Core.Specialization

Specialization, Feature Typing, Redefinition, and Interpretation #

Specialization(preorder)、FeatureTyping(置換補題)、 Redefinition(型のリファイン)、Interpretation(モデル理論的意味論)、 および健全性定理を定義する。

Specialization: A が B を特殊化する ⟺ A の任意のインスタンスは B のインスタンスでもある。

注: 現時点の Specialization(specific, general) のみを保持する syntactic な 構造体であり、chain の証拠は specializes 側の命題でのみ保持する。将来 witness を 構造体に埋め込む拡張を行う場合は、本注記を更新すること(F3 参照)。

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Specialization は反射的。

      Equations
      Instances For

        specialization の命題的定式化。

        Equations
        Instances For

          specializes は反射的。

          theorem VerifiedMBSE.Core.specializes_trans {a b c : KerMLType} (_hab : specializes a b) (_hbc : specializes b c) :

          specializes は推移的。

          Specialization は現時点では witness を持たない pair 構造体であるため、a ≤ c の 証拠は ⟨⟨a, c⟩, rfl, rfl⟩ として直接構成できる。仮説 hab, hbc は API 上は 受け取っているが、本体では使用しない(将来 Specialization に chain の witness を 追加する拡張に備えた API フック)。旧 Specialization.trans は仮説を受け取りながら 使わないデータ関数だったため削除した(F3)。

          @[implicit_reducible]

          Preorder インスタンス。

          Equations
          • One or more equations did not get rendered due to their size.

          FeatureTyping: feature に型を割り当てる関係。 型付け判断 f : A に対応する。

          • feature : Feature

            型付け対象の feature

          • featureType : KerMLType

            割り当てられる型

          Instances For
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              TypedFeature: Feature と FeatureTyping の整合性を保証する束。

              Instances For

                置換補題による型の拡張(subsumption)。 A ≤ B, f : A ⊢ f : B

                Equations
                Instances For

                  widen は feature そのものを変えない。

                  widen 後の型は指定した b に一致する。

                  theorem VerifiedMBSE.Core.FeatureTyping.widen_trans (ft : FeatureTyping) (b c : KerMLType) (hab : ft.featureType b) (hbc : b c) :
                  (ft.widen c ).feature = ((ft.widen b hab).widen c hbc).feature

                  widen は推移的に合成できる(coherence)。

                  Redefinition: サブタイプ文脈で feature を再定義する関係。 redefining.featureType ≤ redefined.featureType という refinement 条件を要求する。

                  Instances For

                    Redefinition から widen 経由で FeatureTyping を復元する。

                    Equations
                    Instances For

                      widen 後の型は redefined の型に一致する。

                      feature 本体は widen 後も redefining のまま。

                      Redefinition の推移律。

                      Equations
                      Instances For

                        意味論的解釈: 各 KerMLType に担体型を割り当てる関数。 denotational semantics: ⟦ T ⟧_I := I T

                        Equations
                        Instances For

                          解釈下での extent。

                          Equations
                          Instances For

                            意味論的 specialization: I の下で A ≤_sem B ⟺ I A → I B の単射が存在する。

                            Equations
                            Instances For

                              意味論的 specialization は反射的。

                              意味論的 specialization は推移的。

                              意味論的 specialization は preorder を成す。

                              単一点解釈(自明モデル)。

                              Equations
                              Instances For

                                文字列解釈(デバッグ用)。

                                Equations
                                Instances For

                                  自明モデル下では specialization は常に成立する。

                                  解釈がモデル条件を満たす(すべての Specialization を尊重する)。

                                  Equations
                                  Instances For

                                    健全性定理: 統語的 specialization ⇒ 意味論的 specialization。

                                    自明解釈はモデル条件を満たす。

                                    系: 自明モデルでは統語的 specialization は常に意味論的にも成立する。