next up previous contents
Next: Who works for Up: Examples with the Previous: Examples with the

Who earns more than 2500?

 

A simple example which illustrates how the paraphraser produces an English version of Squirrel's disambiguation of the lexical items in the query.

ENG: who earns more than 2500
SYN: (s(np(ipron(who)))(vp(v(earns))(adj(more))
      (pp(prep(than))(np(propn(2500))))))
 PT: `than:`2500:(`more:`earn):fva1
FOL: than(fva1,`more:`earn,`2500)
URC: {fva1;exists(rr,[fva1,*,rr,*]:emp&rr>`2500)}
DRC: {fva1:emp![name];exists(rr:emp![sal],[fva1,*,rr,*]:emp&rr>`2500)}
OP1: {fva1:emp![name];exists(skf1:emp![sal],
      [fva1,*,skf1,*]:emp&skf1>`2500)}

PAR: which employee earns a salary that is greater than 2500

TRC: {fva1!name;fva1:emp;exists(skf1:emp,exists(tuple1:emp,
      tuple1!name=fva1!name&tuple1!sal=skf1!sal)&skf1!sal>2500)}
OP2: {fva1!name;fva1:emp;exists(sk2:emp,
      sk2!name=fva1!name&sk2!sal>2500)}
OP3: {fva1!name;fva1:emp;fva1!sal>2500}
SQL: SELECT DISTINCT fva1.name FROM emp fva1 WHERE fva1.sal>2500;

|name      |
|----------|
|malcolm   |
|----------|
(1 rows)


URC: {fva1;exists(a2,exists(a3,[fva1,*,a2,*]:emp&
      [`2500,*,a3,*]:emp&a2>a3))}
CHK: Query not meaningful with respect to current database



Chris Fox, September 1995