Page Numbers: Yes First Page: 1
Heading:
May 16, 1979 4:31 PM[IVY]<krl>document>match-eng-old-traces
Some hypothetical traces of KRL1 functions running
NOTE: Need to put into real units, and to get newer version of units for SAM example.
# # # # # # # # # # # # # # #
trace of Describe
||[B [a Unit]
[a Letter with
value = {[an OddDigit][AtMost Six]}
newConstraints = {<\[a FreeLetter]> ↑[a CurrentValue]}
possibleValues = {<Three Five>
[a CurrentValue with
filter = [the newConstraints from
[a Letter whichIs B]]]}]]
this state was reached by previous elimination -- note that One was eliminated not because of the description of the value of B, but because it failed the FreeLetter test at some updating of possibleValues
1: Describe \B <== \[a Letter with value = [AtMost Four]]
1-1: Signal AddingDescriptorToDescription
1-2: Look for traps
on unit B
on slot of B
1-3: Since descriptor is a perspective, explore mapping:
nm1: [Letter ==> B value => [AtMost Four]]
1-3-1-2: check WhenDescribed triggers on Letter
new information flag???
1-3-1: check for existing mapping -- find m1 [Letter ==> B etc.]
1-3-1-1: check Letter for uniqueness -- unique, so not new Identification
otherwise would check whenKnown triggers
1-3-1-2: (a) check added submappings -- only one is "value""
a-1: Signal -- adding descriptor to submap
a-3: Check for WhenDescribed triggers on Letter/value
new information flag??? internal agenda??
subgoal: Augment (the newConstraints from (a Letter whichIs B))
\[AtMost Four]
a-4: Since descriptor is a functional, explore mapping
nm2: [Magnitude ==> EN1 lesser = EN2 greater => Four]
EN1 declared to exist
EN2 = value in nm1
a-4-1:No mapping with Magnitude as template and EN2 as lesser exists here
decide not to search (signal??)
decide not to create (e.g. different for SAM)
decide not to trigger (no unit involved as instance -- signals??)
mark submap information as new
a-5:actually add submap info (in perspective form, folded?)
2: subgoal: Augment [the newConstraints from [a Letter whichIs B]]
\[AtMost Four]
Should this be Describe \B [a Letter with newConstraints =also ...]?
2-1: (a Seek with
goalDesc =[the newConstraints from [a Letter whichIs B]]
descriptionDesc = [a CurrentValue])
work from inside out:
2-1-1: Find mapping m3: [Letter ==> B]
look in self slot (what if it weren’t there?)
2-1-2: Find submapping in m3 [...newConstraints =>]
find {<\[a FreeLetter]>↑[a CurrentValue]}
2-1-3: look in this description for a CurrentValue description
it’s the only one there.
result of 2-1: {<\[a FreeLetter]>↑[a CurrentValue]}
2-2: add new element to sequence
result: {<\[a FreeLetter] \[AtMost Four]>↑[a CurrentValue]}
2-3: changed right side of submap so check for triggers and traps
traps on B
whenChanged or whenDescribed triggers on
Letter
Letter/newConstraints
result: subgoal Update [the possibleValues from (a Letter whichIs B)]
2-3-1: (a Seek with
goalDesc =[the possibleValues from [a Letter whichIs B]]
descriptionDesc = [a CurrentValue])
work from inside out:
2-3-1-1: Find mapping m3: [Letter ==> B]
2-3-1-2: Find submapping in m3 [...possibleValues =>]
find {<Three Five>
[a CurrentValue with
filter = [the newConstraints from [a Letter whichIs B]]]}
2-3-1-3: look in this description for a CurrentValue description
it’s the only one there.
result of 2-3-1: (call it EN3)
{<Three Five>
[a CurrentValue with
filter = [the newConstraints from [a Letter whichIs B]]]}
2-3-1-4: (b) update it
b-1: find the filter
b-2: apply it ===> See section below ==> result: <Three>
b-3: clobber the descriptor
b-4: changed right side of submap so check for triggers and traps
traps on B
whenChanged or whenDescribed triggers on
Letter
Letter/possibleValues
result: subgoal LISP CheckPossibleValues context = m3
if new things in mapping are marked, there is no need to pass other variables.
# # # # # # # # # # # # # # #
SAM match example
General knowledge
[Act ↑(NOT (Which IsUnique))
<self>
<actor (a Person)>]
[Bring
<self {(a Happening)(an Act with actor = (my bringer))
(a Go with goer = (my bringer)
destination = (my destination)
source = (my source))
(a Go with goer = (my brought)
destination = (my destination)
source = (my source))
<bringer (a Person)>
<brought (a PhysicalObject)>
<source (a Place)>
<destination (a Place)>]
[FoodArrives ↑(Which IsInCluster RestaurantScript)
<self (a Bring with bringer = (our server)
brought = (our meal)
source = (the kitchen from Restaurant (our restaurant))
destination = (which IsPlaceOf (our table))>
[Enactment
<self {(a Thing) ↑ (An Exclusion)}>
<script (a Script)>
<eventSequence {(sequenceOf (a StoryEvent)) ↑
(A MonotonicallyChangingSequence with direction = Increase)}>]
[Go ↑(NOT (Which IsUnique))
<self {(a Happening)(an Act with actor = (my goer))}>
<goer (a PhysicalObject)>
<source (a Place)>
<destination (a Place)>]
[RestaurantScript
<self (A Script with eventNet = (......(my menuArrives)...(my foodArrives)...)>
<restaurant (a Restaurant)>
<table (xor (a Table)(a Booth)(a Counter)>
<host {(a WaitPerson) {(a Hostess) ↑ (A DefaultDescription)}}>
<server {(a WaitPerson) {(a Waiter) ↑ (A DefaultDescription)}}>
<customer (a Person)>
<meal (a Food)>
...
<menuArrives (a Bring with bringer = (OR (my server) (my host))
brought = (a Menu))>
<foodArrives (a FoodArives)>]
[Script
<self {(a Thing) ↑ (An Exclusion)}>
<eventNet (a ...)>]
[StoryEvent
<self {(a Thing) ↑ (An Exclusion)}>
<input (a Phrase)>]
[Food <self {(a PhysicalObject) ↑ (An Exclusion)}>]
[Lobster <self {(a Food) ↑ (An Exclusion)}>]
[Happening ↑(NOT (Which IsUnique)) <self {(a Thing) ↑ (An Exclusion)}>]
[Menu <self {(a PhysicalObject) ↑ (An Exclusion)}>]
[Person <self {(a PhysicalObject) ↑ (An Exclusion)}>]
[Phrase <self {(a Thing) ↑ (An Exclusion)}>]
[PhysicalObject <self {(a Thing) ↑ (An Exclusion)}>]
[Place <self {(a Thing) ↑ (An Exclusion)}>]
Units built up for this story
[Waiter1
<self {(A WaitPerson)(The server from EN1 viewedAs RestaurantScript)}>]
[John1
<self {(A Person with name = "John")
(The customer from EN1 viewedAs RestaurantScript)}>]
[EN1
<self {(An Enactment with
eventSequence = {<SE1 SE2 ...> ↑ (A CurrentValue)}
script = RestaurantScript)
(A RestaurantScript with
server = Waiter1
customer = John1)}>]
[SE17
<self {(A StoryEvent with
input = {Clause24 (W Says "the waiter brought a Lobster")})
(A Bring with bringer = Waiter1 brought = (A Lobster))}>]
Problem 1
A Match with
pattern = \The foodArrives from EN1 viewedAs a RestaurantScript
datum = SE17
Create
# eventE1 self: An EntityRecord with pointer = ’SE17
# Goal1
self: A MatchDescToEntity with
desc = \The foodArrives from EN1 viewedAs a RestaurantScript
entity = eventE1
# scriptInstE2 self: An EntityRecord with pointer = ’EN1
# scriptE3 self: An EntityRecord with pointer = ’RestaurantScript
# foodArrivesE4
self: An EntityRecord with pointer = ??? ’(RestaurantScript . foodArrives)
# scriptMap1
self: A MapRecord with
subMaps = {Pair(scriptE3,scriptInstE2), Pair(foodArrivesE4,eventE1)}
status = Desired
basis = {Goal1}
Trigger strategies:
An AccessAnchor with entity = eventE1
An AccessAnchor with entity = scriptInstE2
An AccessAnchor with entity = scriptE3
An AccessAnchor with entity = foodArrivesE4
Goal 1-1-1 (FindMap): [RestaurantScript ==> EN1]
method (quick confirm): look in self
result: find m1:
[RestaurantScript ==> EN1 server => Waiter1 customer => John1]
Goal 1-1-2 (IdentifyMap) m1 == hm1
method (quick confirm): RestaurantScript maps uniquely (default)
Add: to m1: (hypothetical) foodArrives =>SE17
Goal 1-1-2-1 (CheckSlot): in m1: foodArrives => SE17
method (quick check): look in m1 -- fails
method (quick check): look in SE17 for mention of mapping:
RestaurantScript ==> x-- fails
method (medium deny): see if object matches prototype description
-- Set up goal 1-1-2-1-1
Goal 1-1-2-1-1 (MatchDescription): Context = m1
(a FoodArrives) ==> SE17
Goal1-1-2-1-1-1 (EstablishMap): Ehm2 [FoodArrives ==> SE17]
Goal1-1-2-1-1-1-1 <<call this a>> (FindMap): hm2 [FoodArrives ==> SE17]
method (quick confirm): look in existing mappings -- fails
method (quick confirm): look in self of SE17 -- fails
method (quick deny): trace exclusion hierarchies
none from FoodArrives -- fails
Add: m2 (hypothetical) [FoodArrives ==> SE17]
method (medium confirm): self of FoodArrives onto SE17
-- Set up goal a-1
Goal a-1 (MatchDescription): Context = m2
(a Bring with bringer = (our server)
brought = (our meal)
source = (the kitchen from Restaurant (our restaurant))
destination = (which IsPlaceOf (our table)) ==> SE17
Goal a-1-1 (EstablishMap): Ehm3 [Bring ==> SE17 ..need to keep this indirect...]
Goal a-1-1-1 (FindMap): Ehm3 [Bring ==> SE17]
method (quick confirm): look in existing mappings -- fails
method (quick confirm): look in self
result: find m3:
[Bring ==> SE17 bringer => Waiter1 brought => (A Lobster)]
Goal a-1-1-2 <<call this b>> (IdentifyMap) m3 == hm3
method (quick confirm): Bring maps uniquely (default)
Goal b-1 (CheckSlotIdentity): for bringer:
Waiter1 == (our server) i.c.o. m2
method (quick check): find individuals for both sides
Goal b-1-1 (FindIndividual): (our server) i.c.o. m2
method (quick check): find cluster and access
Goal b-1-1-1 (FindCluster): in m2
method (quick check): look for slot -- fails
method (quick check): look globally for unit match: RestaurantScript
-- succeeds finding EN1
Add: to m2: (hypothetical from context) cluster ==> EN1
Goal b-1-1-2 (FindIndividual): (The server from RestaurantScript EN1)
method (quick check): look in self slot for appropriate filler
-- succeeds finding Waiter1
so b-1 succeeds
Goal b-2 (CheckSlotIdentity): for brought: (A Lobster) == (our meal) i.c.o. m2
method (quick check): find individuals for both sides
Goal b-2-1 (FindIndividual): (A Lobster)
method (quick check): look for mapping info -- fails
method (what allows this?): set up E1 = [(A Lobster)]
Goal b-2-2 (FindIndividual): (our meal) i.c.o. m2
method (quick check): find cluster and access
Goal b-2-2-1 (FindCluster): in m2
method (quick check): look for slot -- finds EN1
Goal b-2-2-2 (FindIndividual): (The meal from RestaurantScript EN1)
method (quick check): look in self slot for appropriate filler -- fails
so b-2-2 fails (how do we know nothing more could be tried?)
Goal b-2 [continued...] (CheckSlotIdentity): for brought:
(A Lobster) == (our meal) i.c.o. m2
method (what allows this?): try to assert identity
(A Lobster) == (our meal) i.c.o. m2
Goal b-2-1 <<call this c>> (MatchDescription):
(the meal from EN1 viewedAs RestaurantScript) ==> E1:(A Lobster)
Goal c-1 (EstablishMap): Ehm4 [RestaurantScript ==> EN1 meal => E1]
Goal c-1-1 (FindMap): [RestaurantScript ==> EN1]
method (quick confirm): look in maps already in match
result: find m1:
[RestaurantScript ==> EN1
server => Waiter1
customer => John1
foodArrives => {SE17 ↑ (W HYP 1-1-2)}]
Goal c-1-2 (IdentifyMap) m1 == hm4
method (quick confirm): RestaurantScript maps uniquely (default)
Goal c-2 (CheckSlot): in m1: meal => E1
method (quick check): look in m1 -- fails
method (quick check): look in E1 for mention of mapping:
RestaurantScript ==> x-- fails
method (medium deny): see if object matches prototype description
-- Set up goal c-2-1
Goal c-2-1 (MatchDescription): Context = EN1
(a Food) ==> E1
Goal c-2-1-1 (EstablishMap): Ehm5 [Food ==> E1]
Goal c-2-1-1-1 (FindMap): [Food ==> E1]
method (quick confirm): look in maps already in match -- fails
method (quick confirm): look in self of E1 -- fails
method (quick check): trace exclusion hierarchies
-- Food is ancestor of Lobster so create m5: [Food ==> E1]
Goal c-2-1-1-2 (IdentifyMap): m5 == hm5
method (quick confirm): Food maps uniquely (default)
--so c-2-1 succeeds
Goal c-1-2 [continued] (IdentifyMap) m1 == hm4
method (how is this justified?): assume meal in hm4
Add: to m1: [meal => {E1 ↑ (W HYP c-1-2)}]
-- so c succeeds: (MatchDescription):
(the meal from EN1 viewedAs RestaurantScript) ==> E1
-- so b-2 succeds: (CheckSlotIdentity) brought
Goal a-1-1 [continued] (EstablishMap): Ehm3 [Bring ==> SE17 ..stuff from proto...]
method (how??): ignore the rest of the slots which don’t appear in m3
-- so a-1 (MatchDescription) succeeds
Goal1-2-1-1 [continued] (EstablishMap): Ehm2 [FoodArrives ==> SE17]
method (??): assume hm2 (on basis of meta-desc in FoodArrives?)
Add: m2: [FoodArrives ==> SE17]
Goal 1-2 [continued] (CheckSlot): in m1: foodArrives => SE17
method: assume
-- so Goal 1-1 succeeds
FINISHED:

m1: [RestaurantScript ==> EN1
server => Waiter1
customer => John1
meal => {E1 ↑ (An Entity) (W HYP c-1-2)}
foodArrives => {SE17 ↑ (W HYP 1-1-2)}]
m2: [FoodArrives ==> SE17 ↑ (which IsHypothetical a)
cluster => {EN1 ↑ (W IsFromContext)}]
m3: [Bring ==> SE17
bringer => Waiter1
brought => (A Lobster)
..is other stuff brought in here or attached implicitly?...]
m5: [Food ==> E1]
EN1: {m1}
SE17: {m2 m3
{(The foodArrives from EN1 viewedAs RestaurantScript) ↑ (W HYP 1)}}
E1: {m5 (A Lobster)
{(the meal from EN1 viewedAs RestaurantScript) ↑ (W HYP c)}}


Problem 2 -- starting with same context
Match (the menuArrives from EN1 viewedAs RestaurantScript) ==> SE17
Goals 2-1 through 2-1-2 parallel problem 1
Goal 2-2 (CheckSlot): in m1: menuArrives => SE17
method (quick check): look in m1 -- fails
method (quick check): look in SE17 for mention of mapping:
RestaurantScript ==> x-- fails
method (medium deny): see if object matches prototype description
-- Set up goal 1-2-1
Goal 2-2-1 (MatchDescription): Context = m1
(a Bring with bringer = (OR (my server) (my host))
brought = (a Menu))) ==> SE17
Goal 2-2-1-1 <<call this e>> (EstablishMap): Ehm2: in context m1
[Bring ==> SE17 ...indirect stuff???..
bringer => (OR (my server) (my host)) brought => (a Menu)]
Goal e-1 (FindMap): hm2 [Bring ==> SE17]
method (quick confirm): look in existing maps -- fails
method (quick confirm): look in self
result: find m2:
[Bring ==> SE17 bringer => Waiter1 brought => (A Lobster)]
Goal e-2 (IdentifyMap) m2 == hm2
method (quick confirm): Bring maps uniquely (default)
Goal e-2-1 (CheckSlotIdentity): for bringer:
Waiter1 == (OR (my host)(my server)) i.c.o. m1
method (quick check): find individuals for both sides taking first success of OR
Goal e-2-1-1 (FindIndividual): (my server) i.c.o. m1
method (quick check): find slot and access
-- finds Waiter1
-- so e-2-1 succeeds
Goal e-2-2 (CheckSlotIdentity): for brought:
(a Menu) == (A Lobster) i.c.o. m1
method (quick check): find individuals for both sides -- fails
method: create entity E1 for A Lobster and match
Goal e-2-2-1 (MatchDescription) (a Menu) ==> E1
method: find mapping
Goal e-2-2-1-1 (EstablishMap): Ehm3: Menu ==> E1
Goal e-2-2-1-1-1 (FindMap): Menu ==> E1
method: look in existing maps -- fails
method: look in self of E1 -- fails
method: use mutual exclusion hierarchy
food and menu are non-dependent things so fails
-- so e-2 fails
-- so 2-2-1 fails
-- so 2-2 fails
-- so 2 fails