+ # Get the set of all properties inherited by self
+ fun inherited_mproperties: Set[MProperty] do
+ var res = new HashSet[MProperty]
+ for s in ancestors do
+ for m in s.intro_mproperties do
+ if not self.intro_mproperties.has(m) and not self.redef_mproperties.has(m) then res.add(m)
+ end
+ end
+ return res
+ end
+
+ # Get the list of all virtual types available in 'self'.
+ fun virtual_types: Set[MVirtualTypeProp] do
+ var res = new HashSet[MVirtualTypeProp]
+ for mclassdef in mclassdefs do
+ for mpropdef in mclassdef.mpropdefs do
+ if mpropdef isa MVirtualTypeDef then
+ res.add(mpropdef.mproperty)
+ end
+ end
+ end
+ for ancestor in ancestors do
+ for mclassdef in ancestor.mclassdefs do
+ for mpropdef in mclassdef.mpropdefs do
+ if mpropdef isa MVirtualTypeDef then
+ res.add(mpropdef.mproperty)
+ end
+ end
+ end
+ end
+ return res
+ end
+
+ # Get the list of all parameter types in 'self'.
+ fun parameter_types: Map[String, MType] do
+ var res = new HashMap[String, MType]
+ for i in [0..intro.parameter_names.length[ do
+ res[intro.parameter_names[i]] = intro.bound_mtype.arguments[i]
+ end
+ return res
+ end
+