chapter09 - Chapter 9: Modular Design, Execution Control,...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 9: Modular Design, Execution Control, and Rule Efficiency Expert Systems: Principles and Programming, Fourth Edition
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Expert Systems: Principles and Programming, Fourth Edition 2 Deftemplate Attributes CLIPS provides slot attributes which can be specified when deftemplate slots are defined. Slot attributes provide strong typing and constraint checking. One can define the allowed types that can be stored in a slot, range of numeric values. Multislots can specify min / max numbers of fields they can contain. Default attributes can be provided for slots not specified in an assert command.
Background image of page 2
Expert Systems: Principles and Programming, Fourth Edition 3 Type Attribute Defines the data types can be placed in a slot Example: (deftemplate person (multislot name (type SYMBOL)) (SLOT AGE (TYPE integer))) Once defined, CLIPS will enforce these restrictions on the slot attributes name – must store symbols age – must store integers
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Expert Systems: Principles and Programming, Fourth Edition 4 Static and Dynamic Constraint Checking CLIPS provides two levels of constraint checking Static constraint checking Performed when CLIPS parses expression / constant Can be disabled by calling the set-static-constraint-checking function and passing it FALSE Dynamic constraint checking Performed on facts when they are asserted Can be enabled / disabled with set-dynamic-constraint- checking
Background image of page 4
Expert Systems: Principles and Programming, Fourth Edition 5 Allowed Value Attributes CLIPS allows one to specify a list of allowed values for a specific type – 8 are provided: Symbols Strings Lexemes Integers Floats Numbers Instance-names Values
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Expert Systems: Principles and Programming, Fourth Edition 6 Range Attributes This attribute allows the specification of minimum and maximum numeric values. Example: (deftemplate person (multislot name (type SYMBOL)) (slot age (type INTEGER) (range 0 ?VARIABLE)))
Background image of page 6
Expert Systems: Principles and Programming, Fourth Edition 7 Default Attribute Previously, each deftemplate fact asserted had an explicit value stated for every slot. It is often convenient to automatically have a specified value stored in a slot if no value is explicitly stated in an assert command. Example: (default <default-specification>) h can be either ?DERIVE or ?NONE or single expression, zero or more expressions
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Expert Systems: Principles and Programming, Fourth Edition 8 Default-Dynamic Attribute When the default attribute is used, the default value for a slot is determined when the slot definition is parsed or when the fact that will use the default value is asserted.
Background image of page 8
Expert Systems: Principles and Programming, Fourth Edition 9 Conflicting Slot Attributes CLIPS does not allow you to specify conflicting attributes for a slot.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Expert Systems: Principles and Programming, Fourth Edition 10 Salience CLIPS provides two explicit techniques for controlling the execution of rules: Salience
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/12/2010 for the course IT expert sys taught by Professor Dr. during the Spring '10 term at Dubai Aerospace Enterprise University.

Page1 / 47

chapter09 - Chapter 9: Modular Design, Execution Control,...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online