Index: examples/access_rt2_typed/Alpha_ID.pem
===================================================================
--- examples/access_rt2_typed/Alpha_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/Alpha_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDBTCCAe2gAwIBAgIIdULqftsjgqMwDQYJKoZIhvcNAQEFBQAwEDEOMAwGA1UE
+AxMFQWxwaGEwHhcNMTIwMjA5MTcyNDE2WhcNMTUwMTI0MTcyNDE2WjAQMQ4wDAYD
+VQQDEwVBbHBoYTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANxY3gz9
+YSH8Xc1c/65IVZwR6AbpNk5kSx7lxMdnmz2vncJjbyMsreOYBbMKGy2jKrtXikZY
+oYa28Jjml1RhAd7BWYrAjjn5ylm4FER5HMJNySIjrjShF7MpQWDLFWlMfzD1GjV/
+v672PyX25qgHSO6UvzSSBbcP5H8MbC8Yt9PP1nF4GC3tyZR9OQ42NWFE7qSwtTwh
+1nilyIy7+VmLeORGE3wxIIjHXYrnPEfXSIuBjiK3sa2xOfTDrCtfJ/LnsmIjwLdy
+WVqzxzQxBlZSGdZlphz+B/u0DO0ZjY3b0vJQQqNcffI9aeRko6F0uTPkAU5i+3uf
+URjxcwQtzXMnBZsCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E
+BAMCAQYwHQYDVR0OBBYEFHQLAcmY0h+p7P7iz/Jd2LOJmGwDMB8GA1UdIwQYMBaA
+FHQLAcmY0h+p7P7iz/Jd2LOJmGwDMA0GCSqGSIb3DQEBBQUAA4IBAQBo8aJq6mj0
+NPsWPg4LQsTEbQUql2nMz9UZhTFcXSQXGRjwQlucZ22jzM01oOp96GXxMhoUW8Rf
+IavhfRKbPiKWzkHH3fcQMaP9sPAP+BPG8tE7YUOSTJ/Dy64/DXukqlRX3l49F1J6
+zE5n1c5EmVKcgkhgMAzvJBSiodKIjlvvkzVnwy/yInk0+F6yq2dXCGauErn8mhpW
+a+cRz2K5j2E3GDqjuRnSDAltf2OmpCInY1WUgo3YT26vKx21HxJBkkgHbLaoyPMo
+g8+vfIq3JEVWxjq+x/b3Vy8TnSnJ+s4Tvaqil4H4EHI2sbP89oZTTfL2KIcH9vYt
+EjVLpBA5Wwtq
+-----END CERTIFICATE-----
Index: examples/access_rt2_typed/Alpha_private.pem
===================================================================
--- examples/access_rt2_typed/Alpha_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/Alpha_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEA3FjeDP1hIfxdzVz/rkhVnBHoBuk2TmRLHuXEx2ebPa+dwmNv
+Iyyt45gFswobLaMqu1eKRlihhrbwmOaXVGEB3sFZisCOOfnKWbgURHkcwk3JIiOu
+NKEXsylBYMsVaUx/MPUaNX+/rvY/JfbmqAdI7pS/NJIFtw/kfwxsLxi308/WcXgY
+Le3JlH05DjY1YUTupLC1PCHWeKXIjLv5WYt45EYTfDEgiMddiuc8R9dIi4GOIrex
+rbE59MOsK18n8ueyYiPAt3JZWrPHNDEGVlIZ1mWmHP4H+7QM7RmNjdvS8lBCo1x9
+8j1p5GSjoXS5M+QBTmL7e59RGPFzBC3NcycFmwIDAQABAoIBADehcB5TckyETKJm
+kl7MAGEw3CWyh3VvONAKLo4xiC4gwnGrbQmyZAyL+xRivs3c3hMCXPS5t74tPb08
+qoQxIam9ov+28bGNcRsJsIRBF5Ou09L8sySybytahRkM7NDy8UHI/971680een75
+QO63OCCUCVoaa7r2FjhFSKLzWKXu4QtMBgN4Ty7tPmZyvqrTFDp9IpHT/iXYiJvB
+lg1EE1EWWo65R83ac7HlQiQjKgsX8vKVveF8YtyvHygfXGdI1/i/VdO3pKZXes4O
+u7DBDv3/q1kZDeGESlyBGDjONJW6n+IyI7VZ8hBOYq5SQsE67RQiLzszTRBdxvC6
+FQeyA4ECgYEA/KO7xqppjDU1O/jzfcPadUReiVBvLpHs1nH6sQBRlTgbeLngGJ1H
+sAQUWyyZwNRetrG2aQRNi2YdBZ9JhScyEL93KCU7NKColk1PHF4jjSG/r2mjQ6QP
+utuX4WC2opJeu0lDxvIJjYBlpSajLW0HNN06citCTBMmI4F7sPKcRGECgYEA30cs
+p+rVbUEilnJKpxEG2Vcj9KuyaJ+KZhv1dQyrKpv08/wnR34LtOLOPLXJHaqKwEGO
+oQTTKvd1a8vSO08UHXLoRzP304eiReOcC9SF0NP7/4nqDbuWpSv425WLOIuGYCIW
+ZUEo0quX91Ic0PHRWDMobCSpglnjFhn/Cr5iC3sCgYBVVRh/qd+ss+wfLZ9Qw25u
+XYFw7/Id0LwmUqlST8E+nYzp4h6HMdic40Pc59um/hRfsPbj0cg/ZWY4F+1FRE/s
+yD7/GFQ/GmTXH5WxBzsK2HNeVFgI6MlHXBSY04ncr4O/zqdN80K2wL+UYNCM716X
+xIGRPntOJsmjBIE66zdNAQKBgHSzMMX7Wd4m4zsbNaWoopnKkAJ8E13XtXC1QFAT
+dQtqRFeZ/bXCTcAXo4/bu+iDkM339eJ3MSAOAxN6jsFtDahuvLUqlme7RrecxZzx
+UZfalKX1oZ3X5F8kYofy27eMRYnNh0MZEYs7IMyl4GXdXnvpEUGkz+xPqv+MSt+E
+rp4tAoGBAIricy9t1h+Y6X0Xjn/iwdBd1g42cjX7CE5N01dti04rK7xa5leDss2P
+xOx5NUyeAd5nI2pP5ROucGCYVNBt4v8a8x3wI2z58X5l59kWoPUIMFDALyhLrCVm
+qACcpxWG3u7+7FD2YyciD4Fb02UpG0HBJJKkHxV79fWYVI2bsp0+
+-----END RSA PRIVATE KEY-----
Index: examples/access_rt2_typed/Bob_ID.pem
===================================================================
--- examples/access_rt2_typed/Bob_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt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35t4OHJgYep
+IUqQ8RJeeoA9BZdUI48y7MsjbM/DqcScgdfEKOaqvw9S0dbBuGliAc0lf0pv/zaY
+dL6fxQUc
+-----END CERTIFICATE-----
Index: examples/access_rt2_typed/Bob_private.pem
===================================================================
--- examples/access_rt2_typed/Bob_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/Bob_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA5JiEkFJS8U6PLO0r8likUc6pheOS9blYpkNgcJ85ImIfCy93
+m97qaVKaOxx0imRi2E0vjLYChtLeAjbtJ3kSVszBYpE2I9vLoBJeDlnkmzIG7kBt
+MizCdkSsHuahWS9Viizsj+/DFVddC1cTdZFqnxaIZ4LeLwDURdZQAj2qxQD263mT
+vp+tdWb7QPBKw9qi2iIYCZkv9fH1jzS80txyPQXZ0FAFGjEqidEewWjvDwYMfNNZ
+0Lbgo/qtXCNM3vVVcDENqvYw8Io1CRfZOAOQ6maTKN4gKHPLM5LuU4B1+JysjB3/
+JyKdeQH8JN/E26dP5wo8PRCL1G0+SYxM5oRT0wIDAQABAoIBAHm0af+clOQ8eyXk
+L92bLAESEldiTj/dKkF65cGQRA72Rqjh4MBv8kWY4NxPzgxQXf/jOEmmLboyUljD
+fYfigc0MvnkH7tcwkjzrCoCBg6DNBbubOYfZJL9q2GirSYP+G4CxYlFPyYF3PeZn
+uciCX03L5VuW5UwJGPsFmxtWUbEITNaI66xwYdQySVUR3CKUjRib3XSfTrKizwLo
+pkwdwnjXyipyqR2o62KLyAAu4F7BrXppIOeTR9mFQ7pBLR4+Np+hCzs//eL0EvEA
+q/dsMN+6ZLvrwoRSQOdUlxAd3QX08HerjQsPJG08sFe2hfLAfS3M0R3X9mhrFQ9Y
+UY1Y5IECgYEA8rleizt2+zJMjbNliTQt5BniBWfji/B0fSTxyTrKBvOvsH2xiHAO
+PuMkrKowgkrL+z/HH1qIZJn0JHApDSFtpVPTdJJgd2AyHgyr4ktR0EgkcAeo7HOv
+Tcjj82yeZdX6z+6JV2JehN393x2q4K2ysYhdUHtKc2aqPrGrVRyG0EMCgYEA8RlS
+v5LFg4lNVcGy5Rka47Dz/Qc3tvc+1I3kYmfD5R546pccTcO99O3KCe+b99zVo0Wg
+pQweHNvS9jdV9xRndTJKcT1c/McfMzXqrknQPhiI8yiZjaB7jUg/aXMR+r38Dw9N
+imbaHFR0vP/gxMSjWviAYQpIuF71pEZXO4pnvTECgYEAhX5F7TWLPqRvTg+4bDly
+c914XZjBoRliN+G1yQK4UhJ8MgkvNubKLvQmG4COpVoVzd1J2oikMxApIlE9gqc7
+8o2j4p0OyRjy92vorNDX8kF7KNJNqZ4GcDVoiVzX0RJamzmJ97F2YoTlN2zNqjxd
+5x4klDr6u3VfdJOqs2i5DJkCgYEAnZb0zH2OFtUnNHegjDjlp5BhWrFeDHz9l4eL
+kXrLw7YwSP4upPHd9vt6xRXWN6QkDE2VnGwYPrq84Oz4hsDSgvs1R2FZp2wsC5gh
+Znye3gfBdFbET5tnRsjDkhSB2whVei6Be4aQ6FWX3HXQIC17rRmjKErFj6WaIB9O
+I3/rIPECgYBPceol1fyiH4y7zIEs7c9ggBHb7xW0rINu673UVyb4pX9iOQBYbbUv
+wceAvvJSEVrYSzjpppKmsIeCZw5IamWH4060Wpht+EgoeGhmq1v7qa/0iwYrUYZ7
+ERYsQPsDR6ROu0r43wURmwMOw0vyh/qzSWuqM0kmLcGoRQD5BUoy7w==
+-----END RSA PRIVATE KEY-----
Index: examples/access_rt2_typed/Joe_ID.pem
===================================================================
--- examples/access_rt2_typed/Joe_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/Joe_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDATCCAemgAwIBAgIIP54pjl+jv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
===================================================================
--- examples/access_rt2_typed/Joe_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/Joe_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEArj9CaQJZy8M0G8N7nVSn/Ww3LaoOb+IOuDwbXFifZeAKLz/m
+DTA15KlKXnJYhm8R5qsN5TbWENcK4xYAnI8DlOKucJLKAGfhfStsnB6KjGb3/yTm
+n+sir55sbiAOh77eVFBrUEKHBPAsrV7IxXw/2a9q669H48d0WA+gclVbENIQQPL8
++O3OcS+j3lK7RxqtFJEkd1M7CMogqLABS6xv93vjYRpgXbN/U+S260X/xxzpr+By
+QzBo2bwieGE3AOH0zPXC+Ui2eb5Tt303Cbhq0oJImH5JIe118B3XrHuXgCcO+/E7
+kiOqS+k0JHLrKFFCJWazcTc1eTseG8eCa3wd5QIDAQABAoIBAQCj3VnW5x8LQMgA
+VBYsHzDcYqiBiSuKjEzLdbtFXRKJ++eYB7+RJ4WHRK1rpJ0bz9hF1Rd8N9WYgKL8
+a/SnRtdXbNYfh+vv9cFYtT2ulAo3f545k7pPKhG0lofiCMOhZR4wrHA/SlEvk65w
+XHLzRaXGUfF7M5un2irPpeJ9o0fAyD66HkH3YPgLGLcjVGgeKPflQUPTYKOkn59B
+Xy9UM4fbFr2D0oSS8OGZp6qLX2zAS0OkQ7uQsAkZCxgRF3jZjYipWw327jrwLLYl
+0/+P9UyCJQWxr4LwjlnEB1QWT1g2iXIrZB7uUDyVV3j/qDMItrMLBTqFA+uM779f
+f7xEtZkBAoGBANXX/Q+g9F5D39ltSXTXB0dtQ3+b968vWBGcviUMKBm6TApkQgTS
+ngCdeOoqMINjO+C1Fw5Zx9KaLeVn28Z6rFF0jm6GP8NM7lM94pcRDzgwPp2fTnr/
+vphsLp7eNJX/Z4BDelYQkWg5bKmjkl8cNPfnetxnx7lpezbT/+E9J99/AoGBANCY
+9OFKiZcSZIRG/HesWXx00qg6HAx9/ALyblXJm1kaPD1dAttBObI9sW5vslyfuazN
+kF6CnWGTNcbqkzjCyyldTmCaZPziesZyHlL+0ki72DzSr3Ql1TxXqxFWxRWumRuo
+9A/2m+p0wzGePz1sK3XU8rqMw9GXNmpGMEDuDjSbAoGBANKPqZOBBf3n0XvTO5g7
+vuQa93KojbtG3+3/q87o6Hdk1EkLLWJ4TLIIXK4eOsS0qpn5VimAR9zcicKwgFww
+IIrYPQMhV5mjn6wBbKMZXiYSgyVLXsiIGBEXvNQbsiXcZfqK9uPVzoeUu6VR9eeG
+67UKjhSGb8fm0DdNilArmp5bAoGAE6+rxKtNKuXAeL9eSkkItPctflTlmsQ1CW4p
+vYzmTVVtg/kIMPsJ3+l0mlCOS7GDS2ynCFRZWAEVnS08MaoolEHLCNDpYPhaz+mr
+NPf5joWz1aGoj1SWuDgp29wNg4tTxcl/JxaGBm14knE11K0luNwdAEASpvAXYZY4
+LZiJ3KsCgYA8zsnNjRcZmkOFyiEcsjTZ0dtonUVKAMUJBaOU3vSCbEZ8ndVa24Uw
+jON35reG4ldG88vgH4v7C/vG8UeGqJ1LGB4XOqrXG+q5++fh1wI0cMiv2kbxXf+Z
+EV5/Bc0yvJn6CQ+klwgYo7w9lVMDngcl2a0ONXcHFAOWyFUkJH4UMA==
+-----END RSA PRIVATE KEY-----
Index: examples/access_rt2_typed/README
===================================================================
--- examples/access_rt2_typed/README	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/README	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+rm -rf *.der *.pem
+
+# alpha.access(read,fileA)<-?-bob  good
+# [keyid:Alpha].role:access([string:'read'],[urn:'file//fileA']) <-?- [keyid:Bob] (yes)
+
+creddy --generate --cn Alpha
+creddy --generate --cn Bob
+creddy --generate --cn Joe
+
+alpha_keyid=`creddy --keyid --cert Alpha_ID.pem`
+bob_keyid=`creddy --keyid --cert Bob_ID.pem`
+joe_keyid=`creddy --keyid --cert Joe_ID.pem`
+
+
+access_qFqP="access([string:'read'],[urn:?F{[keyid:$alpha_keyid].oset:documents([string:?P])}])"
+team_qP="team([string:?P])" 
+
+#[keyid:alpha].role:access([string:'read'],
+#                    [urn:?F{[keyid:alpha].oset:documents([string:?P])}])
+#                                     <- [keyid:alpha].role:team([string:?P]) 
+creddy --attribute \
+       --issuer Alpha_ID.pem --key Alpha_private.pem --role "$access_qFqP" \
+       --subject-cert Alpha_ID.pem --subject-role "$team_qP" \
+       --out Alpha_access_qFqP__alpha_team_qP_attr.der
+
+
+#[keyid:alpha].oset:documents([string:'proj1'])<-[urn:'file//fileA'] 
+creddy --attribute \
+        --issuer Alpha_ID.pem --key Alpha_private.pem \
+        --oset "documents([string:'proj1'])" \
+        --subject-obj "[urn:'file//fileA']" \
+        --out Alpha_documents_proj1__fileA_attr.der
+
+# [keyid:alpha].role:team([string:'proj1'])<-[keyid:Bob]
+creddy --attribute \
+        --issuer Alpha_ID.pem --key Alpha_private.pem \
+        --role "team([string:'proj1'])" \
+        --subject-cert Bob_ID.pem \
+        --out Alpha_team_proj1__Bob_attr.der
+
+# [keyid:alpha].role:team([string:'proj2'])<-[keyid:Joe]
+creddy --attribute \
+        --issuer Alpha_ID.pem --key Alpha_private.pem \
+        --role "team([string:'proj2'])" \
+        --subject-cert Joe_ID.pem \
+        --out Alpha_team_proj2__Joe_attr.der
+
+
+#####################################################################
+# alpha.access(read,?F:alpha.documents(?proj)) <- alpha.team(?proj)
+# [keyid:alpha].role:access([string:'read'],
+#                    [urn:?F{[keyid:alpha].oset:documents([string:?P])}])
+#                                     <- [keyid:alpha].role:team([string:?P]) 
+# 
+# [keyid:alpha].role:access([string:'read'], [urn:?F])<- [principal:?B] 
+#                [keyid:alpha].oset:documents([keyid:?P) <- [urn:?F]
+#                [keyid:alpha].role:team([string:?P]) <- [principal:?B]
+# 
+# 
+# alpha.documents(proj1)<-fileA
+# [keyid:alpha].oset:documents([string:'proj1'])<-[urn:'file//fileA'] 
+# isMember('file//fileA', oset(alpha,documents,'proj1'))
+# 
+# alpha.team(proj1)<-bob
+# [keyid:alpha].role:team([string:'proj1'])<-[keyid:bob]
+# isMember(bob,role(alpha,team,'proj1'))
+# 
+# query,
+# alpha.access(read,fileA)<-?-bob  good
+# [keyid:alpha].role:access([string:'read'],[urn:'file//fileA']) <- [keyid:bob]
+# isMember(bob, role(alpha, access, 'read', 'file//fileA')).
+# 
Index: examples/access_rt2_typed/creds_dump
===================================================================
--- examples/access_rt2_typed/creds_dump	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/creds_dump	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,3 @@
+ pAlpha.access('read',F:isMember(F,oset(pAlpha,documents,P),C1)) <- pAlpha.team(P)
+ pAlpha.documents('proj1') <- 'file//fileA'
+ pAlpha.team('proj1') <- pBob
Index: examples/access_rt2_typed/d
===================================================================
--- examples/access_rt2_typed/d	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/d	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,21 @@
+
+rm -rf creds_dump
+
+eloc=/home/mei/Deter/abac/libabac
+keyloc=/home/mei/Deter/abac/examples/access_rt2_typed
+
+alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
+bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
+joe=`creddy --keyid --cert $keyloc/Joe_ID.pem`
+
+bob_prin="[keyid:$bob]"
+
+access_fileA="[keyid:$alpha].role:access([string:'read'],[urn:'file//fileA'])"
+team_proj2="[keyid:$alpha].role:team([string:'proj2'])"
+bob_prin="[keyid:$bob]"
+joe_prin="[keyid:$joe]"
+
+## dump all credentials
+$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
+
+
Index: examples/access_rt2_typed/db.pl
===================================================================
--- examples/access_rt2_typed/db.pl	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/db.pl	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,24 @@
+isMember(A,role(pAlpha,access,read,C),B) :-
+   isMember(A,role(pAlpha,team,E),D),
+   appendL([['W2tleWlkOjc0MGIwMWM5OThkMjFmYTllY2ZlZTJjZmYyNWRkOGIzODk5ODZjMDNdLnJvbGU6YWNjZXNzKFtzdHJpbmc6J3JlYWQnXSxbdXJuOj9Ge1trZXlpZDo3NDBiMDFjOTk4ZDIxZmE5ZWNmZWUyY2ZmMjVkZDhiMzg5OTg2YzAzXS5vc2V0OmRvY3VtZW50cyhbc3RyaW5nOj9QXSl9XSkgPC0gW2tleWlkOjc0MGIwMWM5OThkMjFmYTllY2ZlZTJjZmYyNWRkOGIzODk5ODZjMDNdLnJvbGU6dGVhbShbc3RyaW5nOj9QXSk='],F,D],B),
+   isType(pAlpha,keyid),
+   isMember(C,oset(pAlpha,documents,E),F).
+isMember('file//fileA',oset(pAlpha,documents,proj1),['W2tleWlkOjc0MGIwMWM5OThkMjFmYTllY2ZlZTJjZmYyNWRkOGIzODk5ODZjMDNdLm9zZXQ6ZG9jdW1lbnRzKFtzdHJpbmc6J3Byb2oxJ10pIDwtIFt1cm46J2ZpbGUvL2ZpbGVBJ10=']) :-
+   isType(pAlpha,keyid).
+isMember(pBob,role(pAlpha,team,proj1),['W2tleWlkOjc0MGIwMWM5OThkMjFmYTllY2ZlZTJjZmYyNWRkOGIzODk5ODZjMDNdLnJvbGU6dGVhbShbc3RyaW5nOidwcm9qMSddKSA8LSBba2V5aWQ6YWY0MGQ3N2Y1YjMwYTk3OTQ4NGY4YmJiZmI0MDg0MDgxN2EzM2E2N10=']) :-
+   isType(pAlpha,keyid),
+   isType(pBob,keyid).
+isMember(pJoe,role(pAlpha,team,proj2),['W2tleWlkOjc0MGIwMWM5OThkMjFmYTllY2ZlZTJjZmYyNWRkOGIzODk5ODZjMDNdLnJvbGU6dGVhbShbc3RyaW5nOidwcm9qMiddKSA8LSBba2V5aWQ6N2Y1YzY4YzEyNTUxZmI2NmU3YmYxNWVmMzY0YjQ2MjI1NDE5MDkzYl0=']) :-
+   isType(pAlpha,keyid),
+   isType(pJoe,keyid).
+isType(pAlpha,keyid).
+isType(pBob,keyid).
+isType(pJoe,keyid).
+appendL([],[]).
+appendL([B|C],A) :-
+   appendL(C,D),
+   append(B,D,A).
+append([],A,A).
+append([B|C],A,[B|D]) :-
+   append(C,A,D).
+
Index: examples/access_rt2_typed/db2.pl
===================================================================
--- examples/access_rt2_typed/db2.pl	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/db2.pl	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,27 @@
+isMember(A,role(pAlpha,access,read,C),B) :-
+   isMember(A,role(pAlpha,team,E),D),
+   appendL([['original cert'],F,D],B),
+   isType(pAlpha,keyid),
+   isMember(C,oset(pAlpha,documents,E),F).
+isMember('file//fileA',oset(pAlpha,documents,proj1),['oset cert']) :-
+   isType(pAlpha,keyid).
+isMember(pBob,role(pAlpha,team,proj1),['bob cert']) :-
+   isType(pAlpha,keyid),
+   isType(pBob,keyid).
+isMember(pJoe,role(pAlpha,team,proj2),['joe cert']) :-
+   isType(pAlpha,keyid),
+   isType(pJoe,keyid).
+isMember(pJoe,role(pAlpha,team,proj1),['joe cert 2']) :-
+   isType(pAlpha,keyid),
+   isType(pJoe,keyid).
+isType(pAlpha,keyid).
+isType(pBob,keyid).
+isType(pJoe,keyid).
+appendL([],[]).
+appendL([B|C],A) :-
+   appendL(C,D),
+   append(B,D,A).
+append([],A,A).
+append([B|C],A,[B|D]) :-
+   append(C,A,D).
+
Index: examples/access_rt2_typed/r
===================================================================
--- examples/access_rt2_typed/r	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/r	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,15 @@
+
+rm -rf creds_dump
+
+eloc=/home/mei/Deter/abac/libabac
+keyloc=/home/mei/Deter/abac/examples/access_rt2_typed
+
+alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
+bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
+
+access_fileA="[keyid:$alpha].role:access([string:'read'],[urn:'file//fileA'])"
+bob_prin="[keyid:$bob]"
+
+#[keyid:Alpha].role:access([string:'read'],[urn:'file//fileA']) <-?- [keyid:bob] (yes)
+echo "===good============ Alpha.access(read,fileA)<-?-Bob  yap "
+$eloc/abac_prover_yap  --keystore $keyloc --role "$access_fileA" --principal "$bob_prin"
Index: examples/access_rt2_typed/rr
===================================================================
--- examples/access_rt2_typed/rr	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/rr	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,31 @@
+
+rm -rf creds_dump
+
+eloc=/home/mei/Deter/abac/libabac
+keyloc=/home/mei/Deter/abac/examples/access_rt2_typed
+
+alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
+bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
+joe=`creddy --keyid --cert $keyloc/Joe_ID.pem`
+
+bob_prin="[keyid:$bob]"
+
+access_fileA="[keyid:$alpha].role:access([string:'read'],[urn:'file//fileA'])"
+team_proj2="[keyid:$alpha].role:team([string:'proj2'])"
+bob_prin="[keyid:$bob]"
+joe_prin="[keyid:$joe]"
+
+## dump all credentials -- does not work
+#$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
+
+#[keyid:Alpha].role:access([string:'read'],[urn:'file//fileA']) <-?- [keyid:bob] (yes)
+echo "===good============ Alpha.access(read,fileA)<-?-Bob  yap "
+$eloc/abac_prover_yap  --keystore $keyloc --role "$access_fileA" --principal "$bob_prin"
+
+echo "===bad============ Alpha.access(read,fileA)<-?-Joe  yap "
+$eloc/abac_prover_yap  --keystore $keyloc --role "$access_fileA" --principal "$joe_prin"
+
+echo "===good============ Alpha.team(proj2)<-?-Joe  yap "
+#[keyid:alpha].oset:team([string:'proj2'])<-[keyid:Joe]
+$eloc/abac_prover_yap  --keystore $keyloc --role "$team_proj2" --principal "$joe_prin"
+
Index: examples/access_rt2_typed/t
===================================================================
--- examples/access_rt2_typed/t	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/access_rt2_typed/t	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,8 @@
+    cn_rule=0x8053848 "pAlpha", 
+    estring=0xbfffec9c "role(pAlpha,access,'read','file//fileA')")
+
+printing up the yap query ..
+ the role part(role(pAlpha,access,'read','file//fileA'))
+ the principal part(pBob)
+
+
Index: examples/alumni_rt1_typed/Bob_ID.pem
===================================================================
--- examples/alumni_rt1_typed/Bob_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/alumni_rt1_typed/Bob_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAeqgAwIBAgIJAJE8JvkQ6YSLMA0GCSqGSIb3DQEBBQUAMA4xDDAKBgNV
+BAMTA0JvYjAeFw0xMjAyMDgwNTA4NDJaFw0xNTAxMjMwNTA4NDJaMA4xDDAKBgNV
+BAMTA0JvYjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALtAr0TV3yWB
+amIUvfelpPEzzqvGtMDmClkOlo/RregScbftt/ciPdnGoV1WvW4zDp88kfTn0MG1
+g3viTd4ofjS0RspoJABSCUDzr0kXU0tsfdt9Mb6S8SLwMNI/XTvc9ZdSVOCxCWij
+sUastFMnAJpR6SIQe6Sh1zecdaXIjUamUxP6/Vp7U961OGblI0ve+jLtlkJ7AXTt
+7fCojA+5rByS+siPyPAOOlVDfxCqztBqlAzeezH/lGhJ5K8Uim+PqTxgVwsQiceg
+bQRzmoWRKHqMK1sKo9GmIlkSxkZhRMIi2md8+QWUKG2huXAretTtVayrnNzJ+KKH
+Z0u+hraZZKMCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwHQYDVR0OBBYEFOPe1fOLYCWhjt0uW3J64tgf+12JMB8GA1UdIwQYMBaAFOPe
+1fOLYCWhjt0uW3J64tgf+12JMA0GCSqGSIb3DQEBBQUAA4IBAQCus0f5QdUbA4BI
+rWE1nXlilQ/TpvFPOXvR++1eGf6Bpk1+PdR2rUGw4LtR+D0IChhKE/6DUjAM2w7V
+kzohy6OQLXqlPjmwla9F+PK66bseXULX1iJCzh82ybAqgBbsHpzwI8lV1TZklKqU
+l4xh2zypAYa++RhY736CJdZC9TroDHxzdqgS/KgOF9YKYt4d1gMhqxz2EQT1TNFN
+L0eqPxaVIGkaj5kekPtIRF3xkR10XRWrR+AfnCVpijLYp2Rjz+03wekMtszLiW/O
+WnBkvdcKHy9fvG8et8RbA/k17Rz4fScnELKCnjCbsbRK7mAdIncADnFGElbaU28m
+JdfGWHmE
+-----END CERTIFICATE-----
Index: examples/alumni_rt1_typed/Bob_private.pem
===================================================================
--- examples/alumni_rt1_typed/Bob_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/alumni_rt1_typed/Bob_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAu0CvRNXfJYFqYhS996Wk8TPOq8a0wOYKWQ6Wj9Gt6BJxt+23
+9yI92cahXVa9bjMOnzyR9OfQwbWDe+JN3ih+NLRGymgkAFIJQPOvSRdTS2x9230x
+vpLxIvAw0j9dO9z1l1JU4LEJaKOxRqy0UycAmlHpIhB7pKHXN5x1pciNRqZTE/r9
+WntT3rU4ZuUjS976Mu2WQnsBdO3t8KiMD7msHJL6yI/I8A46VUN/EKrO0GqUDN57
+Mf+UaEnkrxSKb4+pPGBXCxCJx6BtB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NV9WwRuGGD8FKSc8Igdzzu
+sRh74/w9aAkE1nTkQmnmVplXa+Ms8CL3je2cox8XBffUJysoCAanoMi4ptcYnZsn
+YogqcwKBgAC4BS4dPJiT01e7tBHV8QSfM76bogcqO6rEIgYuFETZtqjLOMLDBCbd
+nvLSIG5lvvplPeJ8WX114aG22/cv39hs/ToTu8vK+PvmWSjrXqYvmBK2HqBymXK+
+61c0aaxf9GtVzo9Bsfv+zfAhi6o1btKcz49BbIJ3gQ4/N/oShW4y
+-----END RSA PRIVATE KEY-----
Index: examples/alumni_rt1_typed/Joe_ID.pem
===================================================================
--- examples/alumni_rt1_typed/Joe_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/alumni_rt1_typed/Joe_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDATCCAemgAwIBAgIIENTiHs5Tk18wDQYJKoZIhvcNAQEFBQAwDjEMMAoGA1UE
+AxMDSm9lMB4XDTEyMDIwODA1MDg0N1oXDTE1MDEyMzA1MDg0N1owDjEMMAoGA1UE
+AxMDSm9lMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwDwqkzCdxpbN
+pbkRPCPFiNN0y/xbFhukPovDD0NhZQbDZ4Qr6TPLrVO6PKWweXGxOQjm9ydexckg
+ZIc+l7cvnEgPa4OvwytEhSKSs8xUxCYb/pN2pz5lRKdgeV7jNBLKvASvszTWeEim
+iOR7kDRAD+VwICI7VD1+vaTr9p9n5hS6R5tQhBoUQcsmsGu1z1GA3bBbi86Z6hdF
+IAvJODu74YrmxcX8WttprHalY5N54aBV8GWtugHp7+IEJhOgRny1y2+PdkmHORqz
+saHPDTQfXag3rOn4aPD8gG73k75USCA2jg/iI5ocuTZF1lP6nBk3V/Pul1yt6SM5
+Aq5s980pZQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB
+BjAdBgNVHQ4EFgQUWjnE4P3CQgi2uv7y39o4RZtnCUwwHwYDVR0jBBgwFoAUWjnE
+4P3CQgi2uv7y39o4RZtnCUwwDQYJKoZIhvcNAQEFBQADggEBACShK2+2d1Qh7xUt
+O0AjlQdQUFcA0ObUIgv/IPsZGnep2lmORwrFsy3nzybHCKodKFEJSWioBgnPIAW0
+QrIFrj6fruTqZEwNz3/YUzfO4xMoKtOfYgeC9Vj3Wn/OYJbMDmAn2aq6WSIAqOOX
+1yL4VoU1CoQDOUQLOaObgyBLy41XQYd5bZYgCLK1tbXMm+c4ThCcK3agxFPwItFe
+ijAV3NBc1Zbwc4Fk14YP6lRs/jbgcXV7rpQaV9yDcDKoFj8NYpZPqon9qtVX5uhc
+Ks7c8zv7N8QcrPE+Z/y+6kFS6U40l3gxWxrPdHeCINuWH1ZuqNO1RH18bTgk3dB2
+j2QpUoU=
+-----END CERTIFICATE-----
Index: examples/alumni_rt1_typed/Joe_private.pem
===================================================================
--- examples/alumni_rt1_typed/Joe_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/alumni_rt1_typed/Joe_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEAwDwqkzCdxpbNpbkRPCPFiNN0y/xbFhukPovDD0NhZQbDZ4Qr
+6TPLrVO6PKWweXGxOQjm9ydexckgZIc+l7cvnEgPa4OvwytEhSKSs8xUxCYb/pN2
+pz5lRKdgeV7jNBLKvASvszTWeEimiOR7kDRAD+VwICI7VD1+vaTr9p9n5hS6R5tQ
+hBoUQcsmsGu1z1GA3bBbi86Z6hdFIAvJODu74YrmxcX8WttprHalY5N54aBV8GWt
+ugHp7+IEJhOgRny1y2+PdkmHORqzsaHPDTQfXag3rOn4aPD8gG73k75USCA2jg/i
+I5ocuTZF1lP6nBk3V/Pul1yt6SM5Aq5s980pZQIDAQABAoIBAClGwf2I2tfh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lSb0b35LLkV2TvGWFUgrd+RlkA9VJYD5yFF6J9v5NZLNpE+b
+aphA2/aCy1QArs2cRiN/y4nu5ztwl649n5c6VJr4TSL45JhkXwJpXM34YjrsOuJb
+XogCAZFjTCu2V3hPdHsEEmrFWGtKlWf99iXAS86x4OxNzIhA9Y0=
+-----END RSA PRIVATE KEY-----
Index: examples/alumni_rt1_typed/Maryann_ID.pem
===================================================================
--- examples/alumni_rt1_typed/Maryann_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/alumni_rt1_typed/Maryann_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDCTCCAfGgAwIBAgIIAd9YH+tERIMwDQYJKoZIhvcNAQEFBQAwEjEQMA4GA1UE
+AxMHTWFyeWFubjAeFw0xMjAyMDgwNTA4NDVaFw0xNTAxMjMwNTA4NDVaMBIxEDAO
+BgNVBAMTB01hcnlhbm4wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDQ
+HzgL/5cnHCl6w23HlBXxkZWtxOJ0goFgemTjzGl5yojz17Sxa23pejAr07c+k7/o
+ATyIA/ipHBjLJ/Q1ogz45/z4E03ymN+ZUviyMJFj4e2IORSC5mCYkj25M4nlOGyH
+UW/boaFVn1Fo2Wxui5fqQYS4EBsSGbFjq9euZxDUDnPOGeAVlHDuV5lvh0mJ85MF
+mM6Bv07/ZrNhKXHWKPzdhxmZagtZvObW6/j/NcMskf+Jfod+aj7rf3Fz9jTbfPoM
+geTEjFj6vDGkmRwJ4P7NroPwKCbCJSEnRrTvkrifaO+LzvcJmdQYgFj0mEORWmXT
+VfxNQuT0sk0uiI7BjdELAgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P
+AQH/BAQDAgEGMB0GA1UdDgQWBBROyoNFFGmCkIjIE+uLYXZcY8PS0zAfBgNVHSME
+GDAWgBROyoNFFGmCkIjIE+uLYXZcY8PS0zANBgkqhkiG9w0BAQUFAAOCAQEAGzUb
+Am1LwjRVaFM83lebheGbaeKfp+noI+8kGU36Tx14OcHQh+XI8emV9F+Zr42C5lC7
+I5G19mgfKtPsO7kDYadrPGdrVpGwGV6sktn+5FHpNhjALzduVQcgdKCpzJGLXQYw
+XznXDTxQy2itFD5F6D8n39e8zUYTLHfIv4CB8v207GAvTU/KBq/4MJdmiNoEmh/q
+Rj+e1kkfSnBuJjROUp4RzEfHgtiFof/4ELbyfd5iSs70ADjh1hiKN1AhkePzQLBt
+96cBvCLC3IVEx3LZ24OPZesDnwyBj7qt6ImciI8TBQBFo/Oc3UcrReeYkZtoRODY
+JU+TNuctTa+yxgCi0w==
+-----END CERTIFICATE-----
Index: examples/alumni_rt1_typed/Maryann_private.pem
===================================================================
--- examples/alumni_rt1_typed/Maryann_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/alumni_rt1_typed/Maryann_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEA0B84C/+XJxwpesNtx5QV8ZGVrcTidIKBYHpk48xpecqI89e0
+sWtt6XowK9O3PpO/6AE8iAP4qRwYyyf0NaIM+Of8+BNN8pjfmVL4sjCRY+HtiDkU
+guZgmJI9uTOJ5Thsh1Fv26GhVZ9RaNlsbouX6kGEuBAbEhmxY6vXrmcQ1A5zzhng
+FZRw7leZb4dJifOTBZjOgb9O/2azYSlx1ij83YcZmWoLWbzm1uv4/zXDLJH/iX6H
+fmo+639xc/Y023z6DIHkxIxY+rwxpJkcCeD+za6D8CgmwiUhJ0a075K4n2jvi873
+CZnUGIBY9JhDkVpl01X8TULk9LJNLoiOwY3RCwIDAQABAoIBAQC4EqSTmB+sK7BU
+L/0sg8FUwxrLclOIENU064vIHsc7PPMcGDBsq0OvOK7aVIrCAhO9szpCYqDPkVYs
+eM35kbY/f4+yKgDLD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lhUyP3afPuiGa75wmiS5WP8ovy
+ht+wxmZOkstC63jw+qGm5LvAtjAMPfrPk/Z9EUNUaXseflOsTaN930E=
+-----END RSA PRIVATE KEY-----
Index: examples/alumni_rt1_typed/README
===================================================================
--- examples/alumni_rt1_typed/README	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/alumni_rt1_typed/README	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+rm -rf *.der *.pem
+# [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes)
+# [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (yes)
+
+creddy --generate --cn StateU
+creddy --generate --cn Bob
+creddy --generate --cn Maryann
+creddy --generate --cn Joe
+
+stateU_keyid=`creddy --keyid --cert StateU_ID.pem`
+bob_keyid=`creddy --keyid --cert Bob_ID.pem`
+maryann_keyid=`creddy --keyid --cert Maryann_ID.pem`
+joe_keyid=`creddy --keyid --cert Joe_ID.pem`
+
+diploma_q_qY="diploma(?, [integer:?Year[1955..1958])"
+
+diploma_m="diploma([string:'mathmatics'],[integer:1960])"
+diploma_z="diploma([string:'zoology'],[integer:1955])"
+diploma_p="diploma([string:'psychology'],[integer:1956])"
+
+# [keyid:stateU].role:foundingAlumni 
+#                   <- [keyid:stateU].role:diploma(?, [integer:?Year[1955..1958])
+creddy --attribute \
+       --issuer StateU_ID.pem --key StateU_private.pem --role "foundingAlumni" \
+       --subject-cert StateU_ID.pem --subject-role "$diploma_q_qY" \
+       --out StateU_foundingAlumni__stateU_diploma_q_qY_attr.der
+
+# [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1960]) <- [keyid:bob]
+creddy --attribute \
+        --issuer StateU_ID.pem --key StateU_private.pem --role "$diploma_m" \
+        --subject-cert Bob_ID.pem \
+        --out StateU_diploma_m__Bob_attr.der
+
+# [keyid:stateU].role:diploma([string:'zoology'],[integer:1955]) <- [keyid:joe]
+creddy --attribute \
+        --issuer StateU_ID.pem --key StateU_private.pem --role "$diploma_z" \
+        --subject-cert Joe_ID.pem \
+        --out StateU_diploma_m__Joe_attr.der
+
+# [keyid:stateU].role:diploma([string:'psychology'],[integer:1956]) <- [keyid:maryann]
+creddy --attribute \
+        --issuer StateU_ID.pem --key StateU_private.pem --role "$diploma_p" \
+        --subject-cert Maryann_ID.pem \
+        --out StateU_diploma_m__Maryann_attr.der
+
+
+#####################################################################
+# stateU.foundingAlumni <- stateU.diploma(?, ?Year:[1955..1958])
+# [keyid:stateU].role:foundingAlumni 
+#                   <- [keyid:stateU].role:diploma(?, [integer:?Year:[1955..1958])
+# 
+# stateU.diploma(mathmatics,1960)<-bob
+# [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1960]) <- [keyid:bob]
+# 
+# stateU.diploma(zoology,1955)<-joe
+# [keyid:stateU].role:diploma([string:'zoology'],[integer:1955]) <- [keyid:joe]
+#
+# stateU.diploma(psychology,1956)<-maryann
+# [keyid:stateU].role:diploma([string:'psychology'],[integer:1956]) <- [keyid:maryann]
+#
+# query,
+# stateU.foundingAlumni<-?-bob  bad
+# [keyid:stateU].role:foundingAlumni <- [keyid:bob]
+# 
+# stateU.foundingAlumni<-?-maryann  good
+# [keyid:stateU].role:foundingAlumni <- [keyid:maryann]
+#
Index: examples/alumni_rt1_typed/StateU_ID.pem
===================================================================
--- examples/alumni_rt1_typed/StateU_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/alumni_rt1_typed/StateU_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDCDCCAfCgAwIBAgIJAKo1FA/FDmq9MA0GCSqGSIb3DQEBBQUAMBExDzANBgNV
+BAMTBlN0YXRlVTAeFw0xMjAyMDgwNTA4MzhaFw0xNTAxMjMwNTA4MzhaMBExDzAN
+BgNVBAMTBlN0YXRlVTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANx5
+JJ/uzEGsaarFFxe91UMBgAd/kO6bjhSoMvy3Wh3T3lXGKW12Qb12i9BR1nqnFz8A
+1S6KKs6cW51xohTFqHtprMKTIm0EbJq4X4BHGOvZmLnyzkPTbfayId9gg1/JC7Mh
+e7FRL25C5sCHytceORO9zmUdiO0CHDabvV3KISFziruIoLKme7WieEoWX7sQJ/jJ
+Pgvbog+nPuaPSHSULGsW30mPJ+CX8nOKJXqo5eLNMVeI2vM9L5pSLxHJlC234NBk
+8Pta66bxWcLl1IYIdnxHEsnUaRmWj0kYSh1NmZ1LKC7Zla0pDiY3hJPN3rrDIaVj
+bnxahkZyut17P9xwjnECAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B
+Af8EBAMCAQYwHQYDVR0OBBYEFOkmSknJuEAMyLvwstHV2fuJNaYkMB8GA1UdIwQY
+MBaAFOkmSknJuEAMyLvwstHV2fuJNaYkMA0GCSqGSIb3DQEBBQUAA4IBAQBKeiSO
+GXL1gUy4O22+tOzXAEHpHUY+SWTmQI5v3t7LKklsEiE4NdBVFEDEGKx2G6kDqush
+nZVfXnvePKC4n37jW+OCbVsRlunsewulnFh8PDfeeKxTU/hDtwoMg3M+HHB1Z9Ii
+tIvJPQ5b2HwscOyDNnMBtsHw3X+Y0RdvoeGCwehEJea2ayRb3JKWyLmu05XghsxM
+KC5y5PZARr01UGZoAJi+kRUhKemOk97f+h6fm7lFTAR0A/pxgi+Mmb0N4SYHJR4V
+/dMUG18qPpUTxRZif0pVtGfdj0ncSnRElIVW5gEiPYdDWAzJKP82jOREfxVsLUPH
+kB+z5nJvYyFYhQsG
+-----END CERTIFICATE-----
Index: examples/alumni_rt1_typed/StateU_private.pem
===================================================================
--- examples/alumni_rt1_typed/StateU_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/alumni_rt1_typed/StateU_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,27 @@
+-----BEGIN RS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5
+8C+k86TgZTZCyLtV2ZSgDzD23LsQX/rPmb7nEap9AoGALG3XzHrzEhFJ7PZNiA8G
+KDfBqX0XNktIBskBNu2CLNylijDdBpmxbTasCgD+KYkwrxVko6XZguYVbJTbUWK6
+shvpSpkdNLEcJoSwsT4M5xZK82MYADE0kYkP68YYvXmROz6ZUVKtlRb0KmQAY6kV
+a+Ope7waGcsAe4IOKXQQ6WkCgYEAwhPAwTQHTYgda3ubiObu7HWcqxDwXn5kBkZZ
+C4LQvwOCB/CfJKf9kd/coz5zN2II69L/z8nDEqwr5FFsG5yZ3jPycLVi2+2Sxzyf
+lZa3s6sAajD/tKb/faGobVEp0nHlfJ+iGRSB4aB66G5zucrxlxDpyOo7tT8L5rp9
+9npDa+kCgYBkegM6rDcvArBbvxVnrDhX5HN5No67OlQ6YHmb1TGnmRWqer0n1hK3
+kqRBhnP4Iie68ou6ctNo4+OBsyL5BqGG0rVU7aj4XXWnhM8G3bzTYigisKOsRf/2
+OV5GheiD5yDrcksvjSycJozNZJnEFmYhECoYjhFizy+94FpbEGexAw==
+-----END RSA PRIVATE KEY-----
Index: examples/alumni_rt1_typed/rr
===================================================================
--- examples/alumni_rt1_typed/rr	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/alumni_rt1_typed/rr	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,30 @@
+rm -rf creds_dump
+
+eloc=/home/mei/Deter/abac/libabac
+keyloc=/home/mei/Deter/abac/examples/alumni_rt1_typed
+
+stateU=`creddy --keyid --cert $keyloc/StateU_ID.pem`
+bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
+maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem`
+joe=`creddy --keyid --cert $keyloc/Joe_ID.pem`
+
+stateU_foundingAlumni="[keyid:$stateU].role:FoundingAlumni"
+bob_prin="[keyid:$bob]"
+maryann_prin="[keyid:$maryann]"
+joe_prin="[keyid:$joe]"
+
+# [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (no)
+# [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (yes)
+
+## dump all credentials
+$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
+
+# [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes)
+echo "===bad============ stateU.foundingAlumni <- Bob yap "
+$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$bob_prin"
+
+# [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (yes)
+echo "===good============ stateU.foundingAlumni <- Maryann yap "
+$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$maryann_prin"
+
+
Index: examples/file_read_rt2_typed/Alpha_ID.pem
===================================================================
--- examples/file_read_rt2_typed/Alpha_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/file_read_rt2_typed/Alpha_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDBjCCAe6gAwIBAgIJAOB+gn201UGgMA0GCSqGSIb3DQEBBQUAMBAxDjAMBgNV
+BAMTBUFscGhhMB4XDTEyMDIwOTE5MDAwNVoXDTE1MDEyNDE5MDAwNVowEDEOMAwG
+A1UEAxMFQWxwaGEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDOrG/1
+jZ5JvckJHTurFJtQPGcpnfQ9xX4glRiER+Kv1NMPzIhYZbg4iAWO3e4sCC+farrt
+FmTQZxt0uxfp9+ZpyM5MyLfv4+5EE73rm21NfWyhsq+r/jSaegBaN8WGidtp0Fsu
+h0+eH1NkCm1nCEvCDhaNnMbrAi8cezWoAXyyuaYxz6LnI7iIZ1ViDvjr1fXBvbbg
+IFpxheRw0B5UtoTntU4oXf6mP46tZH2ASsHrnxFjaNh0/SdPxUNFGd9Nl0KDT/MH
+7hnvgTG1eUQlu0UNQvtS6ZQpcxcbEN86kfcuHafaRlqYjYI4kE/5rJG6p3e/cpy4
+o0Nc7dA8fwAsTDDfAgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/
+BAQDAgEGMB0GA1UdDgQWBBRxsNyb4u+70bP2xZU0QuAykmAS4zAfBgNVHSMEGDAW
+gBRxsNyb4u+70bP2xZU0QuAykmAS4zANBgkqhkiG9w0BAQUFAAOCAQEAc0lfcB7s
+MA0Moo3qSKpAwGqB29F9Uggrys7cD22WL39/m2Q/3+LyNC+ZjfxoVLAV2y74zzYi
+fYtK1FDJPyUo3XNpJaeHtuSzvmprhO2QuSufWmFycc1bcgEHmKHoAdJbEb0GlDIz
+BxeGPTaCcnlVH2GMGAQ/OVZlanJxeOUzaMYeCxdDy8w1g/sVUemMs0Mfo7Cxj5qU
+G9BolU3m5tjMiI2fVRabes/iPVAlVR8uGnzo8QlCO4ns9JRSqTxcnBqkb11qIkEh
+oV+5qpw0M/AHfoMnBkKLTpEt+4NTRf2zwIw68AvOhWHWIOTUm2pWmdfK17qSTFOR
+6fAWjwYAuz+AJg==
+-----END CERTIFICATE-----
Index: examples/file_read_rt2_typed/Alpha_private.pem
===================================================================
--- examples/file_read_rt2_typed/Alpha_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/file_read_rt2_typed/Alpha_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAzqxv9Y2eSb3JCR07qxSbUDxnKZ30PcV+IJUYhEfir9TTD8yI
+WGW4OIgFjt3uLAgvn2q67RZk0GcbdLsX6ffmacjOTMi37+PuRBO965ttTX1sobKv
+q/40mnoAWjfFhonbadBbLodPnh9TZAptZwhLwg4WjZzG6wIvHHs1qAF8srmmMc+i
+5yO4iGdVYg7469X1wb224CBacYXkcNAeVLaE57VOKF3+pj+OrWR9gErB658RY2jY
+dP0nT8VDRRnfTZdCg0/zB+4Z74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Qf4Dox/n5Ac1nMEA5Dc6ZOJQNWZ9m5g59X
+2Y206TxEk++Xj2ivFxyB2/G2o6XglqV8ZrjFQAaRKYLdPbAlLXI1jD1GXYD3G1ts
+hDoRPQKBgB/lla+HVbzrvMr/vaBm+zD8SOxdkogqIAFJM3nH0hqaPeWi8TO2dQXJ
+hm0nnqnD+xNfysf4NuLfvTyLCHJVk9pyx9dsB3LkY9bfQHsuOD5vpfo0obb2KU87
+U/W85pXRenRtAg25cMIWMYpf+L+3HqhpPy8f+Br3kUgdIU81axok
+-----END RSA PRIVATE KEY-----
Index: examples/file_read_rt2_typed/Bob_ID.pem
===================================================================
--- examples/file_read_rt2_typed/Bob_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/file_read_rt2_typed/Bob_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAeqgAwIBAgIJAMh4/85QKd/ZMA0GCSqGSIb3DQEBBQUAMA4xDDAKBgNV
+BAMTA0JvYjAeFw0xMjAyMDkxOTAwMDZaFw0xNTAxMjQxOTAwMDZaMA4xDDAKBgNV
+BAMTA0JvYjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALp4mDnO4v3d
+T3b2KolpOOp6oflNM+lH4QYrbjp61zk6NSS0GHplD5M0+IubjqDwOdblZrgGXzhS
+bsY6qfsjq/VPXYV9hWFT9piX4GIhLvjmugQ6CWR6LYCd+ItRzGphBfU9zwGgmndH
+yi6z57dwotZA3TN33pbZBLpr4j4fTpeHYoYp1IxMAx2k4cXYcGWXqwwXSYOo2ppZ
+rv6X/TWb9MKMM0VmzBBH1N0qUN372zoL2DkGbo3jSN8movFB47U7tOq6SeeXZO5Z
+BJwltHb2lQcaBconVAkes8EZ/Y/NSIHfO+qXki2abvnU/eMt2CIUqbmtHqubPiJr
+ONSLeJPRj28CAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwHQYDVR0OBBYEFJfR7UG/bFbRYB5TWTa+iZwfl+iOMB8GA1UdIwQYMBaAFJfR
+7UG/bFbRYB5TWTa+iZwfl+iOMA0GCSqGSIb3DQEBBQUAA4IBAQCnoS3WWDVDiD/b
+ZDe1gllbkQ6tJhOfG2nRb72CfCn96SIxxB1B6CJhyUtKvn94QvW4gZDsGrRpHrmb
+N7+BuT/Ne3RJJoccze2WGU8vzc+3Xzhaoldw7ZT/x5lmlqtTKzLalbqGhlDskTHU
+rECj0KbSc+wyRALCIvkX3rPHudZAo2lYKNdppBAvVf3u++PRcCdi+eiqnAGQQqJ2
++MxRwgkY0cfPrdYpWYsduwc2yUoMUZSlVsUIuaT/uMlbjhxrkC9nndC3gLm4Ly54
+LY5DRjAmmHJPC9ZGxaBmatXIalRjL3E0w5Btf3O6LTtrXikGQ6sPZtIZI6Hc3t47
+fY2hMow3
+-----END CERTIFICATE-----
Index: examples/file_read_rt2_typed/Bob_private.pem
===================================================================
--- examples/file_read_rt2_typed/Bob_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/file_read_rt2_typed/Bob_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAuniYOc7i/d1PdvYqiWk46nqh+U0z6UfhBituOnrXOTo1JLQY
+emUPkzT4i5uOoPA51uVmuAZfOFJuxjqp+yOr9U9dhX2FYVP2mJfgYiEu+Oa6BDoJ
+ZHotgJ34i1HMamEF9T3PAaCad0fKLrPnt3Ci1kDdM3feltkEumviPh9Ol4dihinU
+jEwDHaThxdhwZZerDBdJg6jamlmu/pf9NZv0wowzRWbMEEfU3SpQ3fvbOgvYOQZu
+jeNI3yai8UHjtTu06rpJ55dk7lkEnCW0dvaVBxoFyidUCR6zwRn9j81Igd876peS
+LZpu+dT94y3YIhSpua0eq5s+Ims41It4k9GPbwI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RDiyqt4DypBK
+YdMsGQKBgA0Vi4gIIio6U4akBiF07nZKLQeAiw9LYBteeQfBBXyQ7d2glD+g7m05
+htHg98joc6NxNICv/0GzqsqRNWd+NEoYGpGZNaJ5qTL0gIgk8j7hDghtkzSz205o
+BCNkbh5F4EVd7UM7wkqH6gHHJ8WLnfVbrd6s1Lph9ROd6BTOEPkL
+-----END RSA PRIVATE KEY-----
Index: examples/file_read_rt2_typed/Joe_ID.pem
===================================================================
--- examples/file_read_rt2_typed/Joe_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/file_read_rt2_typed/Joe_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAeqgAwIBAgIJAPJFYgkD7mKyMA0GCSqGSIb3DQEBBQUAMA4xDDAKBgNV
+BAMTA0pvZTAeFw0xMjAyMDkxOTAwMDlaFw0xNTAxMjQxOTAwMDlaMA4xDDAKBgNV
+BAMTA0pvZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKuMekO81y58
+CgGqyr/Ox7TMgcbgHk8F6ooxwXxZSmfgaAbelfXs7BG0O7vCvR82fr5yeTasZshR
+INQqp5UG/QasllXZJGfA7pLfTopf3dMjC5MWCL+EFunD+91/W8hWK7WfQgkK/kxL
+TVCpLVtP/sHjbV8TUgY1fSsZwFJeNi3EVAu6RK7GIrF2uRuB/n1g/pInyAfDjts5
+p1Bir61RgSZaFa7PsHbWqLjs1lNuodGStHk691Ocf8MsJxP6UOlifagHb7/HX1+k
+o3PLyAUFEap1Uhzg4rtmH+hTue85zoj25QvXEXWj9o2enMjedoUxLUU0kxdZSr3v
+uxwwLkDEONUCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwHQYDVR0OBBYEFCi3wBmwVqScN+5hNrxulNHoF/tzMB8GA1UdIwQYMBaAFCi3
+wBmwVqScN+5hNrxulNHoF/tzMA0GCSqGSIb3DQEBBQUAA4IBAQCO5MfttbLJQpY2
+JALdcEfxGa+MlnbOP46elyUC/TFpA2r2qXC7dZQOJ0ZWjDfIQKYWS0qvaNaVJzeL
+jlTKYncQ2eTXg4Bhck8wF1wc09QKRcDs3frHhs6/Rhi3gWavxznZR9AnrhfeA94g
+VIjWBni2A4rdBbhovyC18SLxnZEU/g1+lARBcvmx+QY1oI/3+6AKsQsktGih8Jw9
+agAQz2Oab+uKJUHS/K3EZtuixZb6ZpPywOlH8UMiIURWbmmcxQGz0w5sjH/a6K53
+5FIZH1RPA1WmqySRIm7W10mPS1nhriuxhBwh6gStLaiQN3UsXhmKE98WxYiBdjv/
+6AXoGBQ5
+-----END CERTIFICATE-----
Index: examples/file_read_rt2_typed/Joe_private.pem
===================================================================
--- examples/file_read_rt2_typed/Joe_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/file_read_rt2_typed/Joe_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAq4x6Q7zXLnwKAarKv87HtMyBxuAeTwXqijHBfFlKZ+BoBt6V
+9ezsEbQ7u8K9HzZ+vnJ5NqxmyFEg1CqnlQb9BqyWVdkkZ8Dukt9Oil/d0yMLkxYI
+v4QW6cP73X9byFYrtZ9CCQr+TEtNUKktW0/+weNtXxNSBjV9KxnAUl42LcRUC7pE
+rsYisXa5G4H+fWD+kifIB8OO2zmnUGKvrVGBJloVrs+wdtaouOzWU26h0ZK0eTr3
+U5x/wywnE/pQ6WJ9qAdvv8dfX6Sjc8vIBQURqnVSHODiu2Yf6FO57znOiPblC9cR
+daP2jZ6cyN52hTEtRTSTF1lKve+7HDAuQMQ41QIDAQABAoIBAQCPN0sHbAsVIrbT
+53s2oHH3Tdh2aLrE7EJ/NsS6hGzqxdzzBzaYxj/bE+XefdiXy04KvtTVQR7Z02kd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6kKvkzoyQD9bxR4LYL1qTPZBWdaDIpWgOUOx9w7auBjsT+hO
+MULAVIfW2Mc8PNkfpDZQnVRnlds/EoutJ6g7x3TxkfS44VJUYdwB
+-----END RSA PRIVATE KEY-----
Index: examples/file_read_rt2_typed/Maryann_ID.pem
===================================================================
--- examples/file_read_rt2_typed/Maryann_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/file_read_rt2_typed/Maryann_ID.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDCjCCAfKgAwIBAgIJANVeqPCWa0e8MA0GCSqGSIb3DQEBBQUAMBIxEDAOBgNV
+BAMTB01hcnlhbm4wHhcNMTIwMjA5MTkwMDA3WhcNMTUwMTI0MTkwMDA3WjASMRAw
+DgYDVQQDEwdNYXJ5YW5uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
+sgaTkkXzha6/smBIZb8vD/LgtZBRv8XTKJJ4G9Jvu6ilTzk8P6zezIJWWRO39WF7
+p8eoXTk6tv0xRUuSH8WlqfQmdWKYJvQwNSXtQT2LBdkznUCI7QigpbBz/D+6P+n+
+csC2aANHPp1RN4qxDlI8iwwGMNcCZ0RgbUn95pgXHv0mlU90dNdWJztrwtc8Syh0
+153VglQ9whfkopL7tE1dpfBN4bpqlPCpK/HX2drQhgJzcX02gAYTF03x/8XGmFZi
+YeD4r2JZdW0WJ5MGXKr1qHOAOEgst88GwDsyS7RyaJ2WbYwsHnikklwgg7qlCMXv
+88rBEnLjk1oF4kBswF/hRQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
+DwEB/wQEAwIBBjAdBgNVHQ4EFgQUICNDP6pSVgshV4bpG0HZKMdDkKowHwYDVR0j
+BBgwFoAUICNDP6pSVgshV4bpG0HZKMdDkKowDQYJKoZIhvcNAQEFBQADggEBADcP
+pwGr7RjiC+fQkqdTlTbBYGI7fcsUUvSgKuIU+qZPZBA6FCspNIQSuGPhmmTpHQCm
+cdVu8rg3/fkluviB5ar68RyEJH04wMlkZybxkYebUoRv7zC7FJKaz1RzL5Tt3Q89
+GqWd/Lu6QxnOvI0+H+/Xw0D7id6OuYcTZDKFLBy86KWAL9hjDwo6MYRdHSz6hqW1
+z+tOOnkG0iF/PVEUxyXBaRp6UXbManahRNXGu9savUFV+Mey56iit+YTbYzYrreE
+VbUCy5kQH+AQgQeO+D8fNTTuJ+S+F4gTeUYeIOuBkP92RUYY4aDT8Ql4VWTd9yPu
+bzHvAN19zavb9i/0OQs=
+-----END CERTIFICATE-----
Index: examples/file_read_rt2_typed/Maryann_private.pem
===================================================================
--- examples/file_read_rt2_typed/Maryann_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/file_read_rt2_typed/Maryann_private.pem	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAsgaTkkXzha6/smBIZb8vD/LgtZBRv8XTKJJ4G9Jvu6ilTzk8
+P6zezIJWWRO39WF7p8eoXTk6tv0xRUuSH8WlqfQmdWKYJvQwNSXtQT2LBdkznUCI
+7QigpbBz/D+6P+n+csC2aANHPp1RN4qxDlI8iwwGMNcCZ0RgbUn95pgXHv0mlU90
+dNdWJztrwtc8Syh0153VglQ9whfkopL7tE1dpfBN4bpqlPCpK/HX2drQhgJzcX02
+gAYTF03x/8XGmFZiYeD4r2JZdW0WJ5MGXKr1qHOAOEgst88GwDsyS7RyaJ2WbYws
+Hnikklwgg7qlCMXv88rBEnLjk1oF4kBswF/hRQIDAQABAoIBAD6zRkJcVLqeo3GF
+q7n6Le8mEbKg08oBOK+vdpIF+chUS3StqeSbVBUfSp4w7beEz/J1xXyf7WgJoNLR
+HPQHvqMvFGR/hyshEeGGLBuwO0iiCSW3VwJ06W+xyAftwgFEvpNYAGZ90RfifHpd
+ZKKwoBYw8/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wxC3/lhjo/QITOCJ+//AWAwlay5wnAjI+
+-----END RSA PRIVATE KEY-----
Index: examples/file_read_rt2_typed/README
===================================================================
--- examples/file_read_rt2_typed/README	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/file_read_rt2_typed/README	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+rm -rf *.der *.pem
+
+# alpha.read(fileA) <-?- Bob
+#[keyid:Alpha].role:read([urn:'file://fileA']) <-?- [keyid:Bob] (yes)
+#[keyid:Alpha].role:read([urn:'file://fileA']) <-?- [keyid:Maryann] (yes)
+
+creddy --generate --cn Alpha
+creddy --generate --cn Bob
+creddy --generate --cn Maryann
+creddy --generate --cn Joe
+
+alpha_keyid=`creddy --keyid --cert Alpha_ID.pem`
+bob_keyid=`creddy --keyid --cert Bob_ID.pem`
+maryann_keyid=`creddy --keyid --cert Maryann_ID.pem`
+joe_keyid=`creddy --keyid --cert Joe_ID.pem`
+
+read_fileA="read([urn:'file://fileA'])"
+managerof_joe="managerOf([keyid:$joe_keyid])"
+ownerof_fileA="ownerOf([urn:'file://fileA'])"
+managerof_qE="managerOf([principal:?E{[keyid:$alpha_keyid].role:ownerOf([urn:?F])}])"
+
+# alpha.read(?F) <- alpha.managerOf(?E:alpha.ownerOf(?F))
+# [keyid:alpha].role:read([urn:?F])<-
+#    [keyid:alpha].role:managerOf([principal:?E{[keyid:alpha].role:ownerOf([urn:?F])}]
+creddy --attribute \
+       --issuer Alpha_ID.pem --key Alpha_private.pem --role "read([urn:?F])" \
+       --subject-cert Alpha_ID.pem --subject-role "$managerof_qE" \
+       --out Alpha_read_qF__alpha_managerof_qE_attr.der
+
+#[keyid:Alpha].role:managerOf([Keyid:Joe]) <- [keyid:Bob]
+creddy --attribute \
+        --issuer Alpha_ID.pem --key Alpha_private.pem --role "$managerof_joe" \
+        --subject-cert Bob_ID.pem \
+        --out Alpha_managerof_Joe__Bob_attr.der
+
+#[keyid:Alpha].role:ownerOf([urn:'file://fileA']) <- [keyid:Joe]
+creddy --attribute \
+        --issuer Alpha_ID.pem --key Alpha_private.pem --role "$ownerof_fileA" \
+        --subject-cert Joe_ID.pem \
+        --out Alpha_ownerof_fileA__Joe_attr.der
+
+####################################################################################
+# note:
+# 
+# alpha.read(?F) <- alpha.manager(?E:alpha.owner(?F))
+# [keyid:alpha].role:read([urn:?F])<-
+#       #[keyid:alpha].role:manager([principal:?E{[keyid:alpha].role:owner([urn:?F])}])
+# 
+# alpha.read(?F) <- alpha.manager(?E) 
+# and alpha.owner(?F) <- ?E
+# 
+# [keyid:alpha].role:read([urn:?F])<-[keyid:?M]
+#     [keyid:alpha].role:manager([principal:?E])<-[keyid:?M]
+#     [keyid:alpha].role:owner([urn:?F])<-[keyid:?E]
+# 
+# isMember(M,role(alpha,read,F)) :-
+#       isMember(M, role(alpha,manager,E)),
+#       isMember(E, role(alpha,owner,F))  <-- constraining rule
+# 
+# alpha.read(?F) <- alpha.manager(?E)
+# alpha.owner(?F) <- ?E
+# 
+# condition like this,
+#          ?E:A.r  needs to be translate into constraining rule,  A.r<-?E
+# 
+# query,
+# alpha.read(fileA) <-?- Bob
+# needs
+# alpha.manager(Joe)<-Bob
+# alpha.owner(fileA)<-Joe
+
Index: examples/file_read_rt2_typed/d
===================================================================
--- examples/file_read_rt2_typed/d	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/file_read_rt2_typed/d	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,18 @@
+
+rm -rf creds_dump
+
+eloc=/home/mei/Deter/abac/libabac
+keyloc=/home/mei/Deter/abac/examples/file_read_rt2_typed
+
+alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
+bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
+maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem`
+alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
+
+read_fileA="[keyid:$alpha].oset:read([urn:'file://fileA'])"
+bob_prin="[keyid:$bob]"
+maryann_prin="[keyid:$maryann]"
+
+## dump all credentials
+$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
+
Index: examples/file_read_rt2_typed/r
===================================================================
--- examples/file_read_rt2_typed/r	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/file_read_rt2_typed/r	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,23 @@
+
+rm -rf creds_dump
+
+eloc=/home/mei/Deter/abac/libabac
+keyloc=/home/mei/Deter/abac/examples/file_read_rt2_typed
+
+alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
+bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
+maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem`
+alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
+
+read_fileA="[keyid:$alpha].role:read([urn:'file://fileA'])"
+bob_prin="[keyid:$bob]"
+maryann_prin="[keyid:$maryann]"
+
+#[keyid:Alpha].role:read([urn:'file://fileA']) <-?- [keyid:Bob] (yes)
+echo "===good============ alpha.read(fileA) <- Bob yap "
+$eloc/abac_prover_yap  --keystore $keyloc --role "$read_fileA" --principal "$bob_prin"
+
+#[keyid:Alpha].role:read([urn:'file://fileA']) <-?- [keyid:Maryann] (no)
+echo "===bad============ alpha.read(fileA) <- Maryann yap "
+$eloc/abac_prover_yap  --keystore $keyloc --role "$read_fileA" --principal "$maryann_prin"
+
Index: examples/file_read_rt2_typed/rr
===================================================================
--- examples/file_read_rt2_typed/rr	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
+++ examples/file_read_rt2_typed/rr	(revision 10e1588c3bda3e12f9242c694c22b504101bae67)
@@ -0,0 +1,26 @@
+
+rm -rf creds_dump
+
+eloc=/home/mei/Deter/abac/libabac
+keyloc=/home/mei/Deter/abac/examples/file_read_rt2_typed
+
+alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
+bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
+maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem`
+alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
+
+read_fileA="[keyid:$alpha].role:read([urn:'file://fileA'])"
+bob_prin="[keyid:$bob]"
+maryann_prin="[keyid:$maryann]"
+
+## dump all credentials -- does not seem to work
+#$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
+
+#[keyid:Alpha].role:read([urn:'file://fileA']) <-?- [keyid:Bob] (yes)
+echo "===good============ alpha.read(fileA) <- Bob yap "
+$eloc/abac_prover_yap  --keystore $keyloc --role "$read_fileA" --principal "$bob_prin"
+
+#[keyid:Alpha].role:read([urn:'file://fileA']) <-?- [keyid:Maryann] (no)
+echo "===bad============ alpha.read(fileA) <- Maryann yap "
+$eloc/abac_prover_yap  --keystore $keyloc --role "$read_fileA" --principal "$maryann_prin"
+
