Skip to main content ITU
Logo
  • Programmes
    • BSc Programmes
    • BSc in Global Business Informatics
    • BSc in Digital Design and Interactive Technologies
    • BSc in Software Development
    • BSc in Data Science
    • Applying for a BSc programme
    • MSc Programmes
    • MSc in Digital Innovation & Management
    • MSc in Digital Design and Interactive Technologies
    • MSc in Software Design
    • MSc in Data Science
    • MSc in Computer Science
    • MSc in Games
    • Applying for an MSc programme
    • Student Life
    • Practical information for international students
    • Ask a student
    • Women in tech
    • Student organisations at ITU
    • Study start
    • Labs for students
    • Special Educational Support (SPS)
    • Study and Career Guidance
    • Exchange student
    • Become an exchange student
    • Guest Students
    • Who can be a guest student?
    • ITU Summer University
    • Open House
    • Open House - BSc programmes
    • Open House - MSc programmes
  • Professional Education
    • Master in IT Management
    • Master in IT Management
    • Admission and entry requirements
    • Contact
    • Single Subjects
    • About single subjects
    • Admission and entry requirements
    • Contact
    • Short courses | ITU Professional Courses
    • See all short courses
    • Contact
    • Contact
    • Contact us here
  • Research
    • Sections
    • Data Science
    • Data, Systems, and Robotics
    • Digital Business Innovation
    • Digitalization Democracy and Governance
    • Human-Computer Interaction and Design
    • Play Culture and AI
    • Software Engineering
    • Technologies in Practice
    • Theoretical Computer Science
    • Research Centres
    • Centre for Digital Play
    • Center for Climate IT
    • Center for Computing Education Research
    • Centre for Digital Welfare
    • Centre for Information Security and Trust
    • Research Centre for Government IT
    • Danish Institute for IT Program Management
    • Research entities
    • Research centers
    • Sections
    • Research groups
    • Labs
    • ITU Research Portal
    • Find Researcher
    • Find Research
    • Research Ethics and Integrity
    • Good Scientific Practice
    • Technical Reports
    • Technical Reports
    • PhD Programme
    • About the PhD Programme
    • PhD Courses
    • PhD Defences
    • PhD Positions
    • Types of Enrolment
    • PhD Admission Requirements
    • PhD Handbook
    • PhD Support
  • Collaboration
    • Collaboration with students
    • Project collaboration
    • Project Market
    • Student worker
    • Project postings
    • Job and Project bank
    • Employer Branding
    • IT Match Making
    • Hiring an ITU student or graduate
    • Make a post in the job bank
    • Research collaboration
    • Read more about research collaboration at ITU
    • Industrial PhD
    • Hire an Industrial PhD
    • Maritime Hub
    • Innovation and entrepreneurship
    • ITU Business Development
    • ITU NextGen
  • About ITU
    • About ITU
    • Press
    • Vacancies
    • Contact
  • DK
PhD Programme
ITU  /  Research  /  PhD Programme  /  Courses  /  Archive  /  2013  /  PhD Course in Dependently Typed Functional Programming with Idris
  • Research
    • Research Sections
    • Research Ethics and Integrity
    • Good Scientific Practice
    • Research centers
    • Research groups
    • Labs
    • Technical Reports
    • PhD Programme
      • About the PhD Programme
      • Courses
        • 2025
        • 2024
        • Archive
          • 2023
          • 2022
          • 2021
          • 2020
          • 2019
          • 2018
          • 2017
          • 2016
          • 2015
          • 2014
          • 2013
            • PhD Course - Games and Subjectivity
            • PhD Course - Readings in Database Systems
            • PhD Course - Technological and Political Ontologies
            • PhD Course - Writing Process Re-engineering
            • PhD Course in Dependently Typed Functional Programming with Idris
              • PhD Course on Advanced process Calculi
              • PhD Course on The art of writing and reviewing papers
              • PhD reading group - STS literature
            • 2012
            • 2011
            • 2010
        • Defences
        • PhD Positions
        • Types of Enrolment
        • PhD Admission Requirements
        • Handbook
        • PhD Support

    PhD Course in Dependently Typed Functional Programming with Idris

    Organiser:
    Edwin Brady, University of St Andrews

    Website:
    Can be found here.

    Lecturer:
    Edwin Brady.

    Dates of the course:
    March 11, 12, 14 and 15, 2013.

    Time:
    Lecture 13:00-14:30, exercises 15:00-16:00.

    Room:
    TBA.

    Course Description:
    Dependently typed functional programming has been an active area of research in programming
    languages for some time now. Edwin Brady, one of the leading researchers in the field, will provide
    an introduction to dependently typed functional programming using the Idris language. Topics to be
    covered include:

    • Language features such as dependent pattern matching, tactic-based proof scripts, and totality checking
    • Embedded domain-specific languages in Idris, including the unique techniques enabled by the presence of dependent types
    • Managing different kinds of effects without the inconvenience of Haskell's monad transformers
    • How to efficiently implement a dependently typed language, including an detailed discussion of the Idris typechecker and compiler.

    The topics will be illustrated with examples and there will be exercise sessions following each
    lecture.

    Program:
    Lecture 1: A tour of Idris – Monday, 11 March, 13:00-14:30

    • How to install
    • Why dependent types?
      • Functional and extra functional correctness
      • Verification
      • Generic programming
      • A survey of dependently typed programming languages - why Idris?
    • Introductory examples
      • Vectors
      • Finite sets
      • Heterogeneous lists
    • Theorem proving
      • Properties of Nat
      • Inductive proofs and tactic scripts
      • Totality checking
      • Default arguments
    • A quick tour of language features
      • Case, problems with dependent case
      • The with rule
      • Extended example: Binary arithmetic

    Advanced reading: E. Brady: Programming in Idris: a Tutorial (2013)

    Exercise Session 1: Monday, 11 March, 15:00-16:00

    Lecture 2: Embedded Domain Specific Languages – Tuesday, 12 March, 13:00-14:30

    • What is a domain specific language?
      • A brief history of programming languages and abstractions
    • Example: A well-typed interpreter, and some programs
    • Syntactic support for DSLs:
      • Syntax rules - if/then/else, bindings (e.g. for), pattern/term syntax
      • DSL notation
    • Interlude: System interaction
      • Foreign functions, C bindings
      • Example: File IO
    • Resource aware programming
      • What is a resource?
      • A DSL for resource management

    Advance reading:
    E. Brady and K. Hammond: A verified staged interpreter is a verified compiler
    (2006)

    E. Brady and K. Hammond: Resource-safe Systems Programming with Embedded Domain
    Specific Languages (2012)

    Exercise Session 2: Tuesday, 12 March, 15:00-16:00

    Lecture 3: Effect management – Thursday, 14 March, 13:00-14:30

    • The Haskell Approach: Monads
      • A monadic evaluator
      • Problems with monad transformers
    • Algebraic effects
      • State, IO, Exceptions, Random numbers
      • Eff: An Embedded DSL for effect management
      • Writing handlers for effects
      • Example: a stateful and effectful evaluator
    • The Eff interpreter
      • Tracking resources
      • Simple automated theorem proving
      • Syntactic sugar
    • Advanced examples:
      • Reasoning about effects and resource usage
      • Multithreading

    Advance reading:
    E. Brady and K. Hammond: Resource-safe Systems Programming with Embedded Domain
    Specific Languages (2012)

    A. Bauer and M. Pretnar: Programming with Algebraic Effects and Handlers (2012)

    Exercise Session 3: Thursday, 14 March, 15:00-16:00

    Lecture 4: Implementing a Dependently Typed Language – Friday, 15 March, 13:00-14:30

    • The Core Type Theory (TT) and its metatheory
      • Properties
      • Typing rules
    • Tactics and elaboration
      • The development calculus
      • The Elaboration monad
      • Primitive tactics
      • Elaborating data types and functions
      • Elaborating high level constructs: where, with, case, type classes
    • Compilation
      • Phase distinctions
      • Forcing, collapsing and type erasure
      • Partial evaluation

    Advance reading:
    E. Brady, C. McBride and J. McKinna: Inductive Families Need Not Store Their
    Indices (2004)

    E. Brady and K. Hammond: Scrapping your Inefficient Engine: Using Partial
    Evaluation to Improve Domain-Specific Language Implementation

    Exercise Session 4: Friday, 15 March, 15:00-16:00

    Exercises will cover the following:

    • vector equivalents of list functions (e.g. take, drop)
    • matrix multiplication
    • length preserving sort
    • permutation preserving sort
    • well-typed interpreter: adding features
    • build a mini imperative DSL, with assignment, while, for
    • making new effects - nondeterminism, cgi, OS/interaction, multithreading

    Prerequisites:
    Participants should be familiar with a functional programming language and the notion of pure
    functional programming.

    Exam:
    Evaluation will be on a pass/fail basis, and the requirement for passing is active participation in the
    lectures, discussions and exercises.

    Credits:
    4 ECTS

    Amount of hours the student is expected to use on the course:
    Participation: 12
    Preparation: 6

     

    Contact us

    Phone
    +45 7218 5000
    E-mail
    itu@itu.dk

    All contact information

    Web Accessibility Statement

    Find us

    IT University of Copenhagen
    Rued Langgaards Vej 7
    DK-2300 Copenhagen S
    Denmark
    How to get here

    Follow us

    ITU Student /
    Privacy /
    EAN-nr. 5798000417878/
    CVR-nr. 29 05 77 53 /
    P-nummer 1005162959

    This page is printed from https://itu.dk/404