- From: Andrea Perego <andrea.perego@uninsubria.it>
- Date: Thu, 15 Mar 2007 16:49:03 +0100
- To: public-cwm-talk@w3.org
Dear all, I'm new to the mailing list and I would like to report a problem I encountered when trying to obtain a proof from Cwm. We are working on a rule-based mechanism for controlling the access to resources owned by social network participants. Very briefly, the idea is that access rules denote authorized users by using constraints on the type, trust level, and depth of relationships. For this purpose, we adopted the PAW approach and, in particular, we use N3 to express access rules and the assertions on the existing relationships, whereas Cwm is in charge of computing and verifying proofs. We are currently implementing such system, but we found some problems in using the --why option in Cwm. More precisely, if I run python cwm.py socrates.n3 --think all works fine, and Cwm returns: #Processed by Id: cwm.py,v 1.164 2004/10/28 17:41:59 timbl Exp # using base file:/users/perego/public_html/cwm/socrates.n3 # Notation3 generation by # notation3.py,v 1.166 2004/10/28 17:41:59 timbl Exp # Base was: file:/users/perego/public_html/cwm/socrates.n3 @prefix : <socrates#> . @prefix soc: <#> . @forAll soc:who . :socrates a :Man, :Mortal . { soc:who a :Man . } <http://www.w3.org/2000/10/swap/log#implies> {soc:who a :Mortal . } . #ENDS However, if I run python cwm-1.0.0/cwm.py socrates.n3 --think --why here is the result: #Processed by Id: cwm.py,v 1.164 2004/10/28 17:41:59 timbl Exp # using base file:/users/perego/public_html/cwm/socrates.n3 @@@@@@@ Proof of {} is <swap.why.FormulaReason instance at 0x824ba0c> @@@@@@ notation3 167 loading file:/users/perego/public_html/cwm/socrates.n3 None {} Now: 169 None <swap.why.FormulaReason instance at 0x824ba0c> {} We have a reason for {{2}:: {who type Man} implies {who type Mortal}} of <swap.why.BecauseOfRule instance at 0x82a070c> with bindings {who: socrates} Traceback (most recent call last): File "cwm-1.0.0/cwm.py", line 650, in ? doCommand() File "cwm-1.0.0/cwm.py", line 523, in doCommand workingContext = workingContext.collector.explanation() File "/users/perego/public_html/cwm/cwm-1.0.0/swap/why.py", line 128, in explanation me=self.explain(ko) File "/users/perego/public_html/cwm/cwm-1.0.0/swap/why.py", line 141, in explain ko.add(subj=me, pred=reason.gives, obj=self.formula, why=dontAsk) File "/users/perego/public_html/cwm/cwm-1.0.0/swap/llyn.py", line 299, in add assert not isinstance(obj, Formula) or obj.canonical is obj, "obj Should be closed"+`obj` AssertionError: obj Should be closed{3} With other examples, Cwm returns not an "AssertionError" but a "NameError" ("NameError: global name 'Error' is not defined"). I've also tried to use different version of Python, but I couldn't solve this problem. Currently I'm using Python 2.4.3 under Linux and 2.4.4 under W2K. Could anybody help? Thanks Andrea ------------------------------------------- Andrea Perego Dipartimento di Informatica e Comunicazione Universita` degli Studi dell'Insubria Via Mazzini, 5 - 21100 Varese, Italy -------------------------------------------
Received on Friday, 16 March 2007 08:37:32 UTC