Professional Documents
Culture Documents
Report Assignment Clips Commands Expert Sytem: By: Ilham Prasetyo 01201705035
Report Assignment Clips Commands Expert Sytem: By: Ilham Prasetyo 01201705035
By :
NIM :01201705035
1. Predicate Functions
A predicate function is defined to be any function that returns either the symbol TRUE or
the symbol FALSE. Actually, when dealing with predicate logic, CLIPS treats any value other
than the symbol FALSE as the symbol TRUE. A predicate function may also be thought of as
having a Boolean return value. Predicate functions may be either predefined or user-
defined functions. Predefined functions are those functions already provided by CLIPS.
Sometimes it is useful to be able to activate rules based on the absence of a particular fact in the fact list. CLIPS
allows the specification of the absence of a fact in the LHS of a rule using the not conditional element.
5. The Exist Conditional Elements
The exists conditional element allows you to pattern match based on the existence of at least one fact that
matches a pattern without regard to the total number of facts that actually match the pattern. This allows a
single partial match or activation for a rule to he generated based on the existence of one fact out of a class of
facts. The exists CE is implemented by using a combination of and CEs and not CEs. The CEs within the exists CE
are enclosed within an and CE and then within two not CEs.
6. THE FORALL CONDITIONAL ELEMENT
The forall conditional element allows you to pattern match based on a set of CEs that are satisfied for every
occurrence of another CE. The general format of the forall CE is as follows:
(forall <first-CE>
<remaining-CEs>+)
In order for the forall CE to be satisfied, each fact matching the <first-CE> must also have facts that match all
of the <remaining-CEs>. The general format of the forall CE is replaced with combinations of the and and not
CEs using the following format:
(not(and<first-CE>
The logical conditional element allows you to specify that the existence of a fact depends on the existence of
another fact or group of facts. The logical CE is the facility that CLIPS provides for truth maintenance. The
logical CE does not have to be included around all the patterns on the LHS of a rule. If it is used, however, it
must enclose the first CE in the LHS of a rule, and there can be no gaps between CEs enclosed by the logical CE.
This restriction on the logical CE is the result of its underlying implementation. It's also possible to make facts
dependent on the nonexistence of facts by using the not CE within the logical CE. Even more complex
conditions using the exists and forall CEs or other combinations of CEs can be used within the logical CE.