-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy paththe-of-is-+what_is_the-.txt
64 lines (48 loc) · 2.15 KB
/
the-of-is-+what_is_the-.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
###############################################################################
###############################################################################
# Induction:
# the factorial of n is n times the factorial of n minus 1.
# the factorial of 1 is 1.
# the sum of x and y is x plus y
On "the FUNCTION of AND-LIST-PARAMS is EXPR-BODY":
#set the PARAMS of FUNCTION to BODY;
perform "function create FUNCTION PARAMS / BODY";
reply "ok, the FUNCTION of PARAMS is BODY".
On "the value of VARIABLE is PHRASE-VALUE", set VARIABLE to VALUE.
On "the ATTR of ENT is PHRASE-VALUE":
perform "value set ENT ATTR VALUE";
reply "ok, the ATTR of ENT is VALUE".
On "the ATTR of the ENT is PHRASE-VALUE":
perform "value set ENT ATTR VALUE";
reply "ok, the ATTR of the ENT is VALUE".
# the height of an entity is a numeric variable.
###############################################################################
###############################################################################
# Deduction:
# what is the height of martin.
## Elaboration:
## What is the capital of France.
On "what is the PHRASE-ATTR of PHRASE-ENTITY":
get the ATTR of ENTITY;
if so, reply "..., the ATTR of ENTITY is ...";
according to wikipedia what is the ATTR of ENTITY;
if not, say so;
reply "ok, the ATTR of ENTITY is ...".
###############################################################################
###############################################################################
On "what is the ATTR of the ENTITY":
get the ATTR of ENTITY;
if so, reply "..., the ATTR of the ENTITY is ...";
according to wikipedia what is the ATTR of ENTITY;
if not, say so;
reply "ok, the ATTR of ENTITY is ...".
###############################################################################
###############################################################################
On "what is the FUNCTION of values PHRASE-PARAMS":
perform "function evaluate FUNCTION PARAMS";
if not, reply "sorry, i do not know";
reply "the FUNCTION of PARAMS is ...".
On "what is the value of VARIABLE":
get the value of VARIABLE;
if not, reply "sorry, VARIABLE is not set";
reply "..., the value of VARIABLE is ...".