title: CLIPS PROGRAMMING: How to count how many facts that are 'yes'?
body: <p>I'm new to clips programming and I'm currently developing an expert system for mental health illness (anxiety). The way how my system works is after the user has answered all the questions such as &quot; Do you have excessive worry? &quot;, &quot;Do you feel lonely ?&quot;, &quot;Do you have difficulty breathing?&quot; and so on, the system will print out the output. For example:-</p>
  <pre><code>;after the user has input all the question about the symptoms...
  
  (defrule MAIN::s-1
  (have-anxiety yes)
  (or (age 2)
      (age 3))
  (heart_palpitation yes)
  (excess_sweating yes)
  (body_trembling yes)
  (dizzy yes)
  (difficult_breath yes)
  (afraid_crowd yes)
  (panic_attack yes)
  (short_breath yes)
  (panic_arises yes)
  (how_long 2)
  =&gt;
  (printout t crlf)
  (printout t &quot;Solution:&quot;)
  (printout t crlf)
  (printout t &quot;You have panic disorder! Please refer specialist now!!!&quot;)
  (printout t crlf crlf)
  (assert (disorder panic)))
  </code></pre>
  <p>The problem with my system now is let say all the facts are 'yes' then that means the user has a mental disorder. But if only 1 fact is 'no' then the user automatically has no disorder since it does not fill the requirement for the rule to fire. Logically if a person has 9 out of 10 symptoms of a mental illness, that person must have a mental illness.</p>
  <p>Therefore, I would like to make a condition such as if the user has 4 or more symptoms, then the user has a mental illness. Thank you in advance!</p>
  <p><em><strong>UPDATED</strong></em></p>
  <p>Below is my full code:-</p>
  <pre><code>;;;;;;;;;;;;;;;;;;;;FUNCTION;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  (deffunction ask-question (?question $?allowed-values)
     (printout t ?question)
     (bind ?answer (read))
     (if (lexemep ?answer) 
         then (bind ?answer (lowcase ?answer)))
     (while (not (member$ ?answer ?allowed-values)) do
        (printout t ?question)
        (bind ?answer (read))
        (if (lexemep ?answer) 
            then (bind ?answer (lowcase ?answer))))
     ?answer)
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  (deffunction yes-or-no-p (?question)
     (bind ?response (ask-question ?question yes no y n))
     (if (or (eq ?response yes) (eq ?response y))
         then yes 
         else no))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  (deffunction ask-question-number (?question $?allowed-values)
      (printout t ?question)
      (bind ?answer (read))
      (while (not (member$ ?answer ?allowed-values)) do
          (printout t ?question)
          (bind ?answer (read)))
      ?answer)
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  (deffunction number-valid (?question)
      (bind ?response (ask-question-number ?question 1 2 3))
      (if (= ?response 1)
          then 1
      else    (if (= ?response 2)
              then 2
          else 3)
          
      )
  )
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  (deffunction ask-question-number-2 (?question $?allowed-values)
      (printout t ?question)
      (bind ?answer (read))
      (while (not (member$ ?answer ?allowed-values)) do
          (printout t ?question)
          (bind ?answer (read)))
      ?answer)
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  (deffunction number-valid-2 (?question)
      (bind ?response (ask-question-number-2 ?question 1 2))
      (if (= ?response 1)
          then 1
      else 2)
  )
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;;;;;;;;;;;;;;;;;;;;;;;START RULE;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  (defrule MAIN::start
      (declare (salience 10))
      =&gt;
      (printout t crlf crlf)
      (printout t &quot;Anxiety Diagnosis Expert System&quot;)
      (printout t crlf crlf)
      (assert (have-anxiety (yes-or-no-p &quot;Do you have an excessive anxiety and worry?:&quot;))))
  
  (defrule f-2
      (have-anxiety yes)
      =&gt;
      (printout t &quot;Choose your citizen category:&quot;)
      (printout t crlf crlf)
      (printout t &quot;1. Adolescence&quot;)
      (printout t crlf)
      (printout t &quot;2. Adult&quot;)
      (printout t crlf)
      (printout t &quot;3. Kid&quot;)
      (printout t crlf crlf)
  ;   (printout t &quot;Type number(1/2/3): &quot;)
  ;   (assert (age (read))))
      (assert (age (number-valid &quot;Type number: &quot;))))
  
  (defrule MAIN::f-3
      (have-anxiety yes)
      =&gt;
      (assert (heart_palpitation (yes-or-no-p &quot;Heart palpitation?:&quot;))))
  
  (defrule MAIN::f-4
      (have-anxiety yes)
      (heart_palpitation yes)
      =&gt;
      (assert (excess_sweating (yes-or-no-p &quot;Excessive sweating?:&quot;))))
  
  (defrule MAIN::f-5
      (have-anxiety yes)
      (heart_palpitation yes)
      =&gt;
      (assert (body_trembling (yes-or-no-p &quot;Trembling on some parts of body?:&quot;))))
  
  (defrule MAIN::f-6
      (have-anxiety yes)
      (heart_palpitation yes)
      =&gt;
      (assert (dizzy (yes-or-no-p &quot;Feeling dizzy?:&quot;))))
  
  (defrule MAIN::f-19
          (have-anxiety yes)
      (heart_palpitation yes)
          =&gt;
          (assert (concentrate (yes-or-no-p &quot;Are you hard to concentrate? &quot;))))
  
  (defrule MAIN::f-20
          (have-anxiety yes)
      (heart_palpitation yes)
          =&gt;
          (assert (uneasy_unrealistically (yes-or-no-p &quot;Always feeling uneasy and thinking unrealistically? &quot;))))
  
  (defrule MAIN::f-21
          (have-anxiety yes)
      (heart_palpitation yes)
      =&gt;
          (assert (muscle_feel_tight (yes-or-no-p &quot;Exposure to triggers causes the muscles to feel tight? &quot;))))
  
  (defrule MAIN::f-8
      (have-anxiety yes)
      (heart_palpitation yes)
      (control_worry no)
      =&gt;
      (assert (afraid_crowd (yes-or-no-p &quot;Afraid of crowded place?:&quot;))))
  
  (defrule MAIN::f-7
      (have-anxiety yes)
      (heart_palpitation yes)
      (control_worry no)
      =&gt;
      (assert (difficult_breath (yes-or-no-p &quot;Difficult at breathing?:&quot;))))
  
  (defrule MAIN::f-9
      (have-anxiety yes)
      (heart_palpitation yes)
      (dizzy yes)
      (afraid_crowd yes)
      (difficult_breath yes)
      (concentrate no)
      (uneasy_unrealistically no)
      (muscle_feel_tight no)
      =&gt;
      (assert (panic_attack (yes-or-no-p &quot;Panic attacks repeat unexpectedly?:&quot;))))
  
  (defrule MAIN::f-10
      (have-anxiety yes)
      (heart_palpitation yes)
      (dizzy yes)
      (concentrate no)
      (uneasy_unrealistically no)
      (muscle_feel_tight no)
      (afraid_crowd yes)
      (difficult_breath yes)
      =&gt;
      (assert (short_breath (yes-or-no-p &quot;Sensation of shortness of breath?:&quot;))))
  
  (defrule MAIN::f-11
      (have-anxiety yes)
      (heart_palpitation yes)
      (dizzy yes)
      (concentrate no)
      (uneasy_unrealistically no)
      (muscle_feel_tight no)
      (afraid_crowd yes)
      (difficult_breath yes)
      =&gt;
      (assert (panic_arises (yes-or-no-p &quot;Panic arises even through the object that triggers panic is not life threatening?:&quot;))))
  
  (defrule MAIN::f-12
      (have-anxiety yes)
      (heart_palpitation yes)
      (dizzy yes)
      (concentrate no)
      (uneasy_unrealistically no)
      (muscle_feel_tight no)
      (afraid_crowd yes)
      (difficult_breath yes)
      =&gt;
      (printout t &quot;How long did this happen:&quot;)
      (printout t crlf crlf)
      (printout t &quot;1. less than 1 month&quot;)
      (printout t crlf)
      (printout t &quot;2. more than 1 month&quot;)
      (printout t crlf crlf crlf)
  ;   (printout t &quot;Type number(1/2):&quot;)
  ;   (assert (how_long (read))))
      (assert (how_long (number-valid-2 &quot;Type number(1/2):&quot;))))
  
  (defrule MAIN::f-13
      (have-anxiety yes)
      (heart_palpitation no)
      =&gt;
      (assert (major_attachment_figures (yes-or-no-p &quot;Have major attachment figures?:&quot;))))
  
  (defrule MAIN::f-14
      (have-anxiety yes)
      (heart_palpitation no)
      (major_attachment_figures yes)
      =&gt;
      (printout t crlf)
      (printout t &quot;List of symptom:&quot;)
      (printout t crlf crlf)
      (printout t &quot;1. Refuse to leave home, go to school, go to work.&quot;)
      (printout t crlf crlf)
      (printout t &quot;2. Worry about losing major attachment figures due to illness, disasters, or death.&quot;)
      (printout t crlf crlf)
      (printout t &quot;3. Worry about experiencing untoward events (getting lost, being kidnapped, having an accident, becoming ill).&quot;)
      (printout t crlf crlf)
      (printout t &quot;4. Reluctance to sleep away from home or sleep away from home.&quot;)
      (printout t crlf crlf)
      (printout t &quot;5. Repeated nightmares with separation theme.&quot;)
      (printout t crlf crlf)
      (assert (list_symptom (yes-or-no-p &quot;Do you have at least 1 of the symptom?:&quot;))))
  
  (defrule MAIN::f-15
      (have-anxiety yes)
      (heart_palpitation no)
      (major_attachment_figures yes)
      =&gt;
      (assert (worry_separation (yes-or-no-p &quot;Worry about separation?:&quot;))))
  
  (defrule MAIN::f-16
      (have-anxiety yes)
      (heart_palpitation no)
      (major_attachment_figures yes)
      =&gt;
      (assert (nausea (yes-or-no-p &quot;Nausea or vomitting?:&quot;))))
  
  (defrule MAIN::f-17
      (have-anxiety yes)
      (heart_palpitation no)
      (major_attachment_figures yes)
      =&gt;
      (assert (stomach_aches (yes-or-no-p &quot;Stomach aches?:&quot;))))
  
  (defrule MAIN::f-18
      (have-anxiety yes)
      (heart_palpitation no)
      (major_attachment_figures yes)
      =&gt;
      (assert (headache (yes-or-no-p &quot;Headaches?:&quot;))))
  
  (defrule MAIN::s-2-f-12
      (have-anxiety yes)
      (heart_palpitation no)
      (major_attachment_figures yes)
      =&gt;
      (printout t &quot;How long did this happen:&quot;)
      (printout t crlf crlf)
      (printout t &quot;1. less than 1 month&quot;)
      (printout t crlf)
      (printout t &quot;2. more than 1 month&quot;)
      (printout t crlf)
      (printout t &quot;3. more than 6 month&quot;)
      (printout t crlf crlf crlf)
  ;   (printout t &quot;Type number(1/2/3):&quot;)
  ;   (assert (how_long (read))))
      (assert (how_long (number-valid &quot;Type number(1/2/3)?:&quot;))))
  
  (defrule MAIN::f-27
      (have-anxiety yes)
      (heart_palpitation no)
      (major_attachment_figures no)
      =&gt;
      (assert (avoid_social (yes-or-no-p &quot;Avoid social situation?:&quot;))))
  
  (defrule MAIN::f-28
      (have-anxiety yes)
      (heart_palpitation no)
      (major_attachment_figures no)
      =&gt;
      (assert (fear_social (yes-or-no-p &quot;Fear about social situation?:&quot;))))
  
  (defrule MAIN::f-29
      (have-anxiety yes)
      (heart_palpitation no)
      (major_attachment_figures no)
      =&gt;
      (assert (fear_humiliation (yes-or-no-p &quot;Fear of humiliating or embarrassing themselves?:&quot;))))
  
  (defrule MAIN::f-22
      (have-anxiety yes)
      (dizzy no)
      (difficult_breath no)
      (heart_palpitation yes)
      =&gt;
      (assert (fear_not_realistic (yes-or-no-p &quot;Do not realize that your fear is not realistic? &quot;))))
  
  (defrule MAIN::f-23
      (have-anxiety yes)
      (heart_palpitation yes)
      (dizzy no)
      =&gt;
      (assert (trigger_headache (yes-or-no-p &quot;Exposure to triggers causes of frequent headaches/migraines? &quot;))))
  
  (defrule MAIN::f-24
      (have-anxiety yes)
      (heart_palpitation yes)
      (dizzy no)
      =&gt;
      (assert (trigger_intense_anxiety (yes-or-no-p &quot;Exposure to triggers cause intense anxiety? &quot;))))
  
  
  
  (defrule MAIN::f-25
      (heart_palpitation yes)
      =&gt;
      (assert (control_worry (yes-or-no-p &quot;Difficult control worry? &quot;))))
  
  (defrule MAIN::f-26-adult-adoles
      (control_worry yes)
      (or (age 1)
          (age 2))
      =&gt;
      (printout t &quot;Do you experience three or more of the following:-&quot;)
          (printout t crlf crlf)
          (printout t &quot;1. Restlessness&quot;)
          (printout t crlf)
          (printout t &quot;2. Easily fatigue&quot;)
          (printout t crlf)
          (printout t &quot;3. Muscle tension&quot;)
      (printout t crlf)
      (printout t &quot;4. Hard to concentrate&quot;)
          (printout t crlf)
          (printout t &quot;5. Sleep disturbance&quot;)
          (printout t crlf crlf)
      (assert (experience (yes-or-no-p &quot;Type (yes/no) : &quot;))))
  
  (defrule MAIN::f-26-kid
      (control_worry yes)
      (age 3)
      =&gt;
      (printout t &quot;Do you experience atleast 1 of the following:-&quot;)
          (printout t crlf crlf)
          (printout t &quot;1. Restlessness&quot;)
          (printout t crlf)
          (printout t &quot;2. Easily fatigue&quot;)
          (printout t crlf)
          (printout t &quot;3. Muscle tension&quot;)
      (printout t crlf)
      (printout t &quot;4. Hard to concentrate&quot;)
          (printout t crlf)
          (printout t &quot;5. Sleep disturbance&quot;)
          (printout t crlf crlf)
      (assert (experience-kid (yes-or-no-p &quot;Type (yes/no) : &quot;))))
  
  (defrule MAIN::s-4-f-12
      (or (experience yes)
          (experience-kid yes))
          =&gt;
          (printout t &quot;How long did this happen:&quot;)
          (printout t crlf crlf)
          (printout t &quot;1. less than 6 months&quot;)
          (printout t crlf)
          (printout t &quot;2. more than 6 months&quot;)
          (printout t crlf crlf crlf)
      (assert (how_long (number-valid-2 &quot;Type number(1/2):&quot;))))
  
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;RESULT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  (defrule MAIN::s-1
      (have-anxiety yes)
      (or (age 2)
          (age 3))
      (heart_palpitation yes)
      (excess_sweating yes)
      (body_trembling yes)
      (dizzy yes)
      (difficult_breath yes)
      (afraid_crowd yes)
      (panic_attack yes)
      (short_breath yes)
      (panic_arises yes)
      (how_long 2)
      =&gt;
      (printout t crlf)
      (printout t &quot;Solution:&quot;)
      (printout t crlf)
      (printout t &quot;You have panic disorder! Please refer specialist now!!!&quot;)
      (printout t crlf crlf)
      (assert (disorder panic)))
  
  (defrule MAIN::s-2-1
      (have-anxiety yes)
      (age 2)
      (heart_palpitation no)
      (major_attachment_figures yes)
      (list_symptom yes)
      (worry_separation yes)
      (nausea yes)
      (stomach_aches yes)
      (headache yes)
      (how_long 3)
      =&gt;
      (printout t crlf)
      (printout t &quot;Solution:&quot;)
      (printout t crlf)
      (printout t &quot;You have separation anxiety disorder! Please refer specialist now!!!&quot;)
      (printout t crlf crlf)
      (assert (disorder separation-anxiety)))
  ;   (halt))
  
  (defrule MAIN::s-2-2
      (have-anxiety yes)
      (or (age 1)
          (age 3))
      (heart_palpitation no)
      (major_attachment_figures yes)
      (major_attachment_figures yes)
      (list_symptom yes)
      (worry_separation yes)
      (nausea yes)
      (stomach_aches yes)
      (headache yes)
      (how_long 2)
      =&gt;
      (printout t crlf)
      (printout t &quot;Solution:&quot;)
      (printout t crlf)
      (printout t &quot;You have separation anxiety disorder! Please refer specialist now!!!&quot;)
      (printout t crlf crlf)
      (assert (disorder separation-anxiety)))
  ;   (halt))
  
  (defrule MAIN::s-3
      (have-anxiety yes)
      (or (age 2)
          (age 3))
      (heart_palpitation yes)
      (excess_sweating yes)
      (body_trembling yes)
      (dizzy no)
      (concentrate yes)
      (uneasy_unrealistically yes)
      (muscle_feel_tight yes)
      (afraid_crowd yes)
      (fear_not_realistic yes)
      (trigger_headache yes)
      (trigger_intense_anxiety yes)
      =&gt;
      (printout t crlf)
          (printout t &quot;Solution:&quot;)
          (printout t crlf)
          (printout t &quot;You have phobia disorder! Please refer specialist now!!!&quot;)
          (printout t crlf crlf)
          (assert (disorder phobia)))
  ;   (halt))
  
  (defrule MAIN::s-4-adult-adoles
      (have-anxiety yes)
      (experience yes)
      (or (age 1)
          (age 2))
      (heart_palpitation yes)
      (excess_sweating yes)
      (body_trembling yes)
      (dizzy yes)
      (concentrate yes)
      (uneasy_unrealistically yes)
      (muscle_feel_tight yes)
      (control_worry yes)
      (how_long 2)
      =&gt;
      (printout t crlf)
          (printout t &quot;Solution:&quot;)
          (printout t crlf)
          (printout t &quot;You have generalized anxiety disorder! Please refer specialist now!!!&quot;)
          (printout t crlf crlf)
          (assert (disorder generalized-anxiety)))
  ;   (halt))
  
  
  (defrule MAIN::s-4-kid
      (have-anxiety yes)
      (experience-kid yes)
      (age 3)
      (heart_palpitation yes)
      (excess_sweating yes)
      (body_trembling yes)
      (dizzy yes)
      (concentrate yes)
      (uneasy_unrealistically yes)
      (muscle_feel_tight yes)
      (control_worry yes)
      (how_long 2)
      =&gt;
      (printout t crlf)
          (printout t &quot;Solution:&quot;)
          (printout t crlf)
          (printout t &quot;You have generalized anxiety disorder! Please refer specialist now!!!&quot;)
          (printout t crlf crlf)
          (assert (disorder generalized-anxiety)))
  ;   (halt))
  
  (defrule MAIN::s-5
      (have-anxiety yes)
      (or (age 2)
          (age 3))
      (heart_palpitation no)
      (major_attachment_figures no)
      (avoid_social yes)
      (fear_social yes)
      (fear_humiliation yes)
      =&gt;
      (printout t crlf)
      (printout t &quot;Solution:&quot;)
      (printout t crlf)
      (printout t &quot;You have social anxiety disorder! Please refer specialist now!!!&quot;)
      (printout t crlf crlf)
      (assert (disorder social-anxiety)))
  ;   (halt))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;FEEDBACK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  (defrule MAIN::feedback-have-disorder
      (or (disorder panic)
          (disorder separation-anxiety)
          (disorder phobia)
          (disorder generalized-anxiety)
          (disorder social-anxiety))
      =&gt;
      (printout t crlf)
      (printout t &quot;Do you satisfied with the system ?&quot; crlf)
      (printout t &quot;Rate: (1)-Disatisfied&quot;)
      (printout t &quot;      (2)-Normal&quot;)
      (printout t &quot;      (3)-Satisfied&quot; crlf crlf)
      (assert (feedback (number-valid &quot;Feedback answer : &quot;)))
      (printout t crlf crlf &quot;Thank you, have a nice day!&quot; crlf))
  
  (defrule feedback-no-disorder
      (declare (salience -10000))
      (or (and    (not    (disorder panic|separation-anxiety|phobia|generalized-anxiety|social-anxiety))
          (have-anxiety no))
          (and    (not    (disorder panic|separation-anxiety|phobia|generalized-anxiety|social-anxiety))
          (have-anxiety yes)))
      =&gt;
      (printout t crlf)
      (printout t &quot;Solution:&quot;)
      (printout t crlf)       
      (printout t &quot;You have no disorder&quot;)
      (printout t crlf crlf)
      (assert (no-disorder yes))
  
      (printout t crlf)
      (printout t &quot;Do you satisfied with the system ?&quot; crlf)
      (printout t &quot;Rate: (1)-Disatisfied&quot;)
      (printout t &quot;      (2)-Normal&quot;)
      (printout t &quot;      (3)-Satisfied&quot; crlf crlf)
      (assert (feedback (number-valid &quot;Feedback answer : &quot;)))
      (printout t crlf crlf &quot;Thank you, have a nice day!&quot; crlf))
  </code></pre>
  <p><em><strong>UPDATED</strong></em></p>
  <p>Let say I create a new deftemplate named generalized-anxiety-list where I want to store only generalized anxiety symptom. Then I create a new defrule which will check if there are only symptoms for generalized anxiety:</p>
  <pre><code>    (defrule check-s-5
  ;all these symptoms MUST be a condition
      (symptom (name have-anxiety) (value yes))
      (symptom (name heart-palpitation) (value no))
      (symptom (name major-attachment-figures) (value no))
      (symptom (name avoid-social) (value yes))
      (symptom (name fear-social) (value yes))
      (symptom (name fear-humiliation) (value yes))
      =&gt;
      (assert (generalized-anxiety-list (generalized-anxiety-names
  </code></pre>
  <p>I'm stuck here. How can I assert those symptoms inside the generalized-anxiety-list ?</p>
  <p><em><strong>UPDATED</strong></em></p>
  <p>I've created a new deftemplate named count-all to count all symptoms with both yes and no value. As long as the user input a new answer for the question, it will store the symptom's name in the count-all.</p>
  <pre><code>(deftemplate count-all
      (multislot names))
  
  (defrule new-count-all
          (symptom (name ?name))
          =&gt;
          (assert (count-all (names ?name))))
      
      (defrule add-to-count-all
          (symptom (name ?name))
          ?sl &lt;- (count-all (names $?names&amp;~:(member$ ?name ?names)))
          =&gt;
          (modify ?sl (names ?names ?name)))
  </code></pre>