综合技术

Type Systems as Macros

微信扫一扫,分享到朋友圈

Type Systems as Macros
0 0

Type Systems as Macros .

Stephen Chang, Alex Knauth, Ben Greenman.

44th ACM SIGPLAN Symposium on Principles of Programming Languages (POPL) , Paris, France, January 18-20, 2017 (to appear).

[pdf|  code repo | artifact instructions,VirtualBox image (2.1GB) ]

We present Turnstile, a metalanguage for creating typed embedded languages. To implement the type system, programmers write type checking rules resembling traditional judgment syntax. To implement the semantics, they incorporate elaborations into these rules. Turnstile critically depends on the idea of linguistic reuse. It exploits a macro system in a novel way to simultaneously type check and rewrite a surface program into a target language. Reusing a macro system also yields modular implementations whose rules may be mixed and matched to create other languages. Combined with typical compiler and runtime reuse, Turnstile produces performant typed embedded languages with little effort.

Installing Turnstile

You must have
Racket installed to use Turnstile.

  • To install Turnstile, from the racket bin directory, run:
    raco pkg install turnstile --auto
  • Or from DrRacket, choose File->Install Package and enter "turnstile"

Turnstile documentation

Artifact Instructions

VM Image (recommended)

  • Download VirtualBox
  • Download theartifact image (2.1GB)
  • Open the VirtualBox viewer, choose File->Import Appliance , select the downloaded .ova file, and start the VM.
  • Open README.html on the Desktop and follow its instructions.

Manual Installation (only if VM is malfunctioning)

  • Download and install Racket 6.6.
  • Clone the repository into the directory popl2017 (or any directory):
    git clone https://bitbucket.org/stchang/macrotypes popl2017
  • Change directory to the repository root:
    cd popl2017
  • From the repository root, install Turnstile (~30min-1hr):
    raco pkg install --auto
  • Register the documentation:
    raco setup --doc-index
  • From the repository root, change to the artifact directory:
    cd artifact
  • Build the README file:
    make readme
  • Open the produced README.html file and follow the contained instructions.

Home

阅读原文...

Lobsters

为什么你学不会递归?告别递归,谈谈我的一些经验

上一篇

Facebook and YouTube rush to remove New Zealand shooting footage

下一篇

您也可能喜欢

评论已经被关闭。

插入图片
Type Systems as Macros

长按储存图像,分享给朋友