You are on page 1of 9

REPORT ASSIGNMENT CLIPS

COMMANDS EXPERT SYTEM

By :

Ilham Prasetyo 01201705035


NAME : Ilham Prasetyo

NIM :01201705035

Major :Information System

program on software CLIPDOS

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.

2. The Or Conditional Elements


shown have an implicit and conditional element between the patterns. That is, a rule will
not be triggered unless all the patterns are true. CLIPS also provides the capability of
specifying both an explicit and conditional element and an explicit or conditional element
on the LHS. Since an or CE generates the equivalent of multiple rules, it is possible for a rule
to be activated more than once by patterns contained with the or CE.

3. The And Conditional Elements


The and CE is opposite in concept to the or CE. Instead of any one of several CEs triggering a rule, the and CE
requires that all of the CEs be satisfied. CLIPS automatically places an implicit and CE around the LHS of a rule.
there is no advantage to writing a rule with an explicit and CE around the entire LHS. The and CE is provided so
it can be used with other CEs to make more complex pattern
4. The Not Conditional Elements

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>

(not (and <remaining-CEs>+))))


7. THE LOGICAL CONDITIONAL ELEMENT

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.

You might also like