Index: examples/acme_rockets_rt0_typed/Acme_ID.pem
===================================================================
--- examples/acme_rockets_rt0_typed/Acme_ID.pem	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
+++ examples/acme_rockets_rt0_typed/Acme_ID.pem	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDBDCCAeygAwIBAgIJALLzeXeloNeRMA0GCSqGSIb3DQEBBQUAMA8xDTALBgNV
+BAMTBEFjbWUwHhcNMTIwMTE3MjEzODU5WhcNMTUwMTAxMjEzODU5WjAPMQ0wCwYD
+VQQDEwRBY21lMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4CIw7dcx
+EghfMvh6DYHmmcm3mBBVSp3/GYBo927AP/WL2zOYRBoXehCNkwOFSmtGpYZUW+y9
+NnxAWd23UvqBJq7joi19fX412eqQIFxmDyPkOCZB8e00ifFM8hJXfryX4DbRB6JF
+W0CbkoBm2rcIw32XgKnvZEQb2FgaYc7glaq373kzFE//Mmg78JOaz5UwsEGJElDU
+zFG3Mn0wo/374T0BeayRRBc8aMpRuM9q24iDs+7qZUJDMJCUVduV+fHJiHjlJB+j
+vuM+cz5ZICvYtXEsZNBJ99GjFys6I86RudDnojM4J1UPaMGg7g6ZvgVhfmhf8Rm+
+EorWo1HnDj3l/QIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE
+AwIBBjAdBgNVHQ4EFgQUUxUwceyMurykHefePz22xGo7qVowHwYDVR0jBBgwFoAU
+UxUwceyMurykHefePz22xGo7qVowDQYJKoZIhvcNAQEFBQADggEBAJCz7M2nbC4q
+1nGaxII9I1uouAUBDsZApB7hgz2U9KOQayUSjdm3KGB4SmMHNqbBtNiE6DUeDQVi
+Y8P4qgEs1VdJSYUG9d/mjskL9adcZ9YII5w/aoU5sRcsPOp5bxo9TTD7yOjJk5QL
+0Q1zMCnT5CUMgtrsvUkwIF11sRPvy+sZwMws60PkipNhOtWkjuhxEs9qd++DOkES
+2NFHKNQmSnSb+rIkWjbZB+NkQCLBtJRCH9PNAFs9pSi8W1Fo/4pLRdib6/Hipw55
+7Hmj6VsqphqaYFaskJDEUugD3C7MSTduOWece6+XBbmoZEXt/xAv6JMfxNHvHlUt
+QzXZno5F+cs=
+-----END CERTIFICATE-----
Index: examples/acme_rockets_rt0_typed/Acme_private.pem
===================================================================
--- examples/acme_rockets_rt0_typed/Acme_private.pem	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
+++ examples/acme_rockets_rt0_typed/Acme_private.pem	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA4CIw7dcxEghfMvh6DYHmmcm3mBBVSp3/GYBo927AP/WL2zOY
+RBoXehCNkwOFSmtGpYZUW+y9NnxAWd23UvqBJq7joi19fX412eqQIFxmDyPkOCZB
+8e00ifFM8hJXfryX4DbRB6JFW0CbkoBm2rcIw32XgKnvZEQb2FgaYc7glaq373kz
+FE//Mmg78JOaz5UwsEGJElDUzFG3Mn0wo/374T0BeayRRBc8aMpRuM9q24iDs+7q
+ZUJDMJCUVduV+fHJiHjlJB+jvuM+cz5ZICvYtXEsZNBJ99GjFys6I86RudDnojM4
+J1UPaMGg7g6ZvgVhfmhf8Rm+EorWo1HnDj3l/QIDAQABAoIBAQCV3MaygOxCjm54
++kNBvNWfhozHlEQzPClRt9Z3ewn4ugnlaz4oavm/mEnRPs1k0Q3Pp13IiSaKw9GT
+RPhK90xbvRxfV+NMgZMoPfpYaO+kt+7kzE/TnzM9+KXmRfVSvG8gcAacABg3x589
++bTMEQ4/CD7AvN9gP1oO8fnR5C2uY9N6kkkDY9qgTmkm7Ad/+0ngxeD1WSrWF996
+huSDhCJEE+PwXJAc2Hd5+jvhhtOhYWwF5rlJILzrghrEIG7lVqXYTB3uQOpBXsYr
+TCFnHAAKbtb0Z3WQ1YjhobiljEuzt/x6kVZ3uNBB6jwjHlj1X6e3udYccKedyPqy
+temHkgtRAoGBAPE6T2rBohhUTlYp7Yaxtuh6hLuT74VNHAFiJ9Wd2FwZbl+YV7az
+zBjVUYSt+rmHQCwnckV/Q2PYRKWtEXqT4IIO35+R7P4O1EGJfkardY+Nvjrj0Jrm
+/qiRuV8TNge47Xk13rB/G0wtnpaFU3s+LMxfgKtCFNfSptuPp87mF/uDAoGBAO3b
+5ch6DMP0UYFyrfCG0pBNA4dMu76wDqESc7F5BZlgV83nl1t0gVQHFp6oV0SkVhkE
+40hWXK8ubSAX+wvHP1HPWVisKrLylQgGOQu68vR0PJ8WlrOq5ZHcAlolY15r5M8V
+P8vQ+/QaAmgPutaYwMmEIKrDH4P+sH9d4PA8LWB/AoGAHKxfsELf76Blx1wofbA2
+G6Akkt9cwy2NPKTcM0oV46yqL/a9xlvM0M7aZ7j+ansnJ5hwvs4HxqB4WHEf+MAH
+Ga6G6kLANtqwZDHhrqjGyo+AoyNdMmxurL7Vl/WCoJxcreG3XKdfKUjq5t1mNOoJ
+DSn082Zhb938M3D581/qTd0CgYEAtG9SgWDsnB2TUsJe5o4v3x085v8zkLTXdCKe
+Nuvabn4iPWVIcS0RCmASLasAAGc1lOcbTv2Mc6uhRm5Kl6W/B91mJpj8DyFsIlku
+HxLjSMOAVSJ6kbK7UYl3E1E3byIjwV+aNI/FAWhVmQENt8rKvFOJwGAiYSvsUcIy
+Z6sOtRsCgYB9RK3K7nMxWNYACCkq4nxHZuHwsXt3iTJ8Mj4nAtwBSdeHVs2BG3Y4
+DsUhqfeiuuLvEq0mWNuh7mR4FIFaO83ubD9Ry2LqWBxCMIAWHM+5TLLuqGn9dqDh
+I3aYF5Dvd7A5vkc/eJPt8FzKie462KE50yoGi4mVWCH15jOdJ5McrA==
+-----END RSA PRIVATE KEY-----
Index: examples/acme_rockets_rt0_typed/Coyote_ID.pem
===================================================================
--- examples/acme_rockets_rt0_typed/Coyote_ID.pem	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
+++ examples/acme_rockets_rt0_typed/Coyote_ID.pem	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDBzCCAe+gAwIBAgIIZcW4joK5mjYwDQYJKoZIhvcNAQEFBQAwETEPMA0GA1UE
+AxMGQ295b3RlMB4XDTEyMDExNzIxMzkwMFoXDTE1MDEwMTIxMzkwMFowETEPMA0G
+A1UEAxMGQ295b3RlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9+ja
+T17+b1J1B4AAHp2EUfkT7X106evaUWQ1Dvyh576zwC7w2VnHOWhOOoMrZMfaSZUB
+fWo+3+BddKQ3fSjBlkabo8a/EzShNSILlRx8p5kJTt5debR0kKn1fXnaO2sOoBQ2
+LBpYRjKhoidAbvc16oxIVYFygwq7fgn2vaEbfv6WoX2gyDA9vZK60wQOdXui1b49
+nxthLKpVqZGg/v3RTQmTmE81Fc3enKOjDQJ0n1w7+GYNn3iNr7MYT+6bfITf2OMj
+ZWZUCerAg0DmzAEKp/BIWdHhPgsTRkzdb7Y5eo6DyBVCr+xrioF4VdMDrp4P7Sxi
+Ijw4dBPcT8R1ObppUwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB
+/wQEAwIBBjAdBgNVHQ4EFgQUira9xKNSPPJjSa5eUwZe8uycfkIwHwYDVR0jBBgw
+FoAUira9xKNSPPJjSa5eUwZe8uycfkIwDQYJKoZIhvcNAQEFBQADggEBAIqBObsF
+7FKpUoFmzdAMBw2ijtEBlrhcGjsGTVeZ+HrkoK1ExwQ8DppqnAlzHMAmTlouYX3l
+rLmq7qJwJYsmJWm/q/bPnPalJ0p3nZ+4krmZUJX1A2sOrqOBNXbV9UIcZaoFEVRb
+S1i8Pad9p7plk9XiiPlyXkfPov2ezkpP9L0eYyTIclpSn7l/++FQw2ukmfqDG944
+zP1qVvXMO5FfA7Rl1FaRryGpDWgwDY83rjiJtzRiI1OPa0cuf95NgJuEzqWrgiOU
+/gnSssbTJPb5AHFF8JCluX7n4yWlRer2GmHb9gJPwI7/iQmeIoZXELCZ82Qjrvsp
+d96s7MOONKRjJCs=
+-----END CERTIFICATE-----
Index: examples/acme_rockets_rt0_typed/Coyote_private.pem
===================================================================
--- examples/acme_rockets_rt0_typed/Coyote_private.pem	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
+++ examples/acme_rockets_rt0_typed/Coyote_private.pem	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA9+jaT17+b1J1B4AAHp2EUfkT7X106evaUWQ1Dvyh576zwC7w
+2VnHOWhOOoMrZMfaSZUBfWo+3+BddKQ3fSjBlkabo8a/EzShNSILlRx8p5kJTt5d
+ebR0kKn1fXnaO2sOoBQ2LBpYRjKhoidAbvc16oxIVYFygwq7fgn2vaEbfv6WoX2g
+yDA9vZK60wQOdXui1b49nxthLKpVqZGg/v3RTQmTmE81Fc3enKOjDQJ0n1w7+GYN
+n3iNr7MYT+6bfITf2OMjZWZUCerAg0DmzAEKp/BIWdHhPgsTRkzdb7Y5eo6DyBVC
+r+xrioF4VdMDrp4P7SxiIjw4dBPcT8R1ObppUwIDAQABAoIBAF2x2rh+vYjTUDm6
+bdEkVTsp+RccAFDce9GhHtCAOKy+jW8IDq0G2l3fBxnkM0VOpziCIWMGAadZQ9ju
+q64Y9jlWjEI0vkiC7p6HNHtxncc19qehMRDrW9bE9Wwr3ofwaUGlAehfOJenUSFY
+1mhZ9D2mMTxnxSCzsLLtDx0SQ7MVxOckZtx1jfbgwGevq9butDHKOqfWkM8sQl8F
+ZdniPuB2aQniOWoX+FFavYAx7utxRPalDyRE7SvZlr/8QQao/A98CqaowTsoC+Gk
+4tZuHyvjZ5Si8wpUSKZhWbhOUMNucF4soflx490Be4vphM9dDIlODrichU0l4mvC
+1NdLLEkCgYEA/l3tmLH2E69XR16VhBNHkZu2FV1PQsbYCGx1XJCo6DbUeFfdCn1U
+HUBRuhyphvTsmqBLDPa4Cc32nxk7NIi/zfQrs3vU8GsTavQeqKCUR2DwhExC7KlF
+VYFX8BBpt35RcoAUK6Vw+z5s3tbYokC7mbNdnEV+V1KBzJZwl+njDz0CgYEA+YBP
+wUzodTCxl9oXSw1AE2mnSdDRVNuyeRwpyZc1JEKwP65sXXax+ecdYutJ8NMVaFBS
+ls9YFKntUBfWxSaez44qgDmSImorJ5xVqDAbdSFpyvoxzgwqLpBr4KHT/r9sIIpb
+sIBsBnZ2eJgSbH/xM4b0wW6IIr6LURmB1KD2488CgYEAo1XnMszbqepGzjJjKgtD
+QrHNK0zej4+lu0sB1a2ieHJ03s30xz6RG7Noh2zOQzXVFLlnV+y5YrpZ6fHGvcYt
+++8VfMxAgR0Qu/YEFd3/ORJ7f0iFFPjg57YFpMa1S7mWTUMHMLusn/iG6lTliNKu
+ZFT0AFvzc9ksNhZIOJRcVDUCgYEA7/EXwjvmKh2EDRct432Aq6qluPVa+xK1Vodh
+IH+MGa0Qto1VpaSqkDxVJHZGi5VUNxdX9bS9blHk6WujncIAZHbCJMI46WPU0Kkm
+LzLklQZnKU7natKEFnfJZyP6LjmFEN4+Q0WdnbF7SYpl3XZFTlpxMzzLKy636Gxx
+UTzjcj0CgYAPPauT8cqEnKCq8YHDWYt9gZIbz2qc6CeaRM2EpGsNTtN8FDJBtCcQ
+0LEFFxoJI4OPphERIpQfrJ1TViu+0X4rJAOEiPq9v5YokxSnHnuHjzEbYe5gAraD
+xml3b3gdHhbfe0XWXXHJNnKuvIHmFqkCNvCU10CFemcSvAGt3a8lWw==
+-----END RSA PRIVATE KEY-----
Index: examples/acme_rockets_rt0_typed/README
===================================================================
--- examples/acme_rockets_rt0_typed/README	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
+++ examples/acme_rockets_rt0_typed/README	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+rm -rf *.der *.pem
+
+creddy --generate --cn Acme
+creddy --generate --cn Coyote
+
+#[keyid:Acme].role:buy_rockets <- [keyid:Acme].role:preferred_customer 
+creddy --attribute \
+       --issuer Acme_ID.pem --key Acme_private.pem --role buy_rockets \
+       --subject-cert Acme_ID.pem --subject-role preferred_customer \
+       --out Acme_buy_rockets__Acme_preferred_customer_attr.der
+
+#[keyid:Acme].role:preferred_customer <- [keyid:Coyote]
+creddy --attribute \
+       --issuer Acme_ID.pem --key Acme_private.pem --role preferred_customer \
+       --subject-cert Coyote_ID.pem \
+       --out Acme_preferred_customer__Coyote_attr.der
+
Index: examples/acme_rockets_rt0_typed/rr
===================================================================
--- examples/acme_rockets_rt0_typed/rr	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
+++ examples/acme_rockets_rt0_typed/rr	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
@@ -0,0 +1,31 @@
+
+eloc=/home/mei/Deter/abac/libabac
+keyloc=/home/mei/Deter/abac/examples/acme_rockets_rt0_typed
+
+acme=`creddy --keyid --cert $keyloc/Acme_ID.pem`
+coyote=`creddy --keyid --cert $keyloc/Coyote_ID.pem`
+
+#[keyid:Acme].role:preferred_customer <-?- [keyid:Coyote] yap
+#isMember(pCoyote, role(pAcme,preferred_customer), C).
+echo "  "
+echo "===good============ Acme.preferred_customer <- Coyote yap "
+$eloc/abac_prover_yap  --keystore $keyloc --role $acme.preferred_customer --principal $coyote
+
+#[keyid:Acme].role:buy_rockets <-?- [keyid:Coyote] yap
+#isMember(pCoyote, role(pAcme,buy_rockets), C).
+echo "  "
+echo "===good=============== Acme.buy_rockets <- Coyote yap"
+$eloc/abac_prover_yap  --keystore $keyloc --role $acme.buy_rockets --principal $coyote
+
+## this is not suppose to work
+#[keyid:Acme].role:buy_rockets <-?- [keyid:Acme].role:preferred_customer yap
+echo "  "
+echo "===bad=============== Acme.buy_rockets <- Acme.preferred_customer yap"
+$eloc/abac_prover_yap  --keystore $keyloc --role $acme.buy_rockets --principal $acme.preferred_customer
+
+#[keyid:Coyote].role:friend <-?- [keyid:Acme] yap
+#isMember(pAcme, role(pCoyote,friend), C).
+echo "  "
+echo "===bad=============== Coyote.friend <- Acme yap"
+$eloc/abac_prover_yap  --keystore $keyloc --role $acme.friend --principal $acme
+
Index: examples/acme_rockets_rt0_typed/rrout
===================================================================
--- examples/acme_rockets_rt0_typed/rrout	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
+++ examples/acme_rockets_rt0_typed/rrout	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
@@ -0,0 +1,185 @@
+  
+===good============ Acme.preferred_customer <- Coyote yap 
+% Restoring file /usr/local/lib/Yap/startup.yss
+calling source..
+--> ID cert... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Acme_ID.pem
+--> ID cert... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Coyote_ID.pem
+--> attr file... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Acme_buy_rockets__Acme_preferred_customer_attr.der
+--> attr file... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Acme_preferred_customer__Coyote_attr.der
+
+
+========= yap db (DEBUG:calling within _query)
+isMember(A,role(pAcme,buy_rockets),B) :-
+   isMember(A,role(pAcme,preferred_customer),C),
+   appendL([['[keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:buy_rockets <- [keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:preferred_customer'],C],B),
+   isType(pAcme,keyid).
+isMember(pCoyote,role(pAcme,preferred_customer),['[keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:preferred_customer <- [keyid:5b705754a7e15cf4a2ba17bd0ef86c32aa4943ac]']) :-
+   isType(pAcme,keyid),
+   isType(pCoyote,keyid).
+isType(pAcme,keyid).
+isType(pCoyote,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).
+file_search_path(library,A) :-
+   library_directory(A).
+file_search_path(commons,_) :-
+   commons_directory(_).
+file_search_path(swi,A) :-
+   current_prolog_flag(home,A).
+file_search_path(yap,A) :-
+   current_prolog_flag(home,A).
+file_search_path(system,A) :-
+   prolog_flag(host_type,A).
+file_search_path(foreign,yap('lib/Yap')).
+listing ok.. 
+========= 
+
+success, query call ok.. 
+DEBUG:responds from yap(['[keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:preferred_customer <- [keyid:5b705754a7e15cf4a2ba17bd0ef86c32aa4943ac]'])
+DEBUG:total 1 credentials
+prover success!!
+credentials needed :
+ =>308020ace07e02450dbc7b58bfc099e4f8b989cd.preferred_customer
+        <- 5b705754a7e15cf4a2ba17bd0ef86c32aa4943ac
+
+  
+===good=============== Acme.buy_rockets <- Coyote yap
+% Restoring file /usr/local/lib/Yap/startup.yss
+calling source..
+--> ID cert... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Acme_ID.pem
+--> ID cert... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Coyote_ID.pem
+--> attr file... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Acme_buy_rockets__Acme_preferred_customer_attr.der
+--> attr file... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Acme_preferred_customer__Coyote_attr.der
+
+
+========= yap db (DEBUG:calling within _query)
+isMember(A,role(pAcme,buy_rockets),B) :-
+   isMember(A,role(pAcme,preferred_customer),C),
+   appendL([['[keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:buy_rockets <- [keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:preferred_customer'],C],B),
+   isType(pAcme,keyid).
+isMember(pCoyote,role(pAcme,preferred_customer),['[keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:preferred_customer <- [keyid:5b705754a7e15cf4a2ba17bd0ef86c32aa4943ac]']) :-
+   isType(pAcme,keyid),
+   isType(pCoyote,keyid).
+isType(pAcme,keyid).
+isType(pCoyote,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).
+file_search_path(library,A) :-
+   library_directory(A).
+file_search_path(commons,_) :-
+   commons_directory(_).
+file_search_path(swi,A) :-
+   current_prolog_flag(home,A).
+file_search_path(yap,A) :-
+   current_prolog_flag(home,A).
+file_search_path(system,A) :-
+   prolog_flag(host_type,A).
+file_search_path(foreign,yap('lib/Yap')).
+listing ok.. 
+========= 
+
+success, query call ok.. 
+DEBUG:responds from yap(['[keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:buy_rockets <- [keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:preferred_customer','[keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:preferred_customer <- [keyid:5b705754a7e15cf4a2ba17bd0ef86c32aa4943ac]'])
+DEBUG:total 2 credentials
+prover success!!
+credentials needed :
+ =>308020ace07e02450dbc7b58bfc099e4f8b989cd.buy_rockets
+        <- 308020ace07e02450dbc7b58bfc099e4f8b989cd.preferred_customer
+
+ =>308020ace07e02450dbc7b58bfc099e4f8b989cd.preferred_customer
+        <- 5b705754a7e15cf4a2ba17bd0ef86c32aa4943ac
+
+  
+===bad=============== Acme.buy_rockets <- Acme.preferred_customer yap
+% Restoring file /usr/local/lib/Yap/startup.yss
+calling source..
+--> ID cert... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Acme_ID.pem
+--> ID cert... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Coyote_ID.pem
+--> attr file... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Acme_buy_rockets__Acme_preferred_customer_attr.der
+--> attr file... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Acme_preferred_customer__Coyote_attr.der
+
+
+========= yap db (DEBUG:calling within _query)
+isMember(A,role(pAcme,buy_rockets),B) :-
+   isMember(A,role(pAcme,preferred_customer),C),
+   appendL([['[keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:buy_rockets <- [keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:preferred_customer'],C],B),
+   isType(pAcme,keyid).
+isMember(pCoyote,role(pAcme,preferred_customer),['[keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:preferred_customer <- [keyid:5b705754a7e15cf4a2ba17bd0ef86c32aa4943ac]']) :-
+   isType(pAcme,keyid),
+   isType(pCoyote,keyid).
+isType(pAcme,keyid).
+isType(pCoyote,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).
+file_search_path(library,A) :-
+   library_directory(A).
+file_search_path(commons,_) :-
+   commons_directory(_).
+file_search_path(swi,A) :-
+   current_prolog_flag(home,A).
+file_search_path(yap,A) :-
+   current_prolog_flag(home,A).
+file_search_path(system,A) :-
+   prolog_flag(host_type,A).
+file_search_path(foreign,yap('lib/Yap')).
+listing ok.. 
+========= 
+
+fail, a.r <- b.r query is not implemented yet !!!
+  
+===bad=============== Coyote.friend <- Acme yap
+% Restoring file /usr/local/lib/Yap/startup.yss
+calling source..
+--> ID cert... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Acme_ID.pem
+--> ID cert... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Coyote_ID.pem
+--> attr file... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Acme_buy_rockets__Acme_preferred_customer_attr.der
+--> attr file... /home/mei/Deter/abac/examples/acme_rockets_rt0_typed/Acme_preferred_customer__Coyote_attr.der
+
+
+========= yap db (DEBUG:calling within _query)
+isMember(A,role(pAcme,buy_rockets),B) :-
+   isMember(A,role(pAcme,preferred_customer),C),
+   appendL([['[keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:buy_rockets <- [keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:preferred_customer'],C],B),
+   isType(pAcme,keyid).
+isMember(pCoyote,role(pAcme,preferred_customer),['[keyid:308020ace07e02450dbc7b58bfc099e4f8b989cd].role:preferred_customer <- [keyid:5b705754a7e15cf4a2ba17bd0ef86c32aa4943ac]']) :-
+   isType(pAcme,keyid),
+   isType(pCoyote,keyid).
+isType(pAcme,keyid).
+isType(pCoyote,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).
+file_search_path(library,A) :-
+   library_directory(A).
+file_search_path(commons,_) :-
+   commons_directory(_).
+file_search_path(swi,A) :-
+   current_prolog_flag(home,A).
+file_search_path(yap,A) :-
+   current_prolog_flag(home,A).
+file_search_path(system,A) :-
+   prolog_flag(host_type,A).
+file_search_path(foreign,yap('lib/Yap')).
+listing ok.. 
+========= 
+
+fail, query's call is bad.. 
Index: examples/acme_rockets_rt0_typed/rt0.pl
===================================================================
--- examples/acme_rockets_rt0_typed/rt0.pl	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
+++ examples/acme_rockets_rt0_typed/rt0.pl	(revision 718ad9243faff3a00dea5c5c5b2ef6fe89caedbe)
@@ -0,0 +1,19 @@
+
+% principal ID (Acme)
+isPrincipal(acme).
+% principal ID (Coyote)
+isPrincipal(coyote).
+
+%Acme.buy_rockets <- Acme.preferred_customer
+isMember(Z, role(acme, buy_rockets, ["cert2", C] )) :- 
+           isMember(Z, role(acme, preferred_customer, [C])). 
+
+%Acme.preferred_customer <- Coyote
+isMember(coyote, role(acme, preferred_customer, ["cert1"])).
+
+%--role preferred_customer --principal coyote
+%isMember(coyote, role(acme, preferred_customer, C)).
+%isMember(coyote, role(acme, buy_rockets, C)).
+
+
+
