Algebra of programming in Agda: Dependent types for relational program derivation

被引:23
|
作者
Mu, Shin-Cheng [1 ]
Ko, Hsiang-Shang [2 ]
Jansson, Patrik [3 ,4 ]
机构
[1] Acad Sinica, Inst Informat Sci, Taipei, Taiwan
[2] Natl Taiwan Univ, Dept Comp Sci & Informat Engn, Taipei, Taiwan
[3] Chalmers Univ Technol, Dept Comp Sci & Engn, Gothenburg, Sweden
[4] Univ Gothenburg, Gothenburg, Sweden
关键词
D O I
10.1017/S0956796809007345
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Relational program derivation is the technique of stepwise refining a relational specification to a program by algebraic rules. The program thus obtained is correct by construction. Meanwhile, dependent type theory is rich enough to express various correctness properties to be verified by the type checker. We have developed a library, AoPA (Algebra of Programming in Agda), to encode relational derivations in the dependently typed programming language Agda. A program is Coupled with an algebraic derivation whose correctness is guaranteed by the type system. Two non-trivial examples are presented: an optimisation problem and a derivation of quicksort in which well-founded recursion is used to model terminating hylomorphisms in a language with inductive types.
引用
收藏
页码:545 / 579
页数:35
相关论文
共 50 条
  • [31] Safe Functional Reactive Programming through Dependent Types
    Sculthorpe, Neil
    Nilsson, Henrik
    ACM SIGPLAN NOTICES, 2009, 44 (8-9) : 23 - 34
  • [32] Safe Functional Reactive Programming through Dependent Types
    Sculthorpe, Neil
    Nilsson, Henrik
    ICFP'09: PROCEEDINGS OF THE 2009 ACM SIGPLAN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, 2009, : 23 - 34
  • [33] The implicit calculus of constructions as a programming language with dependent types
    Barras, Bruno
    Bernardo, Bruno
    FOUNDATIONS OF SOFTWARE SCIENCE AND COMPUTATIONAL STRUCTURES, PROCEEDINGS, 2008, 4962 : 365 - +
  • [34] Secure distributed programming with value-dependent types
    Swamy, Nikhil
    Chen, Juan
    Fournet, Cedric
    Strub, Pierre-Yves
    Bhargavan, Karthikeyan
    Yang, Jean
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2013, 23 (04) : 402 - 451
  • [35] Competition's Effects on Programming Diversity of Different Program Types
    Park, Sora
    JMM-INTERNATIONAL JOURNAL ON MEDIA MANAGEMENT, 2005, 7 (1-2): : 39 - 54
  • [36] Modeling of frequency dependent line by means of algebra processing program
    Doshisha Univ, Japan
    Proc Univ Power Eng Conf, (521-524):
  • [37] Practical programming with higher-order encodings and dependent types
    Poswolsky, Adam
    Schurmann, Carsten
    PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2008, 4960 : 93 - +
  • [38] Shape-Constrained Array Programming with Size-Dependent Types
    Bailly, Lubin
    Henriksen, Troels
    Elsman, Martin
    PROCEEDINGS OF THE 11TH ACM SIGPLAN INTERNATIONAL WORKSHOP ON FUNCTIONAL HIGH-PERFORMANCE AND NUMERICAL COMPUTING, FHPNC 2023, 2023, : 29 - 41
  • [39] Modeling of frequency-dependent lines and cables by means of algebra processing program
    Nagaoka, N
    Ametani, A
    2000 IEEE POWER ENGINEERING SOCIETY WINTER MEETING - VOLS 1-4, CONFERENCE PROCEEDINGS, 2000, : 2664 - 2669
  • [40] The IDRIS Programming Language Implementing Embedded Domain Specific Languages with Dependent Types
    Brady, Edwin
    CENTRAL EUROPEAN FUNCTIONAL PROGRAMMING SCHOOL, CEFP 2013, 2015, 8606 : 115 - 186