Thu Mar 14 15:15:41 EDT 2013

FLUNK presentation


  - A/V DSP, graphics, generic numerical.

  - Systems programming: Linux & embedded uC

  - Student of programming language design & embedded DSLs.

  - Racket projects:

    - Staapl:
      metaprogramming for PIC, based on Forth & Scheme

    - DSP code gen (work in progress).

  - Haskell projects:

    - Metaprogramming experiments

    - Visual Poem.

Abstract interpretation
FLUNK 2013-03-13

  - Informal/practical:

    -> multiple interpretations of a programming language.

    -> main purpose: program analysis

  - Formal Mathematical framework exists:

    -> Cousot, ordered sets

  - Basic idea: abstract syntax / abstract interpretation is based
    on maps from semantics to evaluators:

      (define program
        (lambda (add mul)  ;; Semantics
          (lambda (a b)
             (let ((a2 (mul a a))
                   (b2 (mul b b)))
               (add a2 b2)))))

    For creating DSLs, this approach allows re-use of the embedding
    language's name binding structure (i.e. lambda expression /
    lexical scope) to represent syntax as code instead of data.

    Basic engineering principle: re-use.
    In this case, re-use of the idea of "variable".

    Evaluators are constructed by passing concrete semantics to
    abstract syntax.

       (define program-eval (program + *))

       (define program-compile
          (program (lambda (a b) `(+ ,a ,b))
                   (lambda (a b) `(* ,a ,b))))

  - Representations:

    -> Basic: based on lambda expressions.

    -> Haskell: type classes.

    -> Racket: "environment monad" style syntactic abstraction.

  - Application: AI for Audio DSP.

    - Problem: 
      - C/C++/Fortran/ASM is necessary for efficiency.

      - Too low level: structure iherent in to code is lost.

      - AI allows to capture structure that is present in original
        syntax to perform code analysis.

      - AI avoids "manual compilation", e.g. translation from high
        level mathematical model to C code.

    - RAI (Racket Abstract Interpratation):
      Basic language:

      - purely functional stream processing language

      - support for output feedback / state space models

    - Interpretations:

      - Evaluation to (inefficient) Scheme program for quick
        manual prototyping at command line + unit tests.

      - Evaluation to typed SSA form
        -> Converts to C program / LLVM code.
           -> Compiles to machine code

      - Automatic differentiation (dual numbers)

      - Linear frequency domain transfer function.

      - Constraint satisfaction / logic programming.
        Convert syntax to racklog program