Programs expressed in the OPL language [10] typically consist of two separate parts: a model definition and an optional search specification. The model definition is purely declarative and amounts to declaring data structures and setting up a model consisting of set of algebraic constraints with, possibly, an objective ``function'' to optimize. The search part is not declarative and consists of explicit indications on how to proceed with searching for solutions of a defined model. We are only interested here in the purely declarative part of OPL--the model definition. Upon scrutiny, one realizes that defining a model amounts to declaring data structures and specifying a model as a syntactic object expression constructed out of these structures using data manipulation operations. Thus, the main idea of this work is based on the realization that an OPL model definition can in fact all be formulated as an expression of an object query language [11].
The motivation for redesigning the declarative part of OPL at all stems from the fact that it suffers from several undue shortcomings [15]. While several of these are cosmetic in nature, some are the result of not having recognized that the operations and data types for the representation and manipulation of data it needs have been well studied in the area of object query languages. As a result, OPL provides useful conveniences that feel very appealing to the user but unfortunately work only for very limited cases, falling short of supporting these constructs in their full generality. This state of affairs ends up frustrating the user who is led to expect much more flexibility than is actually supported, not understanding what caused a bona fide expression to be flagged as disallowed when other similar ones are allowed. My proposal is to attempt redesigning OPL to support in their full generality all the data definition and manipulation conveniences it offers, taking inspiration in recent work in object query language design.
This document is organized as follows. Section 2 briefly recounts what one needs to know about query languages. Section 3 examines OPL's constructs for defining models and argues that it all falls within the object query language paradigm. In Section 4, I present recent work proposing formal algebras and calculi for expressing the precise semantics and efficient implementations of object query languages. In Section 5, I discuss the specific desiderata for MATISSE in the light of the reviewed formalisms. In Section 6, I proceed to adapt these ideas to our needs to arrive at an algebra and a calculus sufficient to express precisely OPL constructs in their full generality, to be used as the formal basis for a kernel language into which to ``desugar'' a more convenient surface syntax.