skip to main content
research-article

Interactive Programmatic Modeling

Published:18 May 2021Publication History
Skip Abstract Section

Abstract

Modeling and computational analyses are fundamental activities within science and engineering. Analysis activities can take various forms, such as simulation of executable models, formal verification of model properties, or inference of hidden model variables. Traditionally, tools for modeling and analysis have similar workflows: (i) a user designs a textual or graphical model or the model is inferred from data, (ii) a tool performs computational analyses on the model, and (iii) a visualization tool displays the resulting data. This article identifies three inherent problems with the traditional approach: the recomputation problem, the variable inspection problem, and the model expressiveness problem. As a solution, we propose a conceptual framework called Interactive Programmatic Modeling. We formalize the interface of the framework and illustrate how it can be used in two different domains: equation-based modeling and probabilistic programming.

References

  1. Tom Addis and Jan Addis. 2009. Drawing Programs: The Theory and Practice of Schematic Functional Programming. Springer Science & Business Media.Google ScholarGoogle Scholar
  2. Rajeev Alur, Costas Courcoubetis, Thomas A. Henzinger, and Pei-Hsin Ho. 1993. Hybrid automata: An algorithmic approach to the specification and verification of hybrid systems. In Hybrid Systems. Springer, 209--229.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Albert Benveniste, Benoît Caillaud, and Mathias Malandain. 2020. The Mathematical Foundations of Physical Systems Modeling Languages. Research Report RR-9334. Inria. 112 pages. Retrieved from https://hal.inria.fr/hal-02521747.Google ScholarGoogle Scholar
  4. Eli Bingham, Jonathan P. Chen, Martin Jankowiak, Fritz Obermeyer, Neeraj Pradhan, Theofanis Karaletsos, Rohit Singh, Paul Szerlip, Paul Horsfall, and Noah D. Goodman. 2019. Pyro: Deep universal probabilistic programming. J. Mach. Learn. Res. 20, 28 (2019), 1--6.Google ScholarGoogle Scholar
  5. David C. Black, Jack Donovan, Bill Bunton, and Anna Keist. 2009. SystemC: From the Ground Up. Vol. 71. Springer Science & Business Media.Google ScholarGoogle Scholar
  6. Timothy Bourke and Marc Pouzet. 2013. Zélus: A synchronous language with ODEs. In Proceedings of the 16th International Conference on Hybrid Systems: Computation and Control (HSCC’13). ACM, 113--118.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. David Broman. 2010. Meta-Languages and Semantics for Equation-Based Modeling and Simulation. Ph.D. Dissertation. Department of Computer and Information Science, Linköping University, Sweden.Google ScholarGoogle Scholar
  8. David Broman. 2019. A vision of miking: Interactive programmatic modeling, sound language composition, and self-learning compilation. In Proceedings of the 12th ACM SIGPLAN International Conference on Software Language Engineering (SLE’19). ACM, 55--60.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. David Broman, Christopher Brooks, Lev Greenberg, Edward A. Lee, Michael Masin, Stavros Tripakis, and Michael Wetter. 2013. Determinate composition of FMUs for co-simulation. In Proceedings of the International Conference on Embedded Software (EMSOFT’13). IEEE.Google ScholarGoogle ScholarCross RefCross Ref
  10. David Broman and Peter Fritzson. 2009. Higher-order acausal models. Simul. News Eur. 19, 1 (2009), 5--16.Google ScholarGoogle Scholar
  11. David Broman and Henrik Nilsson. 2012. Node-based connection semantics for equation-based object-oriented modeling languages. In Proceedings of the 14th International Symposium on Practical Aspects of Declarative Languages (PADL’12) (LNCS), Vol. 7149. Springer-Verlag, 258--272.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. David Broman and Jeremy G. Siek. 2012. Modelyze: A Gradually Typed Host Language for Embedding Equation-Based Modeling Languages. Technical Report UCB/EECS-2012-173. EECS Department, University of California, Berkeley.Google ScholarGoogle Scholar
  13. David Broman and Jeremy G. Siek. 2018. Gradually typed symbolic expressions. In Proceedings of the ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation (PEPM’18). ACM, 15--29.Google ScholarGoogle Scholar
  14. Benoît Caillaud, Mathias Malandain, and Joan Thibault. 2020. Implicit structural analysis of multimode DAE systems. In Proceedings of the 23rd International Conference on Hybrid Systems: Computation and Control. 1--11.Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Bob Carpenter, Andrew Gelman, Matthew D. Hoffman, Daniel Lee, Ben Goodrich, Michael Betancourt, Marcus Brubaker, Jiqiang Guo, Peter Li, and Allen Riddell. 2017. Stan: A probabilistic programming language. J. Statist. Softw. 76, 1 (2017).Google ScholarGoogle ScholarCross RefCross Ref
  16. François E. Cellier. 1991. Continuous System Modeling. Springer-Verlag, New York, NY.Google ScholarGoogle Scholar
  17. Jean-Louis Colaço, Bruno Pagano, and Marc Pouzet. 2017. Scade 6: A formal language for embedded critical software development. In Proceedings of the International Symposium on Theoretical Aspects of Software Engineering (TASE’17). IEEE, 1--11.Google ScholarGoogle Scholar
  18. Fabio Cremona, Marten Lohstroh, David Broman, Edward A. Lee, Michael Masin, and Stavros Tripakis. 2019. Hybrid co-simulation: It’s about time. Softw. Syst. Model. 18 (2019), 1655--1679. https://doi.org/10.1007/s10270-017-0633-6Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Dassault Systems. [n.d.]. DYMOLA Systems Engineering: Multi-Engineering Modeling and Simulation based on Modelica and FMI. Retrieved from http://www.dymola.com.Google ScholarGoogle Scholar
  20. Johan Eker, Jorn Janneck, Edward A. Lee, Jie Liu, Xiaojun Liu, Jozsef Ludvig, Sonia Sachs, and Yuhong Xiong. 2003. Taming heterogeneity—The Ptolemy approach. Proc. IEEE 91, 1 (Jan. 2003), 127--144.Google ScholarGoogle ScholarCross RefCross Ref
  21. OpenBugs Online Examples. [n.d.]. Pumps: Conjugate gamma-Poisson hierarchical model. Retrieved from http://www.openbugs.net/Examples/Pumps.html.Google ScholarGoogle Scholar
  22. Martin Fowler. 2009. Illustrative Programming. Retrieved from https://martinfowler.com/bliki/IllustrativeProgramming.html.Google ScholarGoogle Scholar
  23. Peter Fritzson, Peter Aronsson, Håkan Lundvall, Kaj Nyström, Adrian Pop, Levon Saldamli, and David Broman. 2005. The OpenModelica modeling, simulation, and software development environment. Simul. News Eur. 15, 44/45 (2005), 8--16.Google ScholarGoogle Scholar
  24. Hauke Fuhrmann and Reinhard von Hanxleden. 2010. On the pragmatics of model-based design. In Proceedings of the 15th Monterey Workshop on the Foundations of Computer Software. Future Trends and Techniques for Development (LNCS), Vol. 6028. Springer, 116--140.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Sébastien Furic. 2009. Enforcing model composability in Modelica. In Proceedings of the 7th International Modelica Conference. Linköping University Electronic Press, 868--879.Google ScholarGoogle ScholarCross RefCross Ref
  26. Edward I. George, U. E. Makov, and A. F. M. Smith. 1993. Conjugate likelihood distributions. Scand. J. Stat. (1993), 147--156.Google ScholarGoogle Scholar
  27. George Giorgidze and Henrik Nilsson. 2008. Embedding a functional hybrid modelling language in Haskell. In Proceedings of the 20th International Symposium on the Implementation and Application of Functional Languages.Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. George Giorgidze and Henrik Nilsson. 2009. Higher-order non-causal modelling and simulation of structurally dynamic systems. In Proceedings of the 7th International Modelica Conference (Linköping Electronic Conference Proceedings). Linköping University Electronic Press, 208--218.Google ScholarGoogle ScholarCross RefCross Ref
  29. George Giorgidze and Henrik Nilsson. 2011. Mixed-level embedding and JIT compilation for an iteratively staged DSL. In Proceedings of the 19th Workshop on Functional and (Constraint) Logic Programming (WFLP’10) (LNCS), Julio Mariño (Ed.), Vol. 6559. Springer-Verlag, 48--65.Google ScholarGoogle ScholarCross RefCross Ref
  30. Cláudio Gomes, Casper Thule, David Broman, Peter Gorm Larsen, and Hans Vangheluwe. 2018. Co-simulation: A survey. ACM Comput. Surveys 51, 3 (2018), 1--33.Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Noah D. Goodman and Andreas Stuhlmüller. 2014. The Design and Implementation of Probabilistic Programming Languages. Retrieved from http://dippl.org.Google ScholarGoogle Scholar
  32. Nicholas Halbwachs, Paul Caspi, Pascal Raymond, and Daniel Pilaud. 1991. The synchronous data flow programming language LUSTRE. Proc. IEEE 79, 9 (1991), 1305--1320.Google ScholarGoogle Scholar
  33. David Harel. 1987. Statecharts: A visual formalism for complex systems. Sci. Comput. Program. 8, 3 (1987), 231--274.Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Alan C. Hindmarsh, Peter N. Brown, Keith E. Grant, Steven L. Lee, Radu Serban, Dan E. Shumaker, and Carol S. Woodward. 2005. SUNDIALS: Suite of nonlinear and differential/algebraic equation solvers. ACM Trans. Program. Lang. Syst. 31, 3 (2005), 363--396.Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Christoph Hager. 2019. Compiling Modelica: About the Separate Translation of Models from Modelica to OCaml and Its Impact on Variable-structure Modeling. Doctoral Thesis. Technische Universitat Berlin, Berlin.Google ScholarGoogle Scholar
  36. Dan Ingalls, Ted Kaehler, John Maloney, Scott Wallace, and Alan Kay. 1997. Back to the future: The story of squeak, a practical smalltalk written in itself. In Proceedings of the 12th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA’97). ACM, 318--326.Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. National Instruments. [n.d.]. What is LabView?—National Instruments. Retrieved from https://www.ni.com/labview/.Google ScholarGoogle Scholar
  38. Juraj Kubelka, Romain Robbes, and Alexandre Bergel. 2018. The road to live programming: Insights from the practice. In Proceedings in the 40th International Conference on Software Engineering (ICSE’18). IEEE, 1090--1101.Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Peter Kunkel and Volker Mehrmann. 2006. Differential-Algebraic Equations Analysis and Numerical Solution. European Mathematical Society.Google ScholarGoogle Scholar
  40. Kim G. Larsen, Paul Pettersson, and Wang Yi. 1997. UPPAAL in a nutshell. Int. J. Softw. Tools Technol. Transfer 1, 1–2 (1997), 134--152.Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Edward A. Lee. 2016. Fundamental limits of cyber-physical systems modeling. ACM Trans. Cyber-Phys. Syst. 1, 1 (2016), 3.Google ScholarGoogle Scholar
  42. Edward A. Lee and Haiyang Zheng. 2005. Operational semantics of hybrid systems. In Proceedings of the International Workshop on Hybrid Systems: Computation and Control. Springer, 25--53.Google ScholarGoogle Scholar
  43. MathWorks. [n.d.]. Simscape—Model and simulate multidomain physical systems. https://www.mathworks.com/products/simscape.Google ScholarGoogle Scholar
  44. MathWorks. [n.d.]. The Mathworks—Simulink—Simulation and Model-based Design. http://www.mathworks.com/products/simulink/.Google ScholarGoogle Scholar
  45. Sven Erik Mattsson and Gustaf Söderlind. 1993. Index reduction in differential-algebraic equations using dummy derivatives. SIAM J. Sci. Comput. 14, 3 (1993), 677--692.Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Modelica Association 2017. Modelica—A Unified Object-Oriented Language for Physical Systems Modeling-Language Specification Version 3.4. Modelica Association. Retrieved from: http://www.modelica.org.Google ScholarGoogle Scholar
  47. MODELISAR Consortium and Modelica Association. Functional Mock-up Interface for Model Exchange and Co-Simulation—Version 2.0.1. Retrieved from https://www.fmi-standard.org.Google ScholarGoogle Scholar
  48. Lawrence M. Murray and Thomas B. Schön. 2018. Automated learning with a probabilistic programming language: Birch. Annu. Rev. Control 46 (2018), 29--43.Google ScholarGoogle ScholarCross RefCross Ref
  49. Christoph Nytsch-Geusen, Thilo Ernst, André Nordwig, Peter Schneider, Peter Schwarz, Matthias Vetter, Christof Wittwer, Andreas Holm, Thierry Nouidui, Jürgen Leopold, et al. 2005. MOSILAB: Development of a Modelica based generic simulation tool supporting model structural dynamics. In Proceedings of the 4th International Modelica Conference TU Hamburg-Harburg, Vol. 2.Google ScholarGoogle Scholar
  50. Constantinos C. Pantelides. 1988. The consistent initialization of differential-algebraic systems. SIAM J. Sci. Statist. Comput. 9, 2 (1988), 213--231.Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. John D. Pryce. 2001. A simple structural analysis method for DAEs. BIT Numer. Math. 41, 2 (2001), 364--394.Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Claudius Ptolemaeus (Ed.). 2014. System Design, Modeling, and Simulation Using Ptolemy II. Ptolemy.org. Retrieved from http://ptolemy.org/books/Systems.Google ScholarGoogle Scholar
  53. Trygve Reenskaug. 1979. Models—Views—Controllers. Xerox PARC technical note December 1979. Retrieved from https://folk.uio.no/trygver/themes/mvc/mvc-index.html.Google ScholarGoogle Scholar
  54. Fredrik Ronquist, Jan Kudlicka, Viktor Senderov, Johannes Borgström, Nicolas Lartillot, Daniel Lundén, Lawrence Murray, Thomas B. Schön and David Broman. 2021. Universal probabilistic programming offers a powerful approach to statistical phylogenetics. Communications Biology 4, 244 (2021). https://doi.org/10.1038/s42003-021-01753-7Google ScholarGoogle Scholar
  55. rr development team. 2020. rr: Lightweight recording & deterministic debugging. Retrieved from https://rr-project.org.Google ScholarGoogle Scholar
  56. Kozo Sugiyama, Shojiro Tagawa, and Mitsuhiko Toda. 1981. Methods for visual understanding of hierarchical system structures. IEEE Trans. Syst. Man Cybernet. 11, 2 (1981), 109--125.Google ScholarGoogle ScholarCross RefCross Ref
  57. Steven L. Tanimoto. 1990. VIVA: A visual language for image processing. J. Visual Lang. Comput. 1, 2 (1990), 127--139.Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. Steven L. Tanimoto. 2013. A perspective on the evolution of live programming. In Proceedings of the 1st International Workshop on Live Programming. IEEE Press, 31--34.Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. Jan-Willem van de Meent, Brooks Paige, Hongseok Yang, and Frank Wood. 2018. An introduction to probabilistic programming. Retrieved from https://arXiv:1809.10756.Google ScholarGoogle Scholar
  60. Yentl Van Tendeloo, Simon Van Mierlo, and Hans Vangheluwe. 2019. A multi-paradigm modelling approach to live modelling. Softw. Syst. Model. 18, 5 (2019), 2821--2842.Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Reinhard Von Hanxleden, Björn Duderstadt, Christian Motika, Steven Smyth, Michael Mendler, Joaquín Aguado, Stephen Mercer, and Owen O’Brien. 2014. SCCharts: Sequentially constructive statecharts for safety-critical applications: HW/SW-synthesis for a conservative extension of synchronous statecharts. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation. 372--383.Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. Reinhard Von Hanxleden, Edward A. Lee, Christian Motika, and Hauke Fuhrmann. 2012. Multi-view modeling and pragmatics in 2020. In Proceedings of the Monterey Workshop (LNCS), Vol. 7539. Springer, 209--223.Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. Frank Wood, Jan Willem Meent, and Vikash Mansinghka. 2014. A new approach to probabilistic programming inference. In Proceedings of the 17th International Conference on Artificial Intelligence and Statistics (Proceedings of Machine Learning Research), Samuel Kaski and Jukka Corander (Eds.), Vol. 33. 1024--1032.Google ScholarGoogle Scholar
  64. Dirk Zimmer. 2008. Introducing Sol: A general methodology for equation-based modeling of variable-structure systems. In Proceedings of the 6th International Modelica Conference. 47--56.Google ScholarGoogle Scholar

Index Terms

  1. Interactive Programmatic Modeling

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    HTML Format

    View this article in HTML Format .

    View HTML Format
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!