From 99bf02606b3fa06abf2be9ddb4018028687b0c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Fri, 12 Oct 2018 13:17:59 +0200 Subject: [PATCH] modified: src/de/dhbwstuttgart/typeinference/result/ResultPair.java toString() eingefuegt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit modified: src/de/dhbwstuttgart/typeinference/result/ResultSet.java toString() eingefuegt modified: src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java int-Lieterals können auch double-Literals sein. modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java kleien Ausgabeerweiterung --- .../dhbwstuttgart/typeinference/result/ResultPair.java | 4 ++++ src/de/dhbwstuttgart/typeinference/result/ResultSet.java | 6 +++++- .../dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java | 9 ++++++++- .../dhbwstuttgart/typeinference/unify/TypeUnifyTask.java | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/de/dhbwstuttgart/typeinference/result/ResultPair.java b/src/de/dhbwstuttgart/typeinference/result/ResultPair.java index 19bd65f9b..749f9c1c6 100644 --- a/src/de/dhbwstuttgart/typeinference/result/ResultPair.java +++ b/src/de/dhbwstuttgart/typeinference/result/ResultPair.java @@ -23,4 +23,8 @@ public abstract class ResultPair oderConstraints = new HashSet<>(); + Constraint constraint = new Constraint(); + constraint.add(new Pair(literal.getType(), integer, PairOperator.EQUALSDOT)); + oderConstraints.add(constraint); + constraint = new Constraint(); + constraint.add(new Pair(literal.getType(), doublee, PairOperator.EQUALSDOT)); + oderConstraints.add(constraint); + constraintsSet.addOderConstraint(oderConstraints); return; } if (literal.value instanceof Short) { diff --git a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 63c2bd311..f51c351e4 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -597,6 +597,7 @@ public class TypeUnifyTask extends RecursiveTask>> { writeLog("nextSet: " + nextSet.toString()); writeLog("nextSetasList: " + nextSetasList.toString()); writeLog("Number first erased Elements (undef): " + (len - nofstred)); + writeLog("Number second erased Elements (undef): " + (nofstred- nextSetasList.size())); writeLog("Number erased Elements (undef): " + (len - nextSetasList.size())); noAllErasedElements = noAllErasedElements + (len - nextSetasList.size()); writeLog("Number of all erased Elements (undef): " + noAllErasedElements.toString());