> run ../doc/languages/kbfe.html
-
> no decl
> print 'Declaration of concept types'
Declaration of concept types
> Minivan is subtype of Van and subtype of passenger_vehicle.
[Type: Minivan]-
{ <-(Subtype)<-[Type: Van];
<-(Subtype)<-[Type: Passenger_vehicle];
};
> Vehicle has for partition {{Motorized_vehicle, Unmotorized_vehicle}}.
[Type: Vehicle]->(Partition)->[Type: {{Motoried_veehicle,Unmotorized_vehicle}}];
> Age has for domain Person, for range Integer and for supertype PhysChrc.
[Thing: Age]-
{ ->(Domain)->[Thing: Person];
->(Range)->[Thing: Integer];
->(Supertype)->[Thing: PhysChrc];
};
> print "Declaration of individuals"
Declaration of individuals
> The smoker named Joe.
[Smoker: Joe];
> Joe the smoker.
[Smoker: Joe];
> Joe is a smoker.
[Smoker: Joe];
> Joe is a smoker and is a driver.
[Driver: Joe];
> Joe has for type Smoker and for type Driver.
[Driver: Joe];
> The smoker http://www.w3.org/~lassila.
[Smoker: Http://www.w3.org/~lassila];
> print "Simple sentences"
Simple sentences
> There is a liking which has for agent Mary, for object Mary
and for object the cat that has for name "Tom".
[Liking]-
{ ->(Agent)->[Thing: Mary];
->(Object)->[Thing: Mary];
->(Object)->[Cat]->(Name)->[String: Tom];
};
> Mary is liking Tom and is liking the cat named Tom.
[Thing: Mary]-
{ <-(Agent)<-[Liking]->(Object)->[Thing: Tom];
<-(Agent)<-[Liking]->(Object)->[Cat: Tom];
};
> A person *p is the creator of the home_page http://www.w3.org/~lassila.
[Person: *p]<-(Creator)<-[Home_page: Http://www.w3.org/~lassila];
> *p has for name "Ora Lassila".
[Thing: *p]->(Name)->[String: "Ora Lassila"];
> There is a cat *c that is different_from Tom and that is on a mat.
[Cat: *c]-
{ ->(Different_from)->[Thing: Tom];
->(On)->[Mat];
};
> A cat *c!=Tom is on a mat.
[Cat: *c!=Tom]->(On)->[Mat];
> print "Contexts"
Contexts
> Tom is believer of ` *s `Mary is liking Tom' at time 1999'
and is believer of `~*s is before 1999'.
[Thing: Tom]-
{ <-(Believer)<-[Description: [Description: Mary [Thing: Mary]<-(Agent)<-[Liking]->(Object)->[Thing: Tom]]->(Time)->[Number: 1999]];
<-(Believer)<-[Description: [~*s]->(Before)->[Number: 1999]];
};
> `Tom is on a mat' has for exclusion `Tom is on the floor'.
[Description: [Thing: Tom]->(On)->[Mat]]->(Exclusion)->[Description: [Thing: Tom]->(On)->[Floor]];
> `Tom is on a mat' or `Tom is on the floor'.
[Description: [Thing: Tom]->(On)->[Mat]]->(On)->[Description: [Thing: Tom]->(On)->[Floor]];
> print "Collections"
Collections
> A resolution has for approver *g the group of *e {Fred,Wilma,a man}.
[Resolution]->(Approver)->[Set: *g Coll *e {Fred,Wilma,[Man]}];
> A resolution has for approver a group that has for member Fred,
for member Wilma and for member a man.
[Resolution]->(Approver)->[Group]-
{ ->(Member)->[Thing: Fred];
->(Member)->[Thing: Wilma];
->(Member)->[Man];
};
> Together *c {Fred,Wilma,a man} is approver of a resolution.
[Set: Coll *c {Fred,Wilma,[Man]}]<-(Approver)<-[Resolution];
> The persons {Fred, Wilma, a man} are approver of a resolution.
[Person: {Fred,Wilma,[Man]}]<-(Approver)<-[Resolution];
> *e is approver of a resolution.
[Thing: *e]<-(Approver)<-[Resolution];
> {Fred, Wilma, a person} are approvers of a resolution.
[Thing: {Fred,Wilma,[Person]}]<-(Approver)<-[Resolution];
> {`Tom is on a mat' | `Tom is on the floor'}.
[Thing: {[Description: [Thing: Tom]->(On)->[Mat]]|[Description: [Thing: Tom]->(On)->[Floor]]}];
> The files "http://foo.org*" have for author Foo.
[File: "http://foo.org*"]->(Author)->[Thing: Foo];
> Most of the resolutions *r have for approver at least 3 persons {Fred,*}.
[Resolution: most *r]->(Approver)->[Person: {Fred,*}@>=3];
> Tom is agent of a run with duration 14 to 15 minutes.
[Thing: Tom]<-(Agent)<-[Run]->(Duration)->[Minute: @14|15];
> Tom is agent of a run with duration between 14 and 15 minutes.
[Thing: Tom]<-(Agent)<-[Run]->(Duration)->[Minute: @14|15];
> Tom is agent of a run with time from 14 to 15 hour__time_of_day.
[Thing: Tom]<-(Agent)<-[Run]->(Time)->[Hour__time_of_day: @14->15];
> A cat is "between" {a mouse *m, [a den that has for owner *m]}.
[Cat]->(between)->[Thing: {[Mouse: *m],"[Den]->(Owner)->[Thing: *m]"}];
> print "Collections and types"
Collections and types
> Every [person that is in *o] is approver of a resolution.
[Thing: any]<-(Approver)<-[Resolution];
> At least 2 % of persons are liking most of cats.
[Person: @>=2%]<-(Agent)<-[Liking]->(Object)->[Cat: most];
> Vehicle has for partition {{Motorized_vehicle, Unmotorized_vehicle}}.
[Type: Vehicle]->(Partition)->[Type: {{Motoried_veehicle,Unmotorized_vehicle}}];
> {Tom, Bianca, Yojo} have for type Smoker.
[Smoker: {Tom,Bianca,Yojo}];
> Any characteristic can be chrc of a thing.
[Characteristic: any]<-(Chrc)<-[Thing];
> print "Second-order statements"
Second-order statements
> `a relationType *rt has for chrc transitive'
=> ` `a thing *x has for *rt a thing *y that has for *r a thing *z'
=> `*y has for *r *z' '.
[Description: [RelationType: *rt]->(Chrc)->[Thing: Transitive]]->(Implication)->[Description: [Description: [Thing: *x]->(*rt)->[Thing: *y]->(*r)->[Thing: *z]]->(Implication)->[Description: [Thing: *y]->(*r)->[Thing: *z]]];