I think the real answer is that the detailed semantics of the Jess
language don't map directly onto FOPC concepts. At 20,000 feet they
do, but it's not productive to try to pin down exactly what's what for
all values of what :)
The fact objects in working memory are real, physical objects. Every
fact has a concrete value for every slot (some of these may be 'nil')
-- i.e., every slot is bound, by definition.
*Patterns*, on the other hand -- the left-hand-side of a rule --
represent something more abstract; they represent the set of existing
facts that match the pattern. A slot is universally qualified either
by being omitted from a pattern altogether, or by being matched with
just a variable, with no tests. So, given
(deftemplate person (slot name) (slot age))
A pattern like "(person)" matches the set of all people, "(person (age
10))" matches all 10-year-olds, regardless of their name, etc.
Does this help?
On Oct 8, 2008, at 10:27 AM, David Pautler wrote:
Re: slot values in facts needing to be bound...is there no way to
express a fact with universally-quantified vars?
How about with a rule whose antecedent is trivially true and doesn't
include the var?
Sorry for the basic nature of this question...it hasn't been clear
to me in the manual how jess' expressiveness may differ from fopc in
general.
-----Original Message-----
From: "Wolfgang Laun" <[EMAIL PROTECTED]>
To: [email protected]
Sent: 10/7/08 8:29 PM
Subject: Re: JESS: How to test if a var is bound/not-bound?
There are several problems with this rule.
The notion of a slot of some fact being bound doesn't make sense. A
slot
always has a value, possibly nil, and you can simply compare a slot to
this symbol.
You cannot simply write a boolean function as another term in a
rule's LHS. So, the (< ...) must be wrapped in a test, but it would
be better
to have this test in the pattern for the currentTimeStep fact.
The two opening parentheses after "=>" are in error.
You cannot - and need not - re-assert ?Outcome. Use the modify
function
to update a fact's slot value, e.g.,
(modify ?Outcome (time ?T))
Please consult the Jess manual for more detailed explanations.
-W
On Tue, Oct 7, 2008 at 9:59 AM, David Pautler <[EMAIL PROTECTED]
robot.net> wrote:
How can one test if a var is bound or not bound (rather than
testing if it's
bound or not to a specific value)?
For example, I would like to write something like this:
(defrule causation-1
"When a causal trigger is present, the outcome occurs"
(and (cause (trigger ?Trigger) (outcome ?Outcome))
(test (not (bound ?Outcome.time))) ;test
of
whether ?Outcome.time is bound
(currentTimeStep ?T)
(< ?Trigger.time ?T) )
=>
((assert ?Outcome)
(bind ?Outcome.time ?T) ))
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users
[EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
.
--------------------------------------------------------------------
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users
[EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
.
--------------------------------------------------------------------
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------