Commit bf35f666 authored by Mihai Herda's avatar Mihai Herda
Browse files

Merge branch 'master' of git.scc.kit.edu:py8074/dibugger

parents 119d9aa3 891d7a02
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/antlr-4.7-complete.jar"/>
<classpathentry kind="lib" path="lib/byte-buddy-1.7.10.jar"/>
<classpathentry kind="lib" path="lib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="lib/junit-4.12.jar"/>
<classpathentry kind="lib" path="lib/mockito-core-2.15.4.jar"/>
<classpathentry kind="lib" path="lib/objenesis.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>dibugger</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="maxFuncCalls">100</entry>
<entry key="configFileLoc"/>
<entry key="configFileLoc"></entry>
<entry key="maxWhileIterations">100</entry>
<entry key="language">English</entry>
<entry key="maxFuncCalls">100</entry>
</properties>
#this example prints line count for all found files
total=0
find . -type f -name "*.java" | while read FILE; do
#you see use grep instead wc ! for properly counting
count=$(grep -c ^ < "$FILE")
echo "$FILE has $count lines"
total=total+count #in bash, you can convert this for another shell
done
echo TOTAL LINES COUNTED: $total
package dibugger.debuglogic.antlrparser;
public class ActuallyHelpfulSyntaxException extends RuntimeException {
private static final long serialVersionUID = 336836889541520387L;
public ActuallyHelpfulSyntaxException(String message) {
super(message);
......
......@@ -6,7 +6,6 @@ import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import dibugger.debuglogic.antlrparser.ActuallyHelpfulSyntaxException;
import dibugger.debuglogic.exceptions.DIbuggerLogicException;
import dibugger.debuglogic.exceptions.SyntaxException;
import dibugger.debuglogic.interpreter.ConditionalBreakpoint;
......
package dibugger.debuglogic.debugger;
import java.util.List;
/**
* abstract class for suggesting watch expressions and conditional breakpoints.
*
......
package dibugger.debuglogic.debugger;
import java.util.ArrayList;
import java.util.List;
/**
......
......@@ -12,7 +12,7 @@ import dibugger.debuglogic.exceptions.IdentifierNotFoundException;
*
*/
public final class ArrayAccessRelationalTerm extends Term {
private final int DIM;
// private final int DIM;
private Term indexA;
private Term indexB;
private Term indexC;
......@@ -26,7 +26,7 @@ public final class ArrayAccessRelationalTerm extends Term {
* @param index
*/
public ArrayAccessRelationalTerm(String identifier, Term index) {
DIM = 1;
// DIM = 1;
this.indexA = index;
// Dummy indices
this.indexB = new ConstantTerm(new IntValue(0));
......@@ -44,7 +44,7 @@ public final class ArrayAccessRelationalTerm extends Term {
* @param secondIndex
*/
public ArrayAccessRelationalTerm(String identifier, Term firstIndex, Term secondIndex) {
DIM = 2;
// DIM = 2;
this.indexA = firstIndex;
this.indexB = secondIndex;
// Dummy index
......@@ -61,7 +61,7 @@ public final class ArrayAccessRelationalTerm extends Term {
* @param thirdIndex
*/
public ArrayAccessRelationalTerm(String identifier, Term firstIndex, Term secondIndex, Term thirdIndex) {
DIM = 3;
// DIM = 3;
this.indexA = firstIndex;
this.indexB = secondIndex;
this.indexC = thirdIndex;
......
......@@ -12,7 +12,7 @@ import dibugger.debuglogic.exceptions.IdentifierNotFoundException;
*
*/
public final class ArrayAccessTerm extends Term {
private final int DIM;
// private final int DIM;
private Term indexA;
private Term indexB;
private Term indexC;
......@@ -25,7 +25,7 @@ public final class ArrayAccessTerm extends Term {
* @param index
*/
public ArrayAccessTerm(String identifier, Term index) {
DIM = 1;
// DIM = 1;
this.indexA = index;
// Dummy indices
this.indexB = new ConstantTerm(new IntValue(0));
......@@ -43,7 +43,7 @@ public final class ArrayAccessTerm extends Term {
* @param secondIndex
*/
public ArrayAccessTerm(String identifier, Term firstIndex, Term secondIndex) {
DIM = 2;
// DIM = 2;
this.indexA = firstIndex;
this.indexB = secondIndex;
// Dummy index
......@@ -60,7 +60,7 @@ public final class ArrayAccessTerm extends Term {
* @param thirdIndex
*/
public ArrayAccessTerm(String identifier, Term firstIndex, Term secondIndex, Term thirdIndex) {
DIM = 3;
// DIM = 3;
this.indexA = firstIndex;
this.indexB = secondIndex;
this.indexC = thirdIndex;
......
......@@ -9,7 +9,7 @@ import dibugger.debuglogic.exceptions.WrongTypeArgumentException;
public class ArrayDeclaration extends Command {
private final int DIM;
// private final int DIM;
private String identifier;
private Term sizeA; // length of the first dimension
private Term sizeB;
......@@ -17,7 +17,7 @@ public class ArrayDeclaration extends Command {
public ArrayDeclaration(GenerationController controller, int linenumber, String identifier, Term size) {
super(controller, linenumber);
DIM = 1;
// DIM = 1;
this.sizeA = size;
// Dummy indices
this.sizeB = new ConstantTerm(new IntValue(1));
......@@ -29,7 +29,7 @@ public class ArrayDeclaration extends Command {
public ArrayDeclaration(GenerationController controller, int linenumber, String identifier, Term firstsize,
Term secondsize) {
super(controller, linenumber);
DIM = 2;
// DIM = 2;
this.sizeA = firstsize;
this.sizeB = secondsize;
// Dummy index
......@@ -40,7 +40,7 @@ public class ArrayDeclaration extends Command {
public ArrayDeclaration(GenerationController controller, int linenumber, String identifier, Term firstsize,
Term secondsize, Term thirdsize) {
super(controller, linenumber);
DIM = 3;
// DIM = 3;
this.sizeA = firstsize;
this.sizeB = secondsize;
this.sizeC = thirdsize;
......
......@@ -14,8 +14,8 @@ public class ArrayDeclarationAssignment extends Command {
private String identifier;
private Term values;
private Term sizeA; // length of the first dimension
private Term sizeB;
private Term sizeC;
// private Term sizeB;
// private Term sizeC;
private int linenumber;
public ArrayDeclarationAssignment(GenerationController controller, int linenumber, String identifier, Term size,
......@@ -23,8 +23,8 @@ public class ArrayDeclarationAssignment extends Command {
super(controller, linenumber);
this.sizeA = size;
// Dummy indices
this.sizeB = new ConstantTerm(new IntValue(1));
this.sizeC = this.sizeB; // maybe you could make this more efficient by
// this.sizeB = new ConstantTerm(new IntValue(1));
// this.sizeC = this.sizeB; // maybe you could make this more efficient by
// using one global 0 Term
this.identifier = identifier;
this.linenumber = linenumber;
......
......@@ -5,13 +5,12 @@ import java.util.List;
import dibugger.debuglogic.exceptions.DIbuggerLogicException;
import dibugger.debuglogic.exceptions.IdentifierNotFoundException;
import dibugger.debuglogic.exceptions.WrongArgumentException;
import dibugger.debuglogic.exceptions.WrongTypeArgumentException;
import dibugger.debuglogic.exceptions.WrongTypeAssignmentException;
public class ArrayElementAssignment extends Command {
private final int DIM;
// private final int DIM;
private String identifier;
private Term indexA; // index in the first dimension
private Term indexB;
......@@ -21,7 +20,7 @@ public class ArrayElementAssignment extends Command {
public ArrayElementAssignment(GenerationController controller, int linenumber, String identifier, Term index,
Term value) {
super(controller, linenumber);
DIM = 1;
// DIM = 1;
this.indexA = index;
// Dummy indices
this.indexB = new ConstantTerm(new IntValue(0));
......@@ -34,7 +33,7 @@ public class ArrayElementAssignment extends Command {
public ArrayElementAssignment(GenerationController controller, int linenumber, String identifier, Term firstIndex,
Term secondIndex, Term value) {
super(controller, linenumber);
DIM = 2;
// DIM = 2;
this.indexA = firstIndex;
this.indexB = secondIndex;
// Dummy index
......@@ -46,7 +45,7 @@ public class ArrayElementAssignment extends Command {
public ArrayElementAssignment(GenerationController controller, int linenumber, String identifier, Term firstIndex,
Term secondIndex, Term thirdIndex, Term value) {
super(controller, linenumber);
DIM = 3;
// DIM = 3;
this.indexA = firstIndex;
this.indexB = secondIndex;
this.indexC = thirdIndex;
......@@ -57,7 +56,7 @@ public class ArrayElementAssignment extends Command {
@Override
public List<TraceState> run() throws DIbuggerLogicException {
Scope scope = this.controller.getCurrentScope();
TermValue value = this.value.evaluate(scope);
// TermValue value = this.value.evaluate(scope);
Type type = scope.getTypeOf(this.identifier);
// check if variable exists
......
package dibugger.debuglogic.interpreter;
import java.util.List;
/**
* Represents a Binary Condition, which is a Term with two Operands evaluating
* to a boolean
......
......@@ -3,8 +3,6 @@ package dibugger.debuglogic.interpreter;
import java.util.ArrayList;
import java.util.List;
import org.antlr.v4.runtime.tree.ParseTree;
import dibugger.debuglogic.antlrparser.WlangBaseVisitor;
import dibugger.debuglogic.antlrparser.WlangParser.ArglistContext;
import dibugger.debuglogic.antlrparser.WlangParser.ArgumentContext;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment