Semantic formalization in mathematical modeling languages

Mathematical modeling is notoriously error-prone because existing commercial languages and systems for Operations Research (OR) modeling lack semantic formalization. The absence of formal semantics has limited the amount of assistance that is provided by current mathematical modeling language environments to detect and prevent errors in models. For example, it has prevented the development of practical tools which could provide immediate feedback on the location and nature of semantic errors in a model, of tool extensions which could simplify model design by automatically deducing missing, or incomplete, fragments in the model, and of entirely new semantics-driven tools which could support model-analysis activities within the modeling environment itself. Even more importantly, this deficiency has prevented the automatic generation of major components of the environments for OR modeling. The purpose of this dissertation is to promote semantic formalization in mathematical modeling languages by showing the feasibility of employing an attribute grammar formalism as a design paradigm for some of the major components of an OR modeling environment. We begin by identifying the areas where semantic formalization is needed in selected modeling languages for mathematical programming. Then, using SML (Structured Modeling Language) as an example, we propose and show the feasibility of supporting the complete static semantics of mathematical modeling languages through attribute grammar equations. Next, we propose equations for various areas that we identify as amenable to language simplification via the automatic deduction of missing language constructs. Later, we show how we could support the numerical evaluation of expressions in immediate mode in SML. Finally, we validate our approach by implementing a prototype modeling environment which enforces the full syntax and semantics of SML, and by testing it using a large number of models from a variety of domains. We conclude that it is possible to use attribute grammars to rigorously formalize a mathematical modeling language, and to automatically generate modeling environment tools. This kind of explicit semantic formalization can help to make the modeling activity in OR less error-prone, thereby shortening the length of time required to develop correct new models and maintain existing ones.