Merge mit bytecode

This commit is contained in:
JanUlrich 2015-10-23 14:44:55 +02:00
parent c9546d9762
commit 05187aa49f
7 changed files with 6 additions and 7033 deletions

View File

@ -1,4 +1,4 @@
package unify;
package de.dhbwstuttgart.syntaxtree.factory;
import de.dhbwstuttgart.syntaxtree.type.Type;
import de.dhbwstuttgart.typeinference.Menge;

View File

@ -1,4 +1,4 @@
package unify;
package de.dhbwstuttgart.syntaxtree.factory;
import de.dhbwstuttgart.syntaxtree.type.Type;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;

View File

@ -1,4 +1,4 @@
package unify;
package de.dhbwstuttgart.syntaxtree.factory;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.Pair;

View File

@ -1,16 +0,0 @@
class Test{
void methode(){
var;
var.methode();
var.methode();
}
}
class Klasse1 {
void methode(){
}
}
class Klasse2 {
void methode(){
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,58 +0,0 @@
package unify;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import org.junit.Test;
import plugindevelopment.TypeInsertTester;
import de.dhbwstuttgart.core.MyCompiler;
import de.dhbwstuttgart.core.MyCompilerAPI;
import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.logger.LoggerConfiguration;
import de.dhbwstuttgart.logger.Section;
import de.dhbwstuttgart.parser.JavaParser.yyException;
import de.dhbwstuttgart.syntaxtree.SourceFile;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class UnifyFilter {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/unify/";
private final String testFile = "UnifyFilter.jav";
@Test
public void test(){
MyCompilerAPI compiler = MyCompiler.getAPI(new LoggerConfiguration().setOutput(Section.UNIFY, System.out));
try {
compiler.parse(new File(this.rootDirectory+testFile));
Menge<TypeinferenceResultSet> ergebnis = compiler.typeReconstruction();
//Nichts weiter unternehmen. Nur die Ausgabe des Unifikationsalgorithmus anzeigen.
String log = Logger.getWholeLog();
//System.out.println(log);
writeLogFile(log);
} catch (Exception e){
e.printStackTrace();
}
}
private void writeLogFile(String log){
try {
PrintWriter writer = new PrintWriter(rootDirectory+testFile+".log", "UTF-8");
writer.write(log);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

View File

@ -4,6 +4,9 @@ import junit.framework.Assert;
import org.junit.Test;
import de.dhbwstuttgart.syntaxtree.factory.UnifyPairMengenBuilder;
import de.dhbwstuttgart.syntaxtree.factory.UnifyTypeFactory;
import de.dhbwstuttgart.syntaxtree.factory.Unify_FC_TTO_Builder;
import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.typeinference.Menge;