Search in sources :

Example 1 with TypeSystemExtension

use of abs.frontend.typechecker.ext.TypeSystemExtension in project abstools by abstools.

the class LocationTypeInferrerExtension method finished.

@Override
public void finished() {
    if (enablesStats) {
        for (int i = 0; i < 4; i++) {
            SatGenerator satGen = new SatGenerator(constraints);
            // satGen.enableStats = enablesStats;
            results = satGen.generate(errors);
        }
    }
    SatGenerator satGen = new SatGenerator(constraints);
    satGen.enableStats = enablesStats;
    results = satGen.generate(errors);
    if (!errors.containsErrors()) {
        SemanticConditionList sel = new SemanticConditionList();
        List<TypeSystemExtension> curr = model.getTypeExt().getTypeSystemExtensionList();
        model.getTypeExt().clearTypeSystemExtensions();
        model.getTypeExt().register(new LocationTypeExtension(model, this));
        model.typeCheck(sel);
        errors.addAll(sel);
        model.getTypeExt().clearTypeSystemExtensions();
        model.getTypeExt().registerAll(curr);
    }
}
Also used : SemanticConditionList(abs.frontend.analyser.SemanticConditionList) LocationTypeExtension(abs.frontend.typechecker.locationtypes.LocationTypeExtension) DefaultTypeSystemExtension(abs.frontend.typechecker.ext.DefaultTypeSystemExtension) TypeSystemExtension(abs.frontend.typechecker.ext.TypeSystemExtension)

Aggregations

SemanticConditionList (abs.frontend.analyser.SemanticConditionList)1 DefaultTypeSystemExtension (abs.frontend.typechecker.ext.DefaultTypeSystemExtension)1 TypeSystemExtension (abs.frontend.typechecker.ext.TypeSystemExtension)1 LocationTypeExtension (abs.frontend.typechecker.locationtypes.LocationTypeExtension)1