Dependently-Typed Programming in Scientific Computing - Examples from Economic Modelling

Computer simulations are essential in virtually every scientific discipline, even more so in those such as economics or climate change where the ability to make laboratory experiments is limited. Therefore, it is important to ensure that the models are implemented correctly, that they can be re-implemented and that the results can be reproduced. Typically, though, the models are described by a mixture of prose and mathematics which is insufficient for these purposes. We argue that using dependent types allows us to gradually reduce the gap between the mathematical description and the implementation, and we give examples from economic modelling. We discuss the consequences that our incremental approach has on programming style and the requirements it imposes on the dependently-typed programming languages used.

[1]  Sean R Eddy,et al.  What is dynamic programming? , 2004, Nature Biotechnology.

[2]  Samson Abramsky,et al.  Handbook of logic in computer science. , 1992 .

[3]  Edwin Brady,et al.  Correct-by-Construction Concurrency: Using Dependent Types to Verify Implementations of Effectful Resource Usage Protocols , 2010, Fundam. Informaticae.

[4]  Wouter Swierstra A Hoare Logic for the State Monad , 2009, TPHOLs.

[5]  Jan M. Smith,et al.  Martin-Löf's type theory , 2001, LICS 2001.

[6]  Michael R. Genesereth,et al.  Introduction to Logic, Second Edition , 2013, Introduction to Logic.

[7]  Edsger W. Dijkstra,et al.  A constructive approach to the problem of program correctness , 1968 .

[8]  Vladik Kreinovich,et al.  Designing, Understanding, and Analyzing Unconventional Computation: The Important Role Of Logic And Constructive Mathematics , 2011 .

[9]  Herbert Gintis,et al.  The Emergence of a Price System from Decentralized Bilateral Exchange , 2006 .

[10]  Shin-Cheng Mu,et al.  Algebra of programming in Agda: Dependent types for relational program derivation , 2009, J. Funct. Program..

[11]  Raymond Turner,et al.  Computable Models , 2009, J. Log. Comput..

[12]  Simon Thompson,et al.  Type theory and functional programming , 1991, International computer science series.

[13]  Kenneth Foster,et al.  New math , 2009, IEEE Spectrum.

[14]  Pelle Evensen,et al.  An Extensible and Scalable Agent-Based Simulation of Barter Economics , 2010 .

[15]  Shin-Cheng Mu,et al.  Dependently typed programming , 2013 .

[16]  K. Vela Velupillai,et al.  Algorithmic foundations of computable general equilibrium theory , 2006, Appl. Math. Comput..

[17]  L. Walras Elements of Pure Economics, or The Theory of Social Wealth , 1955 .

[18]  Kumaraswamy Velupillai,et al.  Computable Economics: The Arne Ryde Memorial Lectures , 2000 .

[19]  K. Vela Velupillai,et al.  Taming The Incomputable, Reconstructing The Nonconstructive And Deciding The Undecidable In Mathematical Economics , 2012 .

[20]  Jan M. Smith,et al.  Propositions and specifications of programs in Martin-Löf's type theory , 1984, BIT.

[21]  Bengt Nordström,et al.  Programming in Martin-Löf's Type Theory , 1990 .

[22]  Per Martin-Löf,et al.  Constructive mathematics and computer programming , 1984 .

[23]  Dimitri P. Bertsekas,et al.  Dynamic Programming and Optimal Control, Two Volume Set , 1995 .

[24]  Simon J. Thompson,et al.  Are Subsets Necessary in Martin-Löf Type Theory? , 1992, Constructivity in Computer Science.