Re: JESS: [EXTERNAL] Second order JESS?
"Friedman-Hill, Ernest" <[email protected]> Mon, 16 Apr 2012 15:27:09 +0000
| Newsgroups | gmane.comp.java.jess |
|---|---|
| Message-ID | <CBB1B1F7.B38A%[email protected]> |
You can build the fact you want as a string and assert that — for example
(assert-string (str-cat "(" ?foo " " ?bar ")"))
From: Sam Sarjant <[email protected]<mailto:[email protected]>>
Reply-To: <[email protected]<mailto:[email protected]>>
Date: Sun, 15 Apr 2012 13:21:47 +1200
To: <[email protected]<mailto:[email protected]>>
Subject: JESS: [EXTERNAL] Second order JESS?
Hello,
I'm looking to use JESS within an application where second-order logic is needed (or at least it makes things easier). Does JESS support second-order logic in any form?
For example, a rule such as:
(ruleDef (factPredicate ?foo) (factArgs ?bar))
=>
(assert (?foo ?bar)))
is an example of the structure I am looking for (where factPredicate is a String slot and factArgs is a multislot). The LHS of the rule compiles fine (with the appropriate ruleDef deftemplate), but the RHS throws an exception as it is expecting a template name after assert.
--
- Thanks, Sam Sarjant
www.samsarjant.com<http://www.samsarjant.com>