forked from JavaTX/JavaCompilerCore
modified: ../../src/de/dhbwstuttgart/core/JavaTXCompiler.java
bei der der Rueckgabe von subst wurde noch Optional beruecksichtigt
This commit is contained in:
parent
8a43839c28
commit
8e220b81d5
@ -195,26 +195,14 @@ public class JavaTXCompiler {
|
||||
results.addAll(result);
|
||||
}
|
||||
|
||||
/*
|
||||
Function<UnifyPair, UnifyPair> f = y -> {
|
||||
if (y.getPairOp() == PairOperator.SMALLERDOTWC) y.setPairOp(PairOperator.EQUALSDOT);
|
||||
return y;
|
||||
};
|
||||
|
||||
Function<Set<UnifyPair>, Set<UnifyPair>> g = x -> new rules().x.stream().map(y -> {
|
||||
if (y.getPairOp() == PairOperator.SMALLERDOTWC) y.setPairOp(PairOperator.EQUALSDOT);
|
||||
return y;
|
||||
results = results.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()) return res.get(); //wenn subst ein Erg liefert wurde was veraendert
|
||||
else return x; //wenn nichts veraendert wurde wird x zurueckgegeben
|
||||
}).collect(Collectors.toCollection(HashSet::new));
|
||||
*/
|
||||
results = results.stream().map(x -> new RuleSet().subst(x.stream().map(y -> {
|
||||
if (y.getPairOp() == PairOperator.SMALLERDOTWC) y.setPairOp(PairOperator.EQUALSDOT);
|
||||
return y;
|
||||
}).collect(Collectors.toCollection(HashSet::new))).get()).collect(Collectors.toCollection(HashSet::new));
|
||||
/*results.stream().map(x -> x.stream().map(y -> {
|
||||
if (y.getPairOp() == PairOperator.SMALLERDOTWC) y.setPairOp(PairOperator.EQUALSDOT);
|
||||
return y;
|
||||
}).collect(Collectors.toCollection(HashSet::new)).collect(Collectors.toCollection(HashSet::new)));
|
||||
*/
|
||||
System.out.println("RESULT Final: " + results);
|
||||
logFile.write("RES_FINAL: " + results.toString()+"\n");
|
||||
logFile.flush();
|
||||
|
Loading…
Reference in New Issue
Block a user