Compare commits

..

2 Commits

Author SHA1 Message Date
2d598d28e9 Erste Tests für strucTypes 2017-10-18 17:39:16 +02:00
9faf25d670 Documentation anfügen 2017-10-18 14:30:31 +02:00
1439 changed files with 46858 additions and 42560 deletions
.gitignorePlugInBau.txt
Website
abgabeprotokoll.md
doc
Javadoc
allclasses-frame.htmlallclasses-noframe.htmlconstant-values.htmldeprecated-list.htmlhelp-doc.html
index-files
index.html
mycompiler
MyCompiler.htmlMyCompilerAPI.htmlSourceFile.html
class-use
mybytecode
myclass
myexception
mymodifier
myoperator
myparser
mystatement
mytest
mytype
mytypereconstruction
CHelper.htmlCIntersectionType.htmlCMultiplyTuple.htmlCReconstructionTuple.htmlCSubstitution.htmlCSupportData.htmlCTriple.htmlCTypeReconstructionResult.html
class-use
package-frame.htmlpackage-summary.htmlpackage-tree.htmlpackage-use.html
replacementlistener
set
typeassumption
typeassumptionkey
unify
package-frame.htmlpackage-summary.htmlpackage-tree.htmlpackage-use.html
unused
overview-frame.htmloverview-summary.htmloverview-tree.htmlpackage-list
resources
serialized-form.htmlstylesheet.css
LambdaJavadoc
OldStuff
ClassDiagram.ucd
JavaDoc
Abstract.htmlAddOp.htmlAndOp.htmlArgumentList.htmlAssign.htmlAttribute.htmlAttributeInfo.htmlBaseType.htmlBinary.htmlBinaryExpr.htmlBlock.htmlBoolLiteral.htmlBooleanType.htmlCONSTANT_Class_info.htmlCONSTANT_Double_info.htmlCONSTANT_Fieldref_info.htmlCONSTANT_Float_info.htmlCONSTANT_Integer_info.htmlCONSTANT_InterfaceMethodref_info.htmlCONSTANT_Long_info.htmlCONSTANT_Methodref_info.htmlCONSTANT_NameAndType_info.htmlCONSTANT_String_info.htmlCONSTANT_Utf8_info.htmlCPInfo.htmlCastExpr.htmlCharLiteral.htmlCharacterType.htmlClass.htmlClassBody.htmlClassDeclId.htmlClassFile.htmlCodeAttribute.htmlConstantValueAttribute.htmlConstructor.htmlDeclId.htmlDivideOp.htmlEmptyStmt.htmlEqualOp.htmlExceptionList.htmlExceptionTable.htmlExpr.htmlExprStmt.htmlFieldDecl.htmlFieldInfo.htmlFormalParameter.htmlGreaterEquOp.htmlGreaterOp.htmlIfStmt.htmlImport.htmlInstVar.htmlInstVarDecl.htmlInstanceOf.htmlIntLiteral.htmlIntegerType.htmlJVMCode.htmlJVMCodeException.htmlJavaCompiler.htmlJavaLexer.htmlJavaParser.htmlJavaParser.yyException.htmlJavaParser.yyInput.htmlKey.htmlLessEquOp.htmlLessOp.htmlLiteral.htmlLocalOrFieldVar.htmlLocalVarDecl.htmlLogOp.htmlMethod.htmlMethodCall.htmlMethodInfo.htmlMinusOp.htmlModifier.htmlModifiers.htmlModuloOp.htmlMulOp.htmlMyCompiler.htmlNegativeExpr.htmlNewArray.htmlNewClass.htmlNoReceiver.htmlNotEqualOp.htmlNotExpr.htmlNull.htmlOperator.htmlOrOp.htmlPair.htmlParaList.htmlParameterList.htmlPlusOp.htmlPositivExpr.htmlPostDecExpr.htmlPostIncExpr.htmlPreDecExpr.htmlPreIncExpr.htmlPrivate.htmlProtected.htmlPublic.htmlReceiver.htmlRefType.htmlRelOp.htmlReturn.htmlReturnType.htmlSCClassBodyException.htmlSCClassException.htmlSCExcept.htmlSCException.htmlSCMethodException.htmlSCStatementException.htmlScanner.htmlSourceFile.htmlStatement.htmlStatic.htmlStatus.htmlStringLiteral.htmlThis.htmlTimesOp.htmlToken.htmlType.htmlTypeSpec.htmlTyploseVariable.htmlUnaryExpr.htmlUnaryMinus.htmlUnaryNot.htmlUnaryPlus.htmlUsedId.htmlUserDef.htmlVoid.htmlWhileStmt.htmlallclasses-frame.htmlallclasses-noframe.html
class-use
Abstract.htmlAddOp.htmlAndOp.htmlArgumentList.htmlAssign.htmlAttribute.htmlAttributeInfo.htmlBaseType.htmlBinary.htmlBinaryExpr.htmlBlock.htmlBoolLiteral.htmlBooleanType.htmlCONSTANT_Class_info.htmlCONSTANT_Double_info.htmlCONSTANT_Fieldref_info.htmlCONSTANT_Float_info.htmlCONSTANT_Integer_info.htmlCONSTANT_InterfaceMethodref_info.htmlCONSTANT_Long_info.htmlCONSTANT_Methodref_info.htmlCONSTANT_NameAndType_info.htmlCONSTANT_String_info.htmlCONSTANT_Utf8_info.htmlCPInfo.htmlCastExpr.htmlCharLiteral.htmlCharacterType.htmlClass.htmlClassBody.htmlClassDeclId.htmlClassFile.htmlCodeAttribute.htmlConstantValueAttribute.htmlConstructor.htmlDeclId.htmlDivideOp.htmlEmptyStmt.htmlEqualOp.htmlExceptionList.htmlExceptionTable.htmlExpr.htmlExprStmt.htmlFieldDecl.htmlFieldInfo.htmlFormalParameter.htmlGreaterEquOp.htmlGreaterOp.htmlIfStmt.htmlImport.htmlInstVar.htmlInstVarDecl.htmlInstanceOf.htmlIntLiteral.htmlIntegerType.htmlJVMCode.htmlJVMCodeException.htmlJavaCompiler.htmlJavaLexer.htmlJavaParser.htmlJavaParser.yyException.htmlJavaParser.yyInput.htmlKey.htmlLessEquOp.htmlLessOp.htmlLiteral.htmlLocalOrFieldVar.htmlLocalVarDecl.htmlLogOp.htmlMethod.htmlMethodCall.htmlMethodInfo.htmlMinusOp.htmlModifier.htmlModifiers.htmlModuloOp.htmlMulOp.htmlMyCompiler.htmlNegativeExpr.htmlNewArray.htmlNewClass.htmlNoReceiver.htmlNotEqualOp.htmlNotExpr.htmlNull.htmlOperator.htmlOrOp.htmlPair.htmlParaList.htmlParameterList.htmlPlusOp.htmlPositivExpr.htmlPostDecExpr.htmlPostIncExpr.htmlPreDecExpr.htmlPreIncExpr.htmlPrivate.htmlProtected.htmlPublic.htmlReceiver.htmlRefType.htmlRelOp.htmlReturn.htmlReturnType.htmlSCClassBodyException.htmlSCClassException.htmlSCExcept.htmlSCException.htmlSCMethodException.htmlSCStatementException.htmlScanner.htmlSourceFile.htmlStatement.htmlStatic.htmlStatus.htmlStringLiteral.htmlThis.htmlTimesOp.htmlToken.htmlType.htmlTypeSpec.htmlTyploseVariable.htmlUnaryExpr.htmlUnaryMinus.htmlUnaryNot.htmlUnaryPlus.htmlUsedId.htmlUserDef.htmlVoid.htmlWhileStmt.htmlyyCheck0.htmlyyCheck1.htmlyyCheckInit.html
constant-values.htmldeprecated-list.htmlhelp-doc.html
index-files
index.htmloverview-tree.htmlpackage-listpackage-use.htmlpackages.htmlserialized-form.htmlstylesheet.cssyyCheck0.htmlyyCheck1.htmlyyCheckInit.html
Operator.ucdRest.ucd
Rest
Statement.ucdUML Juni 2005.zip
Papers
PluginBau.pdf
Studienarbeiten
UML
parser.md
logFiles
pom.xml
src
build_compiler.sh
de
dhbwstuttgart
.DS_Store
bytecode
core
environment
exceptions
parser
syntaxtree
typedeployment
typeinference
main
antlr4
java
de
dhbwstuttgart
bytecode
core
environment
parser
SyntaxTreeGenerator
sat
syntaxtree
typedeployment
typeinference
test
java
resources
AllgemeinTest
bytecode
javFiles
log4jTesting.xml
testBytecode
test
testBytecode
vorgehen.md

9
.gitignore vendored

@ -20,12 +20,3 @@ bin
.project
.settings/
/target/
#
manually/
logFiles/**
!logFiles/.gitkeep
src/main/java/de/dhbwstuttgart/parser/antlr/
src/main/java/de/dhbwstuttgart/sat/asp/parser/antlr/

@ -1,22 +0,0 @@
Repositories: Branches: JavaCompilerCore: simplyRes
JavaCompilerPlugin: copy_libs
JavaCompilerCore > mvn install -Dskip.test=true
[INFO] Installing /Users/pl/workspace_oxygen/JavaCompilerCore/target/JavaTXcompiler-0.2.jar to /Users/pl/.m2/repository/de/dhbwstuttgart/JavaTXcompiler/0.2/JavaTXcompiler-0.2.jar
[INFO] Installing /Users/pl/workspace_oxygen/JavaCompilerCore/pom.xml to /Users/pl/.m2/repository/de/dhbwstuttgart/JavaTXcompiler/0.2/JavaTXcompiler-0.2.pom
[INFO] Installing /Users/pl/workspace_oxygen/JavaCompilerCore/target/JavaTXcompiler-0.2-jar-with-dependencies.jar to /Users/pl/.m2/repository/de/dhbwstuttgart/JavaTXcompiler/0.2/JavaTXcompiler-0.2-jar-with-dependencies.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.279 s
[INFO] Finished at: 2019-09-17T09:31:30+02:00
[INFO] -------------------------------------
JavaCompilerCore > cd target
JavaCompilerCore/target > cp JavaTXcompiler-0.2.jar ../../Plugin_JCC/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/lib/JavaTXcompiler.jar
Im Eclipse: Plugin_JCC/JavaCompilerPlugin> mvn install
Plugin_JCC/JavaCompilerPlugin/releng/JavaCompilerPlugin.Update/target > cp JavaCompilerPlugin.Update-0.1.0-SNAPSHOT.zip ~/webdav/public_html/javatx/javatx_XXXXXX.zip

Binary file not shown.

@ -1,88 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Java-TX Plugin</title></head>
<center>
<h1>Java-TX Plugin</h1>
</center>
<h2>Content</h2>
<ul>
<li><h4><a href="#introduction">Introduction</a></h4></li>
<li><h4><a href="newJavaTXProject/newJavaTXProject.html" >New Java-TX project</a></h4></li>
<li><h4><a href=" JavaTXExamples.zip" >Example project</a></h4></li>
<li><a href="usePlugin/usePlugin.html" >Using the plugin</a></li>
<li><h4><a href="install/install.html" >Installation</a></h4>
</li>
</ul>
<br/>
<h2 id="introduction">Introduction</h2>
Java-TX (Java Type eXtended) is an extension of Java in which a global type inference algorithm and real function types are added. Since the end of the nineties features from functional program- ming languages have been transferred to Java. Parametric polymorphism extended by wildcards, called generics, were transfered to Java 5.0. Higher-order functions and lambda expression were introduced in Java 8. Java 8 uses functional interfaces as target types of lambda expressions in contrast to real function types as in functional programming languages.
The powerful feature type inference from functional programming languages is incorporated into Java, as into other object-oriented
languages, i.e. only in a restricted way called local type inference. Local type inference allows certain type annotations to be omitted. For instance, it is often not necessary to specify the type of a variable. Type parameters of classes in the new-statement can be left out. Return types of methods can often also be omitted. Local type inference is at its most pronounced in Scala. In Java 10 an extention of local type inference is introduced, where types of local variables can be replaced by the keyword var and inferred automatically during the compilation. In contrast to global type inference, local type inference allows types of recursive methods and lambda expressions not to be omitted.<br>
The Java-TX project contributes to the design of object-oriented languages by developing global type inference algorithms for Java-like languages.
<h3>First Example</h3>
The class <tt>Id</tt> has the method <tt>id</tt>. The type annotations are omitted.
<br/>
<pre> <code class="language-java">
class Id {
id(x) {
return x;
}
}
</code> </pre>
The type inference algorithm inferrs the types, such that <tt>Id</tt> can be applied:
<pre>
new Id().id(1);
new Id().id("hallo");
</pre>
<h3>More complex example</h3>
<pre>
import java.lang.Integer;
import java.lang.Double;
import java.lang.String;
class OL {
m(x) { return x + x; }
}
class OLMain {
main(x) {
var ol;
ol = new OL();
return ol.m(x);
}
}
</pre>
The type inference mechanism considers only imported types. Therefore <tt>Integer</tt> <tt>Double</tt>, and <tt>String</tt> are imported.
<br/>
As the operator <tt>+</tt> is overloaded by all numeric types and String the methods <tt>m</tt> in the class <tt>OL</tt> and <tt>main</tt> in the class <tt>OLMain</tt>, respectively, gets all these types. The generated classfile demonstrates this:
<pre>
> javap OL.class
Compiled from "OL.jav"
class OL {
public OL();
public java.lang.Integer m(java.lang.Integer);
public java.lang.Double m(java.lang.Double);
}
> javap OLMain.class
Compiled from "OLMain.jav"
class OLMain {
public OLMain();
public java.lang.Integer main(java.lang.Integer);
public java.lang.Double main(java.lang.Double);
}
</pre>
<hr>
<address></address>
<!-- hhmts start -->Last modified: Fri Jun 1 16:43:55 CEST 2018 <!-- hhmts end -->
</body> </html>

Binary file not shown.

Before

(image error) Size: 25 KiB

Binary file not shown.

Before

(image error) Size: 80 KiB

Binary file not shown.

Before

(image error) Size: 109 KiB

@ -1,40 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Install Java-TX Plugin</title>
</head>
<body>
<h1>Install Java-TX Plugin</h1>
<ol>
<li>Select "Install New Software ..."<br>
<img width= 400 src="newsoftware.png" >
</li>
<li>Add ...<br>
<img width=550 src="availableSoftware1.png" >
</li>
<li>Insert address<br>
<img width=550 src="availableSoftware2.png" >
</li>
<li>Select installation<br>
<img width=550 src="selectInstallation.png" >
</li>
<li>Installation details<br>
<img width=550 src="installationDetails.png" >
</li>
<li>Accept license agreement<br>
<img width=550 src="licenseAgreement.png" >
</li>
<li>Install anyway<br>
<img width=450 src="installAnyway.png">
</li>
<li>Restart<br>
<img width=450 src="Restart.png">
</li>
</ol>
<hr>
<address></address>
<!-- hhmts start -->Last modified: Fri Jun 1 11:57:15 CEST 2018 <!-- hhmts end -->
</body> </html>

@ -1,40 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Install Java-TX Plugin</title>
</head>
<body>
<h2>Install Java-TX Plugin</h2>
<ol>
<li>Select "Install New Software ..."<br>
<img width= 400 src="newsoftware.png" >
</li>
<li>Add ...<br>
<img width=550 src="availableSoftware1.png" >
</li>
<li>Insert address<br>
<img width=550 src="availableSoftware2.png" >
</li>
<li>Select installation<br>
<img width=550 src="selectInstallation.png" >
</li>
<li>Installation details<br>
<img width=550 src="installationDetails.png" >
</li>
<li>Accept license agreement<br>
<img width=550 src="licenseAgreement.png" >
</li>
<li>Install anyway<br>
<img width=450 src="installAnyway.png">
</li>
<li>Restart<br>
<img width=450 src="Restart.png">
</li>
</ol>
<hr>
<address></address>
<!-- hhmts start -->Last modified: Fri Jun 1 12:05:43 CEST 2018 <!-- hhmts end -->
</body> </html>

Binary file not shown.

Before

(image error) Size: 32 KiB

Binary file not shown.

Before

(image error) Size: 52 KiB

Binary file not shown.

Before

(image error) Size: 61 KiB

Binary file not shown.

Before

(image error) Size: 96 KiB

Binary file not shown.

Before

(image error) Size: 93 KiB

Binary file not shown.

Before

(image error) Size: 163 KiB

Binary file not shown.

Before

(image error) Size: 163 KiB

Binary file not shown.

Before

(image error) Size: 88 KiB

Binary file not shown.

Before

(image error) Size: 50 KiB

Binary file not shown.

Before

(image error) Size: 96 KiB

Binary file not shown.

Before

(image error) Size: 102 KiB

Binary file not shown.

Before

(image error) Size: 100 KiB

Binary file not shown.

Before

(image error) Size: 76 KiB

@ -1,34 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title></title>
</head>
<h2>New Java-TX project in eclipse</h2>
<ol>
<li>New -> Java Project<br/>
<img width= 400 src="newJavaTXProject.png" >
</li>
<br/>
<li>Generate a jav-File folder<br/>
<img width= 550 src="newJavFolder1.png" ><br/><br/>
<img width= 550 src="newJavFolder2.png" >
</li>
<br/>
<li>Add jav-File folder as library<br/>
At the moment no package system is implemented, Therefore the compiled class files are in the jav-File folder. This has to be added as library:<br/>
<img width= 550 src="buildPath1.png" ><br/><br/>
<img width= 550 src="buildPath2.png" ><br/><br/>
<img width= 400 src="buildPath3.png" ><br/><br/>
<img width= 550 src="buildPath4.png" ><br/>
</li>
</ol>
<body>
<h1></h1>
<hr>
<address></address>
<!-- hhmts start -->Last modified: Fri Jun 1 16:50:02 CEST 2018 <!-- hhmts end -->
</body> </html>

Binary file not shown.

Before

(image error) Size: 150 KiB

@ -1,24 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Using the plugin</title>
</head>
<h2>Using the plugin</h2>
<ol>
<li>Overview<br/>
<img width=800 src="usePlugin1.png" >
</li>
<br/>
<li>Select types<br/>
If the method is overloaded the user can select types in the outline the right mouse button:<br/><br/>
<img src="usePlugin2.png" ><br/>
</li>
</ol>
<body>
<h1></h1>
<hr>
<address></address>
<!-- hhmts start -->Last modified: Fri Jun 1 16:51:28 CEST 2018 <!-- hhmts end -->
</body> </html>

Binary file not shown.

Before

(image error) Size: 112 KiB

Binary file not shown.

Before

(image error) Size: 33 KiB

@ -1,19 +0,0 @@
# JavaTXCompiler Klasse
* Konstruktor hat einen weiteren Parameter
* contextPath
* Arrays aus URLs (file-urls)
* Parameter ist Optional
* wird er gesetzt, so werden Classfiles aus den übergebenen Pfaden geladen
* die übergebenen Pfade müssen dabei die Source-Roots sein
* Beispiel:
`import de.test.Klasse;`
* `Klasse.class` liegt in `output/de/test/Klasse.class`
* dann muss contextpath auf `output` gesetzt werden
* wird der Parameter nicht übergeben, so wird der Sourceroot auf das Verzeichnis gesetzt, in dem der Compiler ausgeführt wird
* dies ist das Verhalten vom javac Compiler
* generateBytecode - Methode hat neuen Parameter: path
* wird hier null übergeben, so wird die class-File in den gleichen Ordner wie die übergebene .jav File geschrieben
* wird hier ein Pfad übergeben, so gilt dieser als output root.
* Klassen werden in outputRoot/package/name/KlassenName.class geschrieben

0
doc/Javadoc/allclasses-frame.html Executable file → Normal file

0
doc/Javadoc/allclasses-noframe.html Executable file → Normal file

0
doc/Javadoc/constant-values.html Executable file → Normal file

0
doc/Javadoc/deprecated-list.html Executable file → Normal file

0
doc/Javadoc/help-doc.html Executable file → Normal file

0
doc/Javadoc/index-files/index-1.html Executable file → Normal file

0
doc/Javadoc/index-files/index-10.html Executable file → Normal file

0
doc/Javadoc/index-files/index-11.html Executable file → Normal file

0
doc/Javadoc/index-files/index-12.html Executable file → Normal file

0
doc/Javadoc/index-files/index-13.html Executable file → Normal file

0
doc/Javadoc/index-files/index-14.html Executable file → Normal file

0
doc/Javadoc/index-files/index-15.html Executable file → Normal file

0
doc/Javadoc/index-files/index-16.html Executable file → Normal file

0
doc/Javadoc/index-files/index-17.html Executable file → Normal file

0
doc/Javadoc/index-files/index-18.html Executable file → Normal file

0
doc/Javadoc/index-files/index-19.html Executable file → Normal file

0
doc/Javadoc/index-files/index-2.html Executable file → Normal file

0
doc/Javadoc/index-files/index-20.html Executable file → Normal file

0
doc/Javadoc/index-files/index-21.html Executable file → Normal file

0
doc/Javadoc/index-files/index-22.html Executable file → Normal file

0
doc/Javadoc/index-files/index-23.html Executable file → Normal file

0
doc/Javadoc/index-files/index-24.html Executable file → Normal file

0
doc/Javadoc/index-files/index-3.html Executable file → Normal file

0
doc/Javadoc/index-files/index-4.html Executable file → Normal file

0
doc/Javadoc/index-files/index-5.html Executable file → Normal file

0
doc/Javadoc/index-files/index-6.html Executable file → Normal file

0
doc/Javadoc/index-files/index-7.html Executable file → Normal file

0
doc/Javadoc/index-files/index-8.html Executable file → Normal file

0
doc/Javadoc/index-files/index-9.html Executable file → Normal file

0
doc/Javadoc/index.html Executable file → Normal file

0
doc/Javadoc/mycompiler/MyCompiler.html Executable file → Normal file

0
doc/Javadoc/mycompiler/MyCompilerAPI.html Executable file → Normal file

0
doc/Javadoc/mycompiler/SourceFile.html Executable file → Normal file

0
doc/Javadoc/mycompiler/class-use/MyCompiler.html Executable file → Normal file

0
doc/Javadoc/mycompiler/class-use/MyCompilerAPI.html Executable file → Normal file

0
doc/Javadoc/mycompiler/class-use/SourceFile.html Executable file → Normal file

0
doc/Javadoc/mycompiler/mybytecode/Attribute.html Executable file → Normal file

0
doc/Javadoc/mycompiler/mybytecode/AttributeInfo.html Executable file → Normal file

0
doc/Javadoc/mycompiler/mybytecode/CPInfo.html Executable file → Normal file

0
doc/Javadoc/mycompiler/mybytecode/ClassFile.html Executable file → Normal file

0
doc/Javadoc/mycompiler/mybytecode/CodeAttribute.html Executable file → Normal file

0
doc/Javadoc/mycompiler/mybytecode/ExceptionTable.html Executable file → Normal file

0
doc/Javadoc/mycompiler/mybytecode/FieldInfo.html Executable file → Normal file

0
doc/Javadoc/mycompiler/mybytecode/JVMCode.html Executable file → Normal file

0
doc/Javadoc/mycompiler/mybytecode/Key.html Executable file → Normal file

0
doc/Javadoc/mycompiler/mybytecode/MethodInfo.html Executable file → Normal file

Some files were not shown because too many files have changed in this diff Show More