source: examples/creddy_prover_tests/fruits_rt2/run_query @ 8de54ab

mei_rt2mei_rt2_fix_1
Last change on this file since 8de54ab was 08b8da7, checked in by Mei <mei@…>, 12 years ago

1) rework examples directory with Makefile
2) update scaling with plotting scripts
3) add more doc in there

  • Property mode set to 100755
File size: 1.7 KB
RevLine 
[9502c50]1
2# fruits_rt2_typed
[c586a3c]3
4pwd=`pwd`
[08b8da7]5eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
6if [ "$eloc" = "" ]; then
7  echo "ERROR: abac_prover_yap is not in the search path!!!"
8  exit 1
9fi
[c586a3c]10keyloc=$pwd
11
12ralphs=`creddy --keyid --cert $keyloc/Ralphs_ID.pem`
13bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
14mary=`creddy --keyid --cert $keyloc/Mary_ID.pem`
15
16mary_what2eat="[keyid:$mary].oset:what2eat"
17bob_what2eat="[keyid:$bob].oset:what2eat"
18ralphs_apple="[keyid:$ralphs].oset:fruitprice([float:1.50])"
19
20## dump all credentials
21$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
22
[36b100a]23# [keyid:mary].oset:what2eat <-?- [string:'navel orange'] (yes)
24echo " "
[9502c50]25echo "===good============ mary.what2eat <- navel orange"
[36b100a]26$eloc/abac_prover_yap  --keystore $keyloc --oset "$mary_what2eat" --object "[string:'navel orange']"
[c586a3c]27
[d5bbd3e]28# [keyid:mary].oset:what2eat <-?- [string:'kiwi'] (yes)
29echo " "
[9502c50]30echo "===good============ mary.what2eat <- kiwi"
[d5bbd3e]31$eloc/abac_prover_yap  --keystore $keyloc --oset "$mary_what2eat" --object "[string:'kiwi']"
32
[36b100a]33# [keyid:bob].oset:what2eat <-?- [string:'navel orange'] (no)
34echo " "
[9502c50]35echo "===bad============ bob.what2eat <- navel orange"
[36b100a]36$eloc/abac_prover_yap  --keystore $keyloc --oset "$bob_what2eat" --object "[string:'navel orange']"
[c586a3c]37
38# [keyid:$ralphs].oset:fruitprice([float:1.50]) <-?- [string:'apple'] (yes)
[36b100a]39echo " "
[9502c50]40echo "===good============ ralphs.fruitprice(1.50) <- apple"
[c586a3c]41$eloc/abac_prover_yap  --keystore $keyloc --oset "$ralphs_apple" --object "[string:'apple']"
42
[36b100a]43# [keyid:$ralphs].oset:fruitprice([float:1.50]) <-?- [string:'green apple'] (no)
44echo " "
[9502c50]45echo "===bad============ ralphs.fruitprice(1.50) <- green apple"
[36b100a]46$eloc/abac_prover_yap  --keystore $keyloc --oset "$ralphs_apple" --object "[string:'green apple']"
47
[c586a3c]48
Note: See TracBrowser for help on using the repository browser.