Show/Hide Toolbars

RiverSoftAVG Products Help

Version 2 of the IECS added a new construct (non-CLIPS) for your expert systems, the deftype, which allows you to define types that allow type inheritance, enumerations, range checking, and fuzzy sets.  At design-time, the TInferenceEngine.DefinedTypes property allows access to the new types.  Defined types are required to use the fuzzy logic features of the IECS.


The DefType serves as a type definition (and type constraint) and is used to define the types of fact template slots.  The Defined Types are defined BEFORE they are used in fact templates.  The following defined type creates an enumerated type for office equipment:


(deftype OFFICE_EQUIPMENT extends (type ATOM)

        (allowed-symbols desk chair computer typewriter lamp printer )



After you define the type, you can use it in a fact template slot using the new type slot modifier:


(deftemplate Office

    (slot Employee (type STRING)

            (default "") )

    (slot RoomNumber (type INTEGER)

            (default 0) )

    (multislot Equipment (type OFFICE_EQUIPMENT) (default desk) )



Note that defining types is not necessary for expert systems.  They are solely to provide type checking support and fuzzy logic support.


See the Defined Types definition for the syntax of a defined type.


RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb