Re: How to assert that a country has one president
"Cameron Ross" <[email protected]> Tue, 27 Nov 2007 14:19:32 -0500
| Newsgroups | gmane.comp.ai.powerloom |
|---|---|
| Message-ID | <C043009CC1F54392A1F02BF9915340F1@crosslaptop> |
Thanks Thomas.
Some context... we're trying to create a manual translation of the Process Specification Language that we can load into PowerLoom. My example was based on Axiom 13 of the PSL core module (http://www.mel.nist.gov/psl/psl-ontology/psl_core.html). The original axiom is:
(forall (?occ ?a1 ?a2)
(=> (and (occurrence_of ?occ ?a1)
(occurrence_of ?occ ?a2))
(= ?a1 ?a2)))
We had discussed defining the PSL occurrence_of relation as a function, but would prefer to stay as true to the standard PSL ontology as possible. Note that I think we would in fact want the analogy of (= Bill John) in the PSL context (i.e. Bill and John are synonyms), so this shouldn't be a problem. Generally, the challenge we're having is that the PSL doesn't explicitly define concepts, relations or functions based on an upper ontology, but leaves such definitions implicit within a set of axioms (see http://www.mel.nist.gov/psl/download/psl_core.clf). Any advice on how we should proceed with our manual translation is very much appreciated.
Thanks,
Cameron.
----- Original Message -----
From: Thomas Russ
To: Cameron Ross ; PowerLoom Forum
Cc: Lorrie Fava
Sent: Tuesday, November 27, 2007 1:40 PM
Subject: Re: [PowerLoom Forum] How to assert that a country has one president
On Nov 27, 2007, at 10:04 AM, Cameron Ross wrote:
> Hello,
>
> We're trying to define an axiom to ensure a singular cardinality as
> follows:
>
> ;; BEGIN PowerLoom
> (defconcept Person)
> (defconcept Country)
> (defrelation presidentOf ((?p Person) (?c Country)))
The simplest method would be reverse the order of arguments and make
this a function:
(deffunction hasPresident ((?c Country) (?p Person)))
This will assure that a country only has one president. It will also
enable implicit value clipping so that changing the value doesn't
require an explicit retraction first.
> (assert (forall (?c ?p1 ?p2)
> (=> (and (presidentOf ?p1 ?c)
> (presidentOf ?p2 ?c))
> (= ?p1 ?p2))))
This rule will not necessarily do what you expect it to do. If you
were to assert
(presidentOf John Freedonia)
(presidentOf Bill Freedonia)
this rule will then result in the inference that
(= Bill John)
so that henceforth these two individuals will be considered the
same. PowerLoom uses a unique name assumption (unlike OWL, for
example), but that is just an assumption and can be overcome with an
explicit assertion or an inference. You would have to make sure that
all instances are asserted to be different from one another in order
to force a contradiction. (I will note that PowerLoom is not always
very aggressive in noticing such clashes, though).
Right off the top of my head, I can't think of a rule-based solution,
although there probably is one.
>
> ;; END PowerLoom
>
>
>
> The following error results when the above are entered into the
> PowerLoom command prompt:
This is, of course, a bug. It shouldn't break.
>
> Internal Error: OOPS -- BUG IN 'copy-
> description'edu.isi.stella.StellaException: OOPS -- BUG IN 'copy-
> description'
> at edu.isi.powerloom.logic.Logic.copyPropositionArgument
> (Logic.java:29501)
> at edu.isi.powerloom.logic.Proposition.copyProposition
> (Proposition.java:635)
> at edu.isi.powerloom.logic.Logic.copyPropositionArgument
> (Logic.java:29480)
> at edu.isi.powerloom.logic.Proposition.copyProposition
> (Proposition.java:635)
> at edu.isi.powerloom.logic.Logic.copyPropositionArgument
> (Logic.java:29480)
> at edu.isi.powerloom.logic.Proposition.copyProposition
> (Proposition.java:635)
> at
> edu.isi.powerloom.logic.Proposition.createForwardChainingIndex
> (Proposition.java:4578)
> at
> edu.isi.powerloom.logic.Proposition.deriveComplexForwardRule
> (Proposition.java:4571)
> at edu.isi.powerloom.logic.Proposition.deriveOneSatelliteRule
> (Proposition.java:4954)
> at
> edu.isi.powerloom.logic.Proposition.deriveSatelliteRulesForGoalP
> (Proposition.java:4886)
> at edu.isi.powerloom.logic.Proposition.deriveSatelliteRules
> (Proposition.java:4796)
> at edu.isi.powerloom.logic.Proposition.runGoesTrueDemons
> (Proposition.java:11617)
> at
> edu.isi.powerloom.logic.Proposition.updateLinksAndTimestamps
> (Proposition.java:11492)
> at edu.isi.powerloom.logic.Proposition.assignTruthValue
> (Proposition.java:11469)
> at
> edu.isi.powerloom.logic.Proposition.updatePropositionTruthValue
> (Proposition.java:11277)
> at
> edu.isi.powerloom.logic.Proposition.helpUpdateTopLevelProposition
> (Proposition.java:9493)
> at edu.isi.powerloom.logic.Logic.updateTopLevelProposition
> (Logic.java:9231)
> at edu.isi.powerloom.logic.Logic.updateProposition(Logic.java:
> 9260)
> at edu.isi.powerloom.logic.Logic.smartUpdateProposition
> (Logic.java:9406)
> at edu.isi.powerloom.logic.Logic.renamed_Assert(Logic.java:9427)
> at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at edu.isi.stella.javalib.Native.funcall(Native.java:608)
> at edu.isi.stella.Stella.apply(Stella.java:8401)
> at edu.isi.stella.Cons.evaluateConsTree(Cons.java:8355)
> at edu.isi.stella.Stella_Object.evaluate(Stella_Object.java:
> 4351)
> at edu.isi.powerloom.logic.Logic.evaluateLogicCommand
> (Logic.java:31552)
> at edu.isi.powerloom.logic.Logic.logicCommandLoop(Logic.java:
> 31448)
> at edu.isi.powerloom.logic.Logic.powerloom(Logic.java:37358)
> at edu.isi.powerloom.PowerLoom.main(PowerLoom.java:108)
>
> Any advice is greatly appreciated.
> Cameron Ross.
>
> _______________________________________________
> powerloom-forum mailing list
> [email protected]
> http://mailman.isi.edu/mailman/listinfo/powerloom-forum
_______________________________________________
powerloom-forum mailing list
[email protected]
http://mailman.isi.edu/mailman/listinfo/powerloom-forum