changes + annotation generation
[IRC.git] / Robust / src / buildscript
index e22558840f2abbaff3690939f6868e52dc2defb4..8a7b7a9a156ba3d36a1aa99a7b5f060539dcba47 100755 (executable)
@@ -50,7 +50,8 @@ echo -disjoint-dvisit-stack-callees-on-top alternate stack strat
 echo -disjoint-dvisit-pqueue use prio. q strat to visit descriptors
 echo -disjoint-desire-determinism set above interproc for determinism
 echo -disjoint-debug-scheduling debug when methods are scheduled for analysis
-echo -count-visits for counting visits in the fixed point algorithm to evaluate convergence behavior
+echo -disjoint-count-visits for counting visits in the fixed point algorithm to evaluate convergence behavior
+echo -disjoint-count-graph-elements FILE nodes, edges and states in final graph for main method context
 echo
 echo -do-definite-reach-analysis enable improved precision for disjoint reachability analysis
 echo -disjoint-disable-global-sweep
@@ -93,6 +94,8 @@ echo -accurateprofile build with accurate profile information including pre/post
 echo -profile_interrupt build with profile information of interrupts
 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
 echo -gccachecoherent turns on the cache coherence during gc
+echo -inputfile enables reading input files in Tilera
+echo -inputfilecompress enables the compressed version of input files
 echo
 echo Multicore GC options
 echo -perfcount performance counters
@@ -124,6 +127,7 @@ echo
 echo SSJava options
 echo -ssjava enables SSJava
 echo -ssjavadebug reports interim results
+echo -ssjavainfer location type inference
 echo -ssjava-induce-error N S where 1/N is the probability to error at any deref or divide and S is a random seed
 echo
 echo Other options
@@ -180,6 +184,8 @@ tmpbuilddirectory="tmpbuilddirectory"
 JNI=false
 SSJAVA=false
 USE_SSJAVA_CLASSPATH=false
+USE_SSJAVA_INFER_CLASSPATH=false
+USE_SSJAVA_NOCLASSPATH=false
 SRCAFTERPP=false;
 COREPROF=false;
 NUMA=false;
@@ -273,6 +279,9 @@ TILERA_PAGE_SIZE="0x10000"
 TILERA_PAGE_SIZE_BITS="16"
 TILERA_NUM_BLOCKS="20"
 TILERA_NUM_PAGES_PER_BLOCK="16"
+INPUTFILEFLAG=false
+INPUTFILES=''
+INPUTFILEOPTS=''
 GCCACHECOHERENTFLAG=false
 COMPILER_HEAP_SIZE="1500"
 
@@ -610,6 +619,14 @@ elif [[ $1 = '-mgc' ]]
 then
 MGCFLAG=true
 JAVAOPTS="$JAVAOPTS -mgc"
+elif [[ $1 = '-inputfile' ]]
+then
+INPUTFILEFLAG=true
+INPUTFILES="$INPUTFILES $2"
+shift
+elif [[ $1 = '-inputfilecompress' ]]
+then
+INPUTFILEOPTS="$INPUTFILEOPTS -compress"
 elif [[ $1 = '-mgcintel' ]]
 then
 MGCINTELFLAG=true
@@ -681,6 +698,15 @@ elif [[ $1 = '-ssjavadebug' ]]
 then
 JAVAOPTS="$JAVAOPTS -ssjavadebug"
 
+elif [[ $1 = '-ssjavanoclasspath' ]]
+then
+USE_SSJAVA_NOCLASSPATH=true
+
+elif [[ $1 = '-ssjavainfer' ]]
+then
+USE_SSJAVA_INFER_CLASSPATH=true
+JAVAOPTS="$JAVAOPTS -ssjavainfer"
+
 elif [[ $1 = '-ssjava-inject-error' ]]
 then
 USE_SSJAVA_CLASSPATH=true
@@ -887,7 +913,13 @@ elif $MGCFLAG
 
 elif $USE_SSJAVA_CLASSPATH
   then
-  JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/SSJava"  
+  if $USE_SSJAVA_INFER_CLASSPATH
+    then
+    JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/SSJavaInfer"
+  elif ! $USE_SSJAVA_INFER_NOCLASSPATH
+    then
+    JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/SSJava"  
+  fi
 
 else
   JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/"
@@ -965,6 +997,17 @@ else
   fi
 fi
 
+# transfer the input files
+
+if $INPUTFILEFLAG
+then
+./ourjavac -cp ../cup:.:$(CLASSPATH) ${ROBUSTROOT}/Tilera/Benchmarks/GC/galois/InputFileTranslator.java
+if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx${COMPILER_HEAP_SIZE}m -classpath $ROBUSTROOT/Tilera/Benchmarks/GC/galois InputFileTranslator \
+       -dir $BUILDDIR $INPUTFILEOPTS $INPUTFILES
+    then exit $?
+fi
+fi
+
 # after executing Main, if -justanalyze flag, just exit
 if $EXITAFTERANALYSIS
 then
@@ -1107,6 +1150,11 @@ else
 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
 fi
 
+if $INPUTFILEFLAG
+then
+TILERACFLAGS="${TILERACFLAGS} -DINPUTFILE"
+fi
+
 if $GCTBLDEBUGFLAG
 then
 TILERACFLAGS="${TILERACFLAGS} -DGC_TBL_DEBUG"