CSc 4340/6340, Introduction to Compilers
Fall 2009
PROJECT - Phase III

Phase III: (Due: Nov 30, 2009 - Sunday)

Complete the project by implementing evaluateDRC() method. Once the DRC query is determined to be safe and free of any semantic errors it should be executed to produce the result. Here are some notes:

[raj@tinman phase3]$ java DRC modb
DRC> {x,y | zipcodes(x,y) }
ANSWER(X:INTEGER,Y:VARCHAR)

Number of tuples = 6
67226:Wichita:
60606:Fort Dodge:
50302:Kansas City:
54444:Columbia:
66002:Liberal:
61111:Fort Hays:

DRC> {x | (exists y)(zipcodes(x,y)) }
ANSWER(X:INTEGER)

Number of tuples = 6
67226:
60606:
50302:
54444:
66002:
61111:

DRC> {y | (exists x)(zipcodes(x,y) and x < 60000) }
ANSWER(Y:VARCHAR)

Number of tuples = 2
Kansas City:
Columbia:

DRC> exit
[raj@tinman phase3]$