diff --git a/src/tests/High_Level_Syntax_Invariants.thy b/src/tests/High_Level_Syntax_Invariants.thy index f275d0d..4e33986 100644 --- a/src/tests/High_Level_Syntax_Invariants.thy +++ b/src/tests/High_Level_Syntax_Invariants.thy @@ -61,9 +61,19 @@ doc_class inv_test2 = doc_class inv_test3 = inv_test1 + b :: "inv_test1" c:: int - invariant inv_test3 :: "a \ = 1" + invariant inv_test3 :: "a \ = 2" invariant inv_test3' :: "a (b \) = 2" +doc_class inv_test4 = inv_test2 + + d :: "inv_test3" + invariant inv_test4 :: "a (inv_test2.b \) = 2" + invariant inv_test4' :: "a (d \) = 2" + +text*[inv_test1_instance::inv_test1, a=2]\\ +text*[inv_test3_instance::inv_test3, a=2, b="@{inv-test1 \inv_test1_instance\}" ]\\ +text*[inv_test4_instance::inv_test4, b="@{inv-test1 \inv_test1_instance\}" + , c=1, d="@{inv-test3 \inv_test3_instance\}"]\\ + text\To support invariant on attributes in attributes and invariant on attributes of the superclasses, we check that the type of the attribute of the subclass is ground:\