Lecture 2

来源:互联网 发布:专业软件开发培训中心 编辑:程序博客网 时间:2024/04/29 13:17

Round 1:

今天的题目是 Domain Specific Embedded Languages


  • 正式上课之前,Patrik讲了一下 Signal的代码实现,对其中 unSig的部分我不是特别理解,其他部分都还可以


  • DSEL: Aset of types modelling concepts in the domain
  1. Combinators: combing and modifying elements
  2. Run functions: making observations
  3. Constructor functions : constructing element
  • Deep & Shallow embedding


然后就是以Shape为例的Deep & Shallow embedding



关于这两个的区别还需要深入了解

 

 

 


 


Round 2:


真的怀疑老师有超常的记忆,这次上课还是以signal开始的,呵呵。

感觉还是有点云山雾罩的,虽然肯定不像去年一样需要挣扎在睡与不睡之间~~

 

  • primitive operation & derived operation
  • shallow embedding & deep embedding:
    In shallow embedding, it is much easier to write a run function because it is more close to the semantics and most of the work should be done by construction part. 这个不是绝对的,有时候两个run function可能是完全不同的概念有完全不同的朝向。
    In deep embedding, the constructor does less, run function does the major job. It is more like an interpreter for the language.
  • GADT:generalized abstract data type. 理论上第一次见到GADT的实例