764 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
40
views
How to fill a multislot in a specific way?
Suppose the following deffacts:
(deffacts Liste-MST
(mst (arc 1 2))
(mst (arc 2 3))
(mst (arc 2 5))
(mst (arc 1 4)))
and suppose the following template:
(deftemplate tree
(multislot arc))
How ...
0
votes
1
answer
49
views
Display with format function using constraints
Suppose the following facts:
f-1 (bus (id-bus B1) (id-cb d-g1 d-12 d-13) (type-bus PV) (connecte B2 B3) (etat-bus nil))
f-2 (bus (id-bus B2) (id-cb d-21 d-23) (type-bus PQ) (connecte B1 B3) (...
0
votes
1
answer
47
views
How to express that a node belonging to a particular multislot does not belong to another different multislot
Suppose the following list of facts in a deffacts construct:
(deffacts ss-and-ts-edges
(ss-pair (ss 1 2)) (ss-pair (ss 2 3))(ss-pair (ss 3 4))(ss-pair (ss 4 5))
(ss-pair (ss 8 9)) (ss-pair (ss 9 ...
0
votes
0
answers
64
views
Indirect and direct link in a tree
Suppose 3 sets of nodes, each corresponding to a distinct set in an undirected graph:
Set-A = {1, 2, 3, 4, 5}
Set-B = {6, 7, 8, 9, 10}
Set-C = {11, 12, 13, 14, 15}
The graph is defined by ...
0
votes
1
answer
59
views
How can I use a SYMBOL reference as modify argument?
I start doing a project in CLIPS and get a bit stuck.
I want to write a generic function to change values in template instances. This will be later used to define values from outside (CLIPS engine is ...
0
votes
1
answer
57
views
Search flag by colors
I have that code:
(deftemplate country
(slot name)
(multislot flag_colors))
(deffacts countries
(country (name "United States of America") (flag_colors red white blue))
(...
1
vote
1
answer
46
views
My CLIPS program isn't reading user input properly
This is my program:
Is a program that gives questions on what kind of vulnerability scanning tool is best recommended based on user input.
Tried my best to add ways of checking what parts of the code ...
0
votes
1
answer
62
views
Use a dynamic slot name for modify function
In CLIPS, Is it on purpose or an oversight that the modify function cannot be given a dynamic slot name.
; This compiles and works.
(deffunction set_tpl_value(?addr ?key ?val)
(modify ?addr (the-...
Dess's user avatar
- 2,739
0
votes
1
answer
66
views
Why do some CLIPS function names end with $?
Why do some builtin function names in CLIPS end with a ,ドル such as explode$ ?
What is the significance of this?
Dess's user avatar
- 2,739
0
votes
1
answer
28
views
Using CLIPS c library, how can I change where Watches are printed/written to?
If I do something like Watch(theEnv, FACTS);, the default is this debug gets written to STDOUT, and doesn't look like I can change that. I would like to write this to a seperate file, how can I do ...
1
vote
1
answer
63
views
CLIPS Focused module after auto focused rule is executed
In CLIPS and if we are using modules then we can use auto-focus for rules in a module:
Auto focus rule property allows an automatic focus command to be
executed whenever a rule becomes active. If the ...
0
votes
1
answer
70
views
How can I open the file correctly in CLIPS?
I had a task to wrote a function which receives as a parameter the name of a file containing the coefficients of a system of linear equations specified in the form of a rectangular matrix. Using ...
1
vote
1
answer
86
views
Forward chaining LIFO
For forward chaining (LIFO) it was mentioned that
Depth strategy: Newly activated rules are placed above all rules of
the same salience : for example if fact-a activates rule-1 and rule-2
and fact-...
0
votes
1
answer
93
views
What is the CLIPS C function equivalent to the CLIPS statement 'find-all-facts'?
Trying to create a rules file that I then load to evaluate in CLIPS from Swift, I am encountering the following error:
[PRNTUTIL1] Unable to find deftemplate 'message'.
The commented part of my code ...
1
vote
1
answer
76
views
Understand (forall) conditional element in CLIPS
in CLIPS it was mentioned that
(defrule example
(forall (a ?x) (b ?x) (c ?x))
=>)
is equivalent to
(defrule example
(not (and (a ?x)
(not (and (b ?x) (c ?x)))))
=>)
I ...