Show/Hide Toolbars

RiverSoftAVG Products Help

Defined Types have the following syntax:

 

(deftype [<module-name>::]<symbol-name> 

[<string-comment>] extends <type-name> 

[ [<range-definition>] 

  [<unit-definition>] 

  [<cardinality-definition>] 

  [<allowed-definition>*]

] |

[fuzzy-variable-definition]

 

<type-name>   =  (type <ATOM| STRING| INTEGER| FACTID| FLOAT| DESCRIPTOR| OBJECT| CLASS| EXTERNALADDRESS>+|FUZZY)

<range-definition> =  (range <min-float-expression> <max-float-expression>)

<unit-definition>   =  (units <string-expression>)

<cardinality-definition> =  (range <min-float> <max-float>)

<allowed-definition> =  (allowed-values <expression>+)|

         (allowed-numbers <numeric-expression>+)|

         (allowed-integers <integer-expression>+)|

         (allowed-floats <float-expression>+)|

         (allowed-lexemes <string-or-symbol-expression>+)

         (allowed-symbols <symbol-expression>+)|

         (allowed-strings <string-expression>+)

<fuzzy-variable-definition>=  (range <min-float-expression> <max-float-expression>) [(values <fuzzy-term-definition>+)]

<fuzzy-term-definition> =  (term <symbol-name> [<fuzzy-singletons>]| 

      [(s <leftbound-numeric-expression> <rightbound-numeric-expression>)]|

      [(z <leftbound-numeric-expression> <rightbound-numeric-expression>)]|

      [(tri <leftbound-numeric-expression> <center-numeric-expression> <rightbound-numeric-expression>)]|

      [(pi [ <center-numeric-expression> <range-numeric-expression> ] | [ <left-numeric-expression> <center-numeric-expression> <right-numeric-expression> ])]

<fuzzy-singletons> = ((x0 y0)+)

::     = Module separator.  Module name is optional.  If not specified, a rule belongs to the currently active module

 

Note: Brackets ([) and (]) define optional elements of the construct.  The (|) character defines an or condition.  An asterisk (*) defines zero or more of the preceding element (or disjunction of elements).  A plus sign (+) defines one or more of the preceding element.

 

Note: The Allowed-xxxx definition provide enumeration constraints for the specified type ONLY.  For example, if the type specified (allowed-integers 0 2 3), only INTEGER values would have to be one of the allowed values.

 

Valid Defined Type Definitions

 

(deftype MyType 

    "Comment"

    extends (type INTEGER)

        (range 1 30) 

        (allowed-values Hello "How are you" 1 5 2.3000 )

)

 

(deftype myfuz extends (type FUZZY)

    (range 0.0000 1.0000)

    (values 

        (term medium ((0.0000 0.0000) (0.5000 1.0000) (1.0000 0.0000) ))

        (term high ((0.0000 0.0000) (1.0000 1.0000) ))

        (term low ((0.0000 1.0000) (1.0000 0.0000) ))

    ))

 

(deftype FUNDING extends (type FUZZY)

    (range 1.0000 100.0000)

    (units Thousands)

    (values 

        (term large ((1.0000 0.0000) (100.0000 1.0000) ))

        (term low ((1.0000 1.0000) (100.0000 0.0000) ))

        (term medium (tri 1.0000 49.5000 100.0000))

        (term high ((1.0000 0.0000) (100.0000 1.0000) ))

    ))

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb