(clear)
(assert (foo))
(deftemplate bar)

(deftemplate yak 
   (slot x1 (range ?VARIABLE 10.5)
            (type INTEGER FLOAT)
            (default 3))
   (slot x2 (range 20 ?VARIABLE)
            (type SYMBOL STRING INTEGER INSTANCE)
            (default-dynamic (gensym)))
   (slot x3 (default ?NONE)
            (type ?VARIABLE)
            (allowed-values a "b" [c] 1 3.2))
   (multislot y1 (range ?VARIABLE ?VARIABLE)
                 (type FACT-ADDRESS EXTERNAL-ADDRESS INSTANCE-NAME FLOAT STRING)
                 (cardinality 1 ?VARIABLE)
                 (default (create$ "a" 3.1 [c])))
   (multislot y2 (range -10 10) 
                 (type LEXEME NUMBER INSTANCE-ADDRESS)
                 (cardinality ?VARIABLE 3) 
                 (default-dynamic (create$ (gensym) (gensym))))
   (multislot y3 (cardinality ?VARIABLE ?VARIABLE)
                 (type ?VARIABLE)
                 (allowed-symbols a b c)
                 (allowed-strings "a" "b" "c")
                 (allowed-instance-names [a] [b] [c])
                 (allowed-integers 3 4 5)
                 (allowed-floats 10.5 8.9 3.2)
                 (default ?NONE)))
(deftemplate-slot-names huh)
(deftemplate-slot-names 3)
(deftemplate-slot-names foo bar)
(deftemplate-slot-names)
(deftemplate-slot-names foo)
(deftemplate-slot-names bar)
(deftemplate-slot-names yak)
(deftemplate-slot-default-value)
(deftemplate-slot-default-value foo)
(deftemplate-slot-default-value bar)
(deftemplate-slot-default-value yak)
(deftemplate-slot-default-value huh)
(deftemplate-slot-default-value yak x 3)
(deftemplate-slot-default-value foo zip)
(deftemplate-slot-default-value bar zip)
(deftemplate-slot-default-value yak zip)
(deftemplate-slot-default-value huh x)
(deftemplate-slot-default-value foo implied)
(deftemplate-slot-default-value yak x1)
(deftemplate-slot-default-value yak x2)
(deftemplate-slot-default-value yak x3)
(deftemplate-slot-default-value yak y1)
(deftemplate-slot-default-value yak y2)
(deftemplate-slot-default-value yak y3)
(deftemplate-slot-defaultp)
(deftemplate-slot-defaultp foo)
(deftemplate-slot-defaultp bar)
(deftemplate-slot-defaultp yak)
(deftemplate-slot-defaultp huh)
(deftemplate-slot-defaultp yak x 3)
(deftemplate-slot-defaultp foo zip)
(deftemplate-slot-defaultp bar zip)
(deftemplate-slot-defaultp yak zip)
(deftemplate-slot-defaultp huh x)
(deftemplate-slot-defaultp foo implied)
(deftemplate-slot-defaultp yak x1)
(deftemplate-slot-defaultp yak x2)
(deftemplate-slot-defaultp yak x3)
(deftemplate-slot-defaultp yak y1)
(deftemplate-slot-defaultp yak y2)
(deftemplate-slot-defaultp yak y3)
(deftemplate-slot-singlep)
(deftemplate-slot-singlep foo)
(deftemplate-slot-singlep bar)
(deftemplate-slot-singlep yak)
(deftemplate-slot-singlep huh)
(deftemplate-slot-singlep yak x 3)
(deftemplate-slot-singlep foo zip)
(deftemplate-slot-singlep bar zip)
(deftemplate-slot-singlep yak zip)
(deftemplate-slot-singlep huh x)
(deftemplate-slot-singlep foo implied)
(deftemplate-slot-singlep yak x1)
(deftemplate-slot-singlep yak y1)
(deftemplate-slot-multip)
(deftemplate-slot-multip foo)
(deftemplate-slot-multip bar)
(deftemplate-slot-multip yak)
(deftemplate-slot-multip huh)
(deftemplate-slot-multip yak x 3)
(deftemplate-slot-multip foo zip)
(deftemplate-slot-multip bar zip)
(deftemplate-slot-multip yak zip)
(deftemplate-slot-multip huh x)
(deftemplate-slot-multip foo implied)
(deftemplate-slot-multip yak x1)
(deftemplate-slot-multip yak y1)
(deftemplate-slot-existp)
(deftemplate-slot-existp foo)
(deftemplate-slot-existp bar)
(deftemplate-slot-existp yak)
(deftemplate-slot-existp huh)
(deftemplate-slot-existp yak x 3)
(deftemplate-slot-existp foo zip)
(deftemplate-slot-existp bar zip)
(deftemplate-slot-existp yak zip)
(deftemplate-slot-existp huh x)
(deftemplate-slot-existp foo implied)
(deftemplate-slot-existp yak x1)
(deftemplate-slot-existp yak y1)
(deftemplate-slot-cardinality)
(deftemplate-slot-cardinality foo)
(deftemplate-slot-cardinality bar)
(deftemplate-slot-cardinality yak)
(deftemplate-slot-cardinality huh)
(deftemplate-slot-cardinality yak x 3)
(deftemplate-slot-cardinality foo zip)
(deftemplate-slot-cardinality bar zip)
(deftemplate-slot-cardinality yak zip)
(deftemplate-slot-cardinality huh x)
(deftemplate-slot-cardinality foo implied)
(deftemplate-slot-cardinality yak x1)
(deftemplate-slot-cardinality yak x2)
(deftemplate-slot-cardinality yak x3)
(deftemplate-slot-cardinality yak y1)
(deftemplate-slot-cardinality yak y2)
(deftemplate-slot-cardinality yak y3)
(deftemplate-slot-range)
(deftemplate-slot-range foo)
(deftemplate-slot-range bar)
(deftemplate-slot-range yak)
(deftemplate-slot-range huh)
(deftemplate-slot-range yak x 3)
(deftemplate-slot-range foo zip)
(deftemplate-slot-range bar zip)
(deftemplate-slot-range yak zip)
(deftemplate-slot-range huh x)
(deftemplate-slot-range foo implied)
(deftemplate-slot-range yak x1)
(deftemplate-slot-range yak x2)
(deftemplate-slot-range yak x3)
(deftemplate-slot-range yak y1)
(deftemplate-slot-range yak y2)
(deftemplate-slot-range yak y3)
(deftemplate-slot-allowed-values)
(deftemplate-slot-allowed-values foo)
(deftemplate-slot-allowed-values bar)
(deftemplate-slot-allowed-values yak)
(deftemplate-slot-allowed-values huh)
(deftemplate-slot-allowed-values yak x 3)
(deftemplate-slot-allowed-values foo zip)
(deftemplate-slot-allowed-values bar zip)
(deftemplate-slot-allowed-values yak zip)
(deftemplate-slot-allowed-values huh x)
(deftemplate-slot-allowed-values foo implied)
(deftemplate-slot-allowed-values yak x1)
(deftemplate-slot-allowed-values yak x2)
(deftemplate-slot-allowed-values yak x3)
(deftemplate-slot-allowed-values yak y1)
(deftemplate-slot-allowed-values yak y2)
(deftemplate-slot-allowed-values yak y3)
(deftemplate-slot-types)
(deftemplate-slot-types foo)
(deftemplate-slot-types bar)
(deftemplate-slot-types yak)
(deftemplate-slot-types huh)
(deftemplate-slot-types yak x 3)
(deftemplate-slot-types foo zip)
(deftemplate-slot-types bar zip)
(deftemplate-slot-types yak zip)
(deftemplate-slot-types huh x)
(deftemplate-slot-types foo implied)
(deftemplate-slot-types yak x1)
(deftemplate-slot-types yak x2)
(deftemplate-slot-types yak x3)
(deftemplate-slot-types yak y1)
(deftemplate-slot-types yak y2)
(deftemplate-slot-types yak y3)

(deftemplate woz 
   (multislot x)
   (multislot y (cardinality 3 5))
   (multislot z (default-dynamic (gensym) (gensym))))
(deftemplate-slot-default-value woz x)
(deftemplate-slot-default-value woz y)
(deftemplate-slot-default-value woz z)
