The Department of Computer Science & Engineering
|
|
STUART C. SHAPIRO: CSE
663
|
Notes on Classic
constant :: individual atomic concept :: concept or named concept concept :: concept or description or role restriction sentence :: expression using a function in the classic package
<descr> ::= Thing | <CLASSIC-descr>
<CLASSIC-descr> ::= Classic-Thing | <CLASSIC-concept-name> | (all <role-name> <descr>) | (at-least <positive-integer> <role-name>) | (fills <role-name> <individual-name> +) | (and <CLASSIC-descr> +) <CLASSIC-concept-name> ::= <symbol> <role-name> ::= <symbol> <individual-name> ::= <symbol>
:ld /projects/shapiro/Classic/classic :pa classic
classic(1): (cl-startup) ; don't really need this if just started Classic
t
classic(2): (cl-define-primitive-concept 'Person 'Classic-Thing)
*WARNING*: Creating individual @i{Person-META-IND}.
@c{Person}
classic(3): @c{Person}
@c{Person}
classic(4): @Person ; OK as long as there's only one Classic object with this name
@c{Person}
classic(5): (cl-print-concept @Person)
*Person* ->
Derived Information:
Parents: Classic-Thing
Ancestors: Thing
@c{Person}
classic(6): (cl-define-disjoint-primitive-concept 'Man 'Person 'sexes)
*WARNING*: Creating individual @i{Man-META-IND}.
@c{Man}
classic(7): (cl-define-disjoint-primitive-concept 'Woman 'Person 'sexes)
*WARNING*: Creating individual @i{Woman-META-IND}.
@c{Woman}
classic(8): (cl-print-concept @Woman)
*Woman* ->
Derived Information:
Primitive ancestors: Person Classic-Thing
Parents: Person
Ancestors: Thing Classic-Thing
@c{Woman}
classic(9): (cl-set-classic-warn-mode nil)
nil
classic(10): (cl-print-concept @Man :told t)
*Man* ->
Derived Information:
Primitive ancestors: Person Classic-Thing
Parents: Person
Ancestors: Thing Classic-Thing
Told Information:
Member of decomposition(s): sexes
Parents: Person
@c{Man}
classic(11): (cl-create-ind 'Lucy 'Woman)
@i{Lucy}
classic(12): (cl-print-ind @Lucy)
Lucy ->
Derived Information:
Primitive ancestors:
Woman Person Classic-Thing
Parents: Woman
Ancestors:
Thing Classic-Thing Person
@i{Lucy}
classic(13): (cl-instance? @Lucy @Woman)
t
classic(14): (cl-instance? @Lucy @Person)
t
classic(15): (cl-instance? @Lucy @Man)
nil
classic(16): (cl-define-primitive-concept 'Dog 'Classic-Thing)
@c{Dog}
classic(17): (cl-instance? @Lucy @Dog)
nil
classic(18): (cl-create-ind 'Tom 'Man)
@i{Tom}
classic(19): (cl-concept-instances @Person)
(@i{Lucy} @i{Tom})
classic(20): (cl-create-ind 'Hermi '(and Man Woman))
*CLASSIC ERROR* while processing
(cl-create-ind Hermi (and Man Woman))
occurred on object @i{Hermi-*INCOHERENT*}:
Trying to combine disjoint primitives: @tc{Man} and @tc{Woman}.
classic-error
(disjoint-prims-conflict @tc{Man} @tc{Woman})
nil
@i{Hermi-*INCOHERENT*}
classic(21): (cl-define-primitive-role 'child)
@r{child}
classic(22): (cl-define-concept 'Parent '(and Person
(at-least 1 child)))
@c{Parent}
classic(23): (cl-print-concept @Parent)
Parent ->
Derived Information:
Primitive ancestors: Person Classic-Thing
Parents: Person
Ancestors: Thing Classic-Thing
Role Restrictions:
Child[1 ; INF]
@c{Parent}
classic(24): (cl-create-ind 'Sally 'Woman)
@i{Sally}
classic(25): (cl-print-ind @Sally)
Sally ->
Derived Information:
Primitive ancestors:
Woman Person Classic-Thing
Parents: Woman
Ancestors:
Thing Classic-Thing Person
@i{Sally}
classic(26): (cl-ind-add @Sally '(fills child Lucy))
@i{Sally}
classic(27): (cl-print-ind @Sally)
Sally ->
Derived Information:
Primitive ancestors:
Woman Person Classic-Thing
Parents: Woman Parent
Ancestors:
Thing Classic-Thing Person
Role Fillers and Restrictions:
Child[1 ; INF] -> Lucy
@i{Sally}
classic(28): (cl-fillers @Sally @child)
(@i{Lucy})
/projects/shapiro/CSE663/classicExample.cl
/projects/shapiro/CSE663/classicDisjunctive.cl
/projects/shapiro/CSE663/classicSneps.cl