Coder Social home page Coder Social logo

agda-summer-school's Introduction

Programming with Dependent Types

Getting Started

Prerequisites

  • Haskell Platform
  • Emacs
  • git

Installing Agda

  • cabal update
  • cabal install Agda
  • agda-mode setup

Getting the libraries

Set up Emacs paths

  • M-x agda2-mode
  • M-x customize-group agda2
  • Add the absolute path to agda-prelude/src to Include Dirs (do not remove "." from the list)

Check that it works

  • Open agda-summer-school/exercises/Lambda.agda in Emacs
  • Hit C-c C-l to type check
  • Hit C-c C-x C-c to compile
  • You should now have an executable Lambda in exercises/
  • Run ./Lambda example.lam. This should print a desugared lambda term and the result of running it through the SECD machine.

Exercises

Resources

  • Agda Wiki
  • Mailing list
  • IRC channel #agda on freenode
  • doc/AgdaCheatSheet.agda contains a number of small examples showing some of the features of Agda.
  • doc/EmacsCheatSheet.html lists the most commonly used Emacs mode commands.
  • Browse the library. Use M-. or middle mouse to jump to the definitions of library functions.

Day 1

  • exercises/Lists.agda
  • Bonus: exercises/Grep.agda

Day 2

  • exercises/Term.agda
  • exercises/Term/Eval.agda
  • exercises/TypeCheck.agda

Day 3

  • Copy exercises/SECD/Unchecked.agda to exercises/SECD/StackSafe.agda and add types to ensure stack safety.
  • Copy your stack safe SECD machine to exercises/SECD/TypeSafe.agda and add type safety (running well-typed terms).
  • Change the compiler in exercises/SECD/Compiled.agda to compile well-typed terms and adapt your type safe SECD machine to run the compiled terms.
  • Bonus (hard): Track semantics in the types. In the end you should have a run function that is guaranteed to compute a value corresponding to eval t for an input term t.

Day 4

  • Add more features to the lambda calculus (natrec, booleans, ...).
  • Invent your own exercises.

agda-summer-school's People

Contributors

ignoredambience avatar ulfnorell avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.