Patent Document ID: RE46380
Application ID: 14952788

Base Claim:
1. A computer-implemented method comprising: accessing a query program with , the query program containing one or more queries to a database that contains relations described by at least one a database schema , wherein the database schema specifies a column type for every column of every extensional predicate that occurs in the query program ; receiving the database schema and at least one an entity type hierarchy for the database; and inferring a first type program from definitions in the query program by replacing each use of a database relation an extensional predicate in the query program by its type in the conjunction of the column types of the columns of the extensional predicate, the column types being provided by the database schema, and the wherein each column type is at least portion of a respective 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 programs use only extensionals that are monadic extensions , and the first type program and the second type programs do not contain negation ; testing portion portions of the first type program that has been inferred for type emptiness and type inclusion; and finding type emptiness or type inclusion for a first portion of the first type program, wherein the first portion is also a type program; and providing at least one of error information and or optimization information regarding the type emptiness and or type inclusion being found for the type first portion of the first type program .

---

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