modified: core/JavaTXCompiler.java

modified:   typeinference/constraints/ConstraintSet.java
	modified:   typeinference/unify/TypeUnifyTask.java
This commit is contained in:
pl@gohorb.ba-horb.de 2023-11-03 20:25:17 +01:00
parent 9ad5b76542
commit d1a6dcbbac
3 changed files with 8 additions and 7 deletions

View File

@ -71,7 +71,7 @@ public class JavaTXCompiler {
Boolean resultmodel = false;
public final Map<File, SourceFile> sourceFiles = new HashMap<>();
Boolean log = true; //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 volatile UnifyTaskModel usedTasks = new UnifyTaskModel();
private final DirectoryClassLoader classLoader;

View File

@ -75,11 +75,12 @@ public class ConstraintSet<A> {
Constraint<B> newConst = as.stream()
.map(o)
.collect(Collectors.toCollection((as.getExtendConstraint() != null)
? () -> new Constraint<B> (as.isInherited(),
as.getExtendConstraint().stream().map(o).collect(Collectors.toCollection(Constraint::new)),
as.getmethodSignatureConstraint().stream().map(o).collect(Collectors.toCollection(HashSet::new)))
: () -> new Constraint<B> (as.isInherited())
.collect(Collectors.toCollection((
() -> new Constraint<B> (as.isInherited(),
(as.getExtendConstraint() != null)
? as.getExtendConstraint().stream().map(o).collect(Collectors.toCollection(Constraint::new))
: null,
as.getmethodSignatureConstraint().stream().map(o).collect(Collectors.toCollection(HashSet::new))))
));
//CSA2CSB.put(as, newConst);

View File

@ -668,7 +668,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
.filter(x -> x.size()==1)
.map(y -> y.stream().findFirst().get())
.collect(Collectors.toCollection(HashSet::new)));
oneElems.forEach(x -> { if (x instanceof Constraint) methodSignatureConstraint.addAll(((Constraint<UnifyPair>)x).getmethodSignatureConstraint());});
//optNextSet: Eine mehrelementige Menge, wenn vorhanden
Optional<Set<? extends Set<UnifyPair>>> optNextSet = topLevelSets.stream().filter(x -> x.size()>1).findAny();