Index: examples/README
===================================================================
--- examples/README	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
+++ examples/README	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -0,0 +1,20 @@
+
+This directory serves as a regression testing and performance testing
+platform for libabac.  It contains many actual valid RT0/RT1/RT2 
+examples in C/python/perl. It also contain examples of Creddy in 
+action.
+
+creddy_prover_tests : various RT examples using Creddy and abac_prover_yap,
+                      a C implemenation of an ABAC prover
+python_tests: same RT examples as in creddy_prover_tests but in python scripts
+              using libabac ABAC
+example_scripts: small examples scripts in perl/python/C
+passphrase_tests: examples that demonstrate the use of an encrypted
+                  private key 
+scaling_tests: performance testing
+
+
+To run,
+
+   make runcheck
+
Index: examples/cleanall
===================================================================
--- examples/cleanall	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#!/bin/sh 
-
-pwd=`pwd`
-
-for i in `ls -1`; do
-   if [ -d $i ]; then
-       cd $i
-       .runall clean
-       cd $pwd
-   fi
-done
Index: examples/creddy_prover_tests/.runall
===================================================================
--- examples/creddy_prover_tests/.runall	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,41 +1,0 @@
-#!/bin/sh 
-
-# format,
-#   runall clean
-#   runall setup
-#   runall run
-
-progname=$(basename $0)
-pwd=`pwd`
-
-if [ $# -eq 0 ]; then
-    echo "Usage: $progname (clean|setup|run)" >&2;
-    exit 1
-fi
-
-
-UID=`id | sed -e 's/ .*//' | sed -e 's/.*(//' | sed -e 's/)//'`
-if [ $UID = "mei" ]; then
-    ABAC_PROVER_PATH="../../../libabac"
-    else
-    ABAC_PROVER_PATH=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
-fi
-export ABAC_PROVER_PATH
-
-for i in `ls -1 `; do
-   if [ -d $i ]; then
-       cd $i
-       if [ "$1" = "clean" ]; then
-           rm -rf ../allout.sha ../allout.cn
-           printf "\n ==> CLEANING on %s\n" "$i" >& 2 ;
-           rm -rf *.der *.pem creds_dump
-       elif [ "$1" = "setup" ]; then
-           printf "\n ==> SETUP on %s\n" "$i"  >& 2;
-           ./README
-       elif [ "$1" = "run" ] ; then
-           printf "\n ==> RUN on %s\n" "$i" ;
-           ./run_query 
-       fi 
-       cd $pwd
-   fi
-done
Index: examples/creddy_prover_tests/Makefile
===================================================================
--- examples/creddy_prover_tests/Makefile	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
+++ examples/creddy_prover_tests/Makefile	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -0,0 +1,40 @@
+
+DIRECTORY=access_rt2 acme_friend_rt1 acme_rockets_intersection_rt0 acme_rockets_rt0 alice_rt1 alumni2_rt1 alumni3_rt1 alumni_rt1 balltime_rt2 evaluator_rt1 experiment_create_rt0 file_read_rt2 fruits_rt2 leader_rt1 payraise_rt1
+
+.PHONY : setup runcheck clean 
+
+clean:
+	@for i in $(DIRECTORY); do \
+	here=`pwd`; \
+	printf "\n ==> CLEANING on %s\n" "$$i"; \
+	cd $$i; \
+	rm -rf *.der *.pem *.cn *.sha *.log creds_dump; \
+	cd $$here; \
+	done 
+	@rm -rf allout.cn allout.sha
+
+setup: 
+	@for i in $(DIRECTORY); do \
+	here=`pwd`; \
+	cd $$i; \
+	./README 1 >/dev/null 2>&1; \
+	cd $$here; \
+	done
+
+runcheck: 
+	@echo 'running libabac CREDDY/ABAC_PROVER_YAP testing...' 
+	@make setup
+	@for i in $(DIRECTORY); do \
+	here=`pwd`; \
+	cd $$i; \
+	printf "\n ==> RUN on %s\n" "$$i" >> allout.sha; \
+	./run_query >> ../allout.sha 2>/dev/null; \
+	printf "\n ==> RUN on %s\n" "$$i" >> ../allout.cn; \
+	env ABAC_CN=1 ./run_query >> ../allout.cn 2>/dev/null; \
+	cd $$here; \
+	done
+	@if test `diff -q allout.save allout.cn |wc -l ` -eq 0 ; \
+	then echo "   PASSED"; \
+	else echo "   ERROR:got changes!!!"; \
+	fi
+
Index: examples/creddy_prover_tests/access_rt2/run_query
===================================================================
--- examples/creddy_prover_tests/access_rt2/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/access_rt2/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -5,5 +5,10 @@
 pwd=`pwd`
 
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
+
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/acme_friend_rt1/run_query
===================================================================
--- examples/creddy_prover_tests/acme_friend_rt1/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/acme_friend_rt1/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -4,5 +4,9 @@
 pwd=`pwd`
 
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/acme_rockets_intersection_rt0/run_query
===================================================================
--- examples/creddy_prover_tests/acme_rockets_intersection_rt0/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/acme_rockets_intersection_rt0/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -4,5 +4,9 @@
 pwd=`pwd`
 
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/acme_rockets_rt0/run_query
===================================================================
--- examples/creddy_prover_tests/acme_rockets_rt0/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/acme_rockets_rt0/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,6 +3,9 @@
 
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/alice_rt1/run_query
===================================================================
--- examples/creddy_prover_tests/alice_rt1/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/alice_rt1/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,6 +3,9 @@
 
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/alumni2_rt1/run_query
===================================================================
--- examples/creddy_prover_tests/alumni2_rt1/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/alumni2_rt1/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,6 +3,9 @@
 
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/alumni3_rt1/run_query
===================================================================
--- examples/creddy_prover_tests/alumni3_rt1/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/alumni3_rt1/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -1,7 +1,11 @@
 
 # alumni3_rt1_typed  
+
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/alumni_rt1/run_query
===================================================================
--- examples/creddy_prover_tests/alumni_rt1/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/alumni_rt1/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,6 +3,9 @@
 
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/balltime_rt2/run_query
===================================================================
--- examples/creddy_prover_tests/balltime_rt2/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/balltime_rt2/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,6 +3,9 @@
 
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/evaluator_rt1/run_query
===================================================================
--- examples/creddy_prover_tests/evaluator_rt1/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/evaluator_rt1/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,6 +3,9 @@
 
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/experiment_create_rt0/run_query
===================================================================
--- examples/creddy_prover_tests/experiment_create_rt0/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/experiment_create_rt0/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,6 +3,9 @@
 
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/file_read_rt2/run_query
===================================================================
--- examples/creddy_prover_tests/file_read_rt2/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/file_read_rt2/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,6 +3,9 @@
 
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/fruits_rt2/run_query
===================================================================
--- examples/creddy_prover_tests/fruits_rt2/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/fruits_rt2/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,6 +3,9 @@
 
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/leader_rt1/run_query
===================================================================
--- examples/creddy_prover_tests/leader_rt1/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/leader_rt1/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,6 +3,9 @@
 
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/payraise_rt1/run_query
===================================================================
--- examples/creddy_prover_tests/payraise_rt1/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/creddy_prover_tests/payraise_rt1/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,6 +3,9 @@
 
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/creddy_prover_tests/runcheck
===================================================================
--- examples/creddy_prover_tests/runcheck	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,23 +1,0 @@
-#!/bin/sh 
-
-rm -rf allout.cn allout.sha
-
-./.runall clean 1 >/dev/null 2>&1
-./.runall setup 1 >/dev/null 2>&1
-
-ABAC_PROVER_PATH=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
-export ABAC_PROVER_PATH
-
-echo '\n'
-echo 'running libabac CREDDY/ABAC_PROVER_YAP testing...'
-echo '  ---with sha'
-env ./.runall run 1> allout.sha 2>/dev/null
-echo '  ---with cn'
-env ABAC_CN=1 ./.runall run 1> allout.cn 2>/dev/null
-result=`diff allout.cn allout.save`
-
-if [ "$result" = "" ]; then
-   echo "   PASSED"
-else
-   echo "   ERROR:got changes!!!"
-fi
Index: examples/example_scripts/.runall
===================================================================
--- examples/example_scripts/.runall	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,37 +1,0 @@
-#!/bin/sh 
-
-# format,
-#   runall clean
-#   runall run
-
-progname=$(basename $0)
-pwd=`pwd`
-
-if [ $# -eq 0 ]; then
-    echo "Usage: $progname (clean|run)" >&2;
-    exit 1
-fi
-
-ABAC_PROVER_PATH=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
-export ABAC_PROVER_PATH
-
-if [ "$1" = "clean" ]; then
-    rm -rf allout.tmp 
-    for i in `ls -1 `; do
-        if [ -d $i ]; then
-            printf "\n ==> CLEANING on %s\n" "$i" >& 2 ;
-            cd $i
-            make realclean
-            cd $pwd
-        fi
-    done
-elif [ "$1" = "run" ] ; then
-    for i in `ls -1 `; do
-        if [ -d $i ]; then
-            printf "\n ==> RUN on %s\n" "$i" ;
-            cd $i
-            ./run_test
-            cd $pwd
-        fi
-    done
-fi 
Index: examples/example_scripts/c/Makefile
===================================================================
--- examples/example_scripts/c/Makefile	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/example_scripts/c/Makefile	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -15,8 +15,5 @@
 
 clean:
-	@rm -f abac_attr.o abac_attr *.pem *.der abac_prover.o abac_prover
-
-realclean: 
-	@rm -f abac_attr.o abac_attr *.pem *.der abac_prover.o abac_prover *.log 
+	@rm -f abac_attr.o abac_attr *.pem *.der abac_prover.o abac_prover *.log
 
 setup: abac_attr abac_prover
Index: examples/example_scripts/c/abac_prover.c
===================================================================
--- examples/example_scripts/c/abac_prover.c	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/example_scripts/c/abac_prover.c	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -37,4 +37,6 @@
     printf("with %s\n", with);
 
+    int k=100;
+while(k) {
     credentials = abac_context_query(ctx,
                             query, with,
@@ -53,4 +55,6 @@
     if(credentials)
         abac_context_credentials_free(credentials);
+    k--;
+}
 
     abac_context_free(ctx);
Index: examples/example_scripts/c/run_prover
===================================================================
--- examples/example_scripts/c/run_prover	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/example_scripts/c/run_prover	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -10,4 +10,7 @@
 ./abac_prover "$keystore" "$role" "$principal"
 
+#echo "$keystore" "$role" "$principal"
+#gdb ./abac_prover
 
 
+
Index: examples/example_scripts/perl/Makefile
===================================================================
--- examples/example_scripts/perl/Makefile	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/example_scripts/perl/Makefile	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -2,8 +2,5 @@
 
 clean:
-	@rm -rf *.pem *.der
-
-realclean:
-	@rm -rf *.pem *.der *.log 
+	@rm -rf *.pem *.der *.log
 
 setup: 
Index: examples/example_scripts/python/Makefile
===================================================================
--- examples/example_scripts/python/Makefile	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/example_scripts/python/Makefile	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,7 +3,4 @@
 
 clean:
-	@rm -f *.pem *.der 
-
-realclean:
 	@rm -f *.pem *.der *.log pfile
 
Index: examples/example_scripts/runcheck
===================================================================
--- examples/example_scripts/runcheck	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#!/bin/sh 
-
-rm -rf allout.tmp
-
-./.runall clean 1 >/dev/null 2>&1
-
-ABAC_PROVER_PATH=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
-export ABAC_PROVER_PATH
-
-echo '\n'
-echo 'running libabac SCRIPT testing...'
-./.runall run 1> allout.tmp 2>/dev/null
-result=`diff allout.tmp allout.save`
-
-if [ "$result" = "" ]; then
-   echo "   PASSED"
-else
-   echo "   ERROR:got changes!!!"
-fi
Index: examples/passphrase_tests/.runall
===================================================================
--- examples/passphrase_tests/.runall	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#!/bin/sh 
-
-# format,
-#   runall clean
-#   runall setup
-#   runall run
-
-progname=$(basename $0)
-pwd=`pwd`
-
-if [ $# -eq 0 ]; then
-    echo "Usage: $progname (clean|setup|run)" >&2;
-    exit 1
-fi
-
-ABAC_PROVER_PATH=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
-export ABAC_PROVER_PATH
-
-if [ "$1" = "clean" ]; then
-    rm -rf allout.tmp 
-    rm -rf ENC_PRIVATE.PEM PFILE
-    for i in `ls -1 `; do
-        if [ -d $i ]; then
-            printf "\n ==> CLEANING on %s\n" "$i" >& 2 ;
-            cd $i
-            rm -rf */*.der */*.pem */pfile */*.tmp
-            rm -rf */*.cn */*.sha */*.log */creds_dump
-            rm -rf *.der *.pem pfile *.tmp
-            cd $pwd
-        fi
-    done
-elif [ "$1" = "setup" ]; then
-    echo "dumdum" > PFILE
-    echo ">>>>  generate a encrypted private key ..."
-    echo "passphrase is ==> dumdum"
-    openssl genrsa -des3 -out ENC_PRIVATE.PEM -passout file:PFILE
-    for i in `ls -1 `; do
-        if [ -d $i ]; then
-            printf "\n ==> SETUP on %s\n" "$i"  >& 2;
-            cd $i
-            ./setup
-            cd $pwd
-        fi
-    done
-elif [ "$1" = "run" ] ; then
-    for i in `ls -1 `; do
-        if [ -d $i ]; then
-            printf "\n ==> RUN on %s\n" "$i" ;
-            cd $i
-            ./run_test
-            cd $pwd
-        fi
-    done
-fi 
Index: examples/passphrase_tests/Makefile
===================================================================
--- examples/passphrase_tests/Makefile	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
+++ examples/passphrase_tests/Makefile	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -0,0 +1,46 @@
+
+DIRECTORY=creddy creddy_prover python
+
+.PHONY : setup runcheck clean 
+runcheck: $(DIRECTORY)
+
+clean:
+	@for i in $(DIRECTORY); do \
+	here=`pwd`; \
+	cd $$i; \
+	printf "\n ==> CLEANING on %s\n" "$$i"; \
+	rm -rf */*.der */*.pem */pfile */*.tmp; \
+	rm -rf */*.cn */*.sha */*.log */creds_dump; \
+	rm -rf *.der *.pem pfile *.tmp; \
+	cd $$here; \
+	done 
+	@rm -rf allout.tmp
+	@rm -rf ENC_PRIVATE.PEM PFILE
+
+
+setup: 
+	@echo "dumdum" > PFILE
+	@openssl genrsa -des3 -out ENC_PRIVATE.PEM -passout file:PFILE 1>/dev/null 2>&1
+	@for i in $(DIRECTORY); do \
+	here=`pwd`; \
+	cd $$i; \
+	./setup 1 >/dev/null 2>&1; \
+	cd $$here; \
+	done
+
+
+runcheck:
+	@echo 'running libabac PASSPHRASE testing...'
+	@make setup
+	@for i in $(DIRECTORY); do \
+	here=`pwd`; \
+	cd $$i; \
+	printf "\n ==> RUN on %s\n" "$$i" >> ../allout.tmp ; \
+	./run_test 1 >> ../allout.tmp 2>/dev/null; \
+	cd $$here; \
+	done 
+	@if test `diff -q allout.save allout.tmp |wc -l ` -eq 0 ; \
+	then echo "   PASSED"; \
+	else echo "   ERROR:got changes!!!"; \
+	fi
+
Index: examples/passphrase_tests/creddy_prover/acme_rockets_rt0/run_query
===================================================================
--- examples/passphrase_tests/creddy_prover/acme_rockets_rt0/run_query	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/passphrase_tests/creddy_prover/acme_rockets_rt0/run_query	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -3,6 +3,9 @@
 
 pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 keyloc=$pwd
 
Index: examples/passphrase_tests/runcheck
===================================================================
--- examples/passphrase_tests/runcheck	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#!/bin/sh 
-
-rm -rf allout.tmp
-
-./.runall clean 1 >/dev/null 2>&1
-./.runall setup 1 >/dev/null 2>&1
-
-ABAC_PROVER_PATH=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
-export ABAC_PROVER_PATH
-
-echo '\n'
-echo 'running libabac PASSPHRASE testing...'
-./.runall run 1> allout.tmp 2>/dev/null
-result=`diff allout.tmp allout.save`
-
-if [ "$result" = "" ]; then
-   echo "   PASSED"
-else
-   echo "   ERROR:got changes!!!"
-fi
Index: examples/runall
===================================================================
--- examples/runall	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#!/bin/sh 
-
-pwd=`pwd`
-
-for i in `ls -1`; do
-   if [ -d $i ]; then
-       cd $i
-       if [ -e runcheck ]; then
-           ./runcheck
-       fi
-       cd $pwd
-   fi
-done
Index: examples/scaling_tests/.runall
===================================================================
--- examples/scaling_tests/.runall	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#!/bin/sh 
-
-# format,
-#   .runall clean
-#   .runall run
-#   .runall gettime
-
-progname=$(basename $0)
-pwd=`pwd`
-
-if [ $# -eq 0 ]; then
-    echo "Usage: $progname (clean|run)" >&2;
-    exit 1
-fi
-
-ABAC_PROVER_PATH=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
-export ABAC_PROVER_PATH
-
-if [ "$1" = "clean" ]; then
-    rm -rf allout.tmp 
-    for i in `ls -1 `; do
-        if [ -d $i ]; then
-            printf "\n ==> CLEANING on %s\n" "$i" >& 2 ;
-            cd $i
-            ./run_clean
-            cd $pwd
-        fi
-    done
-elif [ "$1" = "run" ] ; then
-    for i in `ls -1 `; do
-        if [ -d $i ]; then
-            printf "\n ==> RUN on %s\n" "$i" ;
-            cd $i
-            ./run_test
-            cd $pwd
-        fi
-    done
-elif [ "$1" = "gettime" ] ; then
-    for i in `ls -1 `; do
-        if [ -d $i ]; then
-            printf "\n ==> TIME on %s\n" "$i" ;
-            cd $i
-            for j in `ls -1`; do
-               if [ -d $j ]; then
-                    cd $j
-                    if [ -f get_time ]; then
-                        ./get_time
-                    fi
-               fi
-            done
-            cd $pwd
-        fi
-    done
-fi 
Index: examples/scaling_tests/README
===================================================================
--- examples/scaling_tests/README	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/scaling_tests/README	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -6,11 +6,20 @@
    daisychain is the long chaining proof test
 
-     runcheck
+   To run,
+ 
+     make runcheck
+
 
    will run several sets of setup/query that are of different
-sizes.
+sizes on each type of test
 
-     gettime 
+   2 subdirectories are setup toi make timing runs and generate
+jpeg graphs.
 
-   will extract timing information from each set. (very basic)
+   haystack/fruit_python
+   daisychain/likes_python
 
+   To run,
+
+      make plot
+ 
Index: examples/scaling_tests/daisychain/likes_python/Makefile
===================================================================
--- examples/scaling_tests/daisychain/likes_python/Makefile	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
+++ examples/scaling_tests/daisychain/likes_python/Makefile	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -0,0 +1,24 @@
+
+
+TEST=likes_0 likes_10 likes_20
+TIMING=likes_0 likes_10 likes_20 likes_30 likes_40 likes_50 likes_100 likes_150 likes_200
+
+.PHONY : test timing plot 
+test: $(TEST)
+timing: $(TIMING)
+
+clean: 
+	@rm -rf likes_* run_plot plot timing
+
+$(TEST) :
+	@run_one $(subst likes_,,$@)
+
+$(TIMING):
+	@run_one $(subst likes_,,$@)
+
+plot:
+	@make clean
+	cp ../../plotting/run_plot .
+	@make test
+	@make timing
+	@run_plot likes
Index: examples/scaling_tests/daisychain/likes_python/base/BQUERY.py
===================================================================
--- examples/scaling_tests/daisychain/likes_python/base/BQUERY.py	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,62 +1,0 @@
-#!/usr/bin/env python
-
-"""
-Run the queries described in README
-
-cmd2: env ABAC_CN=1 keystore=`pwd` ./query.py
-
-"""
-
-import os
-import ABAC
-
-ctxt = ABAC.Context()
-
-# Keystore is the directory containing the principal credentials.
-# Load existing principals and/or policy credentials
-if (os.environ.has_key("keystore")) :
-    keystore=os.environ["keystore"]
-    ctxt.load_directory(keystore)
-else:
-    print("keystore is not set...")
-    exit(1)
-
-##########################################################################
-# dump the loaded principals/policies
-#
-
-fd=os.open("creds_dump",os.O_WRONLY|os.O_CREAT)
-out = ctxt.context_principals()
-for x in out[1]:
-    os.write(fd, x.string())
-    os.write(fd,"\n")
-out = ctxt.context_credentials()
-for c in out[1]:
-    string="%s <- %s" % (c.head_string(), c.tail_string())
-    os.write(fd,string) 
-    os.write(fd,"\n")
-os.close(fd)
-
-##########################################################################
-# Does John0 likes JohnX ?
-# role = [keyid:JohnX].role:after 
-# p [Keyid:john0]
-bid="John%s_ID.pem"% #VAL#
-bID=ABAC.ID(bid)
-b=bID.id_keyid()
-
-aID=ABAC.ID("John0_ID.pem")
-a=aID.id_keyid()
-
-role = ABAC.Role(a,"likes")
-p = ABAC.Role(b)
-
-print "\n===bad============ john0.likes <- johnX "
-out = ctxt.query(role, p)
-for c in out[1]:
-    print "%s <- %s" % (c.head_string(), c.tail_string())
-
-#### border case for VAL=0 (faking it) #### 
-if ( #VAL# == 0) :
-    print "YAP query failed (fake)\n"
-
Index: examples/scaling_tests/daisychain/likes_python/base/QUERY.py
===================================================================
--- examples/scaling_tests/daisychain/likes_python/base/QUERY.py	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/scaling_tests/daisychain/likes_python/base/QUERY.py	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -4,12 +4,46 @@
 Run the queries described in README
 
-cmd2: env ABAC_CN=1 keystore=`pwd` ./query.py
+cmd: env ABAC_CN=1 keystore=`pwd` ./query.py
 
 """
 
 import os
+import sys
 import ABAC
+import time
+import datetime
+from datetime import timedelta
+
+debug=0
 
 ctxt = ABAC.Context()
+
+cred_count = 2 + 2 * #VAL#
+
+def get_msec(e_time) :
+    msec_delta=0
+    if( int(e_time.seconds) !=0 ) :
+        msec_delta= int(e_time.seconds) *1000
+    if( int(e_time.microseconds) !=0) :
+        msec_delta = msec_delta + int(e_time.microseconds)/1000
+    return msec_delta
+
+def get_micro(e_time) :
+    micro_delta=0
+    if( int(e_time.seconds) !=0 ) :
+        micro_delta= int(e_time.seconds) *1000000
+    if( int(e_time.microseconds) !=0) :
+        micro_delta = micro_delta + int(e_time.microseconds)
+    return micro_delta
+
+def extract_delta(starttime, endtime) :
+    """ given a start time, and a endtime, extract delta """
+    elapsed_time = (endtime - starttime)
+# Only handle in seconds/microseconds
+    if ( int(elapsed_time.days) != 0 ) :
+        sys.stderr,write("%s is longer than a day !!!" % msg)
+        exit(1)
+    return elapsed_time
+
 
 # Keystore is the directory containing the principal credentials.
@@ -17,5 +51,10 @@
 if (os.environ.has_key("keystore")) :
     keystore=os.environ["keystore"]
+    starttime = datetime.datetime.now()
     ctxt.load_directory(keystore)
+    endtime = datetime.datetime.now()
+    elapsed_load=extract_delta(starttime, endtime)
+    elapsed_msec=get_msec(elapsed_load)
+    sys.stderr.write("%d %d LOAD(msec)\n" % (cred_count,elapsed_msec))
 else:
     print("keystore is not set...")
@@ -42,17 +81,91 @@
 # role = [keyid:JohnX].role:after 
 # p [Keyid:john0]
-aid="John%s_ID.pem"% #VAL#
-aID=ABAC.ID(aid)
-a=aID.id_keyid()
+def goodQuery() :
+    aid="John%s_ID.pem"% #VAL#
+    aID=ABAC.ID(aid)
+    a=aID.id_keyid()
 
-bID=ABAC.ID("John0_ID.pem")
-b=bID.id_keyid()
+    bID=ABAC.ID("John0_ID.pem")
+    b=bID.id_keyid()
 
-role = ABAC.Role(a,"likes")
-p = ABAC.Role(b)
+    role = ABAC.Role(a,"likes")
+    p = ABAC.Role(b)
 
-print "\n===good============ johnN.likes <- john0 "
-out = ctxt.query(role, p)
-for c in out[1]:
-    print "%s <- %s" % (c.head_string(), c.tail_string())
+    print "\n===good============ johnN.likes <- john0 "
+    starttime = datetime.datetime.now()
+    out = ctxt.query(role, p)
+    endtime = datetime.datetime.now()
+    for c in out[1]:
+        print "%s <- %s" % (c.head_string(), c.tail_string())
+    return extract_delta(starttime, endtime)
+    
 
+##########################################################################
+# Does John0 likes JohnX ?
+# role = [keyid:JohnX].role:after 
+# p [Keyid:john0]
+def badQuery() :
+    bid="John%s_ID.pem"% #VAL#
+    bID=ABAC.ID(bid)
+    b=bID.id_keyid()
+
+    aID=ABAC.ID("John0_ID.pem")
+    a=aID.id_keyid()
+    
+    role = ABAC.Role(a,"likes")
+    p = ABAC.Role(b)
+    
+    print "\n===bad============ john0.likes <- johnX "
+    starttime = datetime.datetime.now()
+    out = ctxt.query(role, p)
+    endtime = datetime.datetime.now()
+    for c in out[1]:
+        print "%s <- %s" % (c.head_string(), c.tail_string())
+    return extract_delta(starttime, endtime)
+        
+##############################################################
+
+#skip the first one
+e_time=goodQuery()
+elapsed_micro=get_micro(e_time)
+sys.stderr.write("%d %d GOOD_1(micro)\n" % (cred_count,elapsed_micro))
+
+elapsed_good=timedelta()
+k=10
+while(k):
+    e_time=goodQuery()
+    elapsed_good=elapsed_good+e_time
+    k=k-1
+    if(k==9):
+       elapsed_micro=get_micro(e_time)
+       sys.stderr.write("%d %d GOOD_2(micro)\n" % (cred_count,elapsed_micro))
+
+    if(debug):
+        elapsed_micro=get_micro(e_time)
+        sys.stderr.write("%d %d GOOD_%d(micro)\n" % (cred_count,elapsed_micro,k))
+elapsed_micro=get_micro(elapsed_good)
+sys.stderr.write("%d %d GOOD_t(micro)\n" % (cred_count,elapsed_micro/10))
+
+
+###############################################################
+
+e_time=badQuery()
+elapsed_micro=get_micro(e_time)
+sys.stderr.write("%d %d BAD_1(micro)\n" % (cred_count,elapsed_micro))
+
+elapsed_bad=timedelta()
+k=10
+while(k):
+    e_time=badQuery()
+    elapsed_bad=elapsed_bad+e_time
+    k=k-1
+    if(k==9):
+        elapsed_micro=get_micro(e_time)
+        sys.stderr.write("%d %d BAD_2(micro)\n" % (cred_count,elapsed_micro))
+
+    if(debug):
+        elapsed_micro=get_micro(e_time)
+        sys.stderr.write("%d %d BAD_%d(micro)\n" % (cred_count,elapsed_micro,k))
+
+elapsed_micro=get_micro(elapsed_bad)
+sys.stderr.write("%d %d BAD_t(micro)\n" % (cred_count,elapsed_micro/10))
Index: examples/scaling_tests/daisychain/likes_python/base/RESULT
===================================================================
--- examples/scaling_tests/daisychain/likes_python/base/RESULT	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,3 +1,0 @@
-
-===bad============ johnN.after <- john0 
-YAP query failed
Index: examples/scaling_tests/daisychain/likes_python/get_time
===================================================================
--- examples/scaling_tests/daisychain/likes_python/get_time	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,7 +1,0 @@
-#!/bin/sh
-
-echo "..forward time.."
-grep -s user likes_*/likes.time
-
-echo "..backward time.."
-grep -s user likes_*/likes_b.time
Index: examples/scaling_tests/daisychain/likes_python/run_clean
===================================================================
--- examples/scaling_tests/daisychain/likes_python/run_clean	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#!/bin/sh
-
-rm -rf likes_*
Index: examples/scaling_tests/daisychain/likes_python/run_one
===================================================================
--- examples/scaling_tests/daisychain/likes_python/run_one	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/scaling_tests/daisychain/likes_python/run_one	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -2,4 +2,10 @@
 
 noise=$1
+
+if [ -z "$noise" ]; then
+    exit
+fi 
+
+echo "---running daisychain likes_python $noise scaling"
 
 rm -rf likes_$noise
@@ -7,29 +13,36 @@
 sed "s/#VAL#/$noise/" base/SETUP.py > likes_$noise/setup.py
 sed "s/#VAL#/$noise/" base/QUERY.py > likes_$noise/query.py
-sed "s/#VAL#/$noise/" base/BQUERY.py > likes_$noise/bquery.py
 sed "s/#VAL#/$noise/" base/ATTR.py > likes_$noise/attr.py
 
-cp base/RESULT likes_$noise/likes.save
-
 cd likes_$noise
-chmod +x setup.py attr.py query.py bquery.py
+chmod +x setup.py attr.py query.py
 ./setup.py 1>/dev/null 2>& 1
 env keystore=`pwd` ./attr.py 1>/dev/null 2>& 1
 
-echo "  forward.."
-time env keystore=`pwd` ABAC_CN=1 ./query.py 1>likes.tmp 2> likes.time
-result=`grep "YAP query succeed" likes.tmp 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
+env keystore=`pwd` ABAC_CN=1 ./query.py 1>likes.tmp 2> likes.time
+
+if [ $noise -eq 0 ] ; then
+    result=`egrep -c "YAP query succeed" likes.tmp 2>/dev/null`
+    if [ $result -eq 22 ]; then
+       echo "   PASSED"
+       exit 0
+    else  
+       echo "   ERROR"
+       exit 1
+    fi
 fi
 
-echo "  backward.."
-time env keystore=`pwd` ABAC_CN=1 ./bquery.py 1>likes_b.tmp 2> likes_b.time
-result=`grep "YAP query failed" likes_b.tmp 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
+s=`grep -c "YAP query succeed" likes.tmp 2>/dev/null`
+f=`grep -c "YAP query failed" likes.tmp 2>/dev/null `
+if [ $s -ne 11 ] ; then
+    echo "   ERROR"
+    exit 1
 fi
+
+if [ $f  -ne 11 ] ; then
+    echo "   ERROR"
+    exit 1
+fi
+
+echo "   PASSED"
+
Index: examples/scaling_tests/daisychain/likes_python/run_test
===================================================================
--- examples/scaling_tests/daisychain/likes_python/run_test	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#!/bin/sh 
-
-run_clean
-
-echo '---running daisychain likes_python 0 scaling'
-run_one 0  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-
-echo '---running daisychain likes_python 10 scaling'
-run_one 10  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-echo '---running daisychain likes_python 20 scaling'
-run_one 20  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-echo '---running daisychain likes_python 30 scaling'
-run_one 30  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-echo '---running daisychain likes_python 100 scaling'
-run_one 100  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-echo '---running daisychain likes_python 200 scaling'
-run_one 200  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
Index: examples/scaling_tests/daisychain/run_clean
===================================================================
--- examples/scaling_tests/daisychain/run_clean	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#!/bin/sh 
-
-pwd=`pwd`
-
-for i in `ls -1` ; do
-    if [ -d $i ]; then
-        printf " ...cleaning on %s\n" "$i"  >& 2;
-        cd $i
-        ./run_clean
-        cd $pwd
-    fi
-done
-
-
Index: examples/scaling_tests/daisychain/run_test
===================================================================
--- examples/scaling_tests/daisychain/run_test	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#!/bin/sh 
-
-pwd=`pwd`
-
-for i in `ls -1` ; do
-    if [ -d $i ]; then
-        printf " ...running on %s\n" "$i"  >& 2;
-        cd $i
-        ./run_test
-        cd $pwd
-    fi
-done
-
-
Index: examples/scaling_tests/gettime
===================================================================
--- examples/scaling_tests/gettime	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,8 +1,0 @@
-#!/bin/sh 
-
-ABAC_PROVER_PATH=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
-export ABAC_PROVER_PATH
-
-echo '\n'
-echo 'getting libabac SCALING times...'
-.runall gettime 
Index: examples/scaling_tests/haystack/README
===================================================================
--- examples/scaling_tests/haystack/README	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/scaling_tests/haystack/README	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -2,6 +2,5 @@
    To demostrate scalability of libabac, noise is introduced into the
 yap prolog db by adding extraneous attribute and principal credentials.
-Valid queries are made and the result is validated. Timing is collected
-with different degree of noise.
+Valid queries are made and the result is validated. 
 
 
Index: examples/scaling_tests/haystack/fruit_prover/Makefile
===================================================================
--- examples/scaling_tests/haystack/fruit_prover/Makefile	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
+++ examples/scaling_tests/haystack/fruit_prover/Makefile	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -0,0 +1,12 @@
+
+
+TEST=fruit_0 fruit_10 fruit_20 
+
+.PHONY : test clean 
+test: $(TEST)
+
+clean: 
+	@rm -rf fruit_*
+
+$(TEST) :
+	@run_one $(subst fruit_,,$@) 
Index: examples/scaling_tests/haystack/fruit_prover/base/QUERY
===================================================================
--- examples/scaling_tests/haystack/fruit_prover/base/QUERY	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/scaling_tests/haystack/fruit_prover/base/QUERY	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -1,9 +1,13 @@
+
+# number of credentials, 3 + 6 + 3 x #VAL#
 
 # fruits_rt2_typed
 
-pwd=`pwd`
-
-eloc=${ABAC_PROVER_PATH}
-keyloc=$pwd
+keyloc=`pwd`
+eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
+if [ "$eloc" = "" ]; then
+  echo "ERROR: abac_prover_yap is not in the search path!!!"
+  exit 1
+fi
 
 ralphs=`creddy --keyid --cert $keyloc/Ralphs_ID.pem`
Index: examples/scaling_tests/haystack/fruit_prover/base/README
===================================================================
--- examples/scaling_tests/haystack/fruit_prover/base/README	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/scaling_tests/haystack/fruit_prover/base/README	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -8,4 +8,6 @@
 #  The same queries used in fruit_rt2 are run against this setup and 
 #  should  yield the same result
+# number of credentials, 3 + 6 + 3 x #VAL#
+
 
 # fruits_rt2_creddy
Index: examples/scaling_tests/haystack/fruit_prover/get_time
===================================================================
--- examples/scaling_tests/haystack/fruit_prover/get_time	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#!/bin/sh
-
-grep -s user fruit_*/fruit.time
Index: examples/scaling_tests/haystack/fruit_prover/run_clean
===================================================================
--- examples/scaling_tests/haystack/fruit_prover/run_clean	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#!/bin/sh
-
-rm -rf fruit_*
Index: examples/scaling_tests/haystack/fruit_prover/run_one
===================================================================
--- examples/scaling_tests/haystack/fruit_prover/run_one	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/scaling_tests/haystack/fruit_prover/run_one	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -4,12 +4,19 @@
 noise=$1
 
+if [ -z "$noise" ]; then
+    exit
+fi 
+
+echo "---running haystack fruit_prover $noise scaling"
+
 rm -rf fruit_$noise
 mkdir fruit_$noise
+
 sed "s/#VAL#/$noise/" base/README > fruit_$noise/README
+sed "s/#VAL#/$noise/" base/QUERY > fruit_$noise/run_query
 cp base/RESULT fruit_$noise/fruit.save
-cp base/QUERY fruit_$noise/run_query
 cd fruit_$noise
 chmod +x README run_query
-./README
+./README 1>/dev/null 2>&1
 time env ABAC_CN=1 ./run_query 1>fruit.tmp 2> fruit.time
 result=`diff fruit.tmp fruit.save 2>/dev/null`
Index: examples/scaling_tests/haystack/fruit_prover/run_test
===================================================================
--- examples/scaling_tests/haystack/fruit_prover/run_test	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,55 +1,0 @@
-#!/bin/sh 
-
-run_clean
-
-echo '---running haystack fruit_prover 0 scaling'
-run_one 0  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-
-echo '---running haystack fruit_prover 10 scaling'
-run_one 10  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-echo '---running haystack fruit_prover 20 scaling'
-run_one 20  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-echo '---running haystack fruit_prover 30 scaling'
-run_one 30  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-echo '---running haystack fruit_prover 200 scaling'
-run_one 200  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
Index: examples/scaling_tests/haystack/fruit_python/base/QUERY.py
===================================================================
--- examples/scaling_tests/haystack/fruit_python/base/QUERY.py	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/scaling_tests/haystack/fruit_python/base/QUERY.py	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -4,13 +4,48 @@
 Run the queries described in README
 
-cmd1:env keystore=`pwd` ./query.py 
-cmd2: env ABAC_CN=1 keystore=`pwd` ./query.py
+cmd: env ABAC_CN=1 keystore=`pwd` ./query.py
+
+number of credentials,
+     3 + 6 + 3 x #VAL#
 
 """
 
 import os
+import sys
 import ABAC
+import time
+import datetime
+from datetime import timedelta
+
+debug=0
 
 ctxt = ABAC.Context()
+
+cred_count = 3 + 6 + 3 * #VAL#
+
+def get_msec(e_time) :
+    msec_delta=0
+    if( int(e_time.seconds) !=0 ) :
+        msec_delta= int(e_time.seconds) *1000
+    if( int(e_time.microseconds) !=0) :
+        msec_delta = msec_delta + int(e_time.microseconds)/1000
+    return msec_delta
+
+def get_micro(e_time) :
+    micro_delta=0
+    if( int(e_time.seconds) !=0 ) :
+        micro_delta= int(e_time.seconds) *1000000
+    if( int(e_time.microseconds) !=0) :
+        micro_delta = micro_delta + int(e_time.microseconds)
+    return micro_delta
+
+def extract_delta(starttime, endtime) :
+    """ given a start time, and a endtime, extract delta """
+    elapsed_time = (endtime - starttime)
+# Only handle in seconds/microseconds
+    if ( int(elapsed_time.days) != 0 ) :
+        sys.stderr.write("%s is longer than a day !!!" % msg)
+        exit(1)
+    return elapsed_time
 
 # Keystore is the directory containing the principal credentials.
@@ -18,5 +53,10 @@
 if (os.environ.has_key("keystore")) :
     keystore=os.environ["keystore"]
+    starttime = datetime.datetime.now()
     ctxt.load_directory(keystore)
+    endtime = datetime.datetime.now()
+    elapsed_load=extract_delta(starttime, endtime)
+    elapsed_msec=get_msec(elapsed_load)
+    sys.stderr.write("%d %d LOAD(msec)\n" % (cred_count,elapsed_msec))
 else:
     print("keystore is not set...")
@@ -52,12 +92,35 @@
 # oset = [keyid:mary].oset:what2eat 
 # p [string:'navel orange'] 
-oset = ABAC.Oset(mary,"what2eat")
-term=ABAC.DataTerm("string", "'navel orange'")
-p = ABAC.Oset(term)
-
-print "\n===good============ mary.what2eat <- navel orange"
-out = ctxt.query(oset, p)
-for c in out[1]:
-    print "%s <- %s" % (c.head_string(), c.tail_string())
+def maryQuery(pr) :
+    oset = ABAC.Oset(mary,"what2eat")
+    term=ABAC.DataTerm("string", "'navel orange'")
+    p = ABAC.Oset(term)
+
+    if(pr) :
+        print "\n===good============ mary.what2eat <- navel orange"
+    starttime = datetime.datetime.now()
+    out = ctxt.query(oset, p)
+    endtime = datetime.datetime.now()
+    if(pr) :
+        for c in out[1]:
+            print "%s <- %s" % (c.head_string(), c.tail_string())
+    return extract_delta(starttime, endtime)
+
+# skip the first one
+e_time=maryQuery(1)
+elapsed_micro=get_micro(e_time)
+sys.stderr.write("%d %d GOOD_1(micro)\n" % (cred_count,elapsed_micro))
+
+elapsed_good=timedelta()
+k=20
+while(k):
+    e_time=maryQuery(0)
+    elapsed_good=elapsed_good+e_time
+    k=k-1
+    if(debug):
+        elapsed_micro=get_micro(e_time)
+        sys.stderr.write("%d %d GOOD_%d(micro)\n" % (cred_count,elapsed_micro,k))
+elapsed_micro=get_micro(elapsed_good)
+sys.stderr.write("%d %d GOOD_t(micro)\n" % (cred_count,elapsed_micro/20))
 
 ##########################################################################
@@ -78,12 +141,35 @@
 # oset = [keyid:bob].oset:what2eat 
 # p [string:'navel orange'] 
-oset = ABAC.Oset(bob,"what2eat")
-term=ABAC.DataTerm("string", "'navel orange'")
-p = ABAC.Oset(term)
-
-print "\n===bad============ bob.what2eat <- navel orange"
-out = ctxt.query(oset, p)
-for c in out[1]:
-    print "%s <- %s" % (c.head_string(), c.tail_string())
+def bobQuery(pr) :
+    oset = ABAC.Oset(bob,"what2eat")
+    term=ABAC.DataTerm("string", "'navel orange'")
+    p = ABAC.Oset(term)
+
+    if(pr) :
+        print "\n===bad============ bob.what2eat <- navel orange"
+    starttime = datetime.datetime.now()
+    out = ctxt.query(oset, p)
+    endtime = datetime.datetime.now()
+    if(pr) :
+        for c in out[1]:
+            print "%s <- %s" % (c.head_string(), c.tail_string())
+    return extract_delta(starttime, endtime)
+
+# skip the first one
+e_time=bobQuery(1)
+elapsed_micro=get_micro(e_time)
+sys.stderr.write("%d %d BAD_1(micro)\n" % (cred_count,elapsed_micro))
+
+elapsed_bad=timedelta()
+k=20
+while(k):
+    e_time=bobQuery(0)
+    elapsed_bad=elapsed_bad+e_time
+    k=k-1
+    if(debug):
+        elapsed_micro=get_micro(e_time)
+        sys.stderr.write("%d %d BAD_%d(micro)\n" % (cred_count,elapsed_micro,k))
+elapsed_micro=get_micro(elapsed_bad)
+sys.stderr.write("%d %d BAD_t(micro)\n" % (cred_count,elapsed_micro/20))
 
 ##########################################################################
Index: examples/scaling_tests/haystack/fruit_python/base/RESULT
===================================================================
--- examples/scaling_tests/haystack/fruit_python/base/RESULT	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/scaling_tests/haystack/fruit_python/base/RESULT	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -4,4 +4,24 @@
 pMary.what2eat <- pRalphs.fruitprice(P:[..2.000000])
 pRalphs.fruitprice(0.50) <- 'navel orange'
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
+YAP query succeed
 
 ===good============ mary.what2eat <- kiwi
@@ -12,4 +32,24 @@
 ===bad============ bob.what2eat <- navel orange
 YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
+YAP query failed
 
 ===good============ ralphs.fruitprice(1.50) <- apple
Index: examples/scaling_tests/haystack/fruit_python/get_time
===================================================================
--- examples/scaling_tests/haystack/fruit_python/get_time	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#!/bin/sh
-
-grep -s user fruit_*/fruit.time
Index: examples/scaling_tests/haystack/fruit_python/run_clean
===================================================================
--- examples/scaling_tests/haystack/fruit_python/run_clean	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#!/bin/sh
-
-rm -rf fruit_*
Index: examples/scaling_tests/haystack/fruit_python/run_one
===================================================================
--- examples/scaling_tests/haystack/fruit_python/run_one	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ examples/scaling_tests/haystack/fruit_python/run_one	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -4,10 +4,16 @@
 noise=$1
 
+if [ -z "$noise" ]; then
+    exit
+fi 
+
+echo "---running haystack fruit_python $noise scaling"
+
 rm -rf fruit_$noise
 mkdir fruit_$noise
 sed "s/#VAL#/$noise/" base/SETUP.py > fruit_$noise/setup.py
+sed "s/#VAL#/$noise/" base/QUERY.py > fruit_$noise/query.py
+sed "s/#VAL#/$noise/" base/ATTR.py > fruit_$noise/attr.py
 cp base/RESULT fruit_$noise/fruit.save
-cp base/QUERY.py fruit_$noise/query.py
-sed "s/#VAL#/$noise/" base/ATTR.py > fruit_$noise/attr.py
 
 cd fruit_$noise
@@ -15,5 +21,5 @@
 ./setup.py 1>/dev/null 2>& 1
 env keystore=`pwd` ./attr.py 1>/dev/null 2>& 1
-time env keystore=`pwd` ABAC_CN=1 ./query.py 1>fruit.tmp 2> fruit.time
+env keystore=`pwd` ABAC_CN=1 ./query.py 1>fruit.tmp 2> fruit.time
 result=`diff fruit.tmp fruit.save 2>/dev/null`
 if [ "$result" = "" ]; then
Index: examples/scaling_tests/haystack/fruit_python/run_test
===================================================================
--- examples/scaling_tests/haystack/fruit_python/run_test	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,55 +1,0 @@
-#!/bin/sh 
-
-run_clean
-
-echo '---running haystack fruit_python 0 scaling'
-run_one 0  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-
-echo '---running haystack fruit_python 10 scaling'
-run_one 10  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-echo '---running haystack fruit_python 20 scaling'
-run_one 20  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-echo '---running haystack fruit_python 30 scaling'
-run_one 30  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
-echo '---running haystack fruit_python 200 scaling'
-run_one 200  1> log 2>/dev/null
-result=`grep PASSED log 2>/dev/null`
-if [ "$result" = "" ]; then
-   echo "   ERROR"
-else   
-   echo "   PASSED"
-fi
-rm -rf log
-
Index: examples/scaling_tests/haystack/run_clean
===================================================================
--- examples/scaling_tests/haystack/run_clean	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#!/bin/sh 
-
-pwd=`pwd`
-
-for i in `ls -1` ; do
-    if [ -d $i ]; then
-        printf " ...cleaning on %s\n" "$i"  >& 2;
-        cd $i
-        ./run_clean
-        cd $pwd
-    fi
-done
-
-
Index: examples/scaling_tests/haystack/run_test
===================================================================
--- examples/scaling_tests/haystack/run_test	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#!/bin/sh 
-
-pwd=`pwd`
-
-for i in `ls -1` ; do
-    if [ -d $i ]; then
-        printf " ...running on %s\n" "$i"  >& 2;
-        cd $i
-        ./run_test
-        cd $pwd
-    fi
-done
-
-
Index: examples/scaling_tests/plotting/gen_big
===================================================================
--- examples/scaling_tests/plotting/gen_big	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
+++ examples/scaling_tests/plotting/gen_big	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -0,0 +1,44 @@
+#!/bin/sh 
+
+SET=$1
+filename=${SET}_orig
+if [ ! -e $filename ] ; then
+    exit
+fi
+
+## generate the plot script
+make_script() {
+cat <<FIN > $DATA.p
+set title "$TITLE"
+set terminal jpeg medium size 640,480
+set output "$DATA.jpeg"
+set   autoscale    
+unset log
+unset label                            
+set xtic auto                         
+set ytic auto                          
+set xlabel "Number of Credentials"
+set ylabel "$TYPE time ($TIME)"
+set xr [0:*]
+set yr [0:*]
+plot '$DATA1.dat' using $X:$Y title '$DATA1' with linespoints lt 8, \\
+'$DATA2.dat' using $X:$Y title '$DATA2' with linespoints lt 3, \\
+'$DATA3.dat' using $X:$Y title '$DATA3' with linespoints lt 1, \\
+'$DATA4.dat' using $X:$Y title '$DATA4' with linespoints lt 2
+FIN
+}
+
+X=1
+Y=2
+### 
+TYPE='Query Time'
+TITLE='Various Query Time'
+DATA=${SET}_query
+DATA1=${SET}_mgood
+DATA2=${SET}_good1
+DATA3=${SET}_mbad
+DATA4=${SET}_bad1
+TIME='microsec'
+make_script
+gnuplot $DATA.p
+
Index: examples/scaling_tests/plotting/gen_med
===================================================================
--- examples/scaling_tests/plotting/gen_med	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
+++ examples/scaling_tests/plotting/gen_med	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -0,0 +1,49 @@
+#!/bin/sh 
+
+SET=$1
+filename=${SET}_orig
+if [ ! -e $filename ] ; then
+    exit
+fi
+
+## generate the plot script
+make_script() {
+cat <<FIN > $DATA.p
+set title "$TITLE"
+set terminal jpeg medium size 640,480
+set output "$DATA.jpeg"
+set   autoscale    
+unset log
+unset label                            
+set xtic auto                         
+set ytic auto                          
+set xlabel "Number of Credentials"
+set ylabel "$TYPE time ($TIME)"
+set xr [0:*]
+set yr [0:*]
+plot '$DATA1.dat' using $X:$Y title '$DATA1' with linespoints lt 8, \\
+'$DATA2.dat' using $X:$Y title '$DATA2' with linespoints lt 1 
+FIN
+}
+
+X=1
+Y=2
+### 
+TYPE='Query Time'
+TITLE='Various GOOD Query Time'
+DATA=${SET}_goodquery
+DATA1=${SET}_mgood
+DATA2=${SET}_good1
+TIME='microsec'
+make_script
+gnuplot $DATA.p
+### 
+TYPE='Query Time'
+TITLE='Various BAD Query Time'
+DATA=${SET}_badquery
+DATA1=${SET}_mbad
+DATA2=${SET}_bad1
+TIME='microsec'
+make_script
+gnuplot $DATA.p
+
Index: examples/scaling_tests/plotting/gen_small
===================================================================
--- examples/scaling_tests/plotting/gen_small	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
+++ examples/scaling_tests/plotting/gen_small	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -0,0 +1,53 @@
+#!/bin/sh 
+
+SET=$1
+filename=${SET}_orig
+if [ ! -e $filename ] ; then
+    exit
+fi
+
+## generate the plot script
+make_script() {
+cat <<FIN > $DATA.p
+set title "$TITLE"
+set terminal jpeg medium size 640,480
+set output "$DATA.jpeg"
+set   autoscale    
+unset log
+unset label                            
+set xtic auto                         
+set ytic auto                          
+set xr [0:*]
+set yr [0:*]
+set xlabel "Number of Credentials"
+set ylabel "$TYPE time ($TIME)"
+plot '$DATA.dat' using $X:$Y notitle with linespoints
+FIN
+}
+
+X=1
+Y=2
+### making loading script
+TYPE='Loading'
+TITLE='Credential Loading Time'
+DATA=${SET}_load
+TIME='msec'
+make_script
+gnuplot ${SET}_load.p
+
+### making average good query script
+TYPE='Successful Query'
+TITLE='Average Successful Query Time'
+DATA=${SET}_mgood
+TIME='microsec'
+make_script
+gnuplot ${SET}_mgood.p
+
+### making average bad query script
+TYPE='Unsuccessful Query'
+TITLE='Average Unsuccessful Query Time'
+DATA=${SET}_mbad
+TIME='microsec'
+make_script
+gnuplot ${SET}_mbad.p
+
Index: examples/scaling_tests/plotting/note
===================================================================
--- examples/scaling_tests/plotting/note	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
+++ examples/scaling_tests/plotting/note	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -0,0 +1,62 @@
+For example your data file, force.dat , might look like:
+
+      # This file is called   force.dat
+      # Force-Deflection data for a beam and a bar
+      # Deflection    Col-Force       Beam-Force 
+      0.000              0              0    
+      0.001            104             51
+      0.002            202            101
+      0.003            298            148
+      0.0031           290            149
+      0.004            289            201
+      0.0041           291            209
+      0.005            310            250
+      0.010            311            260
+      0.020            280            240
+
+You can display your data by typing:
+
+      gnuplot>  plot  "force.dat" using 1:2 title 'Column', \
+                      "force.dat" using 1:3 title 'Beam'
+Customization of the axis ranges, axis labels, and plot title, as well as many other features, are specified using the set command. Specific examples of the set command follow. (The numerical values used in these examples are arbitrary.) To view your changes type: replot at the gnuplot> prompt at any time.
+
+      Create a title:                  > set title "Force-Deflection Data" 
+      Put a label on the x-axis:       > set xlabel "Deflection (meters)"
+      Put a label on the y-axis:       > set ylabel "Force (kN)"
+      Change the x-axis range:         > set xrange [0.001:0.005]
+      Change the y-axis range:         > set yrange [20:500]
+      Have Gnuplot determine ranges:   > set autoscale
+      Move the key:                    > set key 0.01,100
+      Delete the key:                  > unset key
+      Put a label on the plot:         > set label "yield point" at 0.003, 260 
+      Remove all labels:               > unset label
+      Plot using log-axes:             > set logscale
+      Plot using log-axes on y-axis:   > unset logscale; set logscale y 
+      Change the tic-marks:            > set xtics (0.002,0.004,0.006,0.008)
+      Return to the default tics:      > unset xtics; set xtics auto
+
+Other features which may be customized using the set command are: arrow, border, clip, contour, grid, mapping, polar, surf
+
+Sometimes, several commands are typed to create a particular plot, and it is easy to make a typographical error when entering a command. To stream- line your plotting operations, several Gnuplot commands may be combined into a single script file. For example, the following file will create a customized display of the force-deflection data:
+
+      # Gnuplot script file for plotting data in file "force.dat"
+      # This file is called   force.p
+      set   autoscale                        # scale axes automatically
+      unset log                              # remove any log-scaling
+      unset label                            # remove any previous labels
+      set xtic auto                          # set xtics automatically
+      set ytic auto                          # set ytics automatically
+      set title "Force Deflection Data for a Beam and a Column"
+      set xlabel "Deflection (meters)"
+      set ylabel "Force (kN)"
+      set key 0.01,100
+      set label "Yield Point" at 0.003,260
+      set arrow from 0.0028,250 to 0.003,280
+      set xr [0.0:0.022]
+      set yr [0:325]
+      plot    "force.dat" using 1:2 title 'Column' with linespoints , \
+            "force.dat" using 1:3 title 'Beam' with points
+
+Then the total plot can be generated with the command: gnuplot> load 'force.p'
+
+
Index: examples/scaling_tests/plotting/run_plot
===================================================================
--- examples/scaling_tests/plotting/run_plot	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
+++ examples/scaling_tests/plotting/run_plot	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -0,0 +1,22 @@
+#!/bin/sh 
+
+type=$1
+
+rm -rf timing
+mkdir timing
+ln -s ../../plotting plot
+cp plot/gen_small timing/gen_small
+cp plot/gen_big timing/gen_big
+cp plot/gen_med timing/gen_med
+cp plot/split_it timing/split_it 
+cat ${type}_*/*.time > timing/${type}_orig
+
+cd timing
+chmod +x gen_small gen_big split_it
+
+split_it ${type}
+gen_small ${type}
+gen_big ${type}
+gen_med ${type}
+
+tar cvf ${type}_plot.tar *.jpeg
Index: examples/scaling_tests/plotting/split_it
===================================================================
--- examples/scaling_tests/plotting/split_it	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
+++ examples/scaling_tests/plotting/split_it	(revision 08b8da72eb6c21f483448e5fbd475b8ab31f9a6a)
@@ -0,0 +1,26 @@
+#!/bin/sh 
+
+# either fruit_orig or likes_orig
+type=$1
+
+filename=${type}_orig
+
+if [ -e $filename ]; then
+  rm -rf ${type}_load.jpeg ${type}_load.dat
+  rm -rf ${type}_good1.jpeg ${type}_good1.dat
+  rm -rf ${type}_bad1.jpeg ${type}_bad1.dat
+  rm -rf ${type}_mgood.jpeg ${type}_mgood.dat
+  rm -rf ${type}_mbad.jpeg ${type}_mbad.dat
+
+  grep "GOOD_t" $filename | sort -n  > ${type}_mgood.dat
+  grep "GOOD_1" $filename | sort -n > ${type}_good1.dat
+  grep "BAD_t" $filename | sort -n > ${type}_mbad.dat
+  grep "BAD_1" $filename | sort -n > ${type}_bad1.dat
+  grep "LOAD" $filename | sort -n > ${type}_load.dat
+
+fi
+
+
+
+
+
Index: examples/scaling_tests/runcheck
===================================================================
--- examples/scaling_tests/runcheck	(revision 880e9244d9674fdb0fe8312fc92821d1e1cccd23)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#!/bin/sh 
-
-rm -rf allout.tmp
-
-./.runall clean 1 >/dev/null 2>&1
-
-ABAC_PROVER_PATH=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
-export ABAC_PROVER_PATH
-
-echo '\n'
-echo 'running libabac SCALING testing...'
-./.runall run 1> allout.tmp 2>/dev/null
-result=`diff allout.tmp allout.save`
-
-if [ "$result" = "" ]; then
-   echo "   PASSED"
-else
-   echo "   ERROR:got changes!!!"
-fi
