Page Numbers: Yes First Page: 1
Heading:
November 10, 1976 6:32 PM[IVY]<KRL>document>ex-hendrix
Examples from Hendrix Paper on networks
-----------------------------------------------
Example V-2 = KR2
# Time
# PhysicalObject
# Submarine self: A PhysicalObject
# LegalPerson
# Person self: A LegalPerson
# Corporation self: A LegalPerson
# Situation
start: A Time
end: A Time
object: A PhysicalObject
agent: A LegalPerson
# Build↑11: FurtherSpecified (\Situation)
start: end: object:
agent: A Corporation
# HenryLStimson self/Instance: A Submarine
# GeneralDynamics self/Instance: A Corporation
# B
self/Instance: A Build withobject = HenryLStimson
agent = GeneralDynamics
or, if we want to include the information redundantly for easier retrieval, and functionals for easier naming:
# Build↑11:FurtherSpecified (\Situation)
HasFunctional (agent, Built, object)
HasFunctional (object, BuiltBy, agent)
start: end: object:
agent: A Corporation
# HenryLStimson self/Instance: A Submarine; BuiltBy(GeneralDynamics)
# GeneralDynamics self/Instance: A Corporation; Which Built HenryLStimson
-----------------------------------------------
Example V-3 = KR3
# X self/Instance: WhichIs Categorized (Basic, {Y1, Y2, ...Yn})
# Yi self/Instance: WhichIs SubCategory (Basic, X)
-----------------------------------------------
Example V-4 = KR4
# X self/Instance: {Y1, Y2, ...Yn}
# Yi self/Instance: WhichIs MemberOf X
-----------------------------------------------
Example V-5 = KR5
# Ship
self: A PhysicalObject
# Submarine
self/Instance: SubCategory (Type, Ship)
self: A Ship
# Carrier
self/Instance: SubCategory (Type, Ship)
self: A Ship
# Nuke
self/Instance: SubCategory (Power, Ship)
self: A Ship
# Diesel
self/Instance: SubCategory (Power, Ship)
self: A Ship
# NukeSub
self/Instance: A Ship; A Nuke; A Submarine
self: WhichIs CategoryFor [Superset({HenryLStimson, Whale})
Which HasElement X]
# HenryLStimson
self/Instance: A NukeSub
# Whale
self/Instance: A NukeSub
n is: The cardinality from a Set thatIs SetOfAll \A NukeSub
or, alternatively:
# NukeSubSet
self/Instance:SetOfAll (\[A Nuke; A Submarine])
Superset({HenryLStimson, Whale})
Which HasElement X
n is: The cardinality from a Set thatIs NukeSubSet
-----------------------------------------------
Example V-6 = KR6 --See V-8
-----------------------------------------------
Example V-7 = KR7
# S1 self/Instance: A DescriptionSpace
# S2 self/Instance: A DescriptionSpace; WhichIs ExtentionOf S1
# S3 self/Instance: A DescriptionSpace; WhichIs ExtentionOf S1
# S4 self/Instance: A DescriptionSpace; WhichIs ExtentionOf S1
# S5
self/Instance: A DescriptionSpace
WhichIs ExtentionOf S2
WhichIs ExtentionOf S3
# S6 self/Instance: A DescriptionSpace; WhichIs ExtentionOf S5
# S7 self/Instance: A DescriptionSpace; WhichIs ExtentionOf S4
-----------------------------------------------
Example V-8 = KR8
# SentenceHypothesis
self:A DescriptionSpace
ExtentionOf(My subject)
ExtentionOf(My predicate)
subject: A NPHypothesis
predicate: A VPHypothesis
# NPHypothesis
self: A DescriptionSpace
# VPHypothesis
self:A DescriptionSpace
ExtentionOf(My verb)
ExtentionOf(My object)
object: A NPHypothesis
verb: A VerbHypothesis
# VerbHypothesis
self: A DescriptionSpace
# S1
self/Instance:A SentenceHypothesis with subject = NP1 predicate = VP1
InWhich (B, \A Build with agent = C)
# NP1
self/Instance:A NPHypothesis
A DescriptionSpace with entities = {[C; A Corporation]}
# VP1
self/Instance:A VPHypothesis with verb = V1 object = NP2
InWhich (B, \A Build with object = S)
# V1
self/Instance:A VerbHypothesis
A DescriptionSpace with entities = {[B; A Build]}
# NP2
self/Instance:A NPHypothesis
A DescriptionSpace with entities = {[S; A Submarine]}
# S # B # C #
Or, adding redundant information
# S
self/Instance:WhichIs DescribedAs \A Submarine
with descriptionSpace = NP2
WhichIs DescribedAs \The object from a Build thatIs B
with descriptionSpace = VP1
# B
self/Instance:WhichIs DescribedAs \A Build
with descriptionSpace = V1
WhichIs DescribedAs \A Build with agent = C
with descriptionSpace = S1
WhichIs DescribedAs \A Build with object = S
with descriptionSpace = VP1
# C
self/Instance:WhichIs DescribedAs \A Corporation
with descriptionSpace = NP1
WhichIs DescribedAs \The agent from a Build thatIs B
with descriptionSpace = S1
-----------------------------------------------
Example V-9 = KR9 -- purely graphical notation
Example V-10 = KR10
# John self/Instance: A Person
# JohnsBeliefs
self/Instance: A DescriptionSpace; WorldModel(John)
-----------------------------------------------
Example V-11 = KR11 The HLS was built by General Dynamics and is owned by the US
# Country self: A LegalPerson
# US self/Instance: A Country
# Own↑11:FurtherSpecified (\Situation)
HasFunctional (agent, Owns, object)
HasFunctional (object, OwnedBy, agent)
start: ; end: ; object: ; agent:
This sort of example will be done by giving a call to Describe, rather than showing the unit which results, since there will be other information there already.
DescribeHenryLStimson
\[BuiltBy(GeneralDynamics); OwnedBy(US)]
-----------------------------------------------
Example V-12 = KR12
Either the HLS was built by General Dynamics or it is owned by the US
DescribeHenryLStimson
\Or (BuiltBy(GeneralDynamics), OwnedBy(US))
-----------------------------------------------
Example V-13 = KR13
The HLS is owned by either the US or the USSR
# USSR self/Instance: A Country
DescribeHenryLStimson
\OwnedBy Or(US, USSR))
-----------------------------------------------
Example V-14 = KR14
The USSR does not own the HLS
DescribeUSSR
\Not(Which Owns HenryLStimson)
Note that the decision as to where to hang the information is being controlled by the form of the sentence in Hendrix examples. In a more realistic appliction, it would be controlled (including adding redundancy) by the reasoning processes which need to be carried out.
-----------------------------------------------
Example V-15 = KR14b
Either General Dynamics didn’t build the Henry L Stimson or the US owns it
DescribeHenryLStimson
\Or (Not(BuiltBy(GeneralDynamics)), OwnedBy(US))
this grouping explicitly forces the information to be about the HLS
-----------------------------------------------
Example V-16 = KR14c
If General Dynamics built the Henry L Stimson then the US owns it
DescribeHenryLStimson
\Implies (BuiltBy(GeneralDynamics), OwnedBy(US))
-----------------------------------------------
Example V-17 = KR14d and Example V-18 = KR15 -- notational
-----------------------------------------------
Example V-19 = KR16
AxEy p(x,y)
Making the assumption that x and y are typed variables (anything for which we have a description), and using arg1, arg2, etc. to represent the case names for the relationship. Create a unit for X
# X self: The arg1 from a P with arg2 = A Y
-----------------------------------------------
Example V-20 =
AxEy p(x,y) -- alternative notation
There is no exact equivalent, but assume we do not want a separate unit for X, but have a unit for a superset of the X’s
# SuperX
self: Implies (An X, The arg1 from a P with arg2 = A Y)
-----------------------------------------------
Example V-21 = KR18
Ax [Ey u(x,y)] [Ez v(x,y)]
# X
self: Implies (The arg1 from a U with arg2 = A Y,
The arg1 from a V with arg2 = A Z)
if we want to be logically simpler, and not type everything (probalby not useful for real domains) then:
# X
self: Implies (The arg1 from a U, The arg1 from a V)
-----------------------------------------------
Example V-22 = KR19 -- notational
-----------------------------------------------
Example V-23 = KR20
Every submarine is owned by some country
Describe/TemplateSubmarine
\OwnedBy(A Country)
-----------------------------------------------
Example V-24 = KR21
Every Lafayette is owned by the US
# Class self: A CategoryLabel with dimension = Type
# Lafayette
self/Instance:SubCategory (Type, Submarine)
A Class
self: A Submarine
Describe/TemplateLafayette
\OwnedBy(US)
-----------------------------------------------
Example V-24 = KR21
All the ships in any given class have the same length
# Class
self:A CategoryLabel with dimension = Type
TemplateFor (SetOf (A Ship with length = My classLength))
classLength: A Length
-----------------------------------------------
Example V-26 = KR23
All ships built by General Dynamics belong to the US
Describe/TemplateShip
\Implies (BuiltBy(GeneralDynamics), OwnedBy(US))
-----------------------------------------------
Example V-27 = KR23b
Delineation theorem of ownings (represented by the descriptions in the slot fillers of the template)
# Own↑11: FurtherSpecified (\Situation)
start: A Time
end: A Time
object: A PhysicalObject
agent: A LegalPerson
-----------------------------------------------
Example V-28 = KR23c -- notational
-----------------------------------------------
Example V-29 = KR24
Relating a sentence to its meaning
# Meaning↑11: HasFunctional (sentence, Means, process)
sentence: A Sentence
process: A ComputationProcess
# Sentence
form: A String
# Sentence1
self/Instance:A Sentence with
string = "General Dynamics built the Henry L Stimson"
Which Means A Describe with
object = GeneralDynamics
description = \Which Built HenryLStimson
-----------------------------------------------
Example V-30 = KR25
Did General Dynamics build the Henry L Stimson?
# Sentence2
self/Instance:
A Sentence with
string = "Did General Dynamics build the Henry L Stimson?"
Which Means A Match with
datum = GeneralDynamics
pattern = \Which Built HenryLStimson
-----------------------------------------------
Example V-31 = KR26
Did General Dynamics build all US destroyers?
# Sentence3
self/Instance:
A Sentence with
string = "Did General Dynamics build all US destroyers?"
Which Means A Match with
datum = \[A Destroyer; OwnedBy(US)]
pattern = \BuiltBy(GeneralDynamics)
or alternatively (the reasoning routines need to be able to deal with whichever is appropriate, depending on the finiteness of sets, etc.):
# Sentence3
self/Instance:
A Sentence with
string = "Did General Dynamics build all US destroyers?"
Which Means A Match with
datum = \SetOfAll ([A Destroyer; OwnedBy(US)])
pattern = \SetOf (BuiltBy(GeneralDynamics))
# Sentence3
self/Instance:
A Sentence with
string = "Did General Dynamics build all US destroyers?"
Which Means
A Match with
datum = GeneralDynamics
pattern = \Which↑1 Built [↑x:A Destroyer; OwnedBy(US)]
1: WhichIs Universal {My x}
-----------------------------------------------
Example V-32 = KR27
Who built the Henry L Stimson?
# Sentence4
self/Instance:
A Sentence with
string = "Who built the Henry L Stimson?"
Which Means A Seek with
target = \Which Built HenryLStimson
or, if the translator puts in explicitly the information it gets from the Build template in the process of analysis (this could be used by the Seek strategies):
# Sentence4
self/Instance:
A Sentence with
string = "Who built the Henry L Stimson?"
Which Means A Seek with
target = \[A LegalPerson
Which Built HenryLStimson]
-----------------------------------------------
Example V-33 = KR28
Who built every destroyer?
# Sentence5
self/Instance:
A Sentence with
string = "Who built every destroyer?"
Which Means A Seek with
target = \Which↑1 Built A↑x: Destroyer
1: WhichIs Universal {My x}
-----------------------------------------------
Example V-34 = KR29
Who built each destroyer?
# Sentence6
self/Instance:
A Sentence with
string = "Who built every destroyer?"
Which Means
A Seek with
target = The rangeSet from a SetMap with
base = SetOfAll(A Destroyer)
rangeElement = <This element,
[A LegalEntity
Which Built This element]>
-----------------------------------------------
Example V-35 = KR30
What companies built what destroyers?
I’m not sure I understand this example. My tendency would be to simply replace A LegalEntity with A Company in the previous version. However, trying to capture the notion of looking through both sets, (this doesn’t correspond to a simple search in KRL):
# Sentence7
self/Instance:
A Sentence with
string = "Who built every destroyer?"
Which Means
A Seek with
target = The rangeSet from a SetMap with
base = PairWiseProduct (SetOfAll(A Destroyer),
SetOfAll(A Company))
selector = \A Pair with
first = BuiltBy(The second from
a Pair
thatIs This element)
-----------------------------------------------
Example V-36 = KR31
How many ships did General Dynamics build?
# Sentence8
self/Instance:
A Sentence with
string = "How many ships did General Dynamics build?"
Which Means
A Seek with
target = \The cardinality from
a Set thatIs
SetOfAll([A Ship; BuiltBy(GeneralDynamics)})
-----------------------------------------------
Example V-37 = KR32
# Plus
self/Instance: A ComputationProcess with
input = SetOf(A Number)
output = A Number
# Sum
addends: SetOf(A Number)
total:↑1 A Number1: ToFill (The result from a Computation thatIs A Plus
with input = My addends)
-----------------------------------------------
Example V-38 = KR33
# Shipdata
self/Instance: A ComputationProcess with
input = SetOf(A pair with first = An Atom
second = Or(An Atom, "?"))
output = SetOf(A pair with first = An Atom
second = An Atom)
# Computation1
self/Instance: A Computation with
input = {<’NAME, ’Henry.L.Stimson>,
<’OWNER, "?">,
<’BUILDER, "?">}
output = {<’NAME, ’Henry.L.Stimson>,
<’OWNER, ’The.U.S.>,
<’BUILDER, ’General.Dynamics>}
It is important to work out the interaction between a program and a process here -- ShipData and Plus are programs, while the two instances talk about process (instantiations of those programs)
-----------------------------------------------
Example V-39 = KR34 and Example V-40 = KR35
As far as I can tell, this would all be handled by combinations of meta-descriptors on the slots of a unit which had slots for all of the things which could be keys, using various combinations of known, filled, etc. Without a detailed program it doesn’t seem worth doing that here
-----------------------------------------------
Example V-41 = KR36
This is a loose translation of the LN2 text, leaving out those things (such as IMPLICATIONS) which are put in because they are part of the general logic of the nets, and using the corresponding KRL forms It assumes stuff from above where the Net seems to be doing the same (e.g. Situation and time)
# Own↑11:HasFunctional (owner, Owns, ownee)
HasFunctional (ownee, OwnedBy, owner)
self: A Situation with agent = My owner
object = My ownee
ownee: A PhysicalObject
owner: A LegalPerson
# Submarine self: A PhysicalObject; OwnedBy(A Country)
# Lafayette self: A Submarine; OwnedBy(US)
# HenryLStimson self/Instance: A Submarine; OwnedBy(US)
# Country↑1 self: A LegalPerson1: Which HasPlural "countries"
# US
self/Instance:A Country
Which Owns HenryLStimson
Which↑1 Owns A↑x: Lafayette
1: WhichIs Universal {My x}
Note that the two ownership descriptors in the US unit are redundant. I have chosen not to create units for the ownership relations, since this is not in the KRL spirit. However, they would be:
# Own1 self/Instance: An Own with owner = US ownee = HenryLStimson
# Own2
self/Instance: An↑1 Own with
owner = US
ownee = A↑x: Lafayette
1: WhichIs Universal {My x}