@@ -938,6 +938,7 @@ class KOREDefinition {
938
938
SubsortMap subsorts;
939
939
SubsortMap supersorts;
940
940
SymbolMap overloads;
941
+ SubsortMap sortContains;
941
942
942
943
std::vector<sptr<KOREModule>> modules;
943
944
std::unordered_map<std::string, sptr<KORECompositePattern>> attributes;
@@ -961,6 +962,7 @@ class KOREDefinition {
961
962
962
963
void buildSubsortRelation ();
963
964
void buildOverloadRelation ();
965
+ void buildSortContainsRelation ();
964
966
965
967
public:
966
968
/*
@@ -1029,6 +1031,23 @@ class KOREDefinition {
1029
1031
*/
1030
1032
SymbolMap getOverloads () const { return overloads; }
1031
1033
1034
+ /*
1035
+ * Return a relation specifying the set of sorts that may syntactically occur
1036
+ * as children of another sort. For example, given symbols:
1037
+ *
1038
+ * c(S_1, ..., S_N) : S_R
1039
+ * c(T_1, ..., T_N) : S_R
1040
+ *
1041
+ * The relation will contain an entry:
1042
+ *
1043
+ * S_R |-> { S_1, S'_1, ..., S_N, T_1, ..., T_N }
1044
+ *
1045
+ * where S'_1 is a _subsort_ of S_1 (that is, given that the first argument of
1046
+ * `c` is of sort S_1, a term whose sort is a subsort of S_1 may also occur in
1047
+ * the first argument position).
1048
+ */
1049
+ SubsortMap getSortContains () const { return sortContains; }
1050
+
1032
1051
std::vector<sptr<KOREModule>> const &getModules () const { return modules; }
1033
1052
KORECompositeSortDeclarationMapType const &getSortDeclarations () const {
1034
1053
return sortDeclarations;
0 commit comments