Patent Document ID: 8595213
Application ID: 13183514

Base Claim:
1. A computer-implemented method comprising: accessing a program with one or more queries to a database that contains relations described by at least one database schema; receiving the database schema and at least one entity type hierarchy for the database; and inferring a first type program from definitions in the program by replacing each use of a database relation in the program by its type in the database schema, and the type is at least portion of a second type program, wherein each of the first type program and the second type program is a derived program using type symbols without other extensional relation symbols, and each of the first type program and the second type program do not contain negation, wherein the first type program and the second type program uses monadic extensions; testing portion of the first type program that has been inferred for type emptiness and type inclusion; and providing at least one of error information and optimization information regarding the type emptiness and type inclusion being found for the type.

---

Claim 3:
3. The computer-implemented method of claim 1 , further comprising: in response to type inclusion being found for a portion of the first type program that has been inferred during determining of the testing portion of the first type program, performing at least one of: removing the a type test; and providing a notification regarding the type inclusion being found for the portion type.