This commit is contained in:
Florian Steurer 2016-04-20 17:10:26 +02:00
parent 8780d5d47a
commit d8feb04938
2 changed files with 7 additions and 1 deletions

View File

@ -361,8 +361,12 @@ public class SourceFile
*/
typinferenzLog.debug("\nUnifiziere Constraints:\n"+constraints, Section.TYPEINFERENCE);
typinferenzLog.debug("\nFC:\n"+finiteClosure, Section.TYPEINFERENCE);
long start = System.currentTimeMillis();
Set<Set<UnifyPair>> unifyResult = new TypeUnify().unify(constraints, finiteClosure);
long time = System.currentTimeMillis()-start;
typinferenzLog.debug("\nErgebnis der Unifizierung:\n"+unifyResult, Section.TYPEINFERENCE);
typinferenzLog.debug("\nZeit für Unifizierung: "+time + "ms", Section.TYPEINFERENCE);
Menge<Menge<Pair>> convertedResult = unifyResult.parallelStream().<Menge<Pair>>map((Set<UnifyPair> resultSet)->{
Menge<Pair> innerConvert = resultSet.stream().map((UnifyPair mp)->UnifyTypeFactory.convert(mp))

View File

@ -49,7 +49,9 @@ public class TypeUnify {
*/
protected IRuleSet rules = new RuleSet();
protected boolean parallel = true;
// Scheint momentan eher zu verlangsamen, vermutlich zu viele threads,
// threadpool und task-queue einbauen und minimale problemgröße für neuen thread
protected boolean parallel = false;
/**
* Computes all principal type unifiers for a set of constraints.