IP Library Granted Patent US 8,150,866
Granted Patent B2
US 8,150,866 · App. 12/349,761 · Granted Apr 3, 2012

Creating concise and re-useable queries over complex data

Assignee: Semmle Limited
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,150,866
App. No.
12/349,761
Granted
Apr 3, 2012
Kind
B2
Abstract

A system, computer readable storage medium and method for creating re-usable queries over complex data including hierarchies, trees and graphs is described. This is achieved by an object-oriented query language, where a class is a logical property of a data item, and inheritance is implication between such properties. Virtual method calls execute all relevant method implementations in most specific classes. Expressions can be multi-valued, thus avoiding the need for naming intermediate results. All constructs closely follow the syntax of mainstream object-oriented languages like Java.

Claims (58)

1. A process for creating re-usable queries over complex data, the process comprising:

defining a re-usable object-oriented query language with object-oriented classes treated as logical properties, wherein each logical property is defined by one or more specified classes of at least one complex data item;

relating inheritance, used to form new class with the specified classes, to the logical properties along with a plurality of virtual method calls that execute all applicable method implementations in at least one of the specified classes; and

dispatching on the logical properties to choose at least one most specific implementation of an operation, wherein a most specific implementation is in a class where no subclasses define a same method, wherein the dispatching on the logical properties further includes:

defining a named predicate p as predicate p(T 1 x 1 , . . . , T n x n ) {formula} for each one of the applicable method implementations, wherein the named predicate p has variables x 1 , . . . , x n so as to restrict a range of a relation, which contains tuples (x 1 , . . . , x n ) where each x i has a type T i ; and

testing a receiver against each relevant type and choosing the applicable method implementations, wherein testing a type of the receiver is achieved by invoking a named constructor for each class defining a method of a relevant signature, regardless of static types;

implementing queries by translating actual or possibly recursive object-oriented queries to pure Datalog using for each method and constructor of each class, a first special variable that holds a value that is a member of the class, and for each method that is not a predicate, a second special variable that holds a result of a method; and

at least one of:

mapping each constructor to a named characteristic predicate of its class, which tests whether a value belongs to the class, by taking a logical conjunction of characteristic predicates of all superclasses and a property specified in the constructor;

mapping instance of tests and cast expressions to calls of such characteristic predicates; and

mapping expressions including nested method calls to a conjunction of predicate calls, with a new named variable denoting an intermediate result of each method call.

2. The process as set forth in claim 1 , wherein at least one search engine is targeted by translating a same intermediate Datalog to different executable formats.

3. The process as set forth in claim 1 , wherein the queries are rendered concise by at least one of:

using multi-valued operations to avoid naming intermediate results;

using a * notation and a + notation on multi-valued operations to indicate a chained application of such operations; and

using an aggregate notation with variables, a range condition and an expression (agg(vars|condition|expr)).

4. The process as set forth in claim 1 , wherein complex data is stored in a standard relational database, and column types are used to build a hierarchy of object-oriented classes on top of an existing relational database, by annotating an existing relational schema.

5. The process as set forth in claim 1 , wherein at least one complex data item is at least one of:

a data item in a hierarchy;

a tree; and

a graph.

6. The process as set forth in claim 1 , wherein an object-oriented query language is in any form depending on a domain of object-oriented query language use, including at least one of:

a textual form;

a graphical form;

a query-by-example user interface; and

embedded in a more general programming language.

7. The process as set forth in claim 1 , wherein complex data is stored in a plurality of datasource formats including at least one of:

a relational database;

a web service;

a web page; and

a file on hard disk and column types are used to build a hierarchy of object-oriented classes on top of such data formats, by annotating each relevant data format schema.

8. A computer program product for creating re-usable queries over complex data, the computer program product comprising:

a non-transitory computer readable storage medium, the non-transitory computer readable storage medium storing software programming instructions capable of performing with a processor programming code to carry out:

defining a re-usable object-oriented query language with object-oriented classes treated as logical properties, wherein each logical property is defined by one or more specified classes of at least one complex data item;

relating inheritance, used to form new class with the specified classes, to the logical properties along with a plurality of virtual method calls that execute all applicable method implementations in at least one of the specified classes; and

dispatching on the logical properties to choose at least one most specific implementation of an operation, wherein a most specific implementation is in a class where no subclasses define a same method, wherein the dispatching on the logical properties further includes:

defining a named predicate p as predicate p(T1 x1, . . . , Tn xn) {formula} for each one of the applicable method implementations, wherein the named predicate p has variables x1, . . . , xn so as to restrict a range of a relation, which contains tuples (x1, . . . , xn) where each xi has a type Ti; and

testing a receiver against each relevant type and choosing the applicable method implementations, wherein testing a type of the receiver is achieved by invoking a named constructor for each class defining a method of a relevant signature, regardless of static types;

implementing queries by translating actual or possibly recursive object-oriented queries to pure Datalog using for each method and constructor of each class, a first special variable that holds a value that is a member of the class, and for each method that is not a predicate, a second special variable that holds a result of a method;

at least one of:

mapping each constructor to a named characteristic predicate of its class, which tests whether a value belongs to the class, by taking a logical conjunction of characteristic predicates of all superclasses and a property specified in the constructor;

mapping instance of tests and cast expressions to calls of such characteristic predicates; and

mapping expressions including nested method calls to a conjunction of predicate calls, with a new named variable denoting an intermediate result of each method call.

9. The computer program product of claim 8 , wherein at least one search engine is targeted by translating a same intermediate Datalog to different executable formats.

10. An information processing system for creating re-usable queries over complex data, the system comprising:

a computer memory capable of storing machine instructions; and

a processor in communication with said computer memory, said processor configured to access the memory, the processor performing

a re-usable object-oriented query language defined with object-oriented classes treated as logical properties, wherein each logical property is defined by one or more specified classes of at least one complex data item;

a new class formed by relating inheritance with the specified classes, to the logical properties along with a plurality of virtual method calls that execute all applicable method implementations in at least one of the specified classes; and

means for dispatching on the logical properties to choose at least one of a most specific implementation of an operation, wherein a most specific implementation is in class where no subclasses define a same method, wherein the dispatching on the logical properties further includes:

means for defining a named predicate p as predicate p(T 1 x 1 , . . . , T n x n ) {formula} for each one of the applicable method implementations, wherein the named predicate p has variables x 1 , . . . , x n , so as to restrict a range of a relation, which contains tuples (x 1 , . . . , x n ) where each x 1 has a type T i ; and

means for testing a receiver against each relevant type and choosing the applicable method implementations, wherein testing a type of the receiver is achieved by invoking a named constructor for each class defining a method of a relevant signature, regardless of static types;

means for implementing queries by translating actual or possibly recursive object-oriented queries to pure Datalog using for each method and constructor of each class, a first special variable that holds a value that is a member of the class, and for each method that is not a predicate, a second special variable that holds a result of a method;

at least one of:

means for mapping each constructor to a named characteristic predicate of its class, which tests whether a value belongs to the class, by taking a logical conjunction of characteristic predicates of all superclasses and a property specified in the constructor;

means for mapping instance of tests and cast expressions to calls of such characteristic predicates; and

means for mapping expressions including nested method calls to a conjunction of predicate calls, with a new named variable denoting an intermediate result of each method call.

11. The system of claim 10 , wherein at least one search engine is targeted by translating a same intermediate Datalog to different executable formats.

Assignments (5)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 27, 2020
From: GITHUB SOFTWARE UK LTD.
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 051710/0252 →
CHANGE OF NAME Recorded Dec 10, 2019
From: SEMMLE LIMITED
To: GITHUB SOFTWARE UK LTD.
Reel/Frame 051244/0305 →
RELEASE OF SECURITY INTEREST Recorded Jul 17, 2014
From: SEMMLE CAPITAL PARTNERS LLC
To: SEMMLE LIMITED
Reel/Frame 033358/0198 →
SECURITY AGREEMENT Recorded Nov 28, 2011
From: SEMMLE LIMITED
To: SEMMLE CAPITAL PARTNERS LLC
Reel/Frame 027284/0555 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 7, 2009
From: VERBAERE, MATHIEU; DE MOOR, OEGE; HAJIYEV, ELNAR
To: SEMMLE LTD.
Reel/Frame 022069/0434 →
Continuity (2)
Provisional Application 61019376 · Jan 7, 2008
Related Publication 20090177640A1 · Jul 9, 2009