Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7918d2895 | ||
|
|
2edb23f2d8 |
No files matched your search
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
# Linux start script should use lf
|
||||
/gradlew text eol=lf
|
||||
|
||||
# These are Windows script files and should use crlf
|
||||
*.bat text eol=crlf
|
||||
|
||||
@@ -29,3 +29,12 @@ logFiles/**
|
||||
|
||||
src/main/java/de/dhbwstuttgart/parser/antlr/
|
||||
src/main/java/de/dhbwstuttgart/sat/asp/parser/antlr/
|
||||
|
||||
#GRADLE
|
||||
# Ignore Gradle project-specific cache directory
|
||||
.gradle
|
||||
|
||||
# Ignore Gradle build output directory
|
||||
build
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* This generated file contains a sample Java application project to get you started.
|
||||
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
|
||||
* User Manual available at https://docs.gradle.org/7.6/userguide/building_java_projects.html
|
||||
*/
|
||||
|
||||
plugins {
|
||||
// Apply the application plugin to add support for building a CLI application in Java.
|
||||
antlr
|
||||
application
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(19))
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
// Use Maven Central for resolving dependencies.
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Use JUnit test framework.
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
|
||||
// This dependency is used by the application.
|
||||
implementation("com.google.guava:guava:31.1-jre")
|
||||
implementation("commons-io:commons-io:2.6")
|
||||
implementation("org.reflections:reflections:0.9.11")
|
||||
implementation("org.ow2.asm:asm:7.0")
|
||||
//implementation("org.antlr:antlr4:4.11.1")
|
||||
antlr("org.antlr:antlr4:4.8-1")
|
||||
}
|
||||
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.compilerArgs.add("--enable-preview")
|
||||
}
|
||||
tasks.withType<Test> {
|
||||
jvmArgs("--enable-preview")
|
||||
}
|
||||
tasks.withType<JavaExec> {
|
||||
jvmArgs("--enable-preview")
|
||||
}
|
||||
|
||||
application {
|
||||
// Define the main class for the application.
|
||||
mainClass.set("de.dhbwstuttgart.App")
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Box<A>{
|
||||
void m(A a){}
|
||||
}
|
||||
|
||||
class B { }
|
||||
|
||||
class Box_Main extends B {
|
||||
|
||||
m(b) {
|
||||
b.m(new Box_Main());
|
||||
b.m(new B());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Box<A>{
|
||||
A f;
|
||||
}
|
||||
|
||||
class B { }
|
||||
|
||||
class Box_Main extends B {//Fehler Bugzilla Bug 230
|
||||
|
||||
m(b) {
|
||||
b.f = new Box_Main();
|
||||
b.f = new B();
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Executable
+7
@@ -0,0 +1,7 @@
|
||||
import java.util.List;
|
||||
class M {
|
||||
void m(p, p2){
|
||||
|
||||
new addList().addLists(p, p2);
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -2,6 +2,12 @@ class Pair<T, U> {
|
||||
T x;
|
||||
U y;
|
||||
|
||||
public Pair() { }
|
||||
public Pair(T x, U y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public T fst () {
|
||||
return x;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import java.util.Vector;
|
||||
import java.util.Stack;
|
||||
|
||||
class Put {
|
||||
|
||||
putElement(ele, v) {
|
||||
v.addElement(ele);
|
||||
}
|
||||
|
||||
putElement(ele, s) {
|
||||
s.push(ele);
|
||||
}
|
||||
|
||||
|
||||
main(ele, x) {
|
||||
putElement(ele, x);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class Test {
|
||||
a;
|
||||
Test b;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import java.util.ArrayList;
|
||||
|
||||
class TestSubTypless {
|
||||
m(a){
|
||||
var l = new ArrayList<>();
|
||||
l.add(a);
|
||||
return m2(l).get(0);
|
||||
}
|
||||
m2(a){
|
||||
return m(a);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Twice {
|
||||
twice = f -> x -> f.apply(f.apply(x));
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class Var {
|
||||
|
||||
var(x) { var y; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Integer;
|
||||
|
||||
|
||||
public class VectorConstAdd {
|
||||
vectorAdd(v1) {
|
||||
var i = 0;
|
||||
var erg = new Vector<>();
|
||||
while (i < v1.size()) {
|
||||
erg.addElement(v1.elementAt(i) + 1);
|
||||
i++;
|
||||
}
|
||||
return erg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class Wildcard_Andi {
|
||||
|
||||
Test<? extends A> ex = new Test<>();
|
||||
|
||||
Test<? super A> sup = new Test<>();
|
||||
}
|
||||
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
import java.util.List;
|
||||
|
||||
class addList {
|
||||
addLists(a, b){
|
||||
a.add(b.get(0));
|
||||
b.add(a.get(0));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import java.util.List;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Object;
|
||||
import java.lang.Boolean;
|
||||
|
||||
class wildcardPair {
|
||||
|
||||
make(l) {
|
||||
var p = new Pair(l.get(0), l.get(1));
|
||||
return p;
|
||||
}
|
||||
//<X>Boolean compare(Pair<X, X> x) { return true; }
|
||||
void m(l) {
|
||||
Object o = l.get(0);
|
||||
|
||||
//Pair<? extends Object, ? extends Object> p;
|
||||
//List<?> b;
|
||||
//this.compare(p); //1, type incorrect
|
||||
make(l);
|
||||
//this.compare(this.make(b)); //2, OK
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,6 @@
|
||||
class Cycle {
|
||||
m(x, y) {
|
||||
y = x;
|
||||
x = y;
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -3,7 +3,7 @@ import java.lang.Integer;
|
||||
|
||||
public class Fac {
|
||||
|
||||
getFac(java.lang.Integer n){
|
||||
getFac(n){
|
||||
var res = 1;
|
||||
var i = 1;
|
||||
while(i<=n) {
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,55 @@
|
||||
public class Inf {
|
||||
m(x,y,a){
|
||||
var z;
|
||||
var v;
|
||||
var w;
|
||||
var b;
|
||||
y=x;
|
||||
z=x;
|
||||
v=y;
|
||||
w=y;
|
||||
y=a;
|
||||
b=a;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
TPH M m(TPH N x, TPH O y, TPH P a)({
|
||||
TPH Q z;
|
||||
TPH R v;
|
||||
TPH S w;
|
||||
TPH T b;
|
||||
(y)::TPH O = (x)::TPH N;
|
||||
(z)::TPH Q = (x)::TPH N;
|
||||
(v)::TPH R = (y)::TPH O;
|
||||
(w)::TPH S = (y)::TPH O;
|
||||
(y)::TPH O = (a)::TPH P;
|
||||
(b)::TPH T = (a)::TPH P;
|
||||
return;
|
||||
})::TPH U
|
||||
|
||||
Inf()({
|
||||
super(());
|
||||
})::TPH X
|
||||
|
||||
}
|
||||
// v::R w::S
|
||||
// \ /
|
||||
// z::Q y::O b::T
|
||||
// \ / \ /
|
||||
// x::N a::P
|
||||
|
||||
RESULT Final: [[(TPH O < TPH S), (TPH P < TPH O), (TPH O < TPH R), (TPH P < TPH T), (TPH M = void), (TPH N < TPH O), (TPH N < TPH Q)]]
|
||||
Simplified constraints: [(TPH O < TPH S), (TPH P < TPH O), (TPH O < TPH R), (TPH P < TPH T), (TPH N < TPH O), (TPH N < TPH Q)]
|
||||
m: [(TPH DDV = java.lang.Object), (TPH DDX = java.lang.Object), (TPH DDX < TPH DDV), (TPH N < TPH DDX), (TPH P < TPH DDX)]
|
||||
Class Inf: []
|
||||
Inf: []
|
||||
|
||||
Unify nach Oder-Constraints-Anpassung:
|
||||
UND:[(void =. M, , -1 WC: false, IT: false), (N <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (P <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (N <. Q, 1 WC: false, IT: false, 0 WC: true, IT: false), (O <. S, 1 WC: false, IT: false, 0 WC: true, IT: false), (O <. R, 1 WC: false, IT: false, 0 WC: true, IT: false), (P <. T, 1 WC: false, IT: false, 0 WC: true, IT: false)]
|
||||
isInherited = false
|
||||
isStatement = false
|
||||
|
||||
ODER:
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
class Infimum {
|
||||
m(x, y, z) {
|
||||
y = x;
|
||||
z = x;
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-5
@@ -4,14 +4,10 @@ import java.lang.Double;
|
||||
import java.util.Vector;
|
||||
import java.lang.Boolean;
|
||||
|
||||
|
||||
|
||||
|
||||
public class OLFun {
|
||||
|
||||
//f = x -> {return x + x;};
|
||||
|
||||
m(f, x) {
|
||||
x = f.apply(x+x);
|
||||
x = f.apply(x+x);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import java.lang.String;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Double;
|
||||
import java.util.Vector;
|
||||
import java.lang.Boolean;
|
||||
|
||||
public class OLFun2 {
|
||||
|
||||
x;
|
||||
m(f){
|
||||
x = f.apply(x + x)
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+4
-4
@@ -1,11 +1,11 @@
|
||||
public class SimpleCycle {
|
||||
|
||||
m(a,b,d){
|
||||
/* var g;
|
||||
var g;
|
||||
var h;
|
||||
g = h;
|
||||
h = g;
|
||||
|
||||
/*
|
||||
var y;
|
||||
var z;
|
||||
y=z;
|
||||
@@ -18,8 +18,8 @@ public class SimpleCycle {
|
||||
var f = d;
|
||||
b = x;
|
||||
var l = c;
|
||||
a = l; */
|
||||
|
||||
a = l;
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -3,7 +3,6 @@ public class Tph {
|
||||
m(a,b){
|
||||
var c = m2(b);
|
||||
return a;
|
||||
// return m2(b);
|
||||
}
|
||||
|
||||
m2(b){
|
||||
+2
-1
@@ -4,7 +4,7 @@ public class Tph2 {
|
||||
return id.apply(x);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
m(a,b){
|
||||
var c = m2(a,b);
|
||||
//m2(a,b);
|
||||
@@ -14,4 +14,5 @@ public class Tph2 {
|
||||
m2(a,b){
|
||||
return b;
|
||||
}
|
||||
*/
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,11 @@
|
||||
public class Tph7 {
|
||||
|
||||
m(a,b){
|
||||
var c = m2(b);
|
||||
return m2(b);
|
||||
}
|
||||
|
||||
m2(b){
|
||||
return b;
|
||||
}
|
||||
}
|
||||
Loaded 100 of 2181 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user