source: examples/fruits_rt2_typed/rr @ 36b100a

mei_rt2mei_rt2_fix_1meiyap-rt1rt2
Last change on this file since 36b100a was 36b100a, checked in by Mei <mei@…>, 13 years ago

1) fix up fruits_rt2_typed example to test different types of strings

as oset term

2) fix the abac_pl_yap.c's _abac_yap_query so the first term if given

a literal string will use ReadBuffer? instead of MkAtomTerm?

  • Property mode set to 100755
File size: 1.5 KB
Line 
1rm -rf creds_dump
2
3pwd=`pwd`
4
5#eloc=/home/mei/Deter/abac/libabac
6eloc=$pwd/../../libabac
7#keyloc=/home/mei/Deter/abac/examples/fruits_rt2_typed
8keyloc=$pwd
9
10ralphs=`creddy --keyid --cert $keyloc/Ralphs_ID.pem`
11bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
12mary=`creddy --keyid --cert $keyloc/Mary_ID.pem`
13
14mary_what2eat="[keyid:$mary].oset:what2eat"
15bob_what2eat="[keyid:$bob].oset:what2eat"
16ralphs_apple="[keyid:$ralphs].oset:fruitprice([float:1.50])"
17
18## dump all credentials
19$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
20
21# [keyid:mary].oset:what2eat <-?- [string:'navel orange'] (yes)
22echo " "
23echo "===good============ mary.what2eat <- navel orange yap "
24$eloc/abac_prover_yap  --keystore $keyloc --oset "$mary_what2eat" --object "[string:'navel orange']"
25
26# [keyid:bob].oset:what2eat <-?- [string:'navel orange'] (no)
27echo " "
28echo "===bad============ bob.what2eat <- navel orange yap "
29$eloc/abac_prover_yap  --keystore $keyloc --oset "$bob_what2eat" --object "[string:'navel orange']"
30
31# [keyid:$ralphs].oset:fruitprice([float:1.50]) <-?- [string:'apple'] (yes)
32echo " "
33echo "===good============ ralphs.fruitprice(1.50) <- apple yap "
34$eloc/abac_prover_yap  --keystore $keyloc --oset "$ralphs_apple" --object "[string:'apple']"
35
36# [keyid:$ralphs].oset:fruitprice([float:1.50]) <-?- [string:'green apple'] (no)
37echo " "
38echo "===bad============ ralphs.fruitprice(1.50) <- green apple yap "
39$eloc/abac_prover_yap  --keystore $keyloc --oset "$ralphs_apple" --object "[string:'green apple']"
40
41
Note: See TracBrowser for help on using the repository browser.