Static Balance Checking for First-Class Modular Systems of Equations
- 347 Downloads
Characterising a problem in terms of a system of equations is common to many branches of science and engineering. Due to their size, such systems are often described in a modular fashion by composition of individual equation system fragments. Checking the balance between the number of variables (unknowns) and equations is a common approach to early detection of mistakes that might render such a system unsolvable. However, current approaches to modular balance checking have a number of limitations. This paper investigates a more flexible approach that in particular makes it possible to treat equation system fragments as true first-class entities. The central idea is to record balance information in the type of an equation fragment. This information can then be used to determine if individual fragments are well formed, and if composing fragments preserves this property. The type system presented in this paper is developed in the context of Functional Hybrid Modelling (FHM). However, the key ideas are in no way specific to FHM, but should be applicable to any language featuring a notion of modular systems of equations.
KeywordsSystems of equations equation-based non-causal modelling first-class components equation-variable balance structural analysis linear constraints refinement types
Unable to display preview. Download preview PDF.
- 1.Broman, D., Nyström, K., Fritzson, P.: Determining Over- and Under-Constrained Systems of Equations using Structural Constraint Delta. In: GPCE. ACM, New York (2006)Google Scholar
- 4.Freeman, T., Pfenning, F.: Refinement Types for ML. In: PLDI (1991)Google Scholar
- 5.Giorgidze, G., Nilsson, H.: Higher-Order Non-Causal Modelling and Simulation of Structurally Dynamic Systems. In: Casella, F. (ed.) Proceedings of the 7th International Modelica Conference. Linköping Electronic Conference Proceedings (2009)Google Scholar
- 6.Jones, S.: Haskell 98 Language and Libraries: the Revised Report (2003)Google Scholar
- 7.Kuhn, H.: Solvability and Consistency for Linear Equations and Inequalities. American Mathematical Monthly 63 (1956)Google Scholar
- 8.McKinna, J., Altenkirch, T., McBride, C.: Why Dependent Types Matter. ACM SIGPLAN Notices 41(1) (2006)Google Scholar
- 9.The Modelica Association. Modelica – A Unified Object-Oriented Language for Physical Systems Modeling: Language Specification Version 3.2 (2010)Google Scholar
- 10.Nilsson, H.: Type-Based Structural Analysis for Modular Systems of Equations. In: Proceedings of the 2nd International Workshop on Equation-Based Object-Oriented Languages and Tools. Linköping Electronic Conference Proceedings (2008)Google Scholar
- 12.Nilsson, H., Peterson, J., Hudak, P.: Functional Hybrid Modeling from an Object-Oriented Perspective. In: Simulation News Europe (2007)Google Scholar
- 13.Norell, U.: Towards a Practical Programming Language Based on Dependent Type Theory. PhD thesis, Department of Computer Science and Engineering, Chalmers University of Technology, Göteborg, Sweden (2007)Google Scholar
- 15.Pugh, W.: The Omega Test: a Fast and Practical Integer Programming Algorithm for Dependence Analysis. In: Supercomputing 1991 (1991)Google Scholar