use of org.abs_models.frontend.typechecker.ext.TypeSystemExtension in project abstools by abstools.
the class LocationTypeInferenceExtension method finished.
@Override
public void finished() {
ConstraintSolver solver = new ConstraintSolver(constraints, debug);
results = solver.solve();
if (debug) {
for (Map.Entry<LocationTypeVar, LocationType> e : results.entrySet()) {
System.out.println("" + e.getKey() + " := " + e.getValue());
}
}
if (!errors.containsErrors()) {
SemanticConditionList sel = new SemanticConditionList();
List<TypeSystemExtension> exts = model.getTypeExt().getTypeSystemExtensionList();
model.getTypeExt().clearTypeSystemExtensions();
LocationTypeExtension lte = new LocationTypeExtension(model, results);
lte.setDefaultType(defaultType);
model.getTypeExt().register(lte);
model.typeCheck(sel);
errors.addAll(sel);
model.getTypeExt().clearTypeSystemExtensions();
model.getTypeExt().registerAll(exts);
}
}
Aggregations