forked from JavaTX/JavaCompilerCore
modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified: ../javFiles/Lambda.jav modified: ../typeinference/UnifyTest.java
This commit is contained in:
parent
6b1896f58c
commit
7ea6777906
@ -297,10 +297,10 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
* Step 6 a) Restart (fork) for pairs where subst was applied
|
* Step 6 a) Restart (fork) for pairs where subst was applied
|
||||||
*/
|
*/
|
||||||
if(parallel) {
|
if(parallel) {
|
||||||
if (eqPrime.equals(eq)) //PL 2017-09-29 auskommentiert und durch
|
if (eqPrime.equals(eq) && !eqPrimePrime.isPresent()) //PL 2017-09-29 //(!eqPrimePrime.isPresent()) auskommentiert und durch
|
||||||
//(!eqPrimePrime.isPresent()) //PL 2071-09-29 dies ersetzt
|
//PL 2017-09-29 dies ersetzt //(!eqPrimePrime.isPresent())
|
||||||
//Begruendung: Wenn in der Substitution keine Veraenderung
|
//PL 2018-05-18 beide Bedingungen muessen gelten, da eqPrime Veränderungen in allem ausser subst
|
||||||
//(!eqPrimePrime.isPresent()) erfolgt ist, ist das Ergebnis erzielt.
|
//eqPrimePrime Veraenderungen in subst repraesentieren.
|
||||||
eqPrimePrimeSet.add(eqPrime);
|
eqPrimePrimeSet.add(eqPrime);
|
||||||
else if(eqPrimePrime.isPresent()) {
|
else if(eqPrimePrime.isPresent()) {
|
||||||
//System.out.println("nextStep: " + eqPrimePrime.get());
|
//System.out.println("nextStep: " + eqPrimePrime.get());
|
||||||
@ -317,10 +317,10 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
}
|
}
|
||||||
else { // sequentiell (Step 6b is included)
|
else { // sequentiell (Step 6b is included)
|
||||||
if (printtag) System.out.println("nextStep: " + eqPrimePrime);
|
if (printtag) System.out.println("nextStep: " + eqPrimePrime);
|
||||||
if (eqPrime.equals(eq)) { //PL 2017-09-29 auskommentiert und durch
|
if (eqPrime.equals(eq) && !eqPrimePrime.isPresent()) { //PL 2017-09-29 //(!eqPrimePrime.isPresent()) auskommentiert und durch
|
||||||
//(!eqPrimePrime.isPresent()) //PL 2071-09-29 dies ersetzt
|
//PL 2017-09-29 dies ersetzt //(!eqPrimePrime.isPresent())
|
||||||
//Begruendung: Wenn in der Substitution keine Veraenderung
|
//PL 2018-05-18 beide Bedingungen muessen gelten, da eqPrime Veränderungen in allem ausser subst
|
||||||
//(!eqPrimePrime.isPresent()) erfolgt ist, ist das Ergebnis erzielt.
|
//eqPrimePrime Veraenderungen in subst repraesentieren.
|
||||||
try {
|
try {
|
||||||
if (isSolvedForm(eqPrime)) {
|
if (isSolvedForm(eqPrime)) {
|
||||||
logFile.write(eqPrime.toString()+"\n");
|
logFile.write(eqPrime.toString()+"\n");
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import java.lang.Integer;
|
import java.lang.Integer;
|
||||||
|
import java.lang.Number;
|
||||||
|
|
||||||
public class Lambda {
|
public class Lambda {
|
||||||
|
|
||||||
m () {
|
m () {
|
||||||
var lam1 = (Integer x) -> {
|
var lam1 = (x) -> {
|
||||||
return x;
|
return x;
|
||||||
};
|
};
|
||||||
return lam1;
|
return lam1;
|
||||||
|
@ -28,10 +28,11 @@ public class UnifyTest {
|
|||||||
public void finiteClosure() throws IOException, ClassNotFoundException {
|
public void finiteClosure() throws IOException, ClassNotFoundException {
|
||||||
execute(new File(rootDirectory+"fc.jav"));
|
execute(new File(rootDirectory+"fc.jav"));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
/*
|
||||||
@Test
|
@Test
|
||||||
public void lambda() throws IOException, ClassNotFoundException {
|
public void lambda() throws IOException, ClassNotFoundException {
|
||||||
execute(new File(rootDirectory+"LambdaField.jav"));
|
execute(new File(rootDirectory+"Lambda.jav"));
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
@ -45,6 +46,12 @@ public class UnifyTest {
|
|||||||
public void lambda3() throws IOException, ClassNotFoundException {
|
public void lambda3() throws IOException, ClassNotFoundException {
|
||||||
execute(new File(rootDirectory+"Lambda3.jav"));
|
execute(new File(rootDirectory+"Lambda3.jav"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void lambdafield() throws IOException, ClassNotFoundException {
|
||||||
|
execute(new File(rootDirectory+"LambdaField.jav"));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mathStruc() throws IOException, ClassNotFoundException {
|
public void mathStruc() throws IOException, ClassNotFoundException {
|
||||||
execute(new File(rootDirectory+"mathStruc.jav"));
|
execute(new File(rootDirectory+"mathStruc.jav"));
|
||||||
|
Loading…
Reference in New Issue
Block a user