changes
authorjihoonl <jihoonl>
Wed, 8 Jul 2009 19:26:48 +0000 (19:26 +0000)
committerjihoonl <jihoonl>
Wed, 8 Jul 2009 19:26:48 +0000 (19:26 +0000)
Robust/src/Benchmarks/SingleTM/Intruder/Decoder.java
Robust/src/Benchmarks/SingleTM/Intruder/Stream.java
Robust/src/Benchmarks/SingleTM/Intruder/makefile

index fcbfdb0583c7c07dd00ce9062be45a2f20f21186..41bfe2b1e3071c2982dac39cffd1efeb1803eb86 100644 (file)
@@ -243,14 +243,14 @@ public class Decoder {
                             i++;
                     }
 
-                    String data;
+                    String data = new String();
 
                     it.reset(fragmentListPtr);
                     while(it.hasNext(fragmentListPtr)) {
 
                         Packet fragmentPtr = (Packet)it.next(fragmentListPtr);
                         
-                        data = new String(fragmentPtr.data);
+                        data = (new String(fragmentPtr.data));
                     }
                         
                     Decoded decodedPtr = new Decoded();
index b7b2ac5475164187ca11fb2d5141c14923637782..33a2577f1891661a55f4ec07fc485773c6506d6c 100644 (file)
@@ -151,7 +151,6 @@ public class Stream {
       } else {
         /* Create random string */
         int length = (randomPtr.random_generate() % maxLength) + 1;
-        status = allocVectorPtr.vector_pushBack(str);
         
         if (!status) {
           System.out.printString("Assert failed: status is null\n");
@@ -165,6 +164,7 @@ public class Stream {
         c[l] = '\0';
         str = new String(c);
         String str2 = new String(c);
+        status = allocVectorPtr.vector_pushBack(str);
         int err = detectorPtr.process(str2);
         if (err == error.SIGNATURE) {
           status = MAP_INSERT(attackMapPtr, f, str);
index d4dd8ed0d25e5d621c76bc3c9d94015301e9aabd..77cbe56e0a392d483eb28a1c25f75ee61f0580e1 100644 (file)
@@ -21,10 +21,10 @@ SRC=ttttmp${MAINCLASS}.java \
        Arg.java \
        ../../../ClassLibrary/JavaSTM/Barrier.java 
 
+include ../common/Makefile.flags
+include ../common/Makefile.builds
 
-FLAGS=-nooptimize -debug -thread -mainclass ${MAINCLASS}
-
-default:
+prep:
        cpp ${MAINCLASS}.java > tmp${MAINCLASS}.java
        cpp Stream.java > tmpStream.java
        cpp Decoder.java > tmpDecoder.java
@@ -35,7 +35,6 @@ default:
        ./extractLines tmpStream.java
        ./extractLines tmpDecoder.java
        ./extractLines tmpRBTree.java
-       ../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC}
 
 clean:
        rm tmp*.java
@@ -43,18 +42,4 @@ clean:
        rm -rf tmpbuilddirectory
        rm *.bin
 
-test:
-       cpp ${MAINCLASS}.java > tmp${MAINCLASS}.java
-       cpp Stream.java > tmpStream.java
-       cpp Decoder.java > tmpDecoder.java
-       cpp RBTree.java > tmpRBTree.java
-       cpp Queue_t.java > tmpQueue_t.java
-       ./extractLines tmp${MAINCLASS}.java
-       ./extractLines tmpQueue_t.java
-       ./extractLines tmpStream.java
-       ./extractLines tmpDecoder.java
-       ./extractLines tmpRBTree.java
-       ../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC}
-       ./Intruder.bin -a 10 -l 4 -n 2038 -s 1
-