The Department of Computer Science & Engineering
cse@buffalo

CSE663: Advanced Knowledge Representation
Stuart C. Shapiro

Notes on Classic


Classic is a description logic system written at AT&T Labs - Research. We will be using the Lisp version of Classic. The Classic Reference Manual (or ps version) is available on-line, as is a Classic Tutorial.
Mapping from Text Notation to 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

The Classic Version of the Text's DL Grammar

<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>

How to run Classic
From within Common Lisp, enter the following
:ld /projects/shapiro/Classic/classic
:pa classic

An Example Interaction with Classic
Assuming you have started Classic as instructed above:
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})

Additional Important Notions
necessary conditions; sufficient conditions; primitive concepts; subsumption.

Example files:
/projects/shapiro/CSE663/classicExample.cl

/projects/shapiro/CSE663/classicDisjunctive.cl

/projects/shapiro/CSE663/classicSneps.cl


Last modified: Tue Apr 21 09:46:51 EDT 2009
Stuart C. Shapiro <shapiro@cse.buffalo.edu>