forked from JavaTX/JavaCompilerCore
Compare commits
4 Commits
performanc
...
performanc
Author | SHA1 | Date | |
---|---|---|---|
|
f8efe361e9 | ||
|
63f854d4ee | ||
|
532018241c | ||
|
9e7085bcce |
@@ -66,7 +66,7 @@ public class JavaTXCompiler {
|
|||||||
Boolean resultmodel = true;
|
Boolean resultmodel = true;
|
||||||
public final Map<File, SourceFile> sourceFiles = new HashMap<>();
|
public final Map<File, SourceFile> sourceFiles = new HashMap<>();
|
||||||
Boolean log = false; //gibt an ob ein Log-File nach System.getProperty("user.dir")+""/logFiles/"" geschrieben werden soll?
|
Boolean log = false; //gibt an ob ein Log-File nach System.getProperty("user.dir")+""/logFiles/"" geschrieben werden soll?
|
||||||
public UnifyTaskModelParallel usedTasks = new UnifyTaskModelParallel();
|
public volatile UnifyTaskModel usedTasks = new UnifyTaskModel();
|
||||||
private final DirectoryClassLoader classLoader;
|
private final DirectoryClassLoader classLoader;
|
||||||
static Writer statistics;
|
static Writer statistics;
|
||||||
|
|
||||||
@@ -369,7 +369,7 @@ public class JavaTXCompiler {
|
|||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public UnifyResultModel typeInferenceAsync(UnifyResultListener resultListener, Writer logFile)
|
public UnifyResultModelParallel typeInferenceAsync(UnifyResultListener resultListener, Writer logFile)
|
||||||
throws ClassNotFoundException, IOException {
|
throws ClassNotFoundException, IOException {
|
||||||
List<ClassOrInterface> allClasses = new ArrayList<>();// environment.getAllAvailableClasses();
|
List<ClassOrInterface> allClasses = new ArrayList<>();// environment.getAllAvailableClasses();
|
||||||
// Alle Importierten Klassen in allen geparsten Sourcefiles kommen ins FC
|
// Alle Importierten Klassen in allen geparsten Sourcefiles kommen ins FC
|
||||||
@@ -382,7 +382,7 @@ public class JavaTXCompiler {
|
|||||||
|
|
||||||
final ConstraintSet<Pair> cons = getConstraints();
|
final ConstraintSet<Pair> cons = getConstraints();
|
||||||
Set<Set<UnifyPair>> results = new HashSet<>();
|
Set<Set<UnifyPair>> results = new HashSet<>();
|
||||||
UnifyResultModel urm = null;
|
UnifyResultModelParallel urm = null;
|
||||||
// urm.addUnifyResultListener(resultListener);
|
// urm.addUnifyResultListener(resultListener);
|
||||||
try {
|
try {
|
||||||
logFile = logFile == null
|
logFile = logFile == null
|
||||||
@@ -390,7 +390,7 @@ public class JavaTXCompiler {
|
|||||||
: logFile;
|
: logFile;
|
||||||
IFiniteClosure finiteClosure = UnifyTypeFactory.generateFC(allClasses, logFile, classLoader);
|
IFiniteClosure finiteClosure = UnifyTypeFactory.generateFC(allClasses, logFile, classLoader);
|
||||||
System.out.println(finiteClosure);
|
System.out.println(finiteClosure);
|
||||||
urm = new UnifyResultModel(cons, finiteClosure);
|
urm = new UnifyResultModelParallel(cons, finiteClosure);
|
||||||
urm.addUnifyResultListener(resultListener);
|
urm.addUnifyResultListener(resultListener);
|
||||||
ConstraintSet<UnifyPair> unifyCons = UnifyTypeFactory.convert(cons);
|
ConstraintSet<UnifyPair> unifyCons = UnifyTypeFactory.convert(cons);
|
||||||
|
|
||||||
@@ -720,7 +720,7 @@ public class JavaTXCompiler {
|
|||||||
}).collect(Collectors.toCollection(ArrayList::new))*/;
|
}).collect(Collectors.toCollection(ArrayList::new))*/;
|
||||||
if (resultmodel) {
|
if (resultmodel) {
|
||||||
/* UnifyResultModel Anfang */
|
/* UnifyResultModel Anfang */
|
||||||
UnifyResultModel urm = new UnifyResultModel(cons, finiteClosure);
|
UnifyResultModelParallel urm = new UnifyResultModelParallel(cons, finiteClosure);
|
||||||
UnifyResultListenerImpl li = new UnifyResultListenerImpl();
|
UnifyResultListenerImpl li = new UnifyResultListenerImpl();
|
||||||
urm.addUnifyResultListener(li);
|
urm.addUnifyResultListener(li);
|
||||||
unify.unifyParallel(unifyCons.getUndConstraints(), oderConstraints, finiteClosure, logFile, log, urm,
|
unify.unifyParallel(unifyCons.getUndConstraints(), oderConstraints, finiteClosure, logFile, log, urm,
|
||||||
@@ -738,7 +738,7 @@ public class JavaTXCompiler {
|
|||||||
// oderConstraints, finiteClosure, logFile, log, new UnifyResultModel(cons,
|
// oderConstraints, finiteClosure, logFile, log, new UnifyResultModel(cons,
|
||||||
// finiteClosure));
|
// finiteClosure));
|
||||||
Set<Set<UnifyPair>> result = unify.unifyOderConstraints(unifyCons.getUndConstraints(), oderConstraints,
|
Set<Set<UnifyPair>> result = unify.unifyOderConstraints(unifyCons.getUndConstraints(), oderConstraints,
|
||||||
finiteClosure, logFile, log, new UnifyResultModel(cons, finiteClosure), usedTasks);
|
finiteClosure, logFile, log, new UnifyResultModelParallel(cons, finiteClosure), usedTasks);
|
||||||
System.out.println("RESULT: " + result);
|
System.out.println("RESULT: " + result);
|
||||||
logFile.write("RES: " + result.toString() + "\n");
|
logFile.write("RES: " + result.toString() + "\n");
|
||||||
logFile.flush();
|
logFile.flush();
|
||||||
|
@@ -29,10 +29,10 @@ public class TypeUnify {
|
|||||||
* @param cons
|
* @param cons
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Set<Set<UnifyPair>> unify(Set<UnifyPair> undConstrains, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModel ret, UnifyTaskModelParallel usedTasks) {
|
public Set<Set<UnifyPair>> unify(Set<UnifyPair> undConstrains, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModelParallel resultModel, UnifyTaskModel usedTasks) {
|
||||||
TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, ret);
|
TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, resultModel, usedTasks);
|
||||||
ForkJoinPool pool = new ForkJoinPool();
|
ForkJoinPool pool = new ForkJoinPool();
|
||||||
usedTasks.setPool(pool);
|
resultModel.setPool(pool);
|
||||||
pool.invoke(unifyTask);
|
pool.invoke(unifyTask);
|
||||||
Set<Set<UnifyPair>> res = unifyTask.join();
|
Set<Set<UnifyPair>> res = unifyTask.join();
|
||||||
try {
|
try {
|
||||||
@@ -56,12 +56,12 @@ public class TypeUnify {
|
|||||||
* @param ret
|
* @param ret
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public UnifyResultModel unifyAsync(Set<UnifyPair> undConstrains, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModel ret, UnifyTaskModelParallel usedTasks) {
|
public UnifyResultModelParallel unifyAsync(Set<UnifyPair> undConstrains, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModelParallel resultModel, UnifyTaskModel usedTasks) {
|
||||||
TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, ret);
|
TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, resultModel, usedTasks);
|
||||||
ForkJoinPool pool = new ForkJoinPool();
|
ForkJoinPool pool = new ForkJoinPool();
|
||||||
usedTasks.setPool(pool);
|
resultModel.setPool(pool);
|
||||||
pool.invoke(unifyTask);
|
pool.invoke(unifyTask);
|
||||||
return ret;
|
return resultModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,11 +75,11 @@ public class TypeUnify {
|
|||||||
* @param ret
|
* @param ret
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public UnifyResultModel unifyParallel(Set<UnifyPair> undConstrains, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModel ret, UnifyTaskModelParallel usedTasks) {
|
public UnifyResultModelParallel unifyParallel(Set<UnifyPair> undConstrains, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModelParallel resultModel, UnifyTaskModel usedTasks) {
|
||||||
TypeUnifyTask unifyTask = //new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, ret, usedTasks);
|
TypeUnifyTask unifyTask = //new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, ret, usedTasks);
|
||||||
new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, ret, statistics);
|
new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, resultModel, usedTasks, statistics);
|
||||||
ForkJoinPool pool = new ForkJoinPool();
|
ForkJoinPool pool = new ForkJoinPool();
|
||||||
usedTasks.setPool(pool);
|
resultModel.setPool(pool);
|
||||||
pool.invoke(unifyTask);
|
pool.invoke(unifyTask);
|
||||||
Set<Set<UnifyPair>> res = unifyTask.join();
|
Set<Set<UnifyPair>> res = unifyTask.join();
|
||||||
try {
|
try {
|
||||||
@@ -91,7 +91,7 @@ public class TypeUnify {
|
|||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
System.err.println("no log-File");
|
System.err.println("no log-File");
|
||||||
}
|
}
|
||||||
return ret;
|
return resultModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -112,8 +112,8 @@ public class TypeUnify {
|
|||||||
* @param cons
|
* @param cons
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Set<Set<UnifyPair>> unifyOderConstraints(Set<UnifyPair> undConstrains, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModel ret, UnifyTaskModelParallel usedTasks) {
|
public Set<Set<UnifyPair>> unifyOderConstraints(Set<UnifyPair> undConstrains, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModelParallel resultModel, UnifyTaskModel usedTasks) {
|
||||||
TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, false, logFile, log, 0, ret);
|
TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, false, logFile, log, 0, resultModel, usedTasks);
|
||||||
unifyTask.statistics = statistics;
|
unifyTask.statistics = statistics;
|
||||||
Set<Set<UnifyPair>> res = unifyTask.compute();
|
Set<Set<UnifyPair>> res = unifyTask.compute();
|
||||||
try {
|
try {
|
||||||
|
@@ -23,14 +23,14 @@ public class TypeUnify2Task extends TypeUnifyTask {
|
|||||||
TypeUnify2Task(Set<Set<UnifyPair>> setToFlatten, Set<UnifyPair> eq,
|
TypeUnify2Task(Set<Set<UnifyPair>> setToFlatten, Set<UnifyPair> eq,
|
||||||
List<Set<Constraint<UnifyPair>>> oderConstraints,
|
List<Set<Constraint<UnifyPair>>> oderConstraints,
|
||||||
Set<UnifyPair> nextSetElement,
|
Set<UnifyPair> nextSetElement,
|
||||||
IFiniteClosure fc, boolean parallel, Writer logFile, Boolean log, int rekTiefe, UnifyResultModel urm,
|
IFiniteClosure fc, boolean parallel, Writer logFile, Boolean log, int rekTiefe, UnifyResultModelParallel resultModel, UnifyTaskModel usedTasks,
|
||||||
Set<UnifyPair> methodSignatureConstraintUebergabe, Writer statistics) {
|
Set<UnifyPair> methodSignatureConstraintUebergabe, Writer statistics) {
|
||||||
this(setToFlatten, eq, oderConstraints, nextSetElement, fc, parallel, logFile, log, rekTiefe, urm, methodSignatureConstraintUebergabe );
|
this(setToFlatten, eq, oderConstraints, nextSetElement, fc, parallel, logFile, log, rekTiefe, resultModel, usedTasks, methodSignatureConstraintUebergabe );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TypeUnify2Task(Set<Set<UnifyPair>> setToFlatten, Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, Set<UnifyPair> nextSetElement, IFiniteClosure fc, boolean parallel, Writer logFile, Boolean log, int rekTiefe, UnifyResultModel urm, Set<UnifyPair> methodSignatureConstraintUebergabe) {
|
public TypeUnify2Task(Set<Set<UnifyPair>> setToFlatten, Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, Set<UnifyPair> nextSetElement, IFiniteClosure fc, boolean parallel, Writer logFile, Boolean log, int rekTiefe, UnifyResultModelParallel resultModel, UnifyTaskModel usedTasks, Set<UnifyPair> methodSignatureConstraintUebergabe) {
|
||||||
super(eq, oderConstraints, fc, parallel, logFile, log, rekTiefe, urm);
|
super(eq, oderConstraints, fc, parallel, logFile, log, rekTiefe, resultModel, usedTasks);
|
||||||
this.setToFlatten = setToFlatten;
|
this.setToFlatten = setToFlatten;
|
||||||
this.nextSetElement = nextSetElement;
|
this.nextSetElement = nextSetElement;
|
||||||
this.methodSignatureConstraintUebergabe = methodSignatureConstraintUebergabe;
|
this.methodSignatureConstraintUebergabe = methodSignatureConstraintUebergabe;
|
||||||
@@ -53,8 +53,15 @@ public class TypeUnify2Task extends TypeUnifyTask {
|
|||||||
*/
|
*/
|
||||||
//writeLog("xxx");
|
//writeLog("xxx");
|
||||||
//noOfThread--;
|
//noOfThread--;
|
||||||
|
synchronized (usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
|
else {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void closeLogFile() {
|
public void closeLogFile() {
|
||||||
|
|
||||||
|
@@ -17,17 +17,12 @@ import java.util.concurrent.RecursiveTask;
|
|||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.function.BinaryOperator;
|
import java.util.function.BinaryOperator;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
import org.apache.commons.io.output.NullOutputStream;
|
import org.apache.commons.io.output.NullOutputStream;
|
||||||
|
|
||||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
|
||||||
import de.dhbwstuttgart.exceptions.TypeinferenceException;
|
import de.dhbwstuttgart.exceptions.TypeinferenceException;
|
||||||
import de.dhbwstuttgart.parser.NullToken;
|
import de.dhbwstuttgart.parser.NullToken;
|
||||||
import de.dhbwstuttgart.syntaxtree.factory.UnifyTypeFactory;
|
|
||||||
import de.dhbwstuttgart.typeinference.constraints.Constraint;
|
import de.dhbwstuttgart.typeinference.constraints.Constraint;
|
||||||
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
|
||||||
import de.dhbwstuttgart.typeinference.result.ResultSet;
|
|
||||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IMatch;
|
import de.dhbwstuttgart.typeinference.unify.interfaces.IMatch;
|
||||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IRuleSet;
|
import de.dhbwstuttgart.typeinference.unify.interfaces.IRuleSet;
|
||||||
@@ -47,7 +42,6 @@ import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
|
|||||||
import de.dhbwstuttgart.typeinference.unify.model.WildcardType;
|
import de.dhbwstuttgart.typeinference.unify.model.WildcardType;
|
||||||
import de.dhbwstuttgart.util.Pair;
|
import de.dhbwstuttgart.util.Pair;
|
||||||
import de.dhbwstuttgart.typeinference.unify.model.OrderingUnifyPair;
|
import de.dhbwstuttgart.typeinference.unify.model.OrderingUnifyPair;
|
||||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
@@ -55,7 +49,6 @@ import java.io.IOException;
|
|||||||
import java.io.OutputStreamWriter;
|
import java.io.OutputStreamWriter;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
|
|
||||||
import com.google.common.collect.Ordering;
|
|
||||||
import org.apache.commons.io.output.NullWriter;
|
import org.apache.commons.io.output.NullWriter;
|
||||||
|
|
||||||
|
|
||||||
@@ -78,7 +71,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
/**
|
/**
|
||||||
* Fuer die Threads
|
* Fuer die Threads
|
||||||
*/
|
*/
|
||||||
UnifyResultModel urm;
|
protected UnifyResultModelParallel resultModel;
|
||||||
protected static int noOfThread = 0;
|
protected static int noOfThread = 0;
|
||||||
private static int totalnoOfThread = 0;
|
private static int totalnoOfThread = 0;
|
||||||
int thNo;
|
int thNo;
|
||||||
@@ -132,6 +125,10 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
|
|
||||||
static Integer noShortendElements = 0;
|
static Integer noShortendElements = 0;
|
||||||
|
|
||||||
|
Boolean myIsCanceled = false;
|
||||||
|
|
||||||
|
volatile UnifyTaskModel usedTasks;
|
||||||
|
|
||||||
static Writer statistics;
|
static Writer statistics;
|
||||||
|
|
||||||
public TypeUnifyTask() {
|
public TypeUnifyTask() {
|
||||||
@@ -153,11 +150,11 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//statistics
|
//statistics
|
||||||
public TypeUnifyTask(Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, boolean parallel, Writer logFile, Boolean log, int rekTiefe, UnifyResultModel urm, Writer statistics) {
|
public TypeUnifyTask(Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, boolean parallel, Writer logFile, Boolean log, int rekTiefe, UnifyResultModelParallel resultModel, UnifyTaskModel usedTasks, Writer statistics) {
|
||||||
this(eq,oderConstraints, fc, parallel, logFile, log, rekTiefe, urm);
|
this(eq,oderConstraints, fc, parallel, logFile, log, rekTiefe, resultModel, usedTasks);
|
||||||
this.statistics = statistics;
|
this.statistics = statistics;
|
||||||
}
|
}
|
||||||
public TypeUnifyTask(Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, boolean parallel, Writer logFile, Boolean log, int rekTiefe, UnifyResultModel urm) {
|
public TypeUnifyTask(Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, boolean parallel, Writer logFile, Boolean log, int rekTiefe, UnifyResultModelParallel resultModel, UnifyTaskModel usedTasks) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if(statistics==null){
|
if(statistics==null){
|
||||||
statistics = new NullWriter();
|
statistics = new NullWriter();
|
||||||
@@ -210,7 +207,9 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
*/
|
*/
|
||||||
rules = new RuleSet(logFile);
|
rules = new RuleSet(logFile);
|
||||||
this.rekTiefeField = rekTiefe;
|
this.rekTiefeField = rekTiefe;
|
||||||
this.urm = urm;
|
this.resultModel = resultModel;
|
||||||
|
this.usedTasks = usedTasks;
|
||||||
|
this.usedTasks.add(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,6 +245,13 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
void myCancel(Boolean b) {
|
||||||
|
myIsCanceled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean myIsCancelled() {
|
||||||
|
return myIsCanceled;
|
||||||
|
}
|
||||||
|
|
||||||
protected Set<Set<UnifyPair>> compute() {
|
protected Set<Set<UnifyPair>> compute() {
|
||||||
if (one) {
|
if (one) {
|
||||||
@@ -274,10 +280,17 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
.collect(Collectors.toCollection(ArrayList::new));
|
.collect(Collectors.toCollection(ArrayList::new));
|
||||||
throw new TypeinferenceException("Unresolved constraints: " + res.toString(), new NullToken()); //return new HashSet<>();
|
throw new TypeinferenceException("Unresolved constraints: " + res.toString(), new NullToken()); //return new HashSet<>();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
synchronized (usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
@Override
|
@Override
|
||||||
protected Set<Set<UnifyPair>> compute() {
|
protected Set<Set<UnifyPair>> compute() {
|
||||||
@@ -308,6 +321,12 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
|
|
||||||
//.collect(Collectors.toCollection(HashSet::new)));
|
//.collect(Collectors.toCollection(HashSet::new)));
|
||||||
|
|
||||||
|
synchronized (usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rekTiefe++;
|
rekTiefe++;
|
||||||
nOfUnify++;
|
nOfUnify++;
|
||||||
writeLog(nOfUnify.toString() + " Unifikation: " + eq.toString());
|
writeLog(nOfUnify.toString() + " Unifikation: " + eq.toString());
|
||||||
@@ -489,6 +508,12 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
// .collect(Collectors.toCollection(HashSet::new));
|
// .collect(Collectors.toCollection(HashSet::new));
|
||||||
//Muss auskommentiert werden, wenn computeCartesianRecursive ENDE
|
//Muss auskommentiert werden, wenn computeCartesianRecursive ENDE
|
||||||
|
|
||||||
|
synchronized (usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Set<Set<UnifyPair>> eqPrimePrimeSet = new HashSet<>();
|
Set<Set<UnifyPair>> eqPrimePrimeSet = new HashSet<>();
|
||||||
|
|
||||||
Set<TypeUnifyTask> forks = new HashSet<>();
|
Set<TypeUnifyTask> forks = new HashSet<>();
|
||||||
@@ -573,7 +598,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
urm.notify(eqPrimePrimeSet);
|
resultModel.notify(eqPrimePrimeSet);
|
||||||
writeStatistics("Result: " + eqPrimePrimeSet.toString());
|
writeStatistics("Result: " + eqPrimePrimeSet.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -905,9 +930,14 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
newElemsOrig.add(a);
|
newElemsOrig.add(a);
|
||||||
|
|
||||||
/* FORK ANFANG */
|
/* FORK ANFANG */
|
||||||
TypeUnify2Task forkOrig = new TypeUnify2Task(newElemsOrig, newEqOrig, newOderConstraintsOrig, a, fc, parallel, logFile, log, rekTiefe, urm, methodSignatureConstraint);
|
TypeUnify2Task forkOrig = new TypeUnify2Task(newElemsOrig, newEqOrig, newOderConstraintsOrig, a, fc, parallel, logFile, log, rekTiefe, resultModel, usedTasks, methodSignatureConstraint);
|
||||||
//forks.add(forkOrig);
|
//forks.add(forkOrig);
|
||||||
|
synchronized(usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
forkOrig.fork();
|
forkOrig.fork();
|
||||||
|
}
|
||||||
/* FORK ENDE */
|
/* FORK ENDE */
|
||||||
|
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
@@ -938,10 +968,15 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
Set<Set<UnifyPair>> newElems = new HashSet<>(elems);
|
Set<Set<UnifyPair>> newElems = new HashSet<>(elems);
|
||||||
List<Set<Constraint<UnifyPair>>> newOderConstraints = new ArrayList<>(oderConstraints);
|
List<Set<Constraint<UnifyPair>>> newOderConstraints = new ArrayList<>(oderConstraints);
|
||||||
newElems.add(nSaL);
|
newElems.add(nSaL);
|
||||||
TypeUnify2Task fork = new TypeUnify2Task(newElems, newEq, newOderConstraints, nSaL, fc, parallel, logFile, log, rekTiefe, urm, new HashSet<>(methodSignatureConstraint));
|
TypeUnify2Task fork = new TypeUnify2Task(newElems, newEq, newOderConstraints, nSaL, fc, parallel, logFile, log, rekTiefe, resultModel, usedTasks, new HashSet<>(methodSignatureConstraint));
|
||||||
forks.add(fork);
|
forks.add(fork);
|
||||||
|
synchronized(usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
fork.fork();
|
fork.fork();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//res = unify2(newElemsOrig, newEqOrig, newOderConstraintsOrig, fc, parallel, rekTiefe);
|
//res = unify2(newElemsOrig, newEqOrig, newOderConstraintsOrig, fc, parallel, rekTiefe);
|
||||||
|
|
||||||
/* FORK ANFANG */
|
/* FORK ANFANG */
|
||||||
@@ -949,6 +984,11 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
writeLog("wait "+ forkOrig.thNo);
|
writeLog("wait "+ forkOrig.thNo);
|
||||||
noOfThread--;
|
noOfThread--;
|
||||||
res = forkOrig.join();
|
res = forkOrig.join();
|
||||||
|
synchronized (usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
//noOfThread++;
|
//noOfThread++;
|
||||||
forkOrig.writeLog("final Orig 1");
|
forkOrig.writeLog("final Orig 1");
|
||||||
forkOrig.closeLogFile();
|
forkOrig.closeLogFile();
|
||||||
@@ -964,6 +1004,11 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
noOfThread--;
|
noOfThread--;
|
||||||
Set<Set<UnifyPair>> fork_res = fork.join();
|
Set<Set<UnifyPair>> fork_res = fork.join();
|
||||||
|
synchronized (usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
//noOfThread++;
|
//noOfThread++;
|
||||||
writeLog("Join " + new Integer(fork.thNo).toString());
|
writeLog("Join " + new Integer(fork.thNo).toString());
|
||||||
//noOfThread--; an das Ende von compute verschoben
|
//noOfThread--; an das Ende von compute verschoben
|
||||||
@@ -987,9 +1032,14 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
newElemsOrig.add(a);
|
newElemsOrig.add(a);
|
||||||
|
|
||||||
/* FORK ANFANG */
|
/* FORK ANFANG */
|
||||||
TypeUnify2Task forkOrig = new TypeUnify2Task(newElemsOrig, newEqOrig, newOderConstraintsOrig, a, fc, parallel, logFile, log, rekTiefe, urm, new HashSet<>(methodSignatureConstraint));
|
TypeUnify2Task forkOrig = new TypeUnify2Task(newElemsOrig, newEqOrig, newOderConstraintsOrig, a, fc, parallel, logFile, log, rekTiefe, resultModel, usedTasks, new HashSet<>(methodSignatureConstraint));
|
||||||
//forks.add(forkOrig);
|
//forks.add(forkOrig);
|
||||||
|
synchronized(usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
forkOrig.fork();
|
forkOrig.fork();
|
||||||
|
}
|
||||||
/* FORK ENDE */
|
/* FORK ENDE */
|
||||||
|
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
@@ -1019,10 +1069,15 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
Set<Set<UnifyPair>> newElems = new HashSet<>(elems);
|
Set<Set<UnifyPair>> newElems = new HashSet<>(elems);
|
||||||
List<Set<Constraint<UnifyPair>>> newOderConstraints = new ArrayList<>(oderConstraints);
|
List<Set<Constraint<UnifyPair>>> newOderConstraints = new ArrayList<>(oderConstraints);
|
||||||
newElems.add(nSaL);
|
newElems.add(nSaL);
|
||||||
TypeUnify2Task fork = new TypeUnify2Task(newElems, newEq, newOderConstraints, nSaL, fc, parallel, logFile, log, rekTiefe, urm, new HashSet<>(methodSignatureConstraint));
|
TypeUnify2Task fork = new TypeUnify2Task(newElems, newEq, newOderConstraints, nSaL, fc, parallel, logFile, log, rekTiefe, resultModel, usedTasks, new HashSet<>(methodSignatureConstraint));
|
||||||
forks.add(fork);
|
forks.add(fork);
|
||||||
|
synchronized(usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
fork.fork();
|
fork.fork();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//res = unify2(newElemsOrig, newEqOrig, newOderConstraintsOrig, fc, parallel, rekTiefe);
|
//res = unify2(newElemsOrig, newEqOrig, newOderConstraintsOrig, fc, parallel, rekTiefe);
|
||||||
|
|
||||||
/* FORK ANFANG */
|
/* FORK ANFANG */
|
||||||
@@ -1030,6 +1085,11 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
writeLog("wait "+ forkOrig.thNo);
|
writeLog("wait "+ forkOrig.thNo);
|
||||||
noOfThread--;
|
noOfThread--;
|
||||||
res = forkOrig.join();
|
res = forkOrig.join();
|
||||||
|
synchronized (usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
//noOfThread++;
|
//noOfThread++;
|
||||||
forkOrig.writeLog("final Orig -1");
|
forkOrig.writeLog("final Orig -1");
|
||||||
forkOrig.closeLogFile();
|
forkOrig.closeLogFile();
|
||||||
@@ -1045,6 +1105,11 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
noOfThread--;
|
noOfThread--;
|
||||||
Set<Set<UnifyPair>> fork_res = fork.join();
|
Set<Set<UnifyPair>> fork_res = fork.join();
|
||||||
|
synchronized (usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
//noOfThread++;
|
//noOfThread++;
|
||||||
writeLog("Join " + new Integer(fork.thNo).toString());
|
writeLog("Join " + new Integer(fork.thNo).toString());
|
||||||
//noOfThread--; an das Ende von compute verschoben
|
//noOfThread--; an das Ende von compute verschoben
|
||||||
@@ -1069,10 +1134,14 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
newElemsOrig.add(a);
|
newElemsOrig.add(a);
|
||||||
|
|
||||||
/* FORK ANFANG */
|
/* FORK ANFANG */
|
||||||
TypeUnify2Task forkOrig = new TypeUnify2Task(newElemsOrig, newEqOrig, newOderConstraintsOrig, a, fc, parallel, logFile, log, rekTiefe, urm, new HashSet<>(methodSignatureConstraint));
|
TypeUnify2Task forkOrig = new TypeUnify2Task(newElemsOrig, newEqOrig, newOderConstraintsOrig, a, fc, parallel, logFile, log, rekTiefe, resultModel, usedTasks, new HashSet<>(methodSignatureConstraint));
|
||||||
//forks.add(forkOrig);
|
//forks.add(forkOrig);
|
||||||
|
synchronized(usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
forkOrig.fork();
|
forkOrig.fork();
|
||||||
|
}
|
||||||
/* FORK ENDE */
|
/* FORK ENDE */
|
||||||
|
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
@@ -1086,10 +1155,14 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
Set<Set<UnifyPair>> newElems = new HashSet<>(elems);
|
Set<Set<UnifyPair>> newElems = new HashSet<>(elems);
|
||||||
List<Set<Constraint<UnifyPair>>> newOderConstraints = new ArrayList<>(oderConstraints);
|
List<Set<Constraint<UnifyPair>>> newOderConstraints = new ArrayList<>(oderConstraints);
|
||||||
newElems.add(nSaL);
|
newElems.add(nSaL);
|
||||||
TypeUnify2Task fork = new TypeUnify2Task(newElems, newEq, newOderConstraints, nSaL, fc, parallel, logFile, log, rekTiefe, urm, methodSignatureConstraint);
|
TypeUnify2Task fork = new TypeUnify2Task(newElems, newEq, newOderConstraints, nSaL, fc, parallel, logFile, log, rekTiefe, resultModel, usedTasks, methodSignatureConstraint);
|
||||||
forks.add(fork);
|
forks.add(fork);
|
||||||
|
synchronized(usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
fork.fork();
|
fork.fork();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//res = unify2(newElemsOrig, newEqOrig, newOderConstraintsOrig, fc, parallel, rekTiefe);
|
//res = unify2(newElemsOrig, newEqOrig, newOderConstraintsOrig, fc, parallel, rekTiefe);
|
||||||
|
|
||||||
@@ -1098,6 +1171,11 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
writeLog("wait "+ forkOrig.thNo);
|
writeLog("wait "+ forkOrig.thNo);
|
||||||
noOfThread--;
|
noOfThread--;
|
||||||
res = forkOrig.join();
|
res = forkOrig.join();
|
||||||
|
synchronized (usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
//noOfThread++;
|
//noOfThread++;
|
||||||
forkOrig.writeLog("final Orig 2");
|
forkOrig.writeLog("final Orig 2");
|
||||||
forkOrig.closeLogFile();
|
forkOrig.closeLogFile();
|
||||||
@@ -1112,6 +1190,11 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
noOfThread--;
|
noOfThread--;
|
||||||
Set<Set<UnifyPair>> fork_res = fork.join();
|
Set<Set<UnifyPair>> fork_res = fork.join();
|
||||||
|
synchronized (usedTasks) {
|
||||||
|
if (this.myIsCancelled()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
//noOfThread++;
|
//noOfThread++;
|
||||||
writeLog("Join " + new Integer(fork.thNo).toString());
|
writeLog("Join " + new Integer(fork.thNo).toString());
|
||||||
//noOfThread--; an das Ende von compute verschoben
|
//noOfThread--; an das Ende von compute verschoben
|
||||||
|
@@ -0,0 +1,58 @@
|
|||||||
|
package de.dhbwstuttgart.typeinference.unify;
|
||||||
|
|
||||||
|
import de.dhbwstuttgart.syntaxtree.factory.UnifyTypeFactory;
|
||||||
|
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
||||||
|
import de.dhbwstuttgart.typeinference.constraints.Pair;
|
||||||
|
import de.dhbwstuttgart.typeinference.result.ResultSet;
|
||||||
|
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||||
|
import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
|
||||||
|
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.concurrent.ForkJoinPool;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public class UnifyResultModelParallel {
|
||||||
|
private ForkJoinPool pool;
|
||||||
|
private ConstraintSet<Pair> cons;
|
||||||
|
private IFiniteClosure fc;
|
||||||
|
private List<UnifyResultListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
|
public UnifyResultModelParallel(ConstraintSet<Pair> cons, IFiniteClosure fc){
|
||||||
|
this.cons = cons;
|
||||||
|
this.fc = fc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPool(ForkJoinPool pool){
|
||||||
|
this.pool = pool;
|
||||||
|
}
|
||||||
|
public void addUnifyResultListener(UnifyResultListener listenerToAdd) {
|
||||||
|
listeners.add(listenerToAdd);
|
||||||
|
}
|
||||||
|
public void removeUnifyResultListener(UnifyResultListener listenerToRemove) {
|
||||||
|
listeners.remove(listenerToRemove);
|
||||||
|
}
|
||||||
|
public void notify(Set<Set<UnifyPair>> eqPrimePrimeSet){
|
||||||
|
pool.execute(()->{
|
||||||
|
Object HashSet;
|
||||||
|
Set<Set<UnifyPair>> eqPrimePrimeSetRet = eqPrimePrimeSet.stream().map(x -> {
|
||||||
|
Optional<Set<UnifyPair>> res = new RuleSet().subst(x.stream().map(y -> {
|
||||||
|
if (y.getPairOp() == PairOperator.SMALLERDOTWC) y.setPairOp(PairOperator.EQUALSDOT);
|
||||||
|
return y; //alle Paare a <.? b erden durch a =. b ersetzt
|
||||||
|
}).collect(Collectors.toCollection(HashSet::new)));
|
||||||
|
if (res.isPresent()) {//wenn subst ein Erg liefert wurde was veraendert
|
||||||
|
return new TypeUnifyTask().applyTypeUnificationRules(res.get(), fc);
|
||||||
|
}
|
||||||
|
else return x; //wenn nichts veraendert wurde wird x zurueckgegeben
|
||||||
|
}).collect(Collectors.toCollection(HashSet::new));
|
||||||
|
List<ResultSet> newResult = eqPrimePrimeSetRet.stream().map(unifyPairs ->
|
||||||
|
new ResultSet(UnifyTypeFactory.convert(unifyPairs, de.dhbwstuttgart.typeinference.constraints.Pair.generateTPHMap(cons))))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
UnifyResultEvent evt = new UnifyResultEvent(newResult);
|
||||||
|
|
||||||
|
for (UnifyResultListener listener : listeners) {
|
||||||
|
listener.onNewTypeResultFound(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@@ -11,8 +11,8 @@ public class UnifyTaskModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void cancel() {
|
public synchronized void cancel() {
|
||||||
/*for(TypeUnifyTask t : usedTasks) {
|
for(TypeUnifyTask t : usedTasks) {
|
||||||
t.myCancel(true);
|
t.myCancel(true);
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,17 +0,0 @@
|
|||||||
package de.dhbwstuttgart.typeinference.unify;
|
|
||||||
|
|
||||||
import java.util.concurrent.ForkJoinPool;
|
|
||||||
|
|
||||||
public class UnifyTaskModelParallel {
|
|
||||||
private ForkJoinPool pool;
|
|
||||||
|
|
||||||
public void setPool(ForkJoinPool pool){
|
|
||||||
this.pool = pool;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void cancel(){
|
|
||||||
if(this.pool != null){
|
|
||||||
this.pool.shutdown();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -13,7 +13,8 @@ import de.dhbwstuttgart.typeinference.constraints.Pair;
|
|||||||
import de.dhbwstuttgart.typeinference.result.ResultSet;
|
import de.dhbwstuttgart.typeinference.result.ResultSet;
|
||||||
import de.dhbwstuttgart.typeinference.unify.TypeUnify;
|
import de.dhbwstuttgart.typeinference.unify.TypeUnify;
|
||||||
import de.dhbwstuttgart.typeinference.unify.UnifyResultModel;
|
import de.dhbwstuttgart.typeinference.unify.UnifyResultModel;
|
||||||
import de.dhbwstuttgart.typeinference.unify.UnifyTaskModelParallel;
|
import de.dhbwstuttgart.typeinference.unify.UnifyResultModelParallel;
|
||||||
|
import de.dhbwstuttgart.typeinference.unify.UnifyTaskModel;
|
||||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||||
import de.dhbwstuttgart.typeinference.unify.model.*;
|
import de.dhbwstuttgart.typeinference.unify.model.*;
|
||||||
import org.apache.commons.io.output.NullWriter;
|
import org.apache.commons.io.output.NullWriter;
|
||||||
@@ -91,8 +92,8 @@ public class UnifyTest {
|
|||||||
|
|
||||||
TypeUnify unifyAlgo = new TypeUnify();
|
TypeUnify unifyAlgo = new TypeUnify();
|
||||||
ConstraintSet<Pair> cons = new ConstraintSet<>();
|
ConstraintSet<Pair> cons = new ConstraintSet<>();
|
||||||
UnifyResultModel urm = new UnifyResultModel(cons, finiteClosure);
|
UnifyResultModelParallel urm = new UnifyResultModelParallel(cons, finiteClosure);
|
||||||
UnifyTaskModelParallel tasks = new UnifyTaskModelParallel();
|
UnifyTaskModel tasks = new UnifyTaskModel();
|
||||||
Set<Set<UnifyPair>> solution = unifyAlgo.unify(undConstraints, oderConstraints, finiteClosure, new NullWriter(), false, urm, tasks);
|
Set<Set<UnifyPair>> solution = unifyAlgo.unify(undConstraints, oderConstraints, finiteClosure, new NullWriter(), false, urm, tasks);
|
||||||
System.out.println(solution.size());
|
System.out.println(solution.size());
|
||||||
System.out.println(solution);
|
System.out.println(solution);
|
||||||
|
Reference in New Issue
Block a user