├── .gitignore
├── .io.livecode.ch
├── _site
│ ├── big-step
│ │ └── index.html
│ ├── index.html
│ ├── repeat
│ │ ├── all.elf
│ │ ├── index.html
│ │ └── sources.cfg
│ └── run
│ │ └── index.html
├── defaults.json
├── install
└── run
├── README.md
├── dev2013
├── build.sbt
├── dot.elf
├── dot1.elf
├── dot10.elf
├── dot11.elf
├── dot12.elf
├── dot13.elf
├── dot2.elf
├── dot3.elf
├── dot4.elf
├── dot5.elf
├── dot6.elf
├── dot7.elf
├── dot8.elf
├── dot9.elf
├── ex1.elf
├── ex2.elf
├── ex3.elf
├── ex4.elf
├── ex5.elf
├── ex6.elf
├── ex7.elf
├── ex8.elf
├── minilf1.scala
├── minilf2.scala
├── rules10.txt
├── rules7.txt
├── rules8.txt
├── rules9.txt
├── rulesInf.txt
├── s.txt
├── sources.cfg
├── test1.elf
├── test10.elf
├── test11.elf
├── test11.elfx
├── test12.elf
├── test12.elfx
├── test12z.elf
├── test13.elf
├── test14.elf
├── test15.elf
├── test15p.elf
├── test15q.elf
├── test15r.elf
├── test15s.elf
├── test15z.elf
├── test16.elf
├── test17.elf
├── test17b.elf
├── test17c.elf
├── test18a.elf
├── test18b.elf
├── test19.elf
├── test19b.elf
├── test2.elf
├── test20.elf
├── test20a.elf
├── test20b.elf
├── test20c.elf
├── test20d.elf
├── test20y.elf
├── test20z.elf
├── test21a.elf
├── test21b.elf
├── test22.elf
├── test22a.elf
├── test22b.elf
├── test22c.elf
├── test22d.elf
├── test22e.elf
├── test22f.elf
├── test23.elf
├── test24.elf
├── test24a.elf
├── test24b.elf
├── test24c.elf
├── test24d.elf
├── test25.elf
├── test25a.elf
├── test26.elf
├── test27a.elf
├── test27b.elf
├── test28.elf
├── test28a.elf
├── test3.elf
├── test3a.elf
├── test3y.elf
├── test3z.elf
├── test3zz.elf
├── test4.elf
├── test5.elf
├── test6.elf
├── test7.elf
├── test8.elf
└── test9.elf
├── dev2014
├── fsub-mini1a.elf
├── fsub-mini1b.elf
├── fsub-mini1c.elf
├── fsub-mini1d.elf
├── fsub-mini1e-subsumption.elf
├── fsub-mini1e.elf
├── fsub-mini1f.elf
├── fsub-mini1g.elf
├── fsub-mini1h.elf
├── fsub-mini2.elf
├── fsub-mini3.elf
├── fsub-orig.elf
├── fsub1a.elf
├── leon-quines.scala
├── leon-stlc1.scala
├── leon-stlc2-subtp.scala
├── leon-wip.scala
├── leon-wip2.scala
├── leon-wip3.scala
├── micro.elf
├── mini.elf
├── mini1_ok_reg.elf
├── mini2a1.elf
├── mini2a2.elf
├── mini2a3.elf
├── mini2b.elf
├── mudot1.elf
├── mudot2.elf
├── mudot2a.elf
├── mudot2b.elf
├── mudot2c.elf
├── mudot3.elf
├── mudot4.elf
├── mudot5.elf
├── mudot6.elf
├── mudot7.elf
├── mudot8.elf
├── mudot9.elf
├── self1.elf
├── sources.cfg
├── stlc1.elf
├── stlc2-full-safety.elf
├── stlc3-subtp.elf
├── test-naming-ok3.elf
├── test-naming-ok4.elf
├── test-naming.elf
├── test-naming1.elf
├── test-naming2.elf
├── test-naming3.elf
└── test-naming4.elf
├── dev2015
├── README.md
├── SfLib.v
├── dot-smallstep1.v
├── dot-smallstep2.v
├── dot-smallstep3.v
├── dot-smallstep3a.v
├── dot-smallstep3b.v
├── dot-smallstep3c.v
├── dot-smallstep4.v
├── dot-smallstep5.v
├── dot-smallstep6.v
├── dot-stp-single1.v
├── dot-stp-single2.v
├── dot-stp-single3.v
├── dot10.v
├── dot11-wip.v
├── dot12.v
├── dot13.v
├── dot14.v
├── dot15.v
├── dot16.v
├── dot17.v
├── dot18.v
├── dot19.v
├── dot2.v
├── dot20.v
├── dot21.v
├── dot22.v
├── dot23.v
├── dot24.v
├── dot25-wip.v
├── dot26.v
├── dot27.v
├── dot28.v
├── dot29.v
├── dot3.v
├── dot30-wip.v
├── dotb.v
├── fsub0.v
├── fsub1.v
├── fsub2.v
├── fsub3.v
├── fsub4-strong.v
├── fsub4.v
├── fsub5.v
├── nano0.v
├── nano1.v
├── nano2.v
├── nano3.v
├── nano4-1-smallstep.v
├── nano4-1-smallstep0.v
├── nano4-1.v
├── nano4-2.v
├── nano4-3.v
├── nano4-4.v
├── nano4-5.v
├── nano4-6.v
├── nano4-7.v
├── nano4-8.v
├── nano4.v
├── singletons.v
├── singletons1.v
├── singletons2.v
├── sms-singletons0-latest-wip.v
├── sms-singletons0.v
├── sms-singletons1-wip.v
├── sms-singletons2-wip.v
├── stp-singletons0.v
└── stp-singletons1.v
├── dev2016
├── .dir-locals.el
├── README.md
├── SfLib.v
├── dot.v
├── dot_exs.v
├── dot_norec_storeless.v
├── dot_storeless.v
├── dot_storeless_exs.v
├── dot_storeless_tidy.v
├── dot_storeless_tidy_exs.v
├── dsub.v
├── dsub_bot.v
├── dsub_bot_untidy.v
├── dsub_fulldep.v
├── fsub-equiv.v
├── fsub.v
├── fsub0.v
├── fsub0_bot.v
├── fsub0_exn.v
├── fsub0_mut.v
├── fsub_bot.v
├── fsubsup.v
├── pot.v
├── pot_storeless.v
└── stlc-equiv.v
├── dev2017
├── dsub-total3.v
├── dsubsup-nontotal1.v
├── dsubsup-nontotal2.v
├── dsubsup-total1-broken.v
├── dsubsup-total1.v
├── dsubsup-total2-broken.v
├── dsubsup-total3.v
├── dsubsup-total5.v
├── dsubsup-total6.v
├── dsubsup-withbind_total1-wip.v
├── dsubsup-withbind_total2-wip.v
├── dsubsup-withbind_total3-wip.v
├── dsubsup-withbind_total4-wip.v
├── dsubsup-withbind_total5.v
├── dsubsup-withbind_total6-broken.v
├── dsubsup-withbind_total7-broken.v
├── dsubsup-withbind_total8-wip.v
├── dsubsup-withbind_total9-broken.v
├── nano0-total-lr-tricky.v
├── nano0-total-lr.v
├── nano0-total-silr.v
├── nano0-total.v
├── nano4-total.v
├── nano4-total1-wip.v
├── nano_total_withStore.v
└── nano_total_withStore3b-wip.v
├── dev2019
├── SfLib.v
├── dsubsup_total.v
├── dsubsup_total_positive_rec.v
├── dsubsup_total_rec.v
├── dsubsup_total_rec_exp_tsel.v
├── dsubsup_total_rec_exp_tsel_new_env.v
├── stlc0.v
├── stlc1.v
└── stlc_combined.v
├── dev2020
├── dsubsup_cc
│ ├── .gitignore
│ ├── README.md
│ ├── cc_meta.v
│ ├── coq.v
│ ├── languages.v
│ ├── languages_o2.v
│ ├── languages_x1.v
│ ├── languages_x2.v
│ └── translation.v
├── dsubsup_rec_sn_ecoop.v
└── shallow.v
├── dev2022
└── nano0_total_silr.v
├── doc2014
├── bcprules.sty
├── dot_macros.tex
├── industry.png
├── lub1.png
├── lub2.png
├── math.sty
├── minted.sty
├── prooftree.sty
└── slides.tex
├── doc2015
├── bcprules.sty
├── dot_macros.tex
├── dot_macros2.tex
├── figures.pptx
├── fool.pdf
├── industry.png
├── lub1.png
├── lub2.png
├── macros.tex
├── minted.sty
├── slides.pdf
└── slides.tex
├── ecoop17
├── Makefile
├── README.md
├── SfLib.v
├── dsubsup_total.v
└── dsubsup_total_rec.v
├── old
├── bin
│ ├── ok.sh
│ ├── sync.awk
│ ├── tex.sh
│ └── twelf2tex.py
├── build.sbt
├── cln
│ ├── .dir-locals.el
│ ├── MuDot.v
│ ├── MuDotA.v
│ ├── MuDotX.v
│ ├── MuDotX0.v
│ ├── MuDotX1.v
│ ├── MuDotX2.v
│ └── MuDotX3.v
├── mud
│ ├── dot-bot.elf
│ ├── dot-ext1.elf
│ ├── dot-naming-wip-xx1.elf
│ ├── dot-naming-wip.elf
│ ├── dot-stp2.elf
│ ├── dot-var.elf
│ ├── dot-xp.elf
│ ├── dot-xt.elf
│ ├── dot.elf
│ ├── dot0.elf
│ ├── dot_appvar.elf
│ ├── dotb.elf
│ ├── dotr.elf
│ ├── pico-hsub.elf
│ ├── pico-nosub.elf
│ ├── sources.cfg
│ ├── stp-ident.elf
│ ├── xxxx.elf
│ ├── xxxx2.elf
│ └── xxxx3.elf
├── src
│ ├── main
│ │ ├── elf
│ │ │ ├── b1.dot.check.elf
│ │ │ ├── b1ok.dot.check.elf
│ │ │ ├── b2.dot.check.elf
│ │ │ ├── b3.dot.check.elf
│ │ │ ├── b3ok.dot.check.elf
│ │ │ ├── b4.dot.check.elf
│ │ │ ├── b4a.dot.check.elf
│ │ │ ├── b4ok.dot.check.elf
│ │ │ ├── c1.dot.check.elf
│ │ │ ├── c1a.dot.check.elf
│ │ │ ├── c1aa.dot.check.elf
│ │ │ ├── c1b.dot.check.elf
│ │ │ ├── c1c.dot.check.elf
│ │ │ ├── c1d.dot.check.elf
│ │ │ ├── c1ok.dot.check.elf
│ │ │ ├── dot.elf
│ │ │ ├── e1.dot.check.elf
│ │ │ ├── e10.dot.check.elf
│ │ │ ├── e11.dot.check.elf
│ │ │ ├── e11c.dot.check.elf
│ │ │ ├── e11ok.dot.check.elf
│ │ │ ├── e12.dot.check.elf
│ │ │ ├── e13.dot.check.elf
│ │ │ ├── e14.dot.check.elf
│ │ │ ├── e15.dot.check.elf
│ │ │ ├── e16.dot.check.elf
│ │ │ ├── e16n.dot.check.elf
│ │ │ ├── e16o.dot.check.elf
│ │ │ ├── e17.dot.check.elf
│ │ │ ├── e18.dot.check.elf
│ │ │ ├── e19.dot.check.elf
│ │ │ ├── e2.dot.check.elf
│ │ │ ├── e20.dot.check.elf
│ │ │ ├── e21c.dot.check.elf
│ │ │ ├── e22.dot.check.elf
│ │ │ ├── e22a.dot.check.elf
│ │ │ ├── e22b.dot.check.elf
│ │ │ ├── e22c.dot.check.elf
│ │ │ ├── e22d.dot.check.elf
│ │ │ ├── e22e.dot.check.elf
│ │ │ ├── e22f.dot.check.elf
│ │ │ ├── e22g.dot.check.elf
│ │ │ ├── e22h.dot.check.elf
│ │ │ ├── e22i.dot.check.elf
│ │ │ ├── e22j.dot.check.elf
│ │ │ ├── e23.dot.check.elf
│ │ │ ├── e24.dot.check.elf
│ │ │ ├── e25.dot.check.elf
│ │ │ ├── e26.dot.check.elf
│ │ │ ├── e27.dot.check.elf
│ │ │ ├── e27a.dot.check.elf
│ │ │ ├── e27b.dot.check.elf
│ │ │ ├── e27c.dot.check.elf
│ │ │ ├── e27d.dot.check.elf
│ │ │ ├── e27e.dot.check.elf
│ │ │ ├── e27f.dot.check.elf
│ │ │ ├── e27g.dot.check.elf
│ │ │ ├── e27h.dot.check.elf
│ │ │ ├── e27i.dot.check.elf
│ │ │ ├── e27j.dot.check.elf
│ │ │ ├── e27k.dot.check.elf
│ │ │ ├── e27l.dot.check.elf
│ │ │ ├── e27m.dot.check.elf
│ │ │ ├── e27n.dot.check.elf
│ │ │ ├── e28.dot.check.elf
│ │ │ ├── e28a.dot.check.elf
│ │ │ ├── e3.dot.check.elf
│ │ │ ├── e4.dot.check.elf
│ │ │ ├── e5.dot.check.elf
│ │ │ ├── e6.dot.check.elf
│ │ │ ├── e7.dot.check.elf
│ │ │ ├── e8.dot.check.elf
│ │ │ ├── e9.dot.check.elf
│ │ │ ├── ex_cow.dot.check.elf
│ │ │ ├── ex_list.dot.check.elf
│ │ │ ├── ex_nat.dot.check.elf
│ │ │ ├── ex_nat_anf.dot.check.elf
│ │ │ ├── ex_nat_church.dot.check.elf
│ │ │ ├── ex_nat_church_a.dot.check.elf
│ │ │ ├── ex_nat_church_b.dot.check.elf
│ │ │ ├── ex_nat_church_c.dot.check.elf
│ │ │ ├── ex_nat_church_d.dot.check.elf
│ │ │ ├── ex_nat_church_e.dot.check.elf
│ │ │ ├── ex_norec_nat.dot.check.elf
│ │ │ ├── ex_norec_nat_a.dot.check.elf
│ │ │ ├── p1.dot.check.elf
│ │ │ ├── p10.dot.check.elf
│ │ │ ├── p11.dot.check.elf
│ │ │ ├── p12.dot.check.elf
│ │ │ ├── p12a.dot.check.elf
│ │ │ ├── p12b.dot.check.elf
│ │ │ ├── p12c.dot.check.elf
│ │ │ ├── p13.dot.check.elf
│ │ │ ├── p13a.dot.check.elf
│ │ │ ├── p14.dot.check.elf
│ │ │ ├── p1i.dot.check.elf
│ │ │ ├── p2.dot.check.elf
│ │ │ ├── p2c.dot.check.elf
│ │ │ ├── p3.dot.check.elf
│ │ │ ├── p4.dot.check.elf
│ │ │ ├── p5.dot.check.elf
│ │ │ ├── p6.dot.check.elf
│ │ │ ├── p6a.dot.check.elf
│ │ │ ├── p7.dot.check.elf
│ │ │ ├── p8.dot.check.elf
│ │ │ ├── p9.dot.check.elf
│ │ │ ├── sources.cfg
│ │ │ ├── t1.dot.check.elf
│ │ │ ├── t10.dot.check.elf
│ │ │ ├── t11.dot.check.elf
│ │ │ ├── t2.dot.check.elf
│ │ │ ├── t3.dot.check.elf
│ │ │ ├── t4.dot.check.elf
│ │ │ ├── t5.dot.check.elf
│ │ │ ├── t6.dot.check.elf
│ │ │ ├── t7.dot.check.elf
│ │ │ ├── t8.dot.check.elf
│ │ │ ├── t9.dot.check.elf
│ │ │ └── tests.elf
│ │ └── scala
│ │ │ └── dot
│ │ │ ├── Debug.scala
│ │ │ ├── DotParser.scala
│ │ │ ├── DotSyntax.scala
│ │ │ └── ElfPrinter.scala
│ └── test
│ │ ├── dot
│ │ ├── b1.dot
│ │ ├── b1ok.dot
│ │ ├── b2.dot
│ │ ├── b3.dot
│ │ ├── b3ok.dot
│ │ ├── b4.dot
│ │ ├── b4a.dot
│ │ ├── b4ok.dot
│ │ ├── c1.dot
│ │ ├── c1a.dot
│ │ ├── c1aa.dot
│ │ ├── c1b.dot
│ │ ├── c1c.dot
│ │ ├── c1d.dot
│ │ ├── c1ok.dot
│ │ ├── e1.dot
│ │ ├── e10.dot
│ │ ├── e11.dot
│ │ ├── e11c.dot
│ │ ├── e11ok.dot
│ │ ├── e12.dot
│ │ ├── e13.dot
│ │ ├── e14.dot
│ │ ├── e15.dot
│ │ ├── e16.dot
│ │ ├── e16n.dot
│ │ ├── e16o.dot
│ │ ├── e17.dot
│ │ ├── e18.dot
│ │ ├── e19.dot
│ │ ├── e2.dot
│ │ ├── e20.dot
│ │ ├── e21c.dot
│ │ ├── e22.dot
│ │ ├── e22a.dot
│ │ ├── e22b.dot
│ │ ├── e22c.dot
│ │ ├── e22d.dot
│ │ ├── e22e.dot
│ │ ├── e22f.dot
│ │ ├── e22g.dot
│ │ ├── e22h.dot
│ │ ├── e22i.dot
│ │ ├── e22j.dot
│ │ ├── e23.dot
│ │ ├── e24.dot
│ │ ├── e25.dot
│ │ ├── e26.dot
│ │ ├── e27.dot
│ │ ├── e27a.dot
│ │ ├── e27b.dot
│ │ ├── e27c.dot
│ │ ├── e27d.dot
│ │ ├── e27e.dot
│ │ ├── e27f.dot
│ │ ├── e27g.dot
│ │ ├── e27h.dot
│ │ ├── e27i.dot
│ │ ├── e27j.dot
│ │ ├── e27k.dot
│ │ ├── e27l.dot
│ │ ├── e27m.dot
│ │ ├── e27n.dot
│ │ ├── e28.dot
│ │ ├── e28a.dot
│ │ ├── e3.dot
│ │ ├── e4.dot
│ │ ├── e5.dot
│ │ ├── e6.dot
│ │ ├── e7.dot
│ │ ├── e8.dot
│ │ ├── e9.dot
│ │ ├── ex_cow.dot
│ │ ├── ex_list.dot
│ │ ├── ex_nat.dot
│ │ ├── ex_nat_anf.dot
│ │ ├── ex_nat_church.dot
│ │ ├── ex_nat_church_a.dot
│ │ ├── ex_nat_church_b.dot
│ │ ├── ex_nat_church_c.dot
│ │ ├── ex_nat_church_d.dot
│ │ ├── ex_nat_church_e.dot
│ │ ├── ex_norec_nat.dot
│ │ ├── ex_norec_nat_a.dot
│ │ ├── p1.dot
│ │ ├── p10.dot
│ │ ├── p11.dot
│ │ ├── p12.dot
│ │ ├── p12a.dot
│ │ ├── p12b.dot
│ │ ├── p12c.dot
│ │ ├── p13.dot
│ │ ├── p13a.dot
│ │ ├── p14.dot
│ │ ├── p1i.dot
│ │ ├── p2.dot
│ │ ├── p2c.dot
│ │ ├── p3.dot
│ │ ├── p4.dot
│ │ ├── p5.dot
│ │ ├── p6.dot
│ │ ├── p6a.dot
│ │ ├── p7.dot
│ │ ├── p8.dot
│ │ ├── p9.dot
│ │ ├── t1.dot
│ │ ├── t10.dot
│ │ ├── t11.dot
│ │ ├── t2.dot
│ │ ├── t3.dot
│ │ ├── t4.dot
│ │ ├── t5.dot
│ │ ├── t6.dot
│ │ ├── t7.dot
│ │ ├── t8.dot
│ │ └── t9.dot
│ │ └── scala
│ │ └── dot
│ │ ├── GenerateElf.scala
│ │ ├── TestDotParser.scala
│ │ └── TestElfPrinter.scala
└── tex
│ ├── bcprules.sty
│ ├── dot.bib
│ ├── dot_custom.tex
│ ├── dot_macros.tex
│ ├── fullpage.sty
│ ├── macros.tex
│ ├── math.sty
│ ├── minidot.tex
│ ├── prooftree.sty
│ ├── rules.tex
│ ├── sigplanconf.cls
│ └── twelf.tex
├── oopsla14
└── dot.elf
├── oopsla16
├── Makefile
├── README.md
├── SfLib.v
├── dot.v
├── dot_exs.v
├── dot_soundness.v
└── dot_soundness_alt.v
└── popl17
├── Makefile
├── README.md
├── SfLib.v
├── dot.v
├── dsubsup.v
├── fsub.v
├── fsub_equiv.v
├── fsub_exn.v
├── fsub_mut.v
├── fsubsup.v
└── stlc.v
/.gitignore:
--------------------------------------------------------------------------------
1 | *#*#
2 | *.actual.*
3 | *.aux
4 | *.log
5 | *.snm
6 | *.out
7 | *.toc
8 | *.vrb
9 | *.nav
10 | *.pdf
11 | *.glob
12 | *.vo
13 | *.v.d
14 | target/
15 |
--------------------------------------------------------------------------------
/.io.livecode.ch/_site/big-step/index.html:
--------------------------------------------------------------------------------
1 | {% extends "base_livecode.html" %}
2 | {% block title %}Jeremey Siek's Type Safety Three Easy Lemmas in Twelf{% endblock %}
3 |
4 | {% block content %}
5 |
6 | The type safety proofs in minidot are based
7 | on Type
8 | Safety in Three Easy Lemmas by Jeremy Siek.
9 |
10 |
11 |
12 | nat : type.
13 | z : nat.
14 | s : nat -> nat.
15 |
16 |
17 |
18 | plus : nat -> nat -> nat -> type.
19 | plus/z : plus z N N.
20 | plus/s : plus N1 N2 N3 -> plus (s N1) N2 (s N3).
21 |
22 |
23 | {% endblock %}
24 |
--------------------------------------------------------------------------------
/.io.livecode.ch/_site/repeat/sources.cfg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/.io.livecode.ch/_site/repeat/sources.cfg
--------------------------------------------------------------------------------
/.io.livecode.ch/_site/run/index.html:
--------------------------------------------------------------------------------
1 | {% extends "base_livecode.html" %}
2 | {% block title %}Twelf{% endblock %}
3 |
4 | {% block body_top_extra %}
5 | {{ super() }}
6 |
16 | {% endblock %}
17 |
18 | {% block content %}
19 |
20 |
21 |
22 |
23 |
24 |
25 | {% endblock %}
26 |
--------------------------------------------------------------------------------
/.io.livecode.ch/defaults.json:
--------------------------------------------------------------------------------
1 | {
2 | "language" : "twelf"
3 | }
4 |
--------------------------------------------------------------------------------
/.io.livecode.ch/install:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | echo OK
--------------------------------------------------------------------------------
/.io.livecode.ch/run:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | echo -e "set chatter 0\nloadFile $2\nset chatter 3\nloadFile $1\nset chatter 0\nloadFile $3" | twelf-server | egrep -v '^(%% OK %%$)|(\[Opening|Closing)' | tail -n +2
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | _A good proof is one that makes us wiser._ -- Yuri Manin
2 |
3 | The DOT Calculus and its Variations
4 | ===================================
5 |
6 | Formalizations of the Dependent Object Types (DOT) calculus, from the bottom up, with soundness proofs at each step.
7 |
8 | - Towards Strong Normalization for Dependent Object Types (ECOOP'17) [[pdf]](https://www.cs.purdue.edu/homes/rompf/papers/wang-ecoop17.pdf)
9 | - [D<:> with extensions](./ecoop17/dsubsup_total_rec.v)
10 |
11 | - From F to DOT: Type Soundness Proofs with Definitional Interpreters (POPL'17) [[pdf]](https://www.cs.purdue.edu/homes/rompf/papers/amin-popl17a.pdf)
12 | - [STLC](./popl17/stlc.v)
13 | - [F<:](./popl17/fsub.v)
14 | - [F<: Equivalence with Small-Step](./popl17/fsub_equiv.v)
15 | - [F<: with Mutable References](./popl17/fsub_mut.v)
16 | - [F<: with Exceptions](./popl17/fsub_exn.v)
17 | - [F<:> from the System D Square](./popl17/fsubsup.v)
18 | - [D<:> from the System D Square](./popl17/dsubsup.v)
19 | - [DOT in Big-Step](./popl17/dot.v)
20 | - [older developments from 2015](./dev2015)
21 |
22 | - Type Soundness for Dependent Object Types (OOPSLA'16) [[pdf]](http://lampwww.epfl.ch/~amin/dot/soundness_oopsla16.pdf)
23 | - [DOT in small-step](./oopsla16)
24 |
25 | - Foundations of Path-Dependent Types (OOPSLA'14) [[pdf]](http://lampwww.epfl.ch/~amin/dot/fpdt.pdf)
26 | - [muDOT](./oopsla14)
27 |
--------------------------------------------------------------------------------
/dev2013/build.sbt:
--------------------------------------------------------------------------------
1 | name := "minilf"
2 |
3 | version := "0.1"
4 |
5 | scalaVersion := "2.10.2"
6 |
7 | scalacOptions += "-deprecation"
8 |
9 | scalacOptions += "-unchecked"
10 |
11 | libraryDependencies += "com.googlecode.kiama" %% "kiama" % "1.5.1"
12 |
13 | libraryDependencies += "org.scalatest" %% "scalatest" % "1.9.1" % "test"
14 |
15 | libraryDependencies += "junit" % "junit" % "4.11" % "test"
--------------------------------------------------------------------------------
/dev2013/rules10.txt:
--------------------------------------------------------------------------------
1 | like rules9.txt, but adding
2 |
3 |
4 | // expression typing
5 |
6 | x: { type T1..T2} wf in G
7 | ---------------------------
8 | G |- x: { type x.T .. x.T }
9 |
10 |
--------------------------------------------------------------------------------
/dev2013/rules7.txt:
--------------------------------------------------------------------------------
1 | // syntax
2 |
3 | t ::= x // variable
4 | | new { // object/function creation
5 | def apply(x) = t1
6 | val get = t2
7 | type T
8 | }
9 | | t.apply(t) // method call
10 | | t.get // field selection
11 |
12 | T ::= Top | Bot
13 | | { T1 => T2 } // method
14 | | { val T } // field member
15 | | { type T } // type member
16 | | x.T // type selection
17 |
18 | G :: = tnil | T::G // type env
19 | H :: = vnil | v::H // value env
20 |
21 | v ::= Clos H { // object/closure
22 | def apply = t
23 | val get = v
24 | }
25 |
26 | // lookup
27 |
28 | x: T in G
29 | x->v in H
30 |
31 |
32 | // types well-formed w.r.t env
33 |
34 | G wf Top
35 | G wf Bot
36 |
37 |
38 | G wf T1 G wf T2
39 | ------------------
40 | G wf { T1 => T2 }
41 |
42 |
43 | G wf T
44 | --------------
45 | G wf { val T }
46 |
47 |
48 | G wf T
49 | ---------------
50 | G wf { type T }
51 |
52 |
53 | x:{ type T } wf in G
54 | --------------------
55 | G wf x.T
56 |
57 |
58 |
59 |
60 | // subtyping
61 |
62 | G1 wf T
63 | --------------
64 | G1 T <: G2 Top
65 |
66 | G2 wf T
67 | --------------
68 | G1 Bot <: G2 T
69 |
70 |
71 | G2 T3 <: G1 T1 G1 T2 <: G2 T4
72 | ----------------------------------
73 | G1 { T1 => T2 } <: G2 { T3 => T4 }
74 |
75 |
76 | G1 T1 <: G2 T2
77 | ------------------------------
78 | G1 { val T1 } <: G2 { val T2 }
79 |
80 |
81 | G1 T1 <: G2 T2
82 | --------------------------------
83 | G1 { type T1 } <: G2 { type T2 }
84 |
85 |
86 | x:{ type T1 } wf in G1 G1 T1 <: G2 T2
87 | ----------------------------------------
88 | G1 x.T <: T2
89 |
90 |
91 | G1 T1 <: G2 T2 x:{ type T2 } wf in G2
92 | ----------------------------------------
93 | G1 T1 <: x.T
94 |
95 |
96 |
97 | // eval
98 |
99 | x->v in H
100 | -----------
101 | H |- x => v
102 |
103 |
104 | H |- t2 => v2
105 | --------------------------------------------------------------------------------------------------
106 | H |- new { def apply(x) = t1; val get = t2; type T } => Clos H { def apply(x) = t1; val get = v2 }
107 |
108 |
109 | H |- t1 => Clos H1 { def apply(x) = t3; val get = v4 }
110 | H |- t2 => v2
111 | x->v::H1 |- t3 => v3
112 | -------------------------------------------------------
113 | H |- t1.apply(t2) => v3
114 |
115 |
116 | H |- t1 => Clos H1 { def apply(x) = t3; val get = v4 }
117 | -------------------------------------------------------
118 | H |- t1.get => v4
119 |
120 |
121 |
122 | // expression typing
123 |
124 | x: T wf in G
125 | ------------
126 | G |- x: T
127 |
128 |
129 | x:T1::G |- t1: T2 G wf { T1 => T2 }
130 | -------------------------------------------------------------------
131 | G |- new { def apply(x) = t1; val get = t2; type T } : { T1 => T2 }
132 |
133 |
134 | G |- t2: T2
135 | -----------------------------------------------------------------
136 | G |- new { def apply(x) = t1; val get = t2; type T } : { get T2 }
137 |
138 |
139 | G wf { type T }
140 | -----------------------------------------------------------------
141 | G |- new { def apply(x) = t1; val get = t2; type T } : { type T }
142 |
143 |
144 | G |- t1: { T1 => T2 }
145 | G |- t2: T1
146 | ---------------------
147 | G |- t1.apply(t2): T2
148 |
149 |
150 | G |- t1: { val get: T2 }
151 | ------------------------
152 | G |- t1.get: T2
153 |
154 |
155 | G |- t: T1 G T1 <: G T2
156 | --------------------------
157 | G |- t: T2
158 |
159 |
160 |
161 | // value typing
162 |
163 | x: T wf in G
164 | ------------
165 | G |- x: T
166 |
167 |
168 | G1 |- H1 x:T1::G1 |- t: T2 G1 { T1 => T2 } <: G { T1 => T2 }
169 | ------------------------------------------------------------------
170 | G |- Clos H1 { def apply = t val get = v } : { T1 => T2 }
171 |
172 |
173 | G |- t2: T2
174 | -------------------------------------------------------
175 | G |- Clos H1 { def apply = t val get = v } : { get T2 }
176 |
177 |
178 | G wf { type T }
179 | -------------------------------------------------------
180 | G |- Clos H1 { def apply = t val get = v } : { type T }
181 |
182 |
183 | G1 |- v: T1 G1 T1 <: G T
184 | ---------------------------
185 | G |- v: T
186 |
187 |
188 | // well-typed environments
189 |
190 | G1 |- H1 (element-wise)
191 |
--------------------------------------------------------------------------------
/dev2013/rules8.txt:
--------------------------------------------------------------------------------
1 | like rules7.txt, but changing
2 |
3 | t ::=
4 | | new { // object/function creation
5 | type T
6 | }
7 |
8 | T ::=
9 | | { type T } // type member
10 |
11 |
12 |
13 | G wf T
14 | ---------------
15 | G wf { type T }
16 |
17 | x:{ type T } wf in G
18 | --------------------
19 | G wf x.T
20 |
21 |
22 |
23 | G1 T1 <: G2 T2
24 | --------------------------------
25 | G1 { type T1 } <: G2 { type T2 }
26 |
27 |
28 | x:{ type T1 } wf in G1 G1 T1 <: G2 T2
29 | ----------------------------------------
30 | G1 x.T <: T2
31 |
32 |
33 | G1 T1 <: G2 T2 x:{ type T2 } wf in G2
34 | ----------------------------------------
35 | G1 T1 <: x.T
36 |
37 |
38 |
39 | G wf { type T }
40 | -----------------------------------------------------------------
41 | G |- new { def apply(x) = t1; val get = t2; type T } : { type T }
42 |
43 |
44 |
45 | G wf { type T }
46 | -------------------------------------------------------
47 | G |- Clos H1 { def apply = t val get = v } : { type T }
48 |
49 |
50 |
51 |
52 | to
53 |
54 |
55 |
56 | t ::=
57 | | new { // object/function creation
58 | type T1..T2
59 | }
60 |
61 | T ::=
62 | | { type T1..T2 } // bounded type member
63 |
64 |
65 |
66 | G T1 <: G T2
67 | --------------------
68 | G wf { type T1..T2 }
69 |
70 | x:{ type T1..T2 } wf in G
71 | -------------------------
72 | G wf x.T
73 |
74 |
75 |
76 | G1 T1 <: G1 T2 G2 T3 <: G2 T4
77 | G2 T3 <: G1 T1 G1 T2 <: G2 T4
78 | ----------------------------------------
79 | G1 { type T1..T2 } <: G2 { type T3..T4 }
80 |
81 |
82 | x:{ type TS..TU } wf in G1 G1 TU <: G2 T2
83 | --------------------------------------------
84 | G1 x.T <: T2
85 |
86 |
87 | G1 T1 <: G2 TS x:{ type TS..TU } wf in G2
88 | --------------------------------------------
89 | G1 T1 <: x.T
90 |
91 |
92 |
93 | G wf { type T1..T2 }
94 | ---------------------------------------------------------------------------
95 | G |- new { def apply(x) = t1; val get = t2; type T1..T2 } : { type T1..T2 }
96 |
97 |
98 |
99 | G wf { type T1..T2 }
100 | ------------------------------------------------------------
101 | G |- Clos H1 { def apply = t val get = v } : { type T1..T2 }
102 |
--------------------------------------------------------------------------------
/dev2013/rules9.txt:
--------------------------------------------------------------------------------
1 | like rules8.txt, but adding
2 |
3 | // prefix relation on environments: G1 [= G2
4 |
5 |
6 | x:{ type T1..T2 } wf in G G [= G1 G [= G2
7 | -----------------------------------------------
8 | G1 x.T <: G2 x.T
9 |
--------------------------------------------------------------------------------
/dev2013/rulesInf.txt:
--------------------------------------------------------------------------------
1 | // syntax
2 |
3 | t ::= x // variable
4 | | new { // object/function creation
5 | def apply(x) = t1
6 | val get = t2
7 | type T1..T2
8 | }
9 | | t.apply(t) // method call
10 | | t.get // field selection
11 |
12 | T ::= Top | Bot
13 | | { T1 => T2 } // method
14 | | { val T } // field member
15 | | { type T1..T2 } // type member
16 | | { x => T } // self-type binding
17 | | x.T // type selection
18 |
19 | G :: = tnil | T::G // type env
20 | H :: = vnil | v::H // value env
21 |
22 | v ::= Clos H { // object/closure
23 | def apply = t
24 | val get = t
25 | }
26 |
27 | p ::= ? | x | p.get | p.T // paths: context for subtp
28 | p! ::= x | p!.get | p!.T // stable paths
29 |
30 |
31 | // lookup
32 |
33 | x: T in G
34 | x->v in H
35 |
36 |
37 |
38 | // subtyping: G |- p1 T1 <: p2 T2 (context-sensitive)
39 |
40 | G |- p1 T <: p2 Top
41 | G |- p1 Bot <: p2 T
42 |
43 | G |- ? T3 <: ? T1 G |- ? T2 <: ? T4
44 | ---------------------------------------
45 | G |- p1 { T1 => T2 } <: p2 { T3 => T4 }
46 |
47 |
48 | G |- p1.get T1 <: p2.get T2
49 | -----------------------------------
50 | G |- p1 { val T1 } <: p2 { val T2 }
51 |
52 |
53 |
54 | G |- ? T2 <: ? T3
55 | ---------------------------------------------
56 | G |- p1 { type T1..T2 } <: p2 { type T3..T4 }
57 |
58 |
59 | G |- ? T3 <: ? T1 G |- ? T2 <: ? T4
60 | -----------------------------------------------
61 | G |- p1! { type T1..T2 } <: p1! { type T3..T4 }
62 |
63 |
64 |
65 | G |- x: { type T1..T2 }
66 | -----------------------
67 | G |- p1 T2 <: p2 x.T
68 |
69 |
70 | G |- x: { type T1..T2 }
71 | -----------------------
72 | G |- p1 x.T <: p2 T1
73 |
74 |
75 |
76 | z:T2::G |- z [z/x]T1 <: p2 T2 G |- T2 wf z fresh
77 | ----------------------------------------------------------
78 | G |- p1 { x => T1 } <: p2 T2
79 |
80 |
81 | G |- p1! [p1/x]T1 <: p2 T2
82 | -----------------------------
83 | G |- p1! { x => T1 } <: p2 T2
84 |
85 | (plus symmetric version)
86 |
87 |
88 |
89 |
90 | // subtyping across environments: G1 p1 T1 <: G2 p2 T2
91 |
92 | (needed for proof, union assumes all idents in program are distinct)
93 |
94 |
95 | G1 union G2 |- p1 T1 <: p2 T2 G1 |- T1 wf G2 |- T2 wf
96 | -----------------------------------------------------------
97 | G1 p1 T1 <: G2 p2 T2
98 |
99 |
100 | // type-wf: G |- T wf
101 |
102 | all free vars in T are bound in G
103 |
104 |
105 |
106 |
107 |
108 | // eval
109 |
110 | x->v in H
111 | -----------
112 | H |- x => v
113 |
114 |
115 | H |- t2 => v2
116 | -------------------------------------------------------
117 | H |- new { def apply(x) = t1; val get = t2; type T1..T2 }
118 | => Clos H { def apply(x) = t1; val get = v2 }
119 |
120 |
121 | H |- t1 => Clos H1 { def apply(x) = t3; val get = v4 }
122 | H |- t2 => v2
123 | x->v::H1 |- t3 => v3
124 | -------------------------------------------------------
125 | H |- t1.apply(t2) => v3
126 |
127 |
128 | H |- t1 => Clos H1 { def apply(x) = t3; val get = v4 }
129 | -------------------------------------------------------
130 | H |- t1.get => v4
131 |
132 |
133 |
134 | // expression typing
135 |
136 | x: T in G
137 | ---------
138 | G |- x: T
139 |
140 |
141 | x:T1::G |- t1: T2 G |- T1 => T2 wf
142 | ------------------------------------------------------------------------
143 | G |- new { def apply(x) = t1; val get = t2; type T3..T4 } : { T1 => T2 }
144 |
145 |
146 | G |- t2: T2
147 | ----------------------------------------------------------------------
148 | G |- new { def apply(x) = t1; val get = t2; type T3..T4 } : { val T2 }
149 |
150 |
151 | G |- new { def apply(x) = t1; val get = t2; type T3..T4 } : { type T3..T4 }
152 |
153 |
154 |
155 | G |- t1: { T1 => T2 }
156 | G |- t2: T1
157 | ---------------------
158 | G |- t1.apply(t2): T2
159 |
160 |
161 | G |- t1: { val T2 }
162 | ------------------------
163 | G |- t1.get: T2
164 |
165 |
166 | G |- t: T1 G |- ? T1 <: ? T2
167 | -------------------------------
168 | G |- t: T2
169 |
170 | G |- p!: T1 G |- p! T1 <: p! T2
171 | ----------------------------------
172 | G |- p!: T2
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 | // value typing
182 |
183 | (like for expressions, just with Clos)
184 |
185 |
186 |
--------------------------------------------------------------------------------
/dev2013/s.txt:
--------------------------------------------------------------------------------
1 | # Proposed Syntax
2 |
3 |
4 | variables x, y, z
5 |
6 |
7 | * variable x in scope is indicated by ^x
8 |
9 |
10 | types S, T, U
11 | T := Bot | Top | T /\ T | T \/ T
12 | | { type A: S .. U }
13 | | { def m(_: S):U }
14 | | { val v: U }
15 | | y.A
16 | | { x => T^x }
17 |
18 |
19 | * below, in terms and definitions, all ascriptions `: T` are optional
20 | * the x => in new { x => ... } is also optional
21 |
22 |
23 | terms t
24 | t := x
25 | | t.v
26 | | t.m(t)
27 | | new { x => ds^x }
28 | | val x: T = t; t^x
29 |
30 |
31 | definitions d
32 | d := def m(x: T): T = t^x
33 | | val x : T = t
34 | | type A : S .. U
35 |
36 |
37 |
38 | # Discussion / Extensions
39 |
40 |
41 | 1. All y's above could be paths instead of variables,
42 | where a path is a chain of immutable field selections:
43 |
44 | p := x | p.v
45 |
46 | 2. How can we allow the self/this to be used in a val definition? Do
47 | we want to? In DOT, field definitions can only be variables.
48 |
49 | 3. Can we model DOT/Scala's mixture of nominal and structural typing
50 | with this system? What's missing compared to DOT is a way to create
51 | an object based on a (concrete) type selection. We would need to
52 | change the object creation variant of t from
53 |
54 | | val x: T = new { ds^x }; t
55 |
56 | to
57 |
58 | | val x: T = new Tc { ds^x }; t
59 |
60 | but that entails expanding Tc and checking that the definitions ds
61 | conform.
62 |
63 | Note that the T ascription cannot play the role of Tc, because in
64 | DOT, Tc can be a type selection p.A with lower bound Bot.
65 |
66 | Is there an alternative to expansion that only uses subtyping? Can
67 | we rely on a 'varx/tselx'-like trick?
68 |
--------------------------------------------------------------------------------
/dev2013/sources.cfg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/dev2013/sources.cfg
--------------------------------------------------------------------------------
/dev2013/test3y.elf:
--------------------------------------------------------------------------------
1 | %{
2 | Dear all,
3 |
4 | we ran into a surprising issue with %unique and we were wondering if this is somehow
5 | expected behavior or maybe a bug in the implementation. Below is a minimal test case.
6 |
7 | Twelf accepts lookup-restrict as total, even though it's not covering the case when
8 | G1 is not equal to G2. Without the %unique declaration, Twelf correctly detects that
9 | lookup-restrict is not total.
10 |
11 | In our view it seems pretty clear that lookup-restrict should not hold, as confirmed
12 | by the failed query at the bottom.
13 |
14 | Any comments will be appreciated!
15 | }%
16 |
17 | tpe: type.
18 | int: tpe.
19 | bool: tpe.
20 |
21 | tlookup : tpe -> tpe -> type.
22 | tl/id : tlookup T T.
23 |
24 | %mode tlookup +G -T.
25 | %worlds () (tlookup _ _).
26 | %total (A) (tlookup A _).
27 | %unique tlookup +G -1T.
28 |
29 | lookup-restrict: tlookup G1 T1 -> tlookup G2 T2 -> tlookup G1 T2 -> tlookup G2 T1 -> type.
30 | %mode lookup-restrict +A +B -D -E.
31 |
32 | -: lookup-restrict L1 L2 L1 L2.
33 |
34 | %worlds () (lookup-restrict _ _ _ _).
35 | %total (A) (lookup-restrict _ A _ _).
36 |
37 | %query 1 2 tlookup int int.
38 | %query 1 2 tlookup bool bool.
39 |
40 | %. this query fails! so we really proved a wrong theorem.
41 |
42 | %query 1 2 lookup-restrict (L1: tlookup int int) (L2: tlookup bool bool) R1 R2.
43 |
--------------------------------------------------------------------------------
/dev2014/leon-quines.scala:
--------------------------------------------------------------------------------
1 | object Test {
2 |
3 | sealed abstract class Term
4 | case class Lit(x: Int) extends Term
5 | case class Var(x: Int) extends Term
6 | case class Lambda(x: Int, y: Term) extends Term
7 | case class App(x: Term, y: Term) extends Term
8 | case object Quote extends Term
9 | case class MkApp(x: Term, y: Term) extends Term
10 |
11 | sealed abstract class Value
12 | case class Const(x:Int) extends Value
13 | case class Closure(e:VEnv,x:Int,y:Term) extends Value
14 | case class Code(x:Term) extends Value
15 |
16 | sealed abstract class VOpt
17 | case class Some(x:Value) extends VOpt
18 | case object None extends VOpt
19 |
20 |
21 | sealed abstract class TEnv
22 | case object TNil extends TEnv
23 | case class TCons(x: Int, tl: TEnv) extends TEnv
24 |
25 | sealed abstract class VEnv
26 | case object VNil extends VEnv
27 | case class VCons(x: Int, y: Value, tl: VEnv) extends VEnv
28 |
29 | def vlookup(e: VEnv, x: Int): VOpt = {
30 | e match {
31 | case VCons(x1,v1,tail) => if (x == x1) Some(v1) else vlookup(tail,x)
32 | case _ => None
33 | }
34 | }
35 |
36 | def eval(n: Int, e: VEnv, x: Term): VOpt = if (n <= 0) None else {
37 | x match {
38 | case Lit(x) => Some(Const(x))
39 | case Lambda(x,y) => Some(Closure(e,x,y))
40 | case App(Quote,y) => Some(Code(y))
41 | case Var(x) => vlookup(e,x)
42 | case MkApp(x,y) => eval(n-1,e,x) match {
43 | case Some(Code(c1)) => eval(n-1,e,y) match {
44 | case Some(Code(c2)) => Some(Code(App(c1,c2)))
45 | case _ => None
46 | }
47 | case _ => None
48 | }
49 | case App(x,y) =>
50 | eval(n-1,e,x) match {
51 | case Some(Closure(e1,x1,y1)) =>
52 | eval(n-1,e,y) match {
53 | case Some(v) => eval(n-1,VCons(x1,v,e1),y1)
54 | case None => None
55 | }
56 | case _ => None
57 | }
58 | case _ => None
59 | }
60 | }
61 |
62 | def test1(x: Term) = { eval(VNil,x) == Some(Const(42)) } ensuring { x => !x }
63 |
64 | def test2(x:Int, y: Term) = {
65 | eval(VNil,
66 | App(Lambda(0, MkApp(Var(0), MkApp(App(Quote,Quote), Var(0)))),
67 | App(Quote,Lambda(0, MkApp(Var(0), MkApp(App(Quote,Quote), Var(0))))))
68 | ) == Some(Code(y)) } ensuring { x => !x }
69 |
70 | def test3(x:Int, y: Term) = {
71 | eval(VNil,
72 | App(Lambda(0, MkApp(Var(0), MkApp(App(Quote,Quote), Var(0)))),
73 | App(Quote,Lambda(0, MkApp(Var(0), MkApp(App(Quote,Quote), Var(0))))))
74 | ) == Some(Code(
75 | App(Lambda(0, MkApp(Var(0), MkApp(App(Quote,Quote), Var(0)))),
76 | App(Quote,Lambda(0, MkApp(Var(0), MkApp(App(Quote,Quote), Var(0))))))
77 | )) } ensuring { x => x }
78 |
79 | def test4(x:Int, y: Term) = {
80 | eval(VNil,
81 | y //boring: Quote(..)
82 | ) == Some(Code(
83 | App(Lambda(0, MkApp(Var(0), MkApp(App(Quote,Quote), Var(0)))),
84 | App(Quote,Lambda(0, MkApp(Var(0), MkApp(App(Quote,Quote), Var(0))))))
85 | )) } ensuring { x => !x }
86 |
87 | def test5(x:Int, y: Term) = {
88 | eval(VNil,
89 | App(y,
90 | App(Quote,Lambda(0, MkApp(Var(0), MkApp(App(Quote,Quote), Var(0))))))
91 | ) == Some(Code(
92 | App(Lambda(0, MkApp(Var(0), MkApp(App(Quote,Quote), Var(0)))),
93 | App(Quote,Lambda(0, MkApp(Var(0), MkApp(App(Quote,Quote), Var(0))))))
94 | )) } ensuring { x => !x }
95 |
96 | /*
97 | App(Lambda(x, List(x, List(App(Quote,Quote), x))),
98 | Quote(Lambda(x, List(x, List(App(Quote,Quote), x)))
99 |
100 | Code(
101 | App(Lambda(0, MkApp(Var(0), MkApp(App(Quote, Quote), Var(0)))),
102 | App(Quote, Lambda(0, MkApp(Var(0), MkApp(App(Quote, Quote), Var(0)))))))
103 |
104 | ((lambda (x)
105 | (list x (list (quote quote) x)))
106 | (quote
107 | (lambda (x)
108 | (list x (list (quote quote) x)))))
109 | */
110 |
111 |
112 |
113 | }
114 |
--------------------------------------------------------------------------------
/dev2014/leon-stlc1.scala:
--------------------------------------------------------------------------------
1 | import leon.Annotations._
2 | import leon.Utils._
3 |
4 | object Test {
5 |
6 | sealed abstract class Type
7 | case object Nat extends Type
8 | case object Bot extends Type
9 | case object Top extends Type
10 | case class Arrow(arg: Type, res: Type) extends Type
11 |
12 | sealed abstract class Term
13 | case class Lit(x: Int) extends Term
14 | case class Var(x: Int) extends Term
15 | case class Lambda(x: Int, y: Term) extends Term
16 | case class App(x: Term, tx: Type, y: Term) extends Term
17 |
18 | sealed abstract class Value
19 | case class Const(x:Int) extends Value
20 | case class Closure(e:VEnv,g:TEnv,x:Int,y:Term) extends Value
21 |
22 | sealed abstract class TEnv
23 | case object TNil extends TEnv
24 | case class TCons(x: Int, y: Type, tl: TEnv) extends TEnv
25 |
26 | sealed abstract class VEnv
27 | case object VNil extends VEnv
28 | case class VCons(x: Int, y: Value, tl: VEnv) extends VEnv
29 |
30 | def tlookup(e: TEnv, x: Int, t: Type): Boolean = e match {
31 | case TCons(x1,t1,tail) => if (x == x1) t == t1 else tlookup(tail,x,t)
32 | case TNil => false
33 | }
34 |
35 | def typed(e: TEnv, x: Term, t: Type): Boolean = x match {
36 | case Lit(x) => t == Nat
37 | case Var(x) => tlookup(e,x,t)
38 | case Lambda(x,y) =>
39 | t match {
40 | case Arrow(tx,ty) => typed(TCons(x,tx,e),y,ty)
41 | case _ => false
42 | }
43 | case App(x,tx,y) => typed(e,x,Arrow(tx,t)) && typed(e,y,tx)
44 | }
45 |
46 | def typedEnv(e: VEnv, g: TEnv): Boolean = (e,g) match {
47 | case (VCons(x1,v1,tl1), TCons(x2,t2,tl2)) =>
48 | x1 == x2 && typedVal(tl1,v1,t2) && typedEnv(tl1,tl2)
49 | case (VNil,TNil) => true
50 | case _ => false
51 | }
52 |
53 | def typedVal(e: VEnv, x: Value, t: Type): Boolean = x match {
54 | case Const(x) => t == Nat
55 | case Closure(e,g,x,y) => (t match {
56 | case Arrow(tx,ty) => typed(TCons(x,tx,g),y,ty)
57 | case _ => false
58 | }) && typedEnv(e,g)
59 | }
60 |
61 | def vlookup(e: VEnv, g: TEnv, x: Int, t: Type): Value = {
62 | require(typedEnv(e,g) && tlookup(g,x,t))
63 | (e,g) match {
64 | case (VCons(x1,v1,tail), TCons(_,_,ttl)) => if (x == x1) v1 else vlookup(tail,ttl,x,t)
65 | }
66 | } ensuring { r => typedVal(e,r,t) }
67 |
68 | def eval(e: VEnv, g: TEnv, x: Term, t: Type): Value = {
69 | require(typed(g,x,t) && typedEnv(e,g))
70 | x match {
71 | case Lit(x) => Const(x)
72 | case Lambda(x,y) => Closure(e,g,x,y)
73 | case App(x,tx,y) =>
74 | val v1 = eval(e,g,x,Arrow(tx,t))
75 | val v2 = eval(e,g,y,tx)
76 | v1 match {
77 | case Closure(e1,g1,x1,y1) =>
78 | eval(VCons(x1,v2,e1),TCons(x1,tx,g1),y1,t)
79 | }
80 | case Var(x) => vlookup(e,g,x,t)
81 | }
82 | } ensuring { r => typedVal(e,r,t) }
83 | }
84 |
--------------------------------------------------------------------------------
/dev2014/leon-stlc2-subtp.scala:
--------------------------------------------------------------------------------
1 | import leon.Annotations._
2 | import leon.Utils._
3 |
4 | object Test {
5 |
6 | sealed abstract class Type
7 | case object Nat extends Type
8 | case object Bot extends Type
9 | case object Top extends Type
10 | case class Arrow(arg: Type, res: Type) extends Type
11 |
12 | sealed abstract class Term
13 | case class Lit(x: Int) extends Term
14 | case class Var(x: Int) extends Term
15 | case class Lambda(x: Int, y: Term) extends Term
16 | case class App(x: Term, tx: Type, y: Term) extends Term
17 |
18 | sealed abstract class Value
19 | case class Const(x:Int) extends Value
20 | case class Closure(e:VEnv,g:TEnv,x:Int,y:Term) extends Value
21 |
22 | sealed abstract class TEnv
23 | case object TNil extends TEnv
24 | case class TCons(x: Int, y: Type, tl: TEnv) extends TEnv
25 |
26 | sealed abstract class VEnv
27 | case object VNil extends VEnv
28 | case class VCons(x: Int, y: Value, tl: VEnv) extends VEnv
29 |
30 | // -----
31 |
32 | def subtp(t1: Type, t2: Type): Boolean = (t1,t2) match {
33 | case (Bot,_) => true
34 | case (_,Top) => true
35 | case (Nat,Nat) => true
36 | case (Arrow(t11,t12),Arrow(t21,t22)) => subtp(t21,t11) && subtp(t12,t22)
37 | case _ => false
38 | }
39 |
40 | /* Viktor says: connect it using '&&' :
41 | def property(....) {
42 | proof_hint &&
43 | claim
44 | } holds
45 | */
46 |
47 |
48 | def subtpRefl(t1: Type): Boolean = {
49 | t1 match {
50 | case Arrow(t11,t12) => subtpRefl(t11) && subtpRefl(t12)
51 | case _ => true
52 | }
53 | subtp(t1,t1)
54 | } holds
55 |
56 | def subtpTrans(t1: Type, t2: Type, t3: Type): Boolean = {
57 | require(subtp(t1,t2) && subtp(t2,t3))
58 | (t1,t2,t3) match {
59 | case (Arrow(t11,t12),Arrow(t21,t22),Arrow(t31,t32)) =>
60 | subtpTrans(t31,t21,t11) && subtpTrans(t12,t22,t32)
61 | case _ => true
62 | }
63 | subtp(t1,t3)
64 | } holds
65 |
66 |
67 | // -----
68 |
69 | def tlookup(e: TEnv, x: Int, t: Type): Boolean = e match {
70 | case TCons(x1,t1,tail) => if (x == x1) t == t1 else tlookup(tail,x,t)
71 | case TNil => false
72 | }
73 |
74 | def typed(e: TEnv, x: Term, t: Type): Boolean = x match {
75 | case Lit(x) => t == Nat
76 | case Var(x) => tlookup(e,x,t)
77 | case Lambda(x,y) =>
78 | t match {
79 | case Arrow(tx,ty) => typed(TCons(x,tx,e),y,ty)
80 | case _ => false
81 | }
82 | case App(x,tx,y) => typed(e,x,Arrow(tx,t)) && typed(e,y,tx)
83 | }
84 |
85 | def typedEnv(e: VEnv, g: TEnv): Boolean = (e,g) match {
86 | case (VCons(x1,v1,tl1), TCons(x2,t2,tl2)) =>
87 | x1 == x2 && typedVal(tl1,v1,t2) && typedEnv(tl1,tl2)
88 | case (VNil,TNil) => true
89 | case _ => false
90 | }
91 |
92 | def typedVal(e: VEnv, x: Value, t: Type): Boolean = x match {
93 | case Const(x) => t == Nat
94 | case Closure(e,g,x,y) => (t match {
95 | case Arrow(tx,ty) => typed(TCons(x,tx,g),y,ty)
96 | case _ => false
97 | }) && typedEnv(e,g)
98 | }
99 |
100 | def vlookup(e: VEnv, g: TEnv, x: Int, t: Type): Value = {
101 | require(typedEnv(e,g) && tlookup(g,x,t))
102 | (e,g) match {
103 | case (VCons(x1,v1,tail), TCons(_,_,ttl)) => if (x == x1) v1 else vlookup(tail,ttl,x,t)
104 | }
105 | } ensuring { r => typedVal(e,r,t) }
106 |
107 | def eval(e: VEnv, g: TEnv, x: Term, t: Type): Value = {
108 | require(typed(g,x,t) && typedEnv(e,g))
109 | x match {
110 | case Lit(x) => Const(x)
111 | case Lambda(x,y) => Closure(e,g,x,y)
112 | case App(x,tx,y) =>
113 | val v1 = eval(e,g,x,Arrow(tx,t))
114 | val v2 = eval(e,g,y,tx)
115 | v1 match {
116 | case Closure(e1,g1,x1,y1) =>
117 | eval(VCons(x1,v2,e1),TCons(x1,tx,g1),y1,t)
118 | }
119 | case Var(x) => vlookup(e,g,x,t)
120 | }
121 | } ensuring { r => typedVal(e,r,t) }
122 | }
123 |
--------------------------------------------------------------------------------
/dev2014/leon-wip2.scala:
--------------------------------------------------------------------------------
1 | object Test {
2 |
3 | sealed abstract class Type
4 | case object Nat extends Type
5 | case object Bot extends Type
6 | case object Top extends Type
7 | case class Arrow(arg: Type, res: Type) extends Type
8 |
9 | sealed abstract class Term
10 | case class Lit(x: Int) extends Term
11 | case class Var(x: Int) extends Term
12 | case class Lambda(x: Int, t: Type, y: Term) extends Term
13 | case class App(x: Term, y: Term) extends Term
14 |
15 | sealed abstract class Value
16 | case class Const(x:Int) extends Value
17 | //case class Closure(e:VEnv,g:TEnv,x:Int,t:Type,y:Term) extends Value
18 |
19 | sealed abstract class TEnv
20 | case object TNil extends TEnv
21 | case class TCons(x: Int, y: Type, tl: TEnv) extends TEnv
22 |
23 | sealed abstract class VEnv
24 | case object VNil extends VEnv
25 | case class VCons(x: Int, y: Value, tl: VEnv) extends VEnv
26 |
27 | sealed abstract class TOpt
28 | case object TNone extends TOpt
29 | case class TSome(tl: Type) extends TOpt
30 |
31 | sealed abstract class TEnvOpt
32 | case object TEnvNone extends TEnvOpt
33 | case class TEnvSome(tl: TEnv) extends TEnvOpt
34 |
35 | def get(x: TOpt): Type = {
36 | require(isDefined(x))
37 | x match {
38 | case TSome(x) => x
39 | }
40 | }
41 | def get(x: TEnvOpt): TEnv = {
42 | require(isDefined(x))
43 | x match {
44 | case TEnvSome(x) => x
45 | }
46 | }
47 | def isDefined(x: TOpt): Boolean = x match {
48 | case TSome(x) => true
49 | case _ => false
50 | }
51 | def isDefined(x: TEnvOpt): Boolean = x match {
52 | case TEnvSome(x) => true
53 | case _ => false
54 | }
55 |
56 | def tlookup(e: TEnv, x: Int): TOpt = e match {
57 | case TCons(x1,t1,tail) => if (x == x1) TSome(t1) else tlookup(tail,x)
58 | case TNil => TNone
59 | }
60 |
61 | sealed abstract class TypeDeriv
62 | case class TLit(e: TEnv, x: Term, t: Type) extends TypeDeriv
63 | case class TVar(e: TEnv, x: Term, t: Type) extends TypeDeriv
64 | case class TLam(e: TEnv, x: Term, t: Type, ty: TypeDeriv) extends TypeDeriv
65 | case class TApp(e: TEnv, x: Term, t: Type, tf: TypeDeriv, tx: TypeDeriv) extends TypeDeriv
66 |
67 | def get(td: TypeDeriv): (TEnv, Term, Type) = td match {
68 | case TLit(e1,x1,t1) => (e1,x1,t1)
69 | case TVar(e1,x1,t1) => (e1,x1,t1)
70 | case TLam(e1,x1,t1,_) => (e1,x1,t1)
71 | case TApp(e1,x1,t1,_,_) => (e1,x1,t1)
72 | }
73 |
74 | def typeDeriv(d: TypeDeriv): Boolean = d match {
75 | case TLit(e1,Lit(x),Nat) => true
76 | case TVar(e1,Var(x),t) => tlookup(e1,x) == TSome(t)
77 | case TLam(e1,Lambda(x1,t1,y),Arrow(t2,ty),td) if t1 == t2 =>
78 | typeDeriv(td) && get(td) == (TCons(x1,t1,e1), y, ty)
79 | //case TApp(e1,App(f,x),tf,tdf,tdx) => typeDeriv
80 | case _ => false
81 | }
82 |
83 | case class Closure(e:VEnv,g:TEnv,td:TypeDeriv,x:Int,t:Type,y:Term) extends Value
84 |
85 |
86 |
87 | def typed(e: TEnv, x: Term): TOpt = x match {
88 | case Lit(x) => TSome(Nat)
89 | case Var(x) => tlookup(e,x)
90 | case Lambda(x,t,y) =>
91 | typed(TCons(x,t,e),y) match {
92 | case TSome(ty) => TSome(Arrow(t,ty))
93 | case x => x
94 | }
95 | case App(x,y) =>
96 | (typed(e,x), typed(e,y)) match {
97 | case (TSome(Arrow(tx,ty)), TSome(tx1)) if tx == tx1 => TSome(ty)
98 | case _ => TNone
99 | }
100 | }
101 |
102 |
103 | def typedEnv(e: VEnv): TEnvOpt = e match {
104 | case VCons(x1,v1,tl1) =>
105 | (typedVal(tl1,v1),typedEnv(tl1)) match {
106 | case (TSome(t2),TEnvSome(tl2)) => TEnvSome(TCons(x1,t2,tl2))
107 | case _ => TEnvNone
108 | }
109 | case VNil => TEnvSome(TNil)
110 | case _ => TEnvNone
111 | }
112 |
113 | def typedVal(e: VEnv, x: Value): TOpt = x match {
114 | case Const(x) => TSome(Nat)
115 | case Closure(e,g,td,x,tx,y) =>
116 | if (typeDeriv(td)) TSome(get(td)._3) else TNone
117 | }
118 |
119 | def vlookup(e: VEnv, g: TEnv, x: Int, t: Type): Value = {
120 | require(typedEnv(e) == TEnvSome(g) && tlookup(g,x) == TSome(t))
121 | (e,g) match {
122 | case (VCons(x1,v1,tail), TCons(_,_,ttl)) => if (x == x1) v1 else vlookup(tail,ttl,x,t)
123 | }
124 | } ensuring { r => typedVal(e,r) == TSome(t) }
125 |
126 |
127 | def eval(e: VEnv, g: TEnv, x: Term, t: Type, td: TypeDeriv): Value = {
128 | require(typeDeriv(td) &&
129 | get(td) == (g,x,t) &&
130 | typedEnv(e) == TEnvSome(g))
131 | x match {
132 | case Lit(x) => Const(x)
133 | case Lambda(x,t,y) => Closure(e,g,td,x,t,y)
134 | case App(f,x) =>
135 | td match {
136 | //case TVar(_,_,_) => Const(7)
137 | case TApp(_,_,ty,tdf,tdx) =>
138 | val (_,_,Arrow(tx,ty)) = get(tdf)
139 | val v1 = eval(e,g,f,Arrow(tx,ty),tdf)
140 | val v2 = eval(e,g,x,tx,tdx)
141 | v1 match { case Closure(e1,g1,td1,x1,ty1,y1) =>
142 | eval(VCons(x1,v2,e1),TCons(x1,tx,g1),y1,ty1,td1)
143 | }
144 | }
145 | case Var(x) => vlookup(e,g,x,t)
146 | }
147 | } ensuring { r => typedVal(e,r) == TSome(t) }
148 |
149 | }
150 |
--------------------------------------------------------------------------------
/dev2014/leon-wip3.scala:
--------------------------------------------------------------------------------
1 | import leon.Annotations._
2 | import leon.Utils._
3 |
4 | object Test {
5 |
6 | sealed abstract class Type
7 | case object Nat extends Type
8 | case object Bot extends Type
9 | case object Top extends Type
10 | case class Arrow(arg: Type, res: Type) extends Type
11 |
12 | sealed abstract class Term
13 | case class Lit(x: Int) extends Term
14 | case class Var(x: Int) extends Term
15 | case class Lambda(x: Int, t: Type, y: Term) extends Term
16 | case class App(x: Term, y: Term) extends Term
17 |
18 | sealed abstract class Value
19 | case class Const(x:Int) extends Value
20 | //case class Closure(e:VEnv,g:TEnv,x:Int,t:Type,y:Term) extends Value
21 |
22 | sealed abstract class TEnv
23 | case object TNil extends TEnv
24 | case class TCons(x: Int, y: Type, tl: TEnv) extends TEnv
25 |
26 | sealed abstract class VEnv
27 | case object VNil extends VEnv
28 | case class VCons(x: Int, y: Value, tl: VEnv) extends VEnv
29 |
30 | sealed abstract class TOpt
31 | case object TNone extends TOpt
32 | case class TSome(tl: Type) extends TOpt
33 |
34 | def tlookup(e: TEnv, x: Int): TOpt = e match {
35 | case TCons(x1,t1,tail) => if (x == x1) TSome(t1) else tlookup(tail,x)
36 | case TNil => TNone
37 | }
38 |
39 | sealed abstract class TypeDeriv
40 | case class TLit(e: TEnv, x: Term, t: Type) extends TypeDeriv
41 | case class TVar(e: TEnv, x: Term, t: Type) extends TypeDeriv
42 | case class TLam(e: TEnv, x: Term, t: Type, ty: TypeDeriv) extends TypeDeriv
43 | case class TApp(e: TEnv, x: Term, t: Type, tf: TypeDeriv, tx: TypeDeriv) extends TypeDeriv
44 |
45 | def get(td: TypeDeriv): (TEnv, Term, Type) = td match {
46 | case TLit(e1,x1,t1) => (e1,x1,t1)
47 | case TVar(e1,x1,t1) => (e1,x1,t1)
48 | case TLam(e1,x1,t1,_) => (e1,x1,t1)
49 | case TApp(e1,x1,t1,_,_) => (e1,x1,t1)
50 | }
51 |
52 | def typeDeriv(d: TypeDeriv): Boolean = d match {
53 | case TLit(e1,Lit(x),Nat) => true
54 | case TVar(e1,Var(x),t) => tlookup(e1,x) == TSome(t)
55 | case TLam(e1,Lambda(x1,t1,y),Arrow(t2,ty),td) if t1 == t2 =>
56 | typeDeriv(td) && get(td) == (TCons(x1,t1,e1), y, ty)
57 | case TApp(e1,App(f,x),ty,tdf,tdx) =>
58 | typeDeriv(tdf) && typeDeriv(tdx) &&
59 | get(tdf) == (e1,f,Arrow(get(tdx)._3,ty)) &&
60 | get(tdx)._1 == e1 && get(tdx)._2 == x
61 | case _ => false
62 | }
63 |
64 | def typeDerivX(d: TypeDeriv, g: TEnv, x: Term, t: Type): Boolean =
65 | typeDeriv(d) && get(d) == (g,x,t)
66 |
67 | case class Closure(e:VEnv,g:TEnv,td:TypeDeriv,x:Int,t:Type,y:Term) extends Value
68 |
69 |
70 |
71 | def typed(e: TEnv, x: Term): TOpt = x match {
72 | case Lit(x) => TSome(Nat)
73 | case Var(x) => tlookup(e,x)
74 | case Lambda(x,t,y) =>
75 | typed(TCons(x,t,e),y) match {
76 | case TSome(ty) => TSome(Arrow(t,ty))
77 | case x => x
78 | }
79 | case App(x,y) =>
80 | (typed(e,x), typed(e,y)) match {
81 | case (TSome(Arrow(tx,ty)), TSome(tx1)) if tx == tx1 => TSome(ty)
82 | case _ => TNone
83 | }
84 | }
85 |
86 |
87 | def typedEnv(e: VEnv, g: TEnv): Boolean = (e,g) match {
88 | case (VCons(x1,v1,tl1),TCons(x2,t1,tl2)) if x1 == x2 =>
89 | typedVal(tl1,v1,t1) && typedEnv(tl1,tl2)
90 | case (VNil, TNil) => true
91 | case _ => false
92 | }
93 |
94 | def typedVal(e: VEnv, x: Value, t: Type): Boolean = (x,t) match {
95 | case (Const(x),Nat) => true
96 | case (Closure(e,g,td,x,tx,y), Arrow(t1,t2)) =>
97 | typeDerivX(td,g,y,t2) && t1 == tx
98 | case _ => false
99 | }
100 |
101 | def vlookup(e: VEnv, g: TEnv, x: Int, t: Type): Value = {
102 | require(typedEnv(e,g) && tlookup(g,x) == TSome(t))
103 | (e,g) match {
104 | case (VCons(x1,v1,tail), TCons(_,_,ttl)) => if (x == x1) v1 else vlookup(tail,ttl,x,t)
105 | }
106 | } ensuring { r => typedVal(e,r,t) }
107 |
108 |
109 | def eval0(e: VEnv, g: TEnv, x: Term, t: Type, td: TypeDeriv): Value = {
110 | require(typeDerivX(td,g,x,t) && typedEnv(e,g))
111 | Const(9)
112 | } ensuring { r => typedVal(e,r,t) }
113 |
114 |
115 | def eval(e: VEnv, g: TEnv, x: Term, t: Type, td: TypeDeriv): Value = {
116 | require(typeDerivX(td,g,x,t) && typedEnv(e,g))
117 | x match {
118 | case Lit(x) => Const(x)
119 | case Lambda(x,t,y) => Closure(e,g,td,x,t,y)
120 | case App(f,x) =>
121 | td match {
122 | //case TVar(_,_,_) => Const(7)
123 | case TApp(_,_,ty,tdf,tdx) =>
124 | val (_,_,Arrow(tx,ty)) = get(tdf)
125 | val v1 = eval(e,g,f,Arrow(tx,ty),tdf)
126 | val v2 = eval(e,g,x,tx,tdx)
127 | v1 match { case Closure(e1,g1,td1,x1,ty1,y1) =>
128 | eval(VCons(x1,v2,e1),TCons(x1,tx,g1),y1,ty1,td1)
129 | }
130 | }
131 | case Var(x) => vlookup(e,g,x,t)
132 | }
133 | } //ensuring { r => typedVal(e,r,t) }
134 |
135 |
136 | }
137 |
--------------------------------------------------------------------------------
/dev2014/mini1_ok_reg.elf:
--------------------------------------------------------------------------------
1 | %{ ------- language ----- }%
2 |
3 | tpe: type.
4 | dec: type.
5 | topt: type.
6 |
7 | top: tpe.
8 | tbind: dec -> tpe.
9 | tsel: tpe.
10 |
11 | tnone: topt.
12 | tsome: tpe -> topt.
13 |
14 | rect: topt -> tpe -> dec.
15 |
16 | %{ ------- environments ----- }%
17 |
18 | % environments
19 | tenv : type.
20 | tnil : tenv.
21 | tcons : dec -> tenv.
22 |
23 | tlookup: tenv -> dec -> type.
24 | tl : tlookup (tcons D) D.
25 |
26 | %{ ------- subtyping ------ }%
27 |
28 | has-lower : dec -> tpe -> type.
29 | has-lower/yes : has-lower (rect (tsome S) U) S.
30 |
31 | has-upper : dec -> tpe -> type.
32 | has-upper/yes : has-upper (rect _ U) U.
33 |
34 | wf-tp : tenv -> tpe -> type.
35 | wf-dc : tenv -> dec -> type.
36 | sub-tp : tenv -> tpe -> tpe -> type.
37 | sub-dc : tenv -> dec -> dec -> type.
38 |
39 | sub-tp/top : sub-tp G T top
40 | <- wf-tp G T.
41 | sub-tp/tsel1 : sub-tp G tsel T
42 | <- tlookup G D
43 | <- wf-dc G D
44 | <- has-upper D U
45 | <- sub-tp G U T
46 | .
47 | sub-tp/tsel2 : sub-tp G T tsel
48 | <- tlookup G D
49 | <- wf-dc G D
50 | <- has-lower D S
51 | <- sub-tp G T S
52 | .
53 | sub-tp/tbind : sub-tp G (tbind D1) (tbind D2)
54 | <- wf-tp G (tbind D2)
55 | <- sub-dc (tcons D1) D1 D2
56 | .
57 |
58 | sub-dc/ss : sub-dc G (rect (tsome S1) U1) (rect (tsome S2) U2)
59 | <- sub-tp G S2 S1
60 | <- sub-tp G U1 U2
61 | <- sub-tp G S1 U1
62 | <- sub-tp G S2 U2.
63 | sub-dc/sn : sub-dc G (rect (tsome S1) U1) (rect tnone U2)
64 | <- sub-tp G U1 U2
65 | <- sub-tp G S1 U1.
66 |
67 | sub-dc/nn : sub-dc G (rect tnone U1) (rect tnone U2)
68 | <- sub-tp G U1 U2.
69 |
70 | wf-tp/top : wf-tp G top.
71 | wf-tp/tbind : wf-tp G (tbind D)
72 | <- wf-dc (tcons D) D.
73 | wf-tp/tsel : wf-tp G tsel
74 | <- tlookup G D
75 | <- wf-dc G D.
76 |
77 | wf-dc/s : wf-dc G (rect (tsome S) U)
78 | <- sub-tp G S U.
79 | wf-dc/n : wf-dc G (rect tnone U)
80 | <- wf-tp G U.
81 |
82 | %%% PROOFS %%%
83 |
84 | %{ ------- uniqueness ------ }%
85 |
86 | same: tpe -> tpe -> type.
87 | ident: same T T.
88 |
89 | samed: dec -> dec -> type.
90 | identd: samed T T.
91 |
92 | sameopt : topt -> topt -> type.
93 | identopt: sameopt T T.
94 |
95 | sametenv: tenv -> tenv -> type.
96 | identtenv: sametenv G G.
97 |
98 | false: type.
99 |
100 | tlookup-eq : tlookup G D1 -> tlookup G D2 -> samed D1 D2 -> type.
101 | %mode tlookup-eq +A +B -C.
102 |
103 | - : tlookup-eq tl tl identd.
104 |
105 | %worlds () (tlookup-eq _ _ _).
106 | %total A (tlookup-eq A _ _).
107 |
108 | eq-sub-tp-low : same T1 T1' -> sub-tp G T1 T2 -> sub-tp G T1' T2 -> type.
109 | %mode eq-sub-tp-low +A +B -C.
110 |
111 | - : eq-sub-tp-low ident BT BT.
112 |
113 | %worlds () (eq-sub-tp-low _ _ _).
114 | %total A (eq-sub-tp-low A _ _).
115 | %reduces C <= B (eq-sub-tp-low _ B C).
116 |
117 | eq-sub-tp-high : same T2 T2' -> sub-tp G T1 T2 -> sub-tp G T1 T2' -> type.
118 | %mode eq-sub-tp-high +A +B -C.
119 |
120 | - : eq-sub-tp-high ident BT BT.
121 |
122 | %worlds () (eq-sub-tp-high _ _ _).
123 | %total A (eq-sub-tp-high A _ _).
124 | %reduces C <= B (eq-sub-tp-high _ B C).
125 |
126 | eq-sub-dc-low : samed D1 D1' -> sub-dc G D1 D2 -> sub-dc G D1' D2 -> type.
127 | %mode eq-sub-dc-low +A +B -C.
128 |
129 | - : eq-sub-dc-low identd BD BD.
130 |
131 | %worlds () (eq-sub-dc-low _ _ _).
132 | %total A (eq-sub-dc-low A _ _).
133 | %reduces C <= B (eq-sub-dc-low _ B C).
134 |
135 | eq-sub-dc-high : samed D2 D2' -> sub-dc G D1 D2 -> sub-dc G D1 D2' -> type.
136 | %mode eq-sub-dc-high +A +B -C.
137 |
138 | - : eq-sub-dc-high identd BD BD.
139 |
140 | %worlds () (eq-sub-dc-high _ _ _).
141 | %total A (eq-sub-dc-high A _ _).
142 | %reduces C <= B (eq-sub-dc-high _ B C).
143 |
144 | upper-eq : samed D D' -> has-upper D U -> has-upper D' U' -> same U U' -> type.
145 | %mode upper-eq +A +B +C -D.
146 |
147 | - : upper-eq identd has-upper/yes has-upper/yes ident.
148 |
149 | %worlds () (upper-eq _ _ _ _).
150 | %total A (upper-eq A _ _ _).
151 |
152 | %{ ------- regularity ------ }%
153 |
154 | extract-wfd : sub-dc G T1 T2 -> wf-dc G T1 -> wf-dc G T2 -> type.
155 | %mode extract-wfd +A -B -C.
156 | extract-wf : sub-tp G T1 T2 -> wf-tp G T1 -> wf-tp G T2 -> type.
157 | %mode extract-wf +A -B -C.
158 |
159 | - : extract-wf (sub-tp/top W) W wf-tp/top.
160 |
161 | - : extract-wf (sub-tp/tsel1 B H D L)
162 | (wf-tp/tsel D L)
163 | W2
164 | <- extract-wf B _ W2.
165 |
166 | - : extract-wf (sub-tp/tsel2 B H D L)
167 | W1
168 | (wf-tp/tsel D L)
169 | <- extract-wf B W1 _.
170 |
171 | - : extract-wf (sub-tp/tbind BD W2)
172 | (wf-tp/tbind D1)
173 | W2
174 | <- extract-wfd BD D1 D2.
175 |
176 | - : extract-wfd (sub-dc/ss B2 B1 BU BS)
177 | (wf-dc/s B1)
178 | (wf-dc/s B2).
179 |
180 | - : extract-wfd (sub-dc/sn B1 BU)
181 | (wf-dc/s B1)
182 | (wf-dc/n WU2)
183 | <- extract-wf BU _ WU2.
184 |
185 | - : extract-wfd (sub-dc/nn BU)
186 | (wf-dc/n WU1)
187 | (wf-dc/n WU2)
188 | <- extract-wf BU WU1 WU2.
189 |
190 | %worlds () (extract-wf _ _ _) (extract-wfd _ _ _).
191 | %total (A B) (extract-wf A _ _) (extract-wfd B _ _).
192 |
--------------------------------------------------------------------------------
/dev2014/sources.cfg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/dev2014/sources.cfg
--------------------------------------------------------------------------------
/dev2015/README.md:
--------------------------------------------------------------------------------
1 | - From F to DOT: Type Soundness Proofs with Definitional Interpreters [[pdf]](http://arxiv.org/pdf/1510.05216.pdf)
2 | - big-step
3 | - [simply typed lambda calculus](nano0.v)
4 | - [F<:](fsub0.v)
5 | - [D<:>](fsub2.v) (F<: with first-class types and lower bounds)
6 | - [D<:> with state](fsub4.v) (add mutable references to D<:)
7 | - [full DOT](dot24.v) (D<:> plus intersection and union types, recursive self types, compound objects, ...)
8 | - back to small-step
9 | - [sketch](dot-smallstep1.v)
10 | - [full DOT](dot-smallstep5.v)
11 |
--------------------------------------------------------------------------------
/dev2016/.dir-locals.el:
--------------------------------------------------------------------------------
1 | ((coq-mode . ((coq-prog-args . ("-emacs-U" "-I" "../../sf" "-I" ".")))))
2 |
--------------------------------------------------------------------------------
/dev2016/README.md:
--------------------------------------------------------------------------------
1 | From F to D
2 | ===========
3 |
4 | 1. `fsub.v`
5 | 2. `dsub.v` or `fsub_translucent.v` -- or at any point `..._mut.v`
6 | 3. `dsub_bot.v`
7 | 4. `dsub_bot_and_or.v`
8 | 5. `dsub_bot_and_or_rec.v`
9 | 6. `dsub_bot_and_or_rec_fix.v`
10 | 7. `dot.v`
11 | 8. `pot.v`
12 |
--------------------------------------------------------------------------------
/dev2016/dot_exs.v:
--------------------------------------------------------------------------------
1 | (*
2 | coqc -I ../../sf/ dot.v
3 | *)
4 |
5 | Require Import dot.
6 |
7 | (* ############################################################ *)
8 | (* Examples *)
9 | (* ############################################################ *)
10 |
11 | Hint Constructors dms_has_type.
12 |
13 | Definition dm_compute (d: dm) (l: lb) :=
14 | match d with
15 | | dty T11 => TMem l T11 T11
16 | | dfun T11 T12 t12 => TFun l T11 T12
17 | end.
18 | Fixpoint dms_compute (ds: dms) :=
19 | match ds with
20 | | dnil => TTop
21 | | dcons d ds => TAnd (dm_compute d (length (dms_to_list ds))) (dms_compute ds)
22 | end.
23 |
24 | Ltac apply_dfun := match goal with
25 | | [ |- dms_has_type ?GH ?G1 (dcons (dfun ?T11 ?T12 ?t12) ?ds) ?T ?n ] =>
26 | eapply (D_Fun GH G1 (length (dms_to_list ds)) T11 T12 (open 0 (TVar false (length GH)) T12) t12 ds (dms_compute ds) (TAnd (TFun (length (dms_to_list ds)) T11 T12) (dms_compute ds)))
27 | end.
28 |
29 | Ltac apply_tobj := match goal with
30 | | [ |- has_type ?GH ?G1 (tobj ?ds) ?T ?n ] =>
31 | eapply (T_Obj GH G1 ds) with (T':=(dms_compute ds))
32 | end.
33 |
34 | Ltac apply_stp_bind1 := match goal with
35 | | [ |- stp ?GH ?G1 (TBind (TAnd ?T1 ?T2)) ?T1 ?n ] =>
36 | eapply (stp_trans GH G1 (TBind (TAnd T1 T2)) (TAnd T1 T2) T1)
37 | end.
38 |
39 | Ltac crush := simpl;
40 | try solve [apply_stp_bind1; [(eapply stp_bind1; crush) | (eapply stp_and11; crush)]];
41 | try solve [eapply T_Sub; [(apply_tobj; crush) | (crush)]];
42 | try solve [apply_dfun; crush];
43 | try solve [eapply stp_selx; crush];
44 | try solve [simpl; erewrite <- closed_no_open; try reflexivity; crush];
45 | try solve [econstructor; crush];
46 | try solve [eapply T_Sub; crush].
47 |
48 | Example ex0: has_typed [] [] (tobj dnil) TTop.
49 | eexists. crush.
50 | Grab Existential Variables.
51 | apply 0. apply 0. apply 0. apply 0.
52 | Qed.
53 |
54 | (* define polymorphic identity function *)
55 |
56 | Definition polyId := TFun 0 (TMem 0 TBot TTop) (TFun 0 (TSel (TVarB 0) 0) (TSel (TVarB 1) 0)).
57 |
58 | Example ex1: has_typed
59 | [] []
60 | (tobj (dcons (dfun (TMem 0 TBot TTop) (TFun 0 (TSel (TVarB 0) 0) (TSel (TVarB 1) 0))
61 | (tobj (dcons (dfun (TSel (TVar false 1) 0) (TSel (TVar false 1) 0) (tvar false 3)) dnil))) dnil)) polyId.
62 | Proof.
63 | unfold polyId.
64 | eexists. crush.
65 | Grab Existential Variables.
66 | apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0.
67 | apply 0. apply 0. apply 0. apply 0. apply 0.
68 | Qed.
69 |
70 | (* instantiate it to TTop *)
71 | Example ex2: has_typed [polyId] [] (tapp (tvar false 0) 0 (tobj (dcons (dty TTop) dnil))) (TFun 0 TTop TTop).
72 | Proof.
73 | unfold polyId.
74 | eexists.
75 | eapply T_App.
76 | eapply T_Sub.
77 | eapply T_Varz. compute. reflexivity.
78 | crush.
79 | instantiate (2:=TMem 0 TTop TTop). crush.
80 | crush.
81 | crush.
82 | Grab Existential Variables.
83 | apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0.
84 | apply 0. apply 0.
85 | Qed.
86 |
--------------------------------------------------------------------------------
/dev2016/dot_storeless_exs.v:
--------------------------------------------------------------------------------
1 | (*
2 | coqc -I ../../sf/ dot_storeless.v
3 | *)
4 |
5 | Require Import dot_storeless.
6 |
7 | (* ############################################################ *)
8 | (* Examples *)
9 | (* ############################################################ *)
10 |
11 | Hint Constructors dms_has_type.
12 |
13 | Definition dm_compute (d: dm) (l: lb) :=
14 | match d with
15 | | dty T11 => TMem l T11 T11
16 | | dfun T11 T12 t12 => TFun l T11 T12
17 | end.
18 | Fixpoint dms_compute (ds: dms) :=
19 | match ds with
20 | | dnil => TTop
21 | | dcons d ds => TAnd (dm_compute d (length (dms_to_list ds))) (dms_compute ds)
22 | end.
23 |
24 | Ltac apply_dfun := match goal with
25 | | [ |- dms_has_type ?GH (dcons (dfun ?T11 ?T12 ?t12) ?ds) ?T ?n ] =>
26 | eapply (D_Abs GH (length (dms_to_list ds)) T11 T12 (open 0 (TVar (VAbs (length GH))) T12) t12 ds (dms_compute ds) (TAnd (TFun (length (dms_to_list ds)) T11 T12) (dms_compute ds)))
27 | end.
28 |
29 | Ltac apply_tobj := match goal with
30 | | [ |- has_type ?GH (tobj ?ds) ?T ?n ] =>
31 | eapply (T_Obj GH ds) with (T':=(dms_compute ds))
32 | end.
33 |
34 | Ltac apply_stp_bind1 := match goal with
35 | | [ |- stp ?GH (TBind (TAnd ?T1 ?T2)) ?T1 ?n ] =>
36 | eapply (stp_trans GH (TBind (TAnd T1 T2)) (TAnd T1 T2) T1)
37 | end.
38 |
39 | Ltac crush := simpl;
40 | try solve [apply_stp_bind1; [(eapply stp_bind1; crush) | (eapply stp_and11; crush)]];
41 | try solve [eapply T_Sub; [(apply_tobj; crush) | (crush)]];
42 | try solve [apply_dfun; crush];
43 | try solve [eapply stp_selx; crush];
44 | try solve [simpl; erewrite <- closed_no_open; try reflexivity; crush];
45 | try solve [econstructor; crush];
46 | try solve [eapply T_Sub; crush].
47 |
48 | Example ex0: has_typed [] (tobj dnil) TTop.
49 | eexists. crush.
50 | Grab Existential Variables.
51 | apply 0. apply 0. apply 0.
52 | Qed.
53 |
54 | (* define polymorphic identity function *)
55 |
56 | Definition polyId := TFun 0 (TMem 0 TBot TTop) (TFun 0 (TSel (TVarB 0) 0) (TSel (TVarB 1) 0)).
57 |
58 | Example ex1: has_typed
59 | []
60 | (tobj (dcons (dfun (TMem 0 TBot TTop) (TFun 0 (TSel (TVarB 0) 0) (TSel (TVarB 1) 0))
61 | (tobj (dcons (dfun (TSel (TVar (VAbs 1)) 0) (TSel (TVar (VAbs 1)) 0) (tvar (VAbs 3))) dnil))) dnil)) polyId.
62 | Proof.
63 | unfold polyId.
64 | eexists. crush.
65 | Grab Existential Variables.
66 | apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0.
67 | apply 0. apply 0. apply 0.
68 | Qed.
69 |
70 | (* instantiate it to TTop *)
71 | Example ex2: has_typed [polyId] (tapp (tvar (VAbs 0)) 0 (tobj (dcons (dty TTop) dnil))) (TFun 0 TTop TTop).
72 | Proof.
73 | unfold polyId.
74 | eexists.
75 | eapply T_App.
76 | eapply T_Sub.
77 | eapply T_Varz. compute. reflexivity.
78 | crush.
79 | instantiate (2:=TMem 0 TTop TTop). crush.
80 | crush.
81 | crush.
82 | Grab Existential Variables.
83 | apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0.
84 | apply 0.
85 | Qed.
86 |
--------------------------------------------------------------------------------
/dev2016/dot_storeless_tidy_exs.v:
--------------------------------------------------------------------------------
1 | (*
2 | coqc -I ../../sf/ dot_storeless_tidy.v
3 | *)
4 |
5 | (* Beware: This only works with Coq 8.4pl6, whereas Coq 8.5 seems to loop infinitely on the crush tactic *)
6 |
7 | Require Import dot_storeless_tidy.
8 |
9 | (* ############################################################ *)
10 | (* Examples *)
11 | (* ############################################################ *)
12 |
13 | Hint Constructors dms_has_type.
14 |
15 | Definition dm_compute (d: dm) (l: lb) :=
16 | match d with
17 | | dty T11 => TMem l T11 T11
18 | | dfun T11 T12 t12 => TFun l T11 T12
19 | end.
20 | Fixpoint dms_compute (ds: dms) :=
21 | match ds with
22 | | dnil => TTop
23 | | dcons d ds => TAnd (dm_compute d (length (dms_to_list ds))) (dms_compute ds)
24 | end.
25 |
26 | Ltac apply_dfun := match goal with
27 | | [ |- dm_has_type ?GH ?l (dfun ?T11 ?T12 ?t12) ?T ?n ] =>
28 | eapply (D_Fun GH l T11 T12 (open 0 (VarF (length GH)) T12) t12 (tm_open 0 (VarF (length GH)) t12))
29 | end.
30 |
31 | Ltac apply_tobj := match goal with
32 | | [ |- has_type ?GH (tvar (VObj ?ds)) ?T ?n ] =>
33 | eapply (T_VObj GH ds (dms_open 0 (VarF (length GH)) ds) (dms_compute ds) (open 0 (VarF (length GH)) (dms_compute ds)) (open 0 (VObj ds) (dms_compute ds)))
34 | end.
35 |
36 | Ltac apply_stp_bind1 := match goal with
37 | | [ |- stp ?GH (TBind (TAnd ?T1 ?T2)) ?T1 ?n ] =>
38 | eapply (stp_trans GH (TBind (TAnd T1 T2)) (TAnd T1 T2) T1)
39 | end.
40 |
41 | Ltac crush := simpl;
42 | try solve [apply_stp_bind1; [(eapply stp_bind1; crush) | (eapply stp_and11; crush)]];
43 | try solve [eapply T_Sub; [(apply_tobj; crush) | (crush)]];
44 | try solve [apply_dfun; crush];
45 | try solve [eapply stp_selx; crush];
46 | try solve [simpl; erewrite <- closed_no_open; try reflexivity; crush];
47 | try solve [econstructor; crush];
48 | try solve [eapply T_Sub; crush].
49 |
50 | Example ex0: has_typed [] (tvar (VObj dnil)) TTop.
51 | eexists. crush.
52 | Grab Existential Variables.
53 | apply 0. apply 0.
54 | Qed.
55 |
56 | Example ex_loop: has_typed [] (tvar (VObj (dcons (dfun TTop TBot (tapp (tvar (VarB 1)) 0 (tvar (VarB 0)))) dnil))) (TFun 0 TTop TBot).
57 | eexists.
58 | eapply T_Sub.
59 | apply_tobj.
60 | simpl. eapply D_Cons. reflexivity. simpl. apply_dfun.
61 | simpl. eapply T_App. instantiate (2:=TTop). crush.
62 | eapply T_VarF. simpl. reflexivity. crush. econstructor.
63 | reflexivity. reflexivity. crush. crush. crush. crush. reflexivity. reflexivity.
64 | crush. crush. reflexivity. crush.
65 | Grab Existential Variables.
66 | apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0.
67 | Qed.
68 |
69 | (* define polymorphic identity function *)
70 |
71 | Definition polyId := TFun 0 (TMem 0 TBot TTop) (TFun 0 (TSel (VarB 0) 0) (TSel (VarB 1) 0)).
72 |
73 | Example ex1: has_typed
74 | []
75 | (tvar (VObj (dcons (dfun (TMem 0 TBot TTop) (TFun 0 (TSel (VarB 0) 0) (TSel (VarB 1) 0))
76 | (tvar (VObj (dcons (dfun (TSel (VarB 1) 0) (TSel (VarB 2) 0) (tvar (VarB 0))) dnil)))) dnil))) polyId.
77 | Proof.
78 | unfold polyId.
79 | eexists. crush.
80 | Grab Existential Variables.
81 | apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0.
82 | Qed.
83 |
84 | (* instantiate it to TTop *)
85 | Example ex2: has_typed [polyId] (tapp (tvar (VarF 0)) 0 (tvar (VObj (dcons (dty TTop) dnil)))) (TFun 0 TTop TTop).
86 | Proof.
87 | unfold polyId.
88 | eexists.
89 | eapply T_App.
90 | eapply T_Sub.
91 | eapply T_VarF. compute. reflexivity.
92 | crush.
93 | instantiate (2:=TMem 0 TTop TTop). crush.
94 | crush.
95 | crush.
96 | Grab Existential Variables.
97 | apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0. apply 0.
98 | Qed.
99 |
--------------------------------------------------------------------------------
/dev2020/dsubsup_cc/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !*.md
3 | !*.v
4 | !Makefile
5 | !.gitignore
6 |
--------------------------------------------------------------------------------
/dev2020/dsubsup_cc/README.md:
--------------------------------------------------------------------------------
1 | # Layout
2 |
3 | * `languages.v`: definition of our Dsubsup dialect in module `D`, definition of a dependently-typed target language in module `CC`.
4 | * `cc_meta.v`: Metatheory (strong normalization) of language `CC`.
5 | * `translation.v`: definition and proofs of a type- and reduction-preserving translation of `D` into `CC`, establishing strong normalization of `D`.
6 |
--------------------------------------------------------------------------------
/dev2020/dsubsup_cc/cc_meta.v:
--------------------------------------------------------------------------------
1 | Require Export Arith.EqNat.
2 | Require Export Arith.Le.
3 | Require Import Coq.Program.Equality.
4 | Require Import Omega.
5 | Require Import Coq.Lists.List.
6 | Import ListNotations.
7 |
8 | Require Import languages.
9 | Import CC.Notations.
10 | Open Scope cc_scope.
11 |
12 | Import CC.
13 |
14 | Lemma open_identity: forall b b' f u t,
15 | closed b f t ->
16 | b' >= b ->
17 | (open_rec b' u t) = t.
18 | Proof.
19 | Admitted.
20 |
21 | Lemma subst_identity: forall b f f' u t,
22 | closed b f t ->
23 | f' >= f ->
24 | (subst f u t) = t.
25 | Proof.
26 | Admitted.
27 |
28 | (* TODO: prove that (T^e) = (T^x){e/x} *)
29 | Lemma open_subst: forall b b' f u t,
30 | closed b f t ->
31 | (open_rec b' u t) = (subst f u (open_rec b' (tvar (varF f)) t)).
32 | Proof.
33 | Admitted.
34 |
35 | (* TODO prove strong normalization *)
36 | Theorem full_total_safety : strong_normalization.
37 | Proof.
38 | unfold strong_normalization.
39 | Admitted.
40 |
--------------------------------------------------------------------------------
/doc2014/dot_macros.tex:
--------------------------------------------------------------------------------
1 | \newcommand{\tbnd}[2]{\{#1 \Rightarrow #2\}}
2 | \newcommand{\tmem}[3]{\textbf{type } #1 : #2 .. #3 }
3 | \newcommand{\tmemup}[2]{\textbf{type } #1 <: #2 }
4 | \newcommand{\tdef}[3]{\textbf{def } #1 : #2 \rightarrow #3 }
5 | \newcommand{\inew}[2]{\textbf{new }(#1 \Rightarrow #2)}
6 | \newcommand{\idef}[5]{\textbf{def } #1(#2: #3): #4 = #5}
7 | \newcommand{\vclo}[3]{\ $<$ #1 \Rightarrow #2 {\bf \ in \ } #3 $>$\ }
8 | \newcommand{\vdef}[3]{\textbf{def } #1(#2) = #3}
9 | \newcommand{\ev}[0]{\Downarrow\ }
10 | \newcommand{\evn}[1]{\Downarrow_{#1}}
11 | \newcommand{\st}[0]{\dashv}
12 | \newcommand{\ilet}[4]{\textbf{val } #1: #2 = #3; #4}
13 | \newcommand{\timeout}[0]{\textbf{timeout}}
14 | \newcommand{\stuck}[0]{\textbf{stuck}}
15 |
16 |
17 |
18 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19 | % Language abstraction commands %
20 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21 |
22 | % spacing
23 | \newcommand{\gap}{\quad\quad}
24 | \newcommand{\biggap}{\quad\quad\quad}
25 | \newcommand{\nextline}{\\ \\}
26 | \newcommand{\htabwidth}{0.5cm}
27 | \newcommand{\tabwidth}{1cm}
28 | \newcommand{\htab}{\hspace{\htabwidth}}
29 | \newcommand{\tab}{\hspace{\tabwidth}}
30 | \newcommand{\linesep}{\ \hrulefill \ \smallskip}
31 |
32 | \newcommand{\mi}[1]{\mathit{#1}}
33 |
34 | % misc symbols
35 | \newcommand{\dhd}{\!\!\!\!\!\rightarrow}
36 | \newcommand{\Dhd}{\!\!\!\!\!\Rightarrow}
37 | \newcommand{\ts}{\,\vdash\,}
38 | \newcommand{\la}{\langle}
39 | \newcommand{\ra}{\rangle}
40 | \newcommand{\eg}{{\em e.g.}}
41 |
42 | % misc identifiers
43 | \newcommand{\dom}{\mbox{\sl dom}}
44 | \newcommand{\fn}{\mbox{\sl fn}}
45 | \newcommand{\bn}{\mbox{\sl bn}}
46 | \newcommand{\sig}{\mbox{\sl sig}}
47 | \newcommand{\IF}{\mbox{\mathem if}}
48 | \newcommand{\OTHERWISE}{\mbox{\mathem otherwise}}
49 | \newcommand{\expand}{\prec}
50 | \newcommand{\weakexpand}{\prec^W}
51 | \newcommand{\spcomma}{~,~}
52 | \newcommand{\spsep}{~;~}
53 |
54 |
55 | %% Relations
56 | % Subtype
57 | \newcommand{\sub}{<:}
58 | % Type assignment
59 | \newcommand{\typ}{:}
60 | % reduction
61 | \newcommand{\reduces}{\;\rightarrow\;}
62 | % well-formedness
63 | \newcommand{\wf}{\;\mbox{\textbf{wf}}}
64 | \newcommand{\nswf}{\mbox{\textbf{wf}}}
65 | \newcommand{\wfe}{\;\mbox{\textbf{wfe}}}
66 | \newcommand{\nswfe}{\mbox{\textbf{wfe}}}
67 |
68 | %% Operators
69 | % Type selection
70 | \newcommand{\tsel}{\#}
71 | % Function type
72 | \newcommand{\tfun}{\rightarrow}
73 | \newcommand{\dfun}[3]{(#1\!:\!#2) \Rightarrow #3}
74 | % Conjunction
75 | \newcommand{\tand}{\wedge}
76 | % Disjunction
77 | \newcommand{\tor}{\vee}
78 | % Singleton type suffix
79 | \newcommand{\sing}{.\textbf{type}}
80 |
81 | %% Syntax
82 | % Header for typing rules
83 | \newcommand{\judgement}[2]{{\bf #1} \hfill #2}
84 | % Widening
85 | \newcommand{\wid}[2]{#1 : #2}
86 | % Refinement
87 | \newcommand{\refine}[2]{\left\{#1 \Rightarrow #2 \right\}}
88 | \newcommand{\mlrefine}[2]{\{#1 \Rightarrow #2 \}}
89 | % Field definitions
90 | \newcommand{\ldefs}[1]{\left\{#1\right\}}
91 | \newcommand{\mlldefs}[1]{\{#1\}}
92 | % Member sequences
93 | \newcommand{\seqforall}[2]{\overbrace{#1}^{\forall #2}}
94 | \newcommand{\seq}[1]{\overline{#1}}
95 | % Lambda
96 | \newcommand{\dabs}[3]{(#1\!:\!#2)\Rightarrow #3}
97 | \newcommand{\abs}[3]{\lambda #1\!:\!#2.#3}
98 | % Method Application
99 | \newcommand{\mapp}[3]{#1.#2(#3)}
100 | % Substitution
101 | \newcommand{\subst}[3]{[#1/#2]#3}
102 | % Object creation
103 | \newcommand{\new}[3]{\textbf{val }#1 = \textbf{new }#2 ;\; #3}
104 | \newcommand{\mlnew}[3]{\textbf{val }#1 = \textbf{new }#2 ;\;\\}
105 | %\renewcommand{\new}[3]{#1 \leftarrow #2 \,\textbf{in}\, #3}
106 | % Field declaration
107 | \newcommand{\Ldecl}[3]{#1 : #2..#3}%{#1 \operatorname{>:} #2 \operatorname{<:} #3}
108 | \newcommand{\ldecl}[2]{#1 : #2}
109 | \newcommand{\mdecl}[3]{#1 : #2 \tfun #3}
110 | % Top and Bottom
111 | \newcommand{\Top}{\top}%{\textbf{Top}}
112 | \newcommand{\Bot}{\bot}%\textbf{Bot}}
113 | % Environment extension
114 | %\newcommand{\envplus}[1]{\uplus \{ #1 \}}
115 | \newcommand{\envplus}[1]{, #1}
116 | % Reduction
117 | \newcommand{\reduction}[4]{#1 \operatorname{|} #2 \reduces #3 \operatorname{|} #4}
118 |
119 | % Sugar
120 | \newcommand{\arrow}[2]{#1\rightarrow_s#2}
121 | \newcommand{\fun}[4]{\textbf{fun } (#1:#2)\;#3\;#4}
122 | \newcommand{\app}[2]{(\textbf{app }#1\;#2)}
123 | \newcommand{\mlapp}[2]{(\textbf{app }#1\;\\)}
124 | \newcommand{\cast}[2]{(\textbf{cast }#1\;#2)}
125 |
126 | \newcommand{\lindent}{\hspace{-4mm}}
127 |
128 | % Logical relations
129 | \newcommand{\relv}[4]{\mathcal{V}_{#1;#2;#3}\llbracket#4\rrbracket}
130 | \newcommand{\rele}[4]{\mathcal{E}_{#1;#2;#3}\llbracket#4\rrbracket}
131 | \newcommand{\rels}[3]{\mathcal{\supseteq}_{#1}\llbracket#2;#3\rrbracket}
132 | \newcommand{\relg}[3]{\mathcal{\supseteq^!}_{#1;#2}\llbracket#3\rrbracket}
133 | \newcommand{\irred}[2]{\text{irred }(#1,#2)}
134 | \newcommand{\andl}{\;\wedge\;}
135 | \newcommand{\orl}{\vee}
136 | \newcommand{\impliesl}{\rightarrow}
137 | \newcommand{\reductionl}[5]{#1 \operatorname{|} #2 \;\rightarrow^{#5}\; #3 \operatorname{|} #4}
138 | \newcommand{\ds}{\,\vDash\,}
139 |
--------------------------------------------------------------------------------
/doc2014/industry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/doc2014/industry.png
--------------------------------------------------------------------------------
/doc2014/lub1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/doc2014/lub1.png
--------------------------------------------------------------------------------
/doc2014/lub2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/doc2014/lub2.png
--------------------------------------------------------------------------------
/doc2014/math.sty:
--------------------------------------------------------------------------------
1 | %
2 | % Frame for paste-in figures or tables
3 | \def\mpicplace#1#2{%#1 = width #2 = height
4 | \vbox{\@tempdima=#2\advance\@tempdima by-2\fboxrule
5 | \hrule\@height \fboxrule\@width #1
6 | \hbox to #1{\vrule\@width \fboxrule\@height\@tempdima\hfil
7 | \vrule\@width \fboxrule\@height\@tempdima}\hrule\@height
8 | \fboxrule\@width #1}}
9 |
--------------------------------------------------------------------------------
/doc2015/figures.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/doc2015/figures.pptx
--------------------------------------------------------------------------------
/doc2015/fool.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/doc2015/fool.pdf
--------------------------------------------------------------------------------
/doc2015/industry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/doc2015/industry.png
--------------------------------------------------------------------------------
/doc2015/lub1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/doc2015/lub1.png
--------------------------------------------------------------------------------
/doc2015/lub2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/doc2015/lub2.png
--------------------------------------------------------------------------------
/doc2015/macros.tex:
--------------------------------------------------------------------------------
1 | % ----- listings
2 |
3 | \definecolor{ckeyword}{HTML}{7F0055}
4 | \definecolor{ccomment}{HTML}{3F7F5F}
5 | \definecolor{cstring}{HTML}{2A0099}
6 | % name 7F0055
7 |
8 | \lstdefinelanguage{Scala}%
9 | {morekeywords={abstract,%
10 | case,catch,char,class,%
11 | def,else,extends,final,finally,for,forSome,%
12 | if,import,implicit,%
13 | match,module,%
14 | new,null,%
15 | object,override,%
16 | package,private,protected,public,%
17 | for,public,return,super,sealed,%
18 | this,throw,trait,try,type,%
19 | val,var,%
20 | with,while,%
21 | yield%
22 | },%
23 | sensitive,%
24 | morecomment=[l]//,%
25 | morecomment=[s]{/*}{*/},%
26 | morestring=[b]",%
27 | morestring=[b]',%
28 | showstringspaces=false%
29 | }[keywords,comments,strings]%
30 |
31 | \lstset{language=Scala,%
32 | mathescape=true,%
33 | % columns=[c]fixed,%
34 | % basewidth={0.5em, 0.40em},%
35 | % aboveskip=1pt,%\smallskipamount,
36 | % belowskip=1pt,%\negsmallskipamount,
37 | lineskip=-0.5pt,
38 | basewidth={0.54em, 0.4em},%
39 | % backgroundcolor=\color{listingbg},
40 | basicstyle=\footnotesize\ttfamily,
41 | keywordstyle={\color{ckeyword}\ttfamily\bfseries},
42 | commentstyle={\color{ccomment}\itshape},
43 | stringstyle={\color{cstring}},
44 | xleftmargin=1ex
45 | }
46 |
47 | % class EclipseStyle(Style):
48 | % """
49 | % Style similar to the style used in Eclipse IDEs. (Jevon)
50 | % """
51 |
52 | % default_style = ''
53 |
54 | % styles = {
55 | % Whitespace: '#bbbbbb',
56 |
57 | % Comment: "nobold #3F7F5F", # 63,127,95
58 | % Comment.Multiline: "#3F5FBF", # assume all multiline comments = Javadoc comments, 63,95,191
59 | % Comment.Preproc: 'italic #666', # e.g. XML preprocessing instruction
60 |
61 | % # Comment.Preproc: "noitalic",
62 |
63 | % Keyword: "bold #7F0055", # 127,0,85
64 | % Keyword.Pseudo: "#f00",
65 | % Keyword.Type: "bold #7F0055", # e.g. int
66 |
67 | % Operator: "#000", # e.g. +, -, (, )
68 | % # Operator.Word: "#00f",
69 |
70 | % Number: "#000",
71 |
72 | % # Name: "nobold #000",
73 | % Name.Class: "nobold #000",
74 | % Name.Namespace: "nobold #000",
75 | % Name.Exception: "nobold #000",
76 | % Name.Entity: "nobold #000",
77 | % Name.Tag: "bold #7F0055", # XML/HTML tags - 127,0,85
78 | % Name.Function: "nobold #000",
79 | % Name.Attribute: "nobold #000", # XML/HTML attributes
80 | % Name.Decorator: "nobold #646464", # @Annotations - 100,100,100
81 |
82 | % String: "#2A00FF", # 42,0,255
83 | % #String.Interpol: "bold",
84 | % #String.Escape: "bold",
85 |
86 | % Generic.Heading: "bold",
87 | % Generic.Subheading: "bold",
88 | % Generic.Emph: "italic",
89 | % Generic.Strong: "bold",
90 | % Generic.Prompt: "bold",
91 |
92 | % Error: "border:#FF0000"
93 | % }
94 |
95 |
96 |
97 | \definecolor{listingbg}{RGB}{240, 240, 240}
98 |
99 | \newcommand{\commentstyle}[1]{\slseries{#1}}
100 | \newcommand{\keywordstyle}[1]{\bfseries{#1}}
101 |
102 | \lstnewenvironment{listing}{\lstset{language=Scala}}{}
103 | \lstnewenvironment{listingtiny}{\lstset{language=Scala,basicstyle=\scriptsize\ttfamily}}{}
104 |
105 | \lstnewenvironment{minted}{\lstset{language=Scala}}{}
106 |
107 |
108 | \newcommand{\code}[1]{\lstinline[language=Scala,columns=fixed,basicstyle=\ttfamily]|#1|}
109 |
110 | \newcommand{\mint}[1]{\lstinline[language=Scala,columns=fixed,basicstyle=\ttfamily]|#1|}
111 |
112 |
113 |
114 | % ----- packed items, so we don't waste space
115 | \newenvironment{sitemize}{\vspace{-4pt}
116 | \begin{itemize}
117 | \setlength{\itemsep}{1pt}
118 | \setlength{\parskip}{0pt}
119 | \setlength{\parsep}{0pt}
120 | }{\end{itemize}}
121 |
122 | \newenvironment{senumerate}{
123 | \begin{enumerate}
124 | \setlength{\itemsep}{1pt}
125 | \setlength{\parskip}{0pt}
126 | \setlength{\parsep}{0pt}
127 | }{\end{enumerate}}
128 |
129 | \newcommand{\mypar}[1]{{\bf #1.}}
130 |
131 | % ----- comments and todo
132 |
133 | %\newcommand{\note}[1]{{\color{red}[#1]}}
134 | %\newcommand{\todo}[1]{\note{TODO: #1}}
135 |
136 | %\newcommand{\comment}[1]{}
--------------------------------------------------------------------------------
/doc2015/slides.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/doc2015/slides.pdf
--------------------------------------------------------------------------------
/ecoop17/README.md:
--------------------------------------------------------------------------------
1 | ## Towards Strong Normalization for Dependent Object Types (DOT) ##
2 |
3 | Paper (ECOOP 2017): [[pdf](https://www.cs.purdue.edu/homes/rompf/papers/wang-ecoop17.pdf)]
4 |
5 | ### Mechanization in Coq ###
6 |
7 | The Coq scripts compile with the command `make`, using `coqc --version` 8.6.
8 |
9 | - [`dsubsup_total.v`](dsubsup_total.v) -- termination proof for plain D<:> (Section 3)
10 | - [`dsubsup_total_rec.v`](dsubsup_total_rec.v) -- termination proof for D<:> plus recursive self types and intersection types (Section 4)
11 |
12 | ### Artifact Guide ###
13 |
14 | Appendix A of the paper, _Strong Normalization for Dependent Object Types (DOT)_ ([PDF](https://www.cs.purdue.edu/homes/rompf/papers/wang-ecoop17.pdf)), describes the correspondence between the formalism on paper and the development in Coq.
--------------------------------------------------------------------------------
/old/bin/ok.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ### script to check the main DOT elf sources, and optional files
4 | ###
5 | ### usage examples:
6 | ### ./bin/ok.sh dev/test14.elf dev/test15q.elf
7 |
8 | if [[ -z $TWELF_SERVER ]]; then
9 | bin=twelf-server
10 | else
11 | bin=$TWELF_SERVER
12 | fi
13 | command -v $bin >/dev/null 2>&1 || { echo >&2 "twelf-server not found. aborting..."; exit 1; }
14 |
15 | echo -e "set chatter 1\nConfig.read src/main/elf/sources.cfg\nConfig.load" | $bin
16 | echo
17 |
18 | for f in "$@"; do
19 | echo -e "set chatter 1\nloadFile $f" | $bin
20 | done
21 |
22 |
23 |
--------------------------------------------------------------------------------
/old/bin/sync.awk:
--------------------------------------------------------------------------------
1 | #!/usr/bin/awk -f
2 |
3 | ### script to sync dot.elf with dev
4 | ###
5 | ### usage examples:
6 | ### ./bin/sync.awk src/main/elf/dot.elf >dev/test15q.elf
7 | ### ./bin/sync.awk dev/test15q.elf >src/main/elf/dot.elf
8 |
9 | {
10 | ### uncomment lines starting with % ++
11 | if (substr($0, 0, 4) == "% ++")
12 | print substr($0, 6), "% --"
13 | ### comment lines ending with % --
14 | else if (substr($0, length($0)-3) == "% --")
15 | print "% ++", substr($0, 0, length($0)-5)
16 | ### remove twelf EOF
17 | else if ($0 == "%.")
18 | print "% EOF"
19 | ### add twelf EOF
20 | else if ($0 == "% EOF")
21 | print "%."
22 | else
23 | print $0
24 | }
25 |
--------------------------------------------------------------------------------
/old/bin/tex.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ### script to generate tex for dot.elf
4 | ### must be ran from ../tex directory!
5 |
6 | if [[ -z $TWELF_SERVER ]]; then
7 | bin=twelf-server
8 | else
9 | bin=$TWELF_SERVER
10 | fi
11 | command -v $bin >/dev/null 2>&1 || { echo >&2 "twelf-server not found. aborting..."; exit 1; }
12 |
13 | echo -e "set chatter 0\nloadFile ../dev/dot.elf\nPrint.sgn" | $bin | awk '!/^%%/' | tail -n +2 >dot.txt
14 | ../bin/twelf2tex.py dot.txt >dot_auto.tex
15 | pdflatex twelf.tex
16 | pdflatex minidot.tex
17 |
--------------------------------------------------------------------------------
/old/bin/twelf2tex.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | __doc__ = """usage: twelf2tex.py
4 | converts Twelf signatures to inference rules in the style of TAPL
5 | """
6 |
7 | import re
8 |
9 | def go(twelf_txt):
10 | rem = twelf_txt
11 | commands = []
12 | rules = []
13 | grouprules = {}
14 | cmdrules = []
15 | while '.' in rem:
16 | i = rem.index('.')
17 | line = rem[:i]
18 | rem = rem[i+1:]
19 | if '=' in line:
20 | # ignore abbreviations, such as let sugar
21 | continue
22 | name, c, r, g = process(line)
23 | if c:
24 | commands.append(c)
25 | if name:
26 | cmdrules.append("\\newcommand{\\rule" + name + "}[0]{" + r + "}")
27 | r = "{\\rule" + name + "}"
28 | if g:
29 | grouprules[g] = grouprules.get(g, [])
30 | grouprules[g].append(r)
31 | rules.append(r)
32 | print "\n".join(commands)
33 | print
34 | print "\n".join(cmdrules)
35 | print
36 | print "\n".join("\\newcommand{\\allrules" + g + "}[0]{\n" + "\n".join(rs) + "\n}" for g, rs in grouprules.iteritems())
37 | print
38 | print "\\newcommand{\\allrules}[0]{\n" + "\n".join(rules) + "\n}"
39 |
40 |
41 | def name2cmd(x):
42 | if x[0] == '-':
43 | return None
44 | x = x.replace("'", 'p')
45 | x = x.replace('-', '')
46 | x = x.replace('/', 'F')
47 | x = x.replace('0', 'Zero')
48 | x = x.replace('1', 'One')
49 | x = x.replace('2', 'Two')
50 | x = x.replace('3', 'Three')
51 | x = "aaa"+x
52 | return x
53 |
54 | def typ2tex_rec(x):
55 | if x[0] == '(':
56 | i = x.index(' ')
57 | name = name2cmd(x[1:i].strip())
58 | args = []
59 | rem = x[i+1:].strip()
60 | while rem != "" and rem[0] != ')':
61 | _, a, rem = typ2tex_rec(rem)
62 | args.append(a)
63 | if rem != "":
64 | rem = rem[1:].strip()
65 | return name, "{\\" + name + " " + " ".join(["{"+a+"}" for a in args]) + "}", rem
66 | else:
67 | i = 0
68 | n = len(x)
69 | while i", body)]
93 | n = len(parts)-1
94 | premises = []
95 | conclusion = ""
96 | for i,a in enumerate(parts):
97 | if a[0] == '(':
98 | a = a[1:]
99 | if a[-1] == ')':
100 | a = a[:-1]
101 | if a[0] == '{':
102 | ic = a.index(':')
103 | varname = a[1:ic].strip()
104 | vartype = a[ic+1:].strip()
105 | pname, p = None, "\\aaais {" + varname + "} {" + typ2tex(vartype) + "}"
106 | else:
107 | pname, p = typ2nametex(a)
108 | if i0:
121 | args = "(" + ",".join(["#" + str(i+1) for i in range(0, n)]) + ")"
122 | nmax = n
123 | if n>9:
124 | nmax = 9
125 | return "\\newcommand{\\" + namecmd + "}[" + str(nmax) + "]{\\text{" + name + args + "}}"
126 |
127 | def new_rule(name, premises, conclusion):
128 | r = ""
129 | if name2cmd(name) is None:
130 | named = ""
131 | else:
132 | named = "[" + name + "]"
133 | if premises==[]:
134 | r += "\\infax" + named
135 | else:
136 | r += "\\infrule" + named + "{\n"
137 | r += "\\\\\n".join(premises)
138 | r += "\n}"
139 | r += "{"
140 | r += conclusion
141 | r += "}"
142 | return r
143 |
144 | if __name__ == '__main__':
145 | import sys
146 | argc = len(sys.argv)
147 | if argc!=2:
148 | print __doc__
149 | else:
150 | with open(sys.argv[1], 'r') as twelf_file:
151 | twelf_txt = twelf_file.read()
152 | go(twelf_txt)
153 |
--------------------------------------------------------------------------------
/old/build.sbt:
--------------------------------------------------------------------------------
1 | name := "dot--"
2 |
3 | version := "0.1"
4 |
5 | scalaVersion := "2.10.2"
6 |
7 | scalacOptions += "-deprecation"
8 |
9 | scalacOptions += "-unchecked"
10 |
11 | libraryDependencies += "com.googlecode.kiama" %% "kiama" % "1.5.1"
12 |
13 | libraryDependencies += "org.scalatest" %% "scalatest" % "1.9.1" % "test"
14 |
15 | libraryDependencies += "junit" % "junit" % "4.11" % "test"
16 |
17 | unmanagedResourceDirectories in Test += baseDirectory.value / "src" / "test" / "dot"
18 |
--------------------------------------------------------------------------------
/old/cln/.dir-locals.el:
--------------------------------------------------------------------------------
1 | ((coq-mode . ((coq-prog-args . ("-emacs-U" "-I" "../../dot-calculus/ln/tlc")))))
2 |
--------------------------------------------------------------------------------
/old/mud/sources.cfg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TiarkRompf/minidot/57f6f31e21d61122d0f48b74fad2247074fa3cf8/old/mud/sources.cfg
--------------------------------------------------------------------------------
/old/src/main/elf/b1.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev b1 = (let _ (fun (rect (s z) bot top) z top empty top z empty top (mcons _ bot top (mcons _ bot top mnil))) (let _ (fun (rect (s z) bot top) z top empty top z empty top (mcons _ bot top (mcons _ bot top mnil))) (let _ (fun (arrow z (tsel (var z) (s z)) _) z (tsel (var z) (s z)) (var (s (s (s z)))) _ z empty top mnil) (let _ (fun (arrow z (tsel (var (s z)) (s z)) _) z (tsel (var (s z)) (s z)) (app (var (s (s z))) z (var (s (s (s (s z)))))) _ z empty top mnil) (var z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/b1ok.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev b1ok = (let _ (fun (rect (s z) bot top) z top empty top z empty top (mcons _ bot top (mcons _ bot top mnil))) (let _ (fun (rect (s z) bot top) z top empty top z empty top (mcons _ bot top (mcons _ bot top mnil))) (let _ (fun (arrow z (tsel (var z) (s z)) _) z (tsel (var z) (s z)) (var (s (s (s z)))) _ z empty top mnil) (let _ (fun (arrow z (tsel (var z) (s z)) _) z (tsel (var z) (s z)) (app (var (s (s z))) z (var (s (s (s (s z)))))) _ z empty top mnil) (var z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/b2.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev b2 = (let (bind z (and (rect (s (s (s z))) bot top) (and (rect (s (s z)) (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z))))) (recv (s z) (tsel (var z) (s (s z))))))) (fun (bind z (and (recv (s z) (tsel (var z) (s (s z)))) (and (rect (s (s (s z))) top top) (rect (s (s z)) (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z)))))))) z top empty top (s z) (fun top z top empty top z empty top mnil) (tsel (var z) (s (s z))) (mcons _ top top (mcons _ (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z)))) (mcons _ bot top (mcons _ bot top mnil))))) (let _ (fun (arrow z (bind z (and (rect (s (s (s z))) bot top) (and (rect (s (s z)) (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z))))) (recv (s z) (tsel (var z) (s (s z))))))) top) z (bind z (and (rect (s (s (s z))) bot top) (and (rect (s (s z)) (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z))))) (recv (s z) (tsel (var z) (s (s z))))))) (let (tsel (var (s (s z))) (s (s z))) (sel (var (s (s z))) (s z)) (var (s (s z)))) top z empty top mnil) (let (tsel (var z) (s (s z))) (fun top z top empty top z empty top mnil) (app (var (s z)) z (var z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/b3.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev b3 = (let _ (fun (arrow (s (s (s z))) top (bind (s z) (and (rect (s (s z)) bot top) (and (rect (s z) (tsel (var (s z)) (s (s z))) (tsel (var (s z)) (s (s z)))) (recv z (tsel (var (s z)) (s z))))))) (s (s (s z))) top (fun (bind (s (s z)) (and (recv z (tsel (var (s (s z))) (s z))) (and (rect (s (s z)) top top) (rect (s z) (tsel (var (s (s z))) (s (s z))) (tsel (var (s (s z))) (s (s z))))))) z top empty top z (var (s z)) (tsel (var (s (s z))) (s z)) (mcons _ bot top (mcons _ top top (mcons _ (tsel (var (s (s z))) (s (s z))) (tsel (var (s (s z))) (s (s z))) (mcons _ bot top mnil))))) (bind (s z) (and (rect (s (s z)) bot top) (and (rect (s z) (tsel (var (s z)) (s (s z))) (tsel (var (s z)) (s (s z)))) (recv z (tsel (var (s z)) (s z)))))) z empty top mnil) (let _ (fun top z top empty top z empty top mnil) (let _ (app (var z) (s (s (s z))) (var (s z))) (let (tsel (var (s (s z))) (s z)) (fun top z top empty top z empty top mnil) (var (s z)))))).
--------------------------------------------------------------------------------
/old/src/main/elf/b3ok.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev b3ok = (let _ (fun (arrow (s (s (s z))) top (bind (s z) (and (rect (s (s z)) bot top) (and (rect (s z) (tsel (var (s z)) (s (s z))) (tsel (var (s z)) (s (s z)))) (recv z (tsel (var (s z)) (s z))))))) (s (s (s z))) top (fun (bind (s (s z)) (and (recv z (tsel (var (s (s z))) (s z))) (and (rect (s (s z)) top top) (rect (s z) (tsel (var (s (s z))) (s (s z))) (tsel (var (s (s z))) (s (s z))))))) z top empty top z (var (s z)) (tsel (var (s (s z))) (s z)) (mcons _ bot top (mcons _ top top (mcons _ (tsel (var (s (s z))) (s (s z))) (tsel (var (s (s z))) (s (s z))) (mcons _ bot top mnil))))) (bind (s z) (and (rect (s (s z)) bot top) (and (rect (s z) (tsel (var (s z)) (s (s z))) (tsel (var (s z)) (s (s z)))) (recv z (tsel (var (s z)) (s z)))))) z empty top mnil) (let _ (fun top z top empty top z empty top mnil) (let _ (app (var z) (s (s (s z))) (var (s z))) (let (tsel (var (s (s z))) (s z)) (sel (var (s (s z))) z) (var (s z)))))).
--------------------------------------------------------------------------------
/old/src/main/elf/b4.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev b4 = (let (bind z (and (rect (s z) bot top) (arrow z (tsel (var z) (s z)) (tsel (var z) (s z))))) (fun (bind z (and (arrow z (tsel (var z) (s z)) (tsel (var z) (s z))) (rect (s z) top top))) z (tsel (var z) (s z)) (var (s z)) (tsel (var z) (s z)) z empty top (mcons _ top top (mcons _ bot top mnil))) (let top (fun top z top empty top z empty top mnil) (let (tsel (var z) (s z)) (app (var z) z (var (s z))) (var (s (s z)))))).
--------------------------------------------------------------------------------
/old/src/main/elf/b4a.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev b4a = (let (bind z (and (rect (s (s z)) top top) (and (arrow (s z) (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))) (recv z (tsel (var z) (s (s z))))))) (fun (bind z (and (arrow (s z) (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))) (and (recv z (tsel (var z) (s (s z)))) (rect (s (s z)) top top)))) (s z) (tsel (var z) (s (s z))) (var (s z)) (tsel (var z) (s (s z))) z (fun top z top empty top z empty top mnil) (tsel (var z) (s (s z))) (mcons _ top top (mcons _ bot top (mcons _ bot top mnil)))) (app (var z) (s z) (sel (var z) z))).
--------------------------------------------------------------------------------
/old/src/main/elf/b4ok.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev b4ok = (let (bind z (and (rect (s (s z)) bot top) (and (arrow (s z) (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))) (recv z (tsel (var z) (s (s z))))))) (fun (bind z (and (arrow (s z) (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))) (and (recv z (tsel (var z) (s (s z)))) (rect (s (s z)) top top)))) (s z) (tsel (var z) (s (s z))) (var (s z)) (tsel (var z) (s (s z))) z (fun top z top empty top z empty top mnil) (tsel (var z) (s (s z))) (mcons _ top top (mcons _ bot top (mcons _ bot top mnil)))) (let (tsel (var z) (s (s z))) (app (var z) (s z) (sel (var z) z)) (var (s z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/c1.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev c1 = (let (bind z (and (recv (s z) (tsel (var z) z)) (rect z top top))) (fun (and (recv (s z) _) (rect z top top)) z top empty top (s z) (fun top z top empty top z empty top mnil) _ (mcons _ bot top (mcons _ top top mnil))) (let (recv (s z) (bind (s z) (and (recv (s z) (tsel (var (s z)) z)) (rect z bot top)))) (fun (recv (s z) _) z top empty top (s z) (var z) _ mnil) (let (tsel (sel (var (s z)) (s z)) z) (sel (sel (var (s z)) (s z)) (s z)) (var (s (s z)))))).
--------------------------------------------------------------------------------
/old/src/main/elf/c1a.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev c1a = (let (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top))) (fun (bind z (and (recv (s z) (tsel (var z) z)) (rect z top top))) z top empty top (s z) (fun top z top empty top z empty top mnil) (tsel (var z) z) (mcons _ bot top (mcons _ top top mnil))) (let (recv (s z) (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top)))) (fun (recv (s z) _) z top empty top (s z) (var z) _ mnil) (let (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top))) (sel (var (s z)) (s z)) (let top (sel (var (s (s z))) (s z)) (let top (var (s (s (s z)))) (var (s (s (s (s z)))))))))).
--------------------------------------------------------------------------------
/old/src/main/elf/c1aa.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev c1aa = (let (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top))) (fun (bind z (and (recv (s z) (tsel (var z) z)) (rect z top top))) z top empty top (s z) (fun top z top empty top z empty top mnil) (tsel (var z) z) (mcons _ bot top (mcons _ top top mnil))) (fun top z top empty top z empty top mnil)).
--------------------------------------------------------------------------------
/old/src/main/elf/c1b.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev c1b = (let (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top))) (fun (bind z (and (recv (s z) (tsel (var z) z)) (rect z top top))) z top empty top (s z) (fun top z top empty top z empty top mnil) (tsel (var z) z) (mcons _ bot top (mcons _ top top mnil))) (let (recv (s z) (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top)))) (fun (recv (s z) _) z top empty top (s z) (var z) _ mnil) (let (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top))) (sel (var (s z)) (s z)) (let (tsel (var z) z) (sel (var z) (s z)) (let top (var (s (s (s z)))) (var (s (s (s (s z)))))))))).
--------------------------------------------------------------------------------
/old/src/main/elf/c1c.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev c1c = (let (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top))) (fun (bind z (and (recv (s z) (tsel (var z) z)) (rect z top top))) z top empty top (s z) (fun top z top empty top z empty top mnil) (tsel (var z) z) (mcons _ bot top (mcons _ top top mnil))) (let (recv (s z) (tsel (var z) z)) (var z) (var z))).
--------------------------------------------------------------------------------
/old/src/main/elf/c1d.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev c1d = (let (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top))) (fun (bind z (and (recv (s z) (tsel (var z) z)) (rect z top top))) z top empty top (s z) (fun top z top empty top z empty top mnil) (tsel (var z) z) (mcons _ bot top (mcons _ top top mnil))) (let (bind (s z) (and (recv (s z) (tsel (var (s z)) z)) (rect z bot top))) (var z) (var (s z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/c1ok.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev c1ok = (let (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top))) (fun (bind z (and (recv (s z) (tsel (var z) z)) (rect z top top))) z top empty top (s z) (fun top z top empty top z empty top mnil) (tsel (var z) z) (mcons _ bot top (mcons _ top top mnil))) (let (recv (s z) (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top)))) (fun (recv (s z) _) z top empty top (s z) (var z) _ mnil) (let (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top))) (sel (var (s z)) (s z)) (let (tsel (var (s (s z))) z) (sel (var (s (s z))) (s z)) (let top (var (s (s (s z)))) (var (s (s (s (s z)))))))))).
--------------------------------------------------------------------------------
/old/src/main/elf/e1.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e1 = (fun (arrow z _ _) z _ (var (s z)) _ z empty top mnil).
--------------------------------------------------------------------------------
/old/src/main/elf/e10.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e10 = (let (rect z top top) (fun (rect z top top) z top empty top z empty top (mcons _ top top mnil)) (let (tsel (var z) z) (var z) (var z))).
--------------------------------------------------------------------------------
/old/src/main/elf/e11.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e11 = (fun (bind z (and (rect (s z) top top) (rect z bot (tsel (var z) (s z))))) z top empty top z empty top (mcons _ top top (mcons _ bot (tsel (var z) (s z)) mnil))).
--------------------------------------------------------------------------------
/old/src/main/elf/e11c.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e11c = (fun (rect (s z) top top) z top empty top z empty top (mcons _ top top (mcons _ bot (tsel (var z) (s z)) mnil))).
--------------------------------------------------------------------------------
/old/src/main/elf/e11ok.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e11ok = (fun (bind z (and (rect (s z) top top) (rect z bot (tsel (var z) (s z))))) z top empty top z empty top (mcons _ top top (mcons _ bot (tsel (var z) (s z)) mnil))).
--------------------------------------------------------------------------------
/old/src/main/elf/e12.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e12 = (fun (bind z (and (arrow z (tsel (var z) (s z)) top) (rect (s z) top top))) z (tsel (var z) (s z)) (fun top z top empty top z empty top mnil) top z empty top (mcons _ top top (mcons _ bot top mnil))).
--------------------------------------------------------------------------------
/old/src/main/elf/e13.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e13 = (fun (bind z (and (arrow z top (tsel (var z) (s z))) (rect (s z) top top))) z top (fun top z top empty top z empty top mnil) (tsel (var z) (s z)) z empty top (mcons _ top top (mcons _ bot top mnil))).
--------------------------------------------------------------------------------
/old/src/main/elf/e14.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e14 = (fun (bind z (and (recv z (tsel (var z) (s z))) (rect (s z) top top))) z top empty top z (fun top z top empty top z empty top mnil) (tsel (var z) (s z)) (mcons _ top top (mcons _ bot top mnil))).
--------------------------------------------------------------------------------
/old/src/main/elf/e15.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e15 = (let (bind z (and (recv (s z) (tsel (var z) z)) (rect z top top))) (fun (bind z (and (recv (s z) (tsel (var z) z)) (rect z top top))) z top empty top (s z) (fun top z top empty top z empty top mnil) (tsel (var z) z) (mcons _ bot top (mcons _ top top mnil))) (let (tsel (var z) z) (sel (var z) (s z)) (var (s z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/e16.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e16 = (let (rect (s z) top top) (fun (rect (s z) top top) z top empty top z empty top (mcons _ top top (mcons _ bot top mnil))) (let (recv z (rect (s z) top top)) (fun (recv z _) z top empty top z (var z) _ mnil) (let (tsel (sel (var (s z)) z) (s z)) (fun top z top empty top z empty top mnil) (var (s z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/e16n.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e16n = (let (rect (s z) top top) (fun (rect (s z) top top) z top empty top z empty top (mcons _ top top (mcons _ bot top mnil))) (let (recv z (rect (s z) top top)) (fun (recv z _) z top empty top z (var z) _ mnil) (let _ (sel (var (s z)) z) (let (tsel (sel (var (s z)) z) (s z)) (fun top z top empty top z empty top mnil) (var (s z)))))).
--------------------------------------------------------------------------------
/old/src/main/elf/e16o.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e16o = (let (rect (s z) top top) (fun (rect (s z) top top) z top empty top z empty top (mcons _ top top (mcons _ bot top mnil))) (let (recv z (rect (s z) top top)) (fun (recv z _) z top empty top z (var z) _ mnil) (let (rect (s z) top top) (sel (var (s z)) z) (let (tsel (var (s (s z))) (s z)) (fun top z top empty top z empty top mnil) (var (s z)))))).
--------------------------------------------------------------------------------
/old/src/main/elf/e17.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e17 = (let top (fun top z top empty top z empty top mnil) (let (bind (s z) (and (recv (s (s z)) (tsel (var (s z)) (s z))) (rect (s z) top top))) (fun (bind (s z) (and (recv (s (s z)) _) (rect (s z) top top))) z top empty top (s (s z)) (var z) _ (mcons _ bot top (mcons _ top top (mcons _ bot top mnil)))) (let (recv z (bind (s (s z)) (and (recv (s (s z)) (tsel (var (s (s z))) (s z))) (rect (s z) top top)))) (fun (recv z _) z top empty top z (var (s z)) _ mnil) (var z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/e18.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e18 = (let _ (fun (bind z (and (arrow z (tsel (var z) (s z)) top) (rect (s z) top top))) z (tsel (var z) (s z)) (app (var z) z (var (s z))) top z empty top (mcons _ top top (mcons _ bot top mnil))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e19.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e19 = (let top (fun top z top empty top z empty top mnil) (let (bind (s z) (and (recv (s z) (tsel (var (s z)) z)) (rect z top top))) (fun (bind (s z) (and (recv (s z) _) (rect z top top))) z top empty top (s z) (var z) _ (mcons _ bot top (mcons _ top top mnil))) (var z))).
--------------------------------------------------------------------------------
/old/src/main/elf/e2.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e2 = (fun top z top empty top z empty top mnil).
--------------------------------------------------------------------------------
/old/src/main/elf/e20.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e20 = (let top (fun top z top empty top z empty top mnil) (let (bind (s z) (and (recv (s z) (tsel (var (s z)) z)) (rect z bot top))) (fun (bind (s z) (and (recv (s z) (tsel (var (s z)) z)) (rect z top top))) z top empty top (s z) (var z) _ (mcons _ bot top (mcons _ top top mnil))) (var z))).
--------------------------------------------------------------------------------
/old/src/main/elf/e21c.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e21c = (let top (fun top z top empty top z empty top mnil) (fun (bind (s z) (and (recv (s z) (tsel (var (s z)) z)) (rect z top top))) z top empty top (s z) (var z) _ (mcons _ bot top (mcons _ top top mnil)))).
--------------------------------------------------------------------------------
/old/src/main/elf/e22.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e22 = (let _ (fun (bind z (rect (s z) (arrow z top (tsel (var z) (s z))) (arrow z top (tsel (var z) (s z))))) z top empty top z empty top (mcons _ (arrow z top (tsel (var z) (s z))) (arrow z top (tsel (var z) (s z))) (mcons _ bot top mnil))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e22a.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e22a = (let _ (fun (bind z (rect (s z) (arrow z top (tsel (var z) (s z))) (arrow z top (tsel (var z) (s z))))) z top empty top z empty top (mcons _ (arrow z top (tsel (var z) (s z))) (arrow z top (tsel (var z) (s z))) (mcons _ bot top mnil))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e22b.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e22b = (let _ (fun (bind z (rect (s z) (bind (s z) (arrow z top (tsel (var z) (s z)))) (bind (s z) (arrow z top (tsel (var z) (s z)))))) z top empty top z empty top (mcons _ (bind (s z) (arrow z top (tsel (var z) (s z)))) (bind (s z) (arrow z top (tsel (var z) (s z)))) (mcons _ bot top mnil))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e22c.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e22c = (let _ (fun (bind z (and (arrow z top (tsel (var z) (s (s z)))) (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))))) z top (fun (tsel (var z) (s (s z))) (s z) top (var (s (s z))) (tsel (var z) (s (s z))) z empty top mnil) (tsel (var z) (s (s z))) z empty top (mcons _ (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (mcons _ bot top (mcons _ bot top mnil)))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e22d.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e22d = (let (bind z (and (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))) (arrow z top (tsel (var z) (s (s z)))))) (fun (bind z (and (arrow z top (tsel (var z) (s (s z)))) (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))))) z top (fun (tsel (var z) (s (s z))) (s z) top (var (s (s z))) (tsel (var z) (s (s z))) z empty top mnil) (tsel (var z) (s (s z))) z empty top (mcons _ (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (mcons _ bot top (mcons _ bot top mnil)))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e22e.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e22e = (let (bind z (and (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))) (arrow z top (tsel (var z) (s (s z)))))) (fun (bind z (and (arrow z top (tsel (var z) (s (s z)))) (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))))) z top (fun (tsel (var z) (s (s z))) (s z) top (var (s (s z))) (tsel (var z) (s (s z))) z empty top mnil) (tsel (var z) (s (s z))) z empty top (mcons _ (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (mcons _ bot top (mcons _ bot top mnil)))) (let top (var z) (var z))).
--------------------------------------------------------------------------------
/old/src/main/elf/e22f.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e22f = (let (bind z (and (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))) (arrow z top (tsel (var z) (s (s z)))))) (fun (bind z (and (arrow z top (tsel (var z) (s (s z)))) (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))))) z top (fun (tsel (var z) (s (s z))) (s z) top (var (s (s z))) (tsel (var z) (s (s z))) z empty top mnil) (tsel (var z) (s (s z))) z empty top (mcons _ (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (mcons _ bot top (mcons _ bot top mnil)))) (let top (app (var z) z (var z)) (var z))).
--------------------------------------------------------------------------------
/old/src/main/elf/e22g.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e22g = (let (bind z (and (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))) (arrow z top (tsel (var z) (s (s z)))))) (fun (bind z (and (arrow z top (tsel (var z) (s (s z)))) (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))))) z top (fun (tsel (var z) (s (s z))) (s z) top (var (s (s z))) (tsel (var z) (s (s z))) z empty top mnil) (tsel (var z) (s (s z))) z empty top (mcons _ (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (mcons _ bot top (mcons _ bot top mnil)))) (let (tsel (var z) (s (s z))) (app (var z) z (var z)) (var z))).
--------------------------------------------------------------------------------
/old/src/main/elf/e22h.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e22h = (let (bind z (and (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))) (arrow z top (tsel (var z) (s (s z)))))) (fun (bind z (and (arrow z top (tsel (var z) (s (s z)))) (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))))) z top (fun (tsel (var z) (s (s z))) (s z) top (var (s (s z))) (tsel (var z) (s (s z))) z empty top mnil) (tsel (var z) (s (s z))) z empty top (mcons _ (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (mcons _ bot top (mcons _ bot top mnil)))) (let (tsel (var z) (s (s z))) (app (var z) z (var z)) (let (tsel (var z) (s (s z))) (app (var (s z)) (s z) (var z)) (var z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/e22i.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e22i = (let (bind z (and (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))) (arrow z top (tsel (var z) (s (s z)))))) (fun (bind z (and (arrow z top (tsel (var z) (s (s z)))) (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))))) z top (fun (tsel (var z) (s (s z))) (s z) top (var (s (s z))) (tsel (var z) (s (s z))) z empty top mnil) (tsel (var z) (s (s z))) z empty top (mcons _ (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (mcons _ bot top (mcons _ bot top mnil)))) (let (tsel (var z) (s (s z))) (app (var z) z (var z)) (let (tsel (var z) (s (s z))) (app (var (s z)) (s z) (var z)) (app (app (app (app (var z) z (var z)) (s z) (var z)) (s z) (var z)) (s z) (var z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/e22j.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e22j = (let (bind z (and (rect (s (s z)) bot (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))) (arrow z top (tsel (var z) (s (s z)))))) (fun (bind z (and (arrow z top (tsel (var z) (s (s z)))) (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))))) z top (fun (tsel (var z) (s (s z))) (s z) top (var (s (s z))) (tsel (var z) (s (s z))) z empty top mnil) (tsel (var z) (s (s z))) z empty top (mcons _ (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (mcons _ bot top (mcons _ bot top mnil)))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e23.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e23 = (let (or top bot) (fun top z top empty top z empty top mnil) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e24.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e24 = (let (or (recv z top) (recv z bot)) (fun (recv z top) z top empty top z (fun top z top empty top z empty top mnil) top mnil) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e25.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e25 = (let (or (bind z (and (rect (s z) bot top) (recv z (tsel (var z) (s z))))) (bind z (and (rect (s z) bot bot) (recv z (tsel (var z) (s z)))))) (fun (bind z (and (recv z (tsel (var z) (s z))) (rect (s z) top top))) z top empty top z (fun top z top empty top z empty top mnil) (tsel (var z) (s z)) (mcons _ top top (mcons _ bot top mnil))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e26.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e26 = (let _ (fun (rect (s (s z)) (recv (s z) top) (recv (s z) top)) z top empty top z empty top (mcons _ (recv (s z) top) (recv (s z) top) (mcons _ bot top (mcons _ bot top mnil)))) (let _ (fun (rect (s (s z)) (and (recv (s z) top) (recv z top)) (and (recv (s z) top) (recv z top))) z top empty top z empty top (mcons _ (and (recv (s z) top) (recv z top)) (and (recv (s z) top) (recv z top)) (mcons _ bot top (mcons _ bot top mnil)))) (let (or (tsel (var z) (s (s z))) (tsel (var (s z)) (s (s z)))) (fun (recv (s z) top) z top empty top (s z) (fun top z top empty top z empty top mnil) top mnil) (sel (var (s (s z))) (s z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/e27.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27 = (let (bind z (and (rect (s z) bot top) (and (arrow (s (s (s (s (s (s z)))))) (tsel (var z) (s z)) (tsel (var z) (s z))) (recv (s (s (s (s (s (s (s z))))))) (tsel (var z) (s z)))))) (fun (bind z (and (arrow (s (s (s (s (s (s z)))))) (tsel (var z) (s z)) (tsel (var z) (s z))) (and (recv (s (s (s (s (s (s (s z))))))) (tsel (var z) (s z))) (and (rect (s (s (s (s (s z))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z))))))) (and (rect (s (s (s (s z)))) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top)) (rect (s z) (bind (s z) (tsel (var z) (s (s (s (s (s z))))))) (bind (s z) (tsel (var z) (s (s (s (s (s z))))))))))))) (s (s (s (s (s (s z)))))) (tsel (var z) (s z)) (fun (tsel (var z) (s z)) (s (s (s z))) (arrow (s (s z)) top top) (fun (tsel (var z) (s (s (s (s z))))) z (arrow (s (s z)) (tsel (var z) (s z)) top) (app (var (s (s (s (s (s z)))))) (s (s z)) (var (s z))) top z empty top mnil) _ z empty top mnil) (tsel (var z) (s z)) (s (s (s (s (s (s (s z))))))) (fun (tsel (var z) (s z)) (s (s (s z))) (arrow (s (s z)) top top) (fun (tsel (var z) (s (s (s (s z))))) z (arrow (s (s z)) (tsel (var z) (s z)) top) (app (var (s (s z))) (s (s z)) (var (s z))) top z empty top mnil) _ z empty top mnil) (tsel (var z) (s z)) (mcons _ bot top (mcons _ bot top (mcons _ (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (mcons _ (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (mcons _ bot top (mcons _ bot top (mcons _ (bind (s z) (tsel (var z) (s (s (s (s (s z))))))) (bind (s z) (tsel (var z) (s (s (s (s (s z))))))) (mcons _ bot top mnil))))))))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27a.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27a = (let (bind z (rect (s z) bot top)) (fun (bind z (and (rect (s (s (s (s (s z))))) bot top) (and (rect (s (s (s (s z)))) bot top) (rect (s z) bot top)))) z top empty top z empty top (mcons _ (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (mcons _ (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (mcons _ bot top (mcons _ bot top (mcons _ (bind (s z) (tsel (var z) (s (s (s (s (s z))))))) (bind (s z) (tsel (var z) (s (s (s (s (s z))))))) (mcons _ bot top mnil))))))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27b.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27b = (let (bind z (rect (s z) bot top)) (fun (bind z (and (rect (s (s (s (s (s z))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z))))))) (and (rect (s (s (s (s z)))) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top)) (rect (s z) bot top)))) z top empty top z empty top (mcons _ (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (mcons _ (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (mcons _ bot top (mcons _ bot top (mcons _ bot top (mcons _ bot top mnil))))))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27c.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27c = (let (bind z (rect (s z) bot top)) (fun (bind z (and (rect (s (s (s (s (s z))))) bot top) (and (rect (s (s (s (s z)))) bot top) (rect (s z) bot top)))) z top empty top z empty top (mcons _ (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (mcons _ (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (mcons _ bot top (mcons _ bot top (mcons _ (tsel (var z) (s (s (s (s (s z)))))) (tsel (var z) (s (s (s (s (s z)))))) (mcons _ bot top mnil))))))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27d.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27d = (let _ (fun (bind z (and (rect (s (s (s z))) bot top) (and (rect (s (s z)) bot top) (rect (s z) bot top)))) z top empty top z empty top (mcons _ (arrow z (arrow z top top) (tsel (var z) (s (s z)))) (arrow z (arrow z top top) (tsel (var z) (s (s z)))) (mcons _ (arrow z (arrow z top top) top) (arrow z (arrow z top top) top) (mcons _ (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z)))) (mcons _ bot top mnil))))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27e.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27e = (let (bind z (and (rect (s z) bot top) (arrow (s (s (s (s (s (s z)))))) (tsel (var z) (s z)) (tsel (var z) (s z))))) (fun (bind z (and (rect (s (s (s (s (s z))))) bot top) (and (rect (s (s (s (s z)))) bot top) (and (rect (s z) bot top) (arrow (s (s (s (s (s (s z)))))) (tsel (var z) (s z)) (tsel (var z) (s z))))))) (s (s (s (s (s (s z)))))) (tsel (var z) (s z)) (var (s z)) (tsel (var z) (s z)) z empty top (mcons _ bot top (mcons _ (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (mcons _ (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (mcons _ bot top (mcons _ bot top (mcons _ (bind (s z) (tsel (var z) (s (s (s (s (s z))))))) (bind (s z) (tsel (var z) (s (s (s (s (s z))))))) (mcons _ bot top mnil)))))))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27f.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27f = (let _ (fun (bind z (rect (s z) bot top)) z top empty top z empty top (mcons _ (arrow z top (tsel (var z) (s z))) (arrow z top (tsel (var z) (s z))) (mcons _ bot top mnil))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27g.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27g = (let _ (fun (bind z (and (rect (s (s z)) bot top) (arrow (s z) (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))))) (s z) (tsel (var z) (s (s z))) (var (s z)) (tsel (var z) (s (s z))) z empty top (mcons _ (arrow z top (tsel (var z) (s (s z)))) (arrow z top (tsel (var z) (s (s z)))) (mcons _ bot top (mcons _ bot top mnil)))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27h.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27h = (let _ (fun (bind z (rect (s (s z)) bot top)) z (tsel (var z) (s (s z))) (var (s z)) (tsel (var z) (s (s z))) z empty top (mcons _ (arrow (s z) top (tsel (var z) (s (s z)))) (arrow (s z) top (tsel (var z) (s (s z)))) (mcons _ bot top (mcons _ bot top mnil)))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27i.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27i = (let _ (fun (bind z (and (arrow z (tsel (var z) (s z)) (tsel (var z) (s z))) (rect (s z) bot top))) z (tsel (var z) (s z)) (var (s z)) (tsel (var z) (s z)) z empty top (mcons _ bot top (mcons _ bot top mnil))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27j.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27j = (let _ (fun (bind z (and (rect (s z) bot top) (arrow z (tsel (var z) (s z)) (tsel (var z) (s z))))) z (tsel (var z) (s z)) (var (s z)) (tsel (var z) (s z)) z empty top (mcons _ bot bot (mcons _ bot top mnil))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27k.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27k = (let _ (fun (bind z (and (rect (s z) bot bot) (arrow z (tsel (var z) (s z)) (tsel (var z) (s z))))) z (tsel (var z) (s z)) (var (s z)) (tsel (var z) (s z)) z empty top (mcons _ bot bot (mcons _ bot top mnil))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27l.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27l = (let _ (fun (bind z (and (rect (s (s z)) bot top) (arrow (s z) (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))))) (s z) (tsel (var z) (s (s z))) (var (s z)) (tsel (var z) (s (s z))) z empty top (mcons _ (recv z (tsel (var z) (s (s z)))) (recv z (tsel (var z) (s (s z)))) (mcons _ bot top (mcons _ bot top mnil)))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27m.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27m = (let _ (fun (bind z (and (rect (s (s z)) bot top) (arrow (s z) (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))))) (s z) (tsel (var z) (s (s z))) (sel (var (s z)) z) (tsel (var z) (s (s z))) z empty top (mcons _ (recv z (tsel (var z) (s (s z)))) (recv z (tsel (var z) (s (s z)))) (mcons _ bot top (mcons _ bot top mnil)))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e27n.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e27n = (let _ (fun (bind z (and (rect (s (s z)) (recv (s z) (tsel (var z) (s (s z)))) (recv (s z) (tsel (var z) (s (s z))))) (arrow z (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))))) z (tsel (var z) (s (s z))) (sel (var (s z)) (s z)) (tsel (var z) (s (s z))) z empty top (mcons _ (recv (s z) (tsel (var z) (s (s z)))) (recv (s z) (tsel (var z) (s (s z)))) (mcons _ bot top (mcons _ bot top mnil)))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e28.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e28 = (fun (bind z (arrow (s z) top top)) (s z) top (fun (arrow z (arrow z top top) top) z (arrow z top top) (fun (arrow z (arrow z top top) top) z (arrow z top top) (app (var (s (s (s z)))) z (var (s z))) top z empty top mnil) top z empty top mnil) top z empty top mnil).
--------------------------------------------------------------------------------
/old/src/main/elf/e28a.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e28a = (fun (bind z (arrow z top top)) z top (fun (arrow z top top) z top (fun (arrow z bot bot) z bot (var (s (s (s (s (s z)))))) bot z empty top mnil) top z empty top mnil) top z empty top mnil).
--------------------------------------------------------------------------------
/old/src/main/elf/e3.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e3 = (let _ (fun top z top empty top z empty top mnil) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e4.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e4 = (let _ (fun top z top empty top z empty top mnil) (let _ (fun (recv z _) z top empty top z (var z) _ mnil) (var (s z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/e5.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e5 = (let top (fun top z top empty top z empty top mnil) (let (recv z top) (fun (recv z top) z top empty top z (var z) top mnil) (var (s z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/e6.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e6 = (let _ (fun top z top empty top z empty top mnil) (let _ (fun (arrow z _ _) z _ (var z) _ z empty top mnil) (var (s z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/e7.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e7 = (let _ (fun top z top empty top z empty top mnil) (let (arrow z top top) (fun (arrow z _ _) z _ (var z) _ z empty top mnil) (var (s z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/e8.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e8 = (let (arrow z top top) (fun (arrow z _ _) z _ (var (s z)) _ z empty top mnil) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/e9.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev e9 = (let (rect z top top) (fun (rect z top top) z top empty top z empty top (mcons _ top top mnil)) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/ex_cow.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev ex_cow = (let _ (fun (bind z (and (rect (s z) (bind (s z) (and (rect (s (s (s (s (s (s z)))))) bot top) (and (arrow (s (s (s (s (s z))))) (tsel (var (s z)) (s (s (s (s (s (s z))))))) top) (arrow (s (s (s z))) top (tsel (var (s z)) (s (s (s (s (s (s z))))))))))) (bind (s z) (and (rect (s (s (s (s (s (s z)))))) bot top) (and (arrow (s (s (s (s (s z))))) (tsel (var (s z)) (s (s (s (s (s (s z))))))) top) (arrow (s (s (s z))) top (tsel (var (s z)) (s (s (s (s (s (s z)))))))))))) (and (rect z bot top) (rect (s (s (s (s z)))) (and (tsel (var z) (s z)) (rect (s (s (s (s (s (s z)))))) (tsel (var z) z) (tsel (var z) z))) (and (tsel (var z) (s z)) (rect (s (s (s (s (s (s z)))))) (tsel (var z) z) (tsel (var z) z))))))) z top empty top z empty top (mcons _ bot top (mcons _ bot top (mcons _ (and (tsel (var z) (s z)) (rect (s (s (s (s (s (s z)))))) (tsel (var z) z) (tsel (var z) z))) (and (tsel (var z) (s z)) (rect (s (s (s (s (s (s z)))))) (tsel (var z) z) (tsel (var z) z))) (mcons _ bot top (mcons _ bot top (mcons _ (bind (s z) (and (rect (s (s (s (s (s (s z)))))) bot top) (and (arrow (s (s (s (s (s z))))) (tsel (var (s z)) (s (s (s (s (s (s z))))))) top) (arrow (s (s (s z))) top (tsel (var (s z)) (s (s (s (s (s (s z))))))))))) (bind (s z) (and (rect (s (s (s (s (s (s z)))))) bot top) (and (arrow (s (s (s (s (s z))))) (tsel (var (s z)) (s (s (s (s (s (s z))))))) top) (arrow (s (s (s z))) top (tsel (var (s z)) (s (s (s (s (s (s z))))))))))) (mcons _ bot top mnil)))))))) (let _ (fun (arrow (s (s z)) (tsel (var z) (s (s (s (s z))))) (tsel (var z) (s z))) (s (s z)) (tsel (var z) (s (s (s (s z))))) (var (s (s z))) (tsel (var z) (s z)) z empty top mnil) (var z))).
--------------------------------------------------------------------------------
/old/src/main/elf/ex_list.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev ex_list = (let _ (fun (bind z (arrow (s z) top bot)) (s z) top (app (var z) (s z) (var (s z))) bot z empty top mnil) (let (bind (s z) (rect (s (s z)) bot (bind (s (s z)) (and (rect (s (s (s z))) bot top) (and (recv (s (s (s (s z)))) (tsel (var (s (s z))) (s (s (s z))))) (arrow z top (and (tsel (var (s z)) (s (s z))) (rect (s (s (s z))) (tsel (var (s (s z))) (s (s (s z)))) (tsel (var (s (s z))) (s (s (s z)))))))))))) (fun (bind (s z) (rect (s (s z)) (bind (s (s z)) (and (rect (s (s (s z))) bot top) (and (recv (s (s (s (s z)))) (tsel (var (s (s z))) (s (s (s z))))) (arrow z top (and (tsel (var (s z)) (s (s z))) (rect (s (s (s z))) (tsel (var (s (s z))) (s (s (s z)))) (tsel (var (s (s z))) (s (s (s z)))))))))) (bind (s (s z)) (and (rect (s (s (s z))) bot top) (and (recv (s (s (s (s z)))) (tsel (var (s (s z))) (s (s (s z))))) (arrow z top (and (tsel (var (s z)) (s (s z))) (rect (s (s (s z))) (tsel (var (s (s z))) (s (s (s z)))) (tsel (var (s (s z))) (s (s (s z)))))))))))) z top empty top z empty top (mcons _ bot top (mcons _ bot top (mcons _ (bind (s (s z)) (and (rect (s (s (s z))) bot top) (and (recv (s (s (s (s z)))) (tsel (var (s (s z))) (s (s (s z))))) (arrow z top (and (tsel (var (s z)) (s (s z))) (rect (s (s (s z))) (tsel (var (s (s z))) (s (s (s z)))) (tsel (var (s (s z))) (s (s (s z)))))))))) (bind (s (s z)) (and (rect (s (s (s z))) bot top) (and (recv (s (s (s (s z)))) (tsel (var (s (s z))) (s (s (s z))))) (arrow z top (and (tsel (var (s z)) (s (s z))) (rect (s (s (s z))) (tsel (var (s (s z))) (s (s (s z)))) (tsel (var (s (s z))) (s (s (s z)))))))))) (mcons _ bot top (mcons _ bot top mnil)))))) (var (s z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/ex_nat.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev ex_nat = (let (bind z (and (rect (s (s z)) bot (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))) (arrow z top (tsel (var z) (s (s z)))))) (fun (bind z (and (arrow z top (tsel (var z) (s (s z)))) (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))))) z top (fun (bind (s (s z)) (arrow (s z) top (tsel (var z) (s (s z))))) (s z) top (var (s (s z))) (tsel (var z) (s (s z))) z empty top mnil) (tsel (var z) (s (s z))) z empty top (mcons _ (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (mcons _ bot top (mcons _ bot top mnil)))) (let (tsel (var z) (s (s z))) (app (var z) z (var z)) (app (app (var z) z (var z)) (s z) (var z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/ex_nat_anf.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev ex_nat_anf = (let (bind z (and (rect (s (s z)) bot (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))) (arrow z top (tsel (var z) (s (s z)))))) (fun (bind z (and (arrow z top (tsel (var z) (s (s z)))) (rect (s (s z)) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z)))))))) z top (fun (bind (s (s z)) (arrow (s z) top (tsel (var z) (s (s z))))) (s z) top (var (s (s z))) (tsel (var z) (s (s z))) z empty top mnil) (tsel (var z) (s (s z))) z empty top (mcons _ (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (bind (s z) (arrow (s z) top (tsel (var z) (s (s z))))) (mcons _ bot top (mcons _ bot top mnil)))) (let (tsel (var z) (s (s z))) (app (var z) z (var z)) (let (tsel (var z) (s (s z))) (app (var (s z)) (s z) (var z)) (let (tsel (var z) (s (s z))) (app (var (s (s z))) (s z) (var z)) (var (s (s z))))))).
--------------------------------------------------------------------------------
/old/src/main/elf/ex_nat_church.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev ex_nat_church = (let (bind z (and (rect (s z) bot top) (and (arrow (s (s (s (s (s (s z)))))) (tsel (var z) (s z)) (tsel (var z) (s z))) (recv (s (s (s (s (s (s (s z))))))) (tsel (var z) (s z)))))) (fun (bind z (and (arrow (s (s (s (s (s (s z)))))) (tsel (var z) (s z)) (tsel (var z) (s z))) (and (recv (s (s (s (s (s (s (s z))))))) (tsel (var z) (s z))) (and (rect (s (s (s (s (s z))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z))))))) (and (rect (s (s (s (s z)))) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top)) (rect (s z) (bind (s z) (tsel (var z) (s (s (s (s (s z))))))) (bind (s z) (tsel (var z) (s (s (s (s (s z))))))))))))) (s (s (s (s (s (s z)))))) (tsel (var z) (s z)) (fun (tsel (var z) (s z)) (s (s (s z))) (arrow (s (s z)) top top) (fun (tsel (var z) (s (s (s (s z))))) z (arrow (s (s z)) (tsel (var z) (s z)) top) (app (var (s (s (s (s (s z)))))) (s (s z)) (var (s z))) top z empty top mnil) _ z empty top mnil) (tsel (var z) (s z)) (s (s (s (s (s (s (s z))))))) (fun (tsel (var z) (s z)) (s (s (s z))) (arrow (s (s z)) top top) (fun (tsel (var z) (s (s (s (s z))))) z (arrow (s (s z)) (tsel (var z) (s z)) top) (app (var (s (s z))) (s (s z)) (var (s z))) top z empty top mnil) _ z empty top mnil) (tsel (var z) (s z)) (mcons _ bot top (mcons _ bot top (mcons _ (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (mcons _ (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (mcons _ bot top (mcons _ bot top (mcons _ (bind (s z) (tsel (var z) (s (s (s (s (s z))))))) (bind (s z) (tsel (var z) (s (s (s (s (s z))))))) (mcons _ bot top mnil))))))))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/ex_nat_church_a.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev ex_nat_church_a = (let _ (fun (bind z (and (recv (s (s (s (s (s (s z)))))) (tsel (var z) (s z))) (and (rect (s (s (s (s (s z))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z))))))) (and (rect (s (s (s (s z)))) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top)) (rect (s z) (tsel (var z) (s (s (s (s (s z)))))) (tsel (var z) (s (s (s (s (s z))))))))))) z top empty top (s (s (s (s (s (s z)))))) (fun (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (s (s (s z))) (arrow (s (s z)) top top) (fun (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) z (arrow (s (s z)) (tsel (var z) (s z)) top) (app (var (s (s z))) (s (s z)) (fun top z top empty top z empty top mnil)) top z empty top mnil) (tsel (var z) (s (s (s (s z))))) z empty top mnil) (tsel (var z) (s z)) (mcons _ bot top (mcons _ (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (mcons _ (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (mcons _ bot top (mcons _ bot top (mcons _ (tsel (var z) (s (s (s (s (s z)))))) (tsel (var z) (s (s (s (s (s z)))))) (mcons _ bot top mnil)))))))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/ex_nat_church_b.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev ex_nat_church_b = (let (bind z (and (rect (s z) bot top) (recv (s (s (s (s (s (s z)))))) (tsel (var z) (s z))))) (fun (bind z (and (recv (s (s (s (s (s (s z)))))) (tsel (var z) (s z))) (and (rect (s (s (s (s (s z))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z))))))) (and (rect (s (s (s (s z)))) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top)) (rect (s z) (tsel (var z) (s (s (s (s (s z)))))) (tsel (var z) (s (s (s (s (s z))))))))))) z top empty top (s (s (s (s (s (s z)))))) (fun (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (s (s (s z))) (arrow (s (s z)) top top) (fun (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) z (arrow (s (s z)) (tsel (var z) (s z)) top) (app (var (s (s z))) (s (s z)) (fun top z top empty top z empty top mnil)) top z empty top mnil) (tsel (var z) (s (s (s (s z))))) z empty top mnil) (tsel (var z) (s z)) (mcons _ bot top (mcons _ (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (arrow (s (s (s z))) (arrow (s (s z)) top top) (tsel (var z) (s (s (s (s z)))))) (mcons _ (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (arrow z (arrow (s (s z)) (tsel (var z) (s z)) top) top) (mcons _ bot top (mcons _ bot top (mcons _ (tsel (var z) (s (s (s (s (s z)))))) (tsel (var z) (s (s (s (s (s z)))))) (mcons _ bot top mnil)))))))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/ex_nat_church_c.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev ex_nat_church_c = (let (bind z (and (rect z bot top) (recv (s (s (s (s z)))) (tsel (var z) z)))) (fun (bind z (and (arrow (s (s (s z))) (tsel (var z) z) (tsel (var z) z)) (and (recv (s (s (s (s z)))) (tsel (var z) z)) (and (rect (s (s z)) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z)))) (and (rect (s z) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) top) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) top)) (rect z (tsel (var z) (s (s z))) (tsel (var z) (s (s z))))))))) (s (s (s z))) (tsel (var z) z) (fun (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (fun (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) top) (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (app (var (s (s (s (s (s z)))))) (s (s (s (s (s z))))) (var (s z))) top z empty top mnil) (tsel (var z) (s z)) z empty top mnil) (tsel (var z) z) (s (s (s (s z)))) (fun (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (fun (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) top) (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (app (var (s (s z))) (s (s (s (s (s z))))) (fun top z top empty top z empty top mnil)) top z empty top mnil) (tsel (var z) (s z)) z empty top mnil) (tsel (var z) z) (mcons _ bot top (mcons _ bot top (mcons _ bot top (mcons _ (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (mcons _ (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) top) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) top) (mcons _ (tsel (var z) (s (s z))) (tsel (var z) (s (s z))) mnil))))))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/ex_nat_church_d.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev ex_nat_church_d = (let (bind z (and (rect z bot top) (recv (s (s (s (s z)))) (tsel (var z) z)))) (fun (bind z (and (arrow (s (s (s z))) (tsel (var z) z) (tsel (var z) z)) (and (recv (s (s (s (s z)))) (tsel (var z) z)) (and (rect (s (s z)) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z)))) (and (rect (s z) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) top) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) top)) (rect z (tsel (var z) (s (s z))) (tsel (var z) (s (s z))))))))) (s (s (s z))) (tsel (var z) z) (fun (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (fun (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) top) (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) (app (var (s (s (s (s (s z)))))) (s (s (s (s (s z))))) (var (s z))) top z empty top mnil) (tsel (var z) (s z)) z empty top mnil) (tsel (var z) z) (s (s (s (s z)))) (fun (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (fun (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) top) (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) (app (var (s (s z))) (s (s (s (s (s z))))) (fun top z top empty top z empty top mnil)) top z empty top mnil) (tsel (var z) (s z)) z empty top mnil) (tsel (var z) z) (mcons _ bot top (mcons _ bot top (mcons _ bot top (mcons _ (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (mcons _ (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) top) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) top) (mcons _ (tsel (var z) (s (s z))) (tsel (var z) (s (s z))) mnil))))))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/ex_nat_church_e.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev ex_nat_church_e = (let (bind z (and (rect z bot top) (and (arrow (s (s (s z))) (tsel (var z) z) (tsel (var z) z)) (recv (s (s (s (s z)))) (tsel (var z) z))))) (fun (bind z (and (arrow (s (s (s z))) (tsel (var z) z) (tsel (var z) z)) (and (recv (s (s (s (s z)))) (tsel (var z) z)) (and (rect (s (s z)) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z)))) (and (rect (s z) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) top) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) top)) (rect z (tsel (var z) (s (s z))) (tsel (var z) (s (s z))))))))) (s (s (s z))) (tsel (var z) z) (fun (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (fun (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) top) (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) (app (var (s (s (s (s (s z)))))) (s (s (s (s (s z))))) (var (s z))) top z empty top mnil) (tsel (var z) (s z)) z empty top mnil) (tsel (var z) z) (s (s (s (s z)))) (fun (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (fun (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) top) (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) (app (var (s (s z))) (s (s (s (s (s z))))) (fun top z top empty top z empty top mnil)) top z empty top mnil) (tsel (var z) (s z)) z empty top mnil) (tsel (var z) z) (mcons _ bot top (mcons _ bot top (mcons _ bot top (mcons _ (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) top top) (tsel (var z) (s z))) (mcons _ (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) top) (arrow (s (s (s (s (s z))))) (arrow (s (s (s (s (s z))))) (tsel (var z) z) top) top) (mcons _ (tsel (var z) (s (s z))) (tsel (var z) (s (s z))) mnil))))))) (var z)).
--------------------------------------------------------------------------------
/old/src/main/elf/ex_norec_nat.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev ex_norec_nat = (let (bind z (and (rect (s (s z)) bot top) (and (arrow (s z) (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))) (recv z (tsel (var z) (s (s z))))))) (fun (bind z (and (arrow (s z) (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))) (and (recv z (tsel (var z) (s (s z)))) (rect (s (s z)) top top)))) (s z) (tsel (var z) (s (s z))) (var (s z)) (tsel (var z) (s (s z))) z (fun top z top empty top z empty top mnil) (tsel (var z) (s (s z))) (mcons _ top top (mcons _ bot top (mcons _ bot top mnil)))) (let (tsel (var z) (s (s z))) (sel (var z) z) (let (tsel (var z) (s (s z))) (app (var z) (s z) (var (s z))) (let (tsel (var z) (s (s z))) (app (var z) (s z) (var (s (s z)))) (let (tsel (var z) (s (s z))) (app (var z) (s z) (app (var z) (s z) (app (var z) (s z) (sel (var z) z)))) (var (s (s (s (s z)))))))))).
--------------------------------------------------------------------------------
/old/src/main/elf/ex_norec_nat_a.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev ex_norec_nat_a = (let (bind z (and (rect (s (s z)) bot top) (and (arrow (s z) (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))) (recv z (tsel (var z) (s (s z))))))) (fun (bind z (and (arrow (s z) (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))) (and (recv z (tsel (var z) (s (s z)))) (rect (s (s z)) top top)))) (s z) (tsel (var z) (s (s z))) (var (s z)) (tsel (var z) (s (s z))) z (fun top z top empty top z empty top mnil) (tsel (var z) (s (s z))) (mcons _ top top (mcons _ bot top (mcons _ bot top mnil)))) (let (tsel (var z) (s (s z))) (app (var z) (s z) (sel (var z) z)) (let (tsel (var z) (s (s z))) (app (var z) (s z) (var (s z))) (var (s z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/p1.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p1 = (let _ (fun top z top empty top z empty top mnil) (let (recv z top) (fun (recv z _) z top empty top z (var z) _ mnil) (let (recv z (recv z top)) (fun (recv z _) z top empty top z (var (s z)) _ mnil) (sel (sel (var (s (s z))) z) z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/p10.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p10 = (fun (bind z (and (recv (s (s z)) top) (and (rect (s z) top top) (rect z (tsel (var z) (s z)) (tsel (var z) (s z)))))) z top empty top (s (s z)) (fun top z top empty top z empty top mnil) top (mcons _ bot top (mcons _ top top (mcons _ (tsel (var z) (s z)) (tsel (var z) (s z)) mnil)))).
--------------------------------------------------------------------------------
/old/src/main/elf/p11.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p11 = (fun (rect (s (s z)) top top) z top empty top (s z) (fun top z top empty top z empty top mnil) top (mcons _ top top (mcons _ bot top (mcons _ (tsel (var z) (s (s z))) (tsel (var z) (s (s z))) mnil)))).
--------------------------------------------------------------------------------
/old/src/main/elf/p12.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p12 = (fun (rect (s z) (recv z top) (recv z top)) z top empty top z empty top (mcons _ (recv z top) (recv z top) (mcons _ bot top mnil))).
--------------------------------------------------------------------------------
/old/src/main/elf/p12a.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p12a = (fun (rect z bot (bind (s z) (recv z top))) z top empty top z empty top (mcons _ bot (bind (s z) (recv z top)) mnil)).
--------------------------------------------------------------------------------
/old/src/main/elf/p12b.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p12b = (fun (rect (s z) (bind (s z) (and (rect (s z) bot top) (recv z (tsel (var (s z)) (s z))))) (bind (s z) (and (rect (s z) bot top) (recv z (tsel (var (s z)) (s z)))))) z top empty top z empty top (mcons _ (bind (s z) (and (rect (s z) bot top) (recv z (tsel (var (s z)) (s z))))) (bind (s z) (and (rect (s z) bot top) (recv z (tsel (var (s z)) (s z))))) (mcons _ bot top mnil))).
--------------------------------------------------------------------------------
/old/src/main/elf/p12c.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p12c = (let (bind z (rect (s z) (bind (s z) (and (rect (s z) bot top) (recv z (tsel (var (s z)) (s z))))) (bind (s z) (and (rect (s z) bot top) (recv z (tsel (var (s z)) (s z))))))) (fun (rect (s z) (bind (s z) (and (rect (s z) bot top) (recv z (tsel (var (s z)) (s z))))) (bind (s z) (and (rect (s z) bot top) (recv z (tsel (var (s z)) (s z)))))) z top empty top z empty top (mcons _ (bind (s z) (and (rect (s z) bot top) (recv z (tsel (var (s z)) (s z))))) (bind (s z) (and (rect (s z) bot top) (recv z (tsel (var (s z)) (s z))))) (mcons _ bot top mnil))) (let _ (fun (bind (s z) (and (recv z (tsel (var (s z)) (s z))) (rect (s z) top top))) z top empty top z (fun top z top empty top z empty top mnil) (tsel (var (s z)) (s z)) (mcons _ top top (mcons _ bot top mnil))) (var z))).
--------------------------------------------------------------------------------
/old/src/main/elf/p13.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p13 = (let (bind z (and (rect (s (s (s z))) bot top) (and (rect (s (s z)) (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z))))) (recv (s z) (tsel (var z) (s (s z))))))) (fun (bind z (and (recv (s z) (tsel (var z) (s (s z)))) (and (rect (s (s (s z))) top top) (rect (s (s z)) (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z)))))))) z top empty top (s z) (fun top z top empty top z empty top mnil) (tsel (var z) (s (s z))) (mcons _ top top (mcons _ (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z)))) (mcons _ bot top (mcons _ bot top mnil))))) (let _ (fun (arrow z (bind z (and (rect (s (s (s z))) bot top) (and (rect (s (s z)) (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z))))) (recv (s z) (tsel (var z) (s (s z))))))) top) z (bind z (and (rect (s (s (s z))) bot top) (and (rect (s (s z)) (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z))))) (recv (s z) (tsel (var z) (s (s z))))))) (let (tsel (var (s (s z))) (s (s z))) (sel (var (s (s z))) (s z)) (var (s (s z)))) top z empty top mnil) (let (tsel (var z) (s (s z))) (sel (var z) (s z)) (app (var (s z)) z (var z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/p13a.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p13a = (let (bind z (and (rect (s (s (s z))) bot top) (and (rect (s (s z)) (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z))))) (recv (s z) (tsel (var z) (s (s z))))))) (fun (bind z (and (recv (s z) (tsel (var z) (s (s z)))) (and (rect (s (s (s z))) top top) (rect (s (s z)) (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z)))))))) z top empty top (s z) (fun top z top empty top z empty top mnil) (tsel (var z) (s (s z))) (mcons _ top top (mcons _ (tsel (var z) (s (s (s z)))) (tsel (var z) (s (s (s z)))) (mcons _ bot top (mcons _ bot top mnil))))) (let _ (fun (arrow z (bind (s (s z)) (and (rect (s (s (s z))) bot top) (and (rect (s (s z)) (tsel (var (s (s z))) (s (s (s z)))) (tsel (var (s (s z))) (s (s (s z))))) (recv (s z) (tsel (var (s (s z))) (s (s z))))))) top) z (bind (s (s z)) (and (rect (s (s (s z))) bot top) (and (rect (s (s z)) (tsel (var (s (s z))) (s (s (s z)))) (tsel (var (s (s z))) (s (s (s z))))) (recv (s z) (tsel (var (s (s z))) (s (s z))))))) (let (tsel (var (s (s z))) (s (s z))) (sel (var (s (s z))) (s z)) (var (s (s z)))) top z empty top mnil) (let (tsel (var z) (s (s z))) (sel (var z) (s z)) (app (var (s z)) z (var z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/p14.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p14 = (let _ (fun (arrow (s (s (s z))) top (bind (s z) (and (rect (s (s z)) bot top) (and (rect (s z) (tsel (var (s z)) (s (s z))) (tsel (var (s z)) (s (s z)))) (recv z (tsel (var (s z)) (s z))))))) (s (s (s z))) top (fun (bind (s (s z)) (and (recv z (tsel (var (s (s z))) (s z))) (and (rect (s (s z)) top top) (rect (s z) (tsel (var (s (s z))) (s (s z))) (tsel (var (s (s z))) (s (s z))))))) z top empty top z (var (s z)) (tsel (var (s (s z))) (s z)) (mcons _ bot top (mcons _ top top (mcons _ (tsel (var (s (s z))) (s (s z))) (tsel (var (s (s z))) (s (s z))) (mcons _ bot top mnil))))) (bind (s z) (and (rect (s (s z)) bot top) (and (rect (s z) (tsel (var (s z)) (s (s z))) (tsel (var (s z)) (s (s z)))) (recv z (tsel (var (s z)) (s z)))))) z empty top mnil) (let _ (fun top z top empty top z empty top mnil) (app (var z) (s (s (s z))) (var (s z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/p1i.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p1i = (let _ (fun top z top empty top z empty top mnil) (let _ (fun (recv z _) z top empty top z (var z) _ mnil) (let _ (fun (recv z _) z top empty top z (var (s z)) _ mnil) (sel (sel (var (s (s z))) z) z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/p2.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p2 = (let _ (fun (recv z _) z top empty top z (fun (recv z _) z top empty top z (fun top z top empty top z empty top mnil) _ mnil) _ mnil) (sel (sel (var z) z) z)).
--------------------------------------------------------------------------------
/old/src/main/elf/p2c.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p2c = (let (recv z (recv z top)) (fun (recv z (recv z top)) z top empty top z (fun (recv z top) z top empty top z (fun top z top empty top z empty top mnil) top mnil) (recv z top) mnil) (sel (sel (var z) z) z)).
--------------------------------------------------------------------------------
/old/src/main/elf/p3.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p3 = (let (bind z (rect z top top)) (fun (rect z top top) z top empty top z empty top (mcons _ top top mnil)) (let (tsel (var z) z) (fun top z top empty top z empty top mnil) (var (s z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/p4.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p4 = (let (bind z (rect z top top)) (fun (rect z top top) z top empty top z empty top (mcons _ top top mnil)) (let (tsel (var z) z) (fun top z top empty top z empty top mnil) (var (s z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/p5.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p5 = (let (recv (s z) top) (fun (recv (s z) _) z top empty top (s z) (fun top z top empty top z empty top mnil) _ mnil) (let (rect z (recv (s z) top) top) (fun (rect z (recv (s z) top) (recv (s z) top)) z top empty top z empty top (mcons _ bot top (mcons _ (recv (s z) top) (recv (s z) top) mnil))) (let (tsel (var (s z)) z) (var z) (let (bind (s (s (s z))) (rect z (recv (s z) top) top)) (var (s z)) (let (recv (s z) (tsel (var (s z)) z)) (fun (recv (s z) _) z top empty top (s z) (var (s (s z))) _ mnil) (let (bind (s (s (s (s (s z))))) (rect z (recv (s z) top) (tsel (var (s z)) z))) (fun (rect z (recv (s z) top) (tsel (var (s z)) z)) z top empty top z empty top (mcons _ bot top (mcons _ (recv (s z) top) (tsel (var (s z)) z) mnil))) (sel (var z) (s z)))))))).
--------------------------------------------------------------------------------
/old/src/main/elf/p6.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p6 = (fun (bind z (and (rect (s z) top top) (rect z (tsel (var z) (s z)) (tsel (var z) (s z))))) z top empty top z empty top (mcons _ top top (mcons _ (tsel (var z) (s z)) (tsel (var z) (s z)) mnil))).
--------------------------------------------------------------------------------
/old/src/main/elf/p6a.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p6a = (fun (bind z (and (rect (s (s z)) top top) (and (rect (s z) (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))) (rect z bot top)))) z top empty top z empty top (mcons _ top top (mcons _ (tsel (var z) (s (s z))) (tsel (var z) (s (s z))) (mcons _ bot top mnil)))).
--------------------------------------------------------------------------------
/old/src/main/elf/p7.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p7 = (let (bind z (and (rect (s z) top top) (rect z (tsel (var z) (s z)) (tsel (var z) (s z))))) (fun (bind z (and (rect (s z) top top) (rect z (tsel (var z) (s z)) (tsel (var z) (s z))))) z top empty top z empty top (mcons _ top top (mcons _ (tsel (var z) (s z)) (tsel (var z) (s z)) mnil))) (let (tsel (var z) (s z)) (var z) (let (tsel (var z) z) (var z) (var (s z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/p8.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p8 = (let (bind z (and (rect (s z) top top) (rect z (tsel (var z) (s z)) (tsel (var z) (s z))))) (fun (bind z (and (rect (s z) top top) (rect z (tsel (var z) (s z)) (tsel (var z) (s z))))) z top empty top z empty top (mcons _ top top (mcons _ (tsel (var z) (s z)) (tsel (var z) (s z)) mnil))) (let _ (fun top z top empty top z empty top mnil) (let _ (fun top z top empty top (s z) (var z) _ mnil) (var (s z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/p9.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev p9 = (let _ (fun (recv (s (s z)) _) z top empty top (s (s z)) (fun top z top empty top z empty top mnil) _ mnil) (let (bind (s z) (and (rect (s z) top top) (rect z (tsel (var (s z)) (s z)) (tsel (var (s z)) (s z))))) (fun (bind (s z) (and (rect (s z) top top) (rect z (tsel (var (s z)) (s z)) (tsel (var (s z)) (s z))))) z top empty top z empty top (mcons _ bot top (mcons _ top top (mcons _ (tsel (var (s z)) (s z)) (tsel (var (s z)) (s z)) mnil)))) (let _ (fun top z top empty top (s (s z)) (var (s z)) _ mnil) (var z)))).
--------------------------------------------------------------------------------
/old/src/main/elf/sources.cfg:
--------------------------------------------------------------------------------
1 | % echo "Config.load" > twelf-server
2 | dot.elf
3 | e1.dot.check.elf
4 | e2.dot.check.elf
5 | e3.dot.check.elf
6 | e4.dot.check.elf
7 | e5.dot.check.elf
8 | e6.dot.check.elf
9 | e7.dot.check.elf
10 | e8.dot.check.elf
11 | e9.dot.check.elf
12 | e10.dot.check.elf
13 | e11.dot.check.elf
14 | e11c.dot.check.elf
15 | e11ok.dot.check.elf
16 | e12.dot.check.elf
17 | e13.dot.check.elf
18 | e14.dot.check.elf
19 | e15.dot.check.elf
20 | e16.dot.check.elf
21 | e16n.dot.check.elf
22 | e16o.dot.check.elf
23 | e17.dot.check.elf
24 | e18.dot.check.elf
25 | e19.dot.check.elf
26 | e20.dot.check.elf
27 | e21c.dot.check.elf
28 | e22.dot.check.elf
29 | e22a.dot.check.elf
30 | e22b.dot.check.elf
31 | e22c.dot.check.elf
32 | e22d.dot.check.elf
33 | e22e.dot.check.elf
34 | e22f.dot.check.elf
35 | e22g.dot.check.elf
36 | e22h.dot.check.elf
37 | e22i.dot.check.elf
38 | e22j.dot.check.elf
39 | e23.dot.check.elf
40 | e24.dot.check.elf
41 | e25.dot.check.elf
42 | e26.dot.check.elf
43 | e27a.dot.check.elf
44 | e27b.dot.check.elf
45 | e27c.dot.check.elf
46 | e27d.dot.check.elf
47 | e27e.dot.check.elf
48 | e27f.dot.check.elf
49 | e27g.dot.check.elf
50 | e27h.dot.check.elf
51 | e27i.dot.check.elf
52 | e27j.dot.check.elf
53 | e27k.dot.check.elf
54 | e27l.dot.check.elf
55 | e27m.dot.check.elf
56 | e27n.dot.check.elf
57 | e28.dot.check.elf
58 | e28a.dot.check.elf
59 | p1.dot.check.elf
60 | p1i.dot.check.elf
61 | p2.dot.check.elf
62 | p2c.dot.check.elf
63 | p3.dot.check.elf
64 | p4.dot.check.elf
65 | p5.dot.check.elf
66 | p6.dot.check.elf
67 | p6a.dot.check.elf
68 | p7.dot.check.elf
69 | p8.dot.check.elf
70 | p9.dot.check.elf
71 | p10.dot.check.elf
72 | p11.dot.check.elf
73 | p12.dot.check.elf
74 | p12a.dot.check.elf
75 | p12b.dot.check.elf
76 | p12c.dot.check.elf
77 | p13.dot.check.elf
78 | p13a.dot.check.elf
79 | p14.dot.check.elf
80 | t1.dot.check.elf
81 | t2.dot.check.elf
82 | t3.dot.check.elf
83 | t4.dot.check.elf
84 | t5.dot.check.elf
85 | t6.dot.check.elf
86 | t7.dot.check.elf
87 | t8.dot.check.elf
88 | t9.dot.check.elf
89 | t10.dot.check.elf
90 | t11.dot.check.elf
91 | c1.dot.check.elf
92 | c1aa.dot.check.elf
93 | c1a.dot.check.elf
94 | c1b.dot.check.elf
95 | c1c.dot.check.elf
96 | c1d.dot.check.elf
97 | c1ok.dot.check.elf
98 | b1.dot.check.elf
99 | b1ok.dot.check.elf
100 | b2.dot.check.elf
101 | b3.dot.check.elf
102 | b3ok.dot.check.elf
103 | b4.dot.check.elf
104 | b4a.dot.check.elf
105 | b4ok.dot.check.elf
106 | ex_norec_nat_a.dot.check.elf
107 | ex_norec_nat.dot.check.elf
108 | ex_nat.dot.check.elf
109 | ex_nat_anf.dot.check.elf
110 | ex_nat_church.dot.check.elf
111 | ex_nat_church_a.dot.check.elf
112 | ex_nat_church_b.dot.check.elf
113 | ex_nat_church_c.dot.check.elf
114 | ex_nat_church_d.dot.check.elf
115 | ex_nat_church_e.dot.check.elf
116 | ex_cow.dot.check.elf
117 | ex_list.dot.check.elf
118 | tests.elf
--------------------------------------------------------------------------------
/old/src/main/elf/t1.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev t1 = (recv z top).
--------------------------------------------------------------------------------
/old/src/main/elf/t10.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev t10 = (bind z (and (rect (s z) bot bot) (arrow z (tsel (var z) (s z)) (tsel (var z) (s z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/t11.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev t11 = (bind z (and (rect (s z) bot top) (arrow z (tsel (var z) (s z)) (tsel (var z) (s z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/t2.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev t2 = (and (arrow z top top) (and (recv z top) (rect z bot top))).
--------------------------------------------------------------------------------
/old/src/main/elf/t3.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev t3 = (bind z (and (rect (s z) top top) (rect z (tsel (var z) (s z)) (tsel (var z) (s z))))).
--------------------------------------------------------------------------------
/old/src/main/elf/t4.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev t4 = (bind z (and (arrow (s (s (s z))) top top) (and (recv (s (s z)) top) (and (rect (s z) top top) (rect z (tsel (var z) (s z)) (tsel (var z) (s z))))))).
--------------------------------------------------------------------------------
/old/src/main/elf/t5.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev t5 = (bind z (and (rect (s z) top top) (and (rect z (tsel (var z) (s z)) (tsel (var z) (s z))) top))).
--------------------------------------------------------------------------------
/old/src/main/elf/t6.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev t6 = (bind z (and (arrow (s (s (s z))) top (tsel (var z) (s (s z)))) (and (recv (s z) top) (and (rect (s (s z)) top top) (rect z (tsel (var z) (s (s z))) (tsel (var z) (s (s z)))))))).
--------------------------------------------------------------------------------
/old/src/main/elf/t7.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev t7 = (bind z (and (recv (s z) (tsel (var z) z)) (rect z top top))).
--------------------------------------------------------------------------------
/old/src/main/elf/t8.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev t8 = (bind z (and (recv (s z) (tsel (var z) z)) (rect z bot top))).
--------------------------------------------------------------------------------
/old/src/main/elf/t9.dot.check.elf:
--------------------------------------------------------------------------------
1 | %abbrev t9 = (bind z (rect (s z) (arrow z top (tsel (var z) (s z))) (arrow z top (tsel (var z) (s z))))).
--------------------------------------------------------------------------------
/old/src/main/scala/dot/Debug.scala:
--------------------------------------------------------------------------------
1 | package dot
2 |
3 | trait Debug {
4 | var debugMode: Boolean = false
5 | def debug(msg: String) { if (debugMode) println(msg) }
6 | def inDebugMode[A](body: => A): A = {
7 | val oldDebugMode = debugMode
8 | debugMode = true
9 | try {
10 | body
11 | } finally {
12 | debugMode = oldDebugMode
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/old/src/main/scala/dot/DotSyntax.scala:
--------------------------------------------------------------------------------
1 | package dot
2 |
3 | trait DotSyntax {
4 | import scala.util.parsing.input.Positional
5 |
6 | sealed trait Entity extends Positional
7 |
8 | case class Tag(id: String) extends Entity
9 |
10 | sealed trait Type extends Entity
11 | object types {
12 | case object Bot extends Type
13 | case object Top extends Type
14 | case class And(ty1: Type, ty2: Type) extends Type
15 | case class Or(ty1: Type, ty2: Type) extends Type
16 | case class MemType(tag: Tag, tyS: Type, tyU: Type) extends Type
17 | case class MemDef(tag: Tag, tyP: Type, tyR: Type) extends Type
18 | case class MemVal(tag: Tag, ty: Type) extends Type
19 | case class Tsel(p: Term, tag: Tag, hint: Option[MemType]) extends Type {
20 | assert(p.isPath)
21 | }
22 | case class TRec(self: terms.Var, ty: Type) extends Type
23 | case class SingletonType(x: terms.Var) extends Type
24 | case class TShift(ty: Type) extends Type
25 |
26 | case object Unknown extends Type
27 | }
28 |
29 | sealed trait Term extends Entity {
30 | def isVar: Boolean = false
31 | def isPath: Boolean = false
32 | }
33 | object terms {
34 | case class Var(id: String) extends Term {
35 | override def isVar = true
36 | override def isPath = true
37 | }
38 | case class Sel(o: Term, tag: Tag) extends Term {
39 | override def isPath = o.isPath
40 | }
41 | case class App(f: Term, tag: Tag, a: Term) extends Term
42 | case class New(tc: Option[Type], self: Option[Var], members: List[Init]) extends Term
43 | case class Let(x: Var, tyx: Type, ex: Term, body: Term) extends Term
44 | }
45 |
46 | sealed trait Init extends Positional {
47 | def d: Type
48 | }
49 | object init {
50 | case class InitDef(d: types.MemDef, param: terms.Var, body: Term) extends Init
51 | case class InitVal(d: types.MemVal, t: Term) extends Init
52 | case class InitType(d: types.MemType) extends Init
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/old/src/test/dot/b1.dot:
--------------------------------------------------------------------------------
1 | val a = new (type X: Bot .. Top)
2 | val b = new (type X: Bot .. Top)
3 | val f = new (def m(x: a.X) = x)
4 | val g = new (def m(x: b.X) = f.m(x))
5 | a
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/b1ok.dot:
--------------------------------------------------------------------------------
1 | val a = new (type X: Bot .. Top)
2 | val b = new (type X: Bot .. Top)
3 | val f = new (def m(x: a.X) = x)
4 | val g = new (def m(x: a.X) = f.m(x))
5 | a
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/b2.dot:
--------------------------------------------------------------------------------
1 | val x: { x => {type A: Bot .. Top} & {type B: x.A .. x.A} & {val l: x.B} } = new (x => type A: Top .. Top; type B: x.A .. x.A; val l: x.B = new ())
2 | val d = new ( def m(x: x.type): Top = val y: x.B = x.l; y )
3 | val y: x.B = new ()
4 | d.m(x)
5 |
--------------------------------------------------------------------------------
/old/src/test/dot/b3.dot:
--------------------------------------------------------------------------------
1 | val f = new (def m(a: Top): { x => {type A: Bot .. Top} & {type B: x.A .. x.A} & {val l: x.B} } = new (x => type A: Top .. Top; type B: x.A .. x.A; val l: x.B = a))
2 | val a = new ()
3 | val y = f.m(a)
4 | val z: y.B = new ()
5 | a
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/b3ok.dot:
--------------------------------------------------------------------------------
1 | val f = new (def m(a: Top): { x => {type A: Bot .. Top} & {type B: x.A .. x.A} & {val l: x.B} } = new (x => type A: Top .. Top; type B: x.A .. x.A; val l: x.B = a))
2 | val a = new ()
3 | val y = f.m(a)
4 | val z: y.B = y.l
5 | a
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/b4.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Bot .. Top } &
3 | { def succ(n: r.Nat): r.Nat }
4 | }
5 | = new ( r =>
6 | type Nat = Top
7 | def succ(n: r.Nat): r.Nat = n
8 | )
9 | val nan: Top = new ()
10 | val no: r.Nat = r.succ(nan)
11 | no
12 |
--------------------------------------------------------------------------------
/old/src/test/dot/b4a.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Top .. Top } &
3 | { def succ(n: r.Nat): r.Nat } &
4 | { val zero: r.Nat }
5 | }
6 | = new ( r =>
7 | type Nat = Top
8 | def succ(n: r.Nat): r.Nat = n
9 | val zero: r.Nat = new ()
10 | )
11 | r.succ(r.zero)
12 |
--------------------------------------------------------------------------------
/old/src/test/dot/b4ok.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Bot .. Top } &
3 | { def succ(n: r.Nat): r.Nat } &
4 | { val zero: r.Nat }
5 | }
6 | = new ( r =>
7 | type Nat = Top
8 | def succ(n: r.Nat): r.Nat = n
9 | val zero: r.Nat = new ()
10 | )
11 | val sn: r.Nat = r.succ(r.zero)
12 | sn
13 |
--------------------------------------------------------------------------------
/old/src/test/dot/c1.dot:
--------------------------------------------------------------------------------
1 | val b: { b => {val l: b.X} & {type X: Top .. Top}} = new (val l = new (); type X: Top .. Top)
2 | val a: {val l: {b => {val l: b.X} & {type X: Bot .. Top}}} = new (val l = b)
3 | val c: a.l.X = a.l.l
4 | c
5 |
--------------------------------------------------------------------------------
/old/src/test/dot/c1a.dot:
--------------------------------------------------------------------------------
1 | val b: { b => {val l: b.X:Bot..Top} & {type X:Bot..Top}} = new (b => val l: b.X:Top..Top = new (); type X:Top..Top)
2 | val a: {val l: b.type} = new (val l = b)
3 | val al: b.type = a.l
4 | val c: Top = al.l
5 | val d: Top = c
6 | d
7 |
--------------------------------------------------------------------------------
/old/src/test/dot/c1aa.dot:
--------------------------------------------------------------------------------
1 | val b: { b => {val l: b.X:Bot..Top} & {type X:Bot..Top}} = new (b => val l: b.X:Top..Top = new (); type X:Top..Top)
2 | new ()
3 |
--------------------------------------------------------------------------------
/old/src/test/dot/c1b.dot:
--------------------------------------------------------------------------------
1 | val b: { b => {val l: b.X:Bot..Top} & {type X:Bot..Top}} = new (b => val l: b.X:Top..Top = new (); type X:Top..Top)
2 | val a: {val l: b.type} = new (val l = b)
3 | val al: b.type = a.l
4 | val c: b.X:Bot..Top = b.l
5 | val d: Top = c
6 | d
7 |
--------------------------------------------------------------------------------
/old/src/test/dot/c1c.dot:
--------------------------------------------------------------------------------
1 | val b: { b => {val l: b.X} & {type X:Bot..Top}} = new (b => val l: b.X:Top..Top = new (); type X:Top..Top)
2 | val b1: {val l:b.X} = b
3 | b
4 |
--------------------------------------------------------------------------------
/old/src/test/dot/c1d.dot:
--------------------------------------------------------------------------------
1 | val b: { b => {val l: b.X} & {type X: Bot .. Top}} = new (b => val l: b.X = new (); type X: Top .. Top)
2 | val c: { b => {val l: b.X} & {type X: Bot .. Top}} = b
3 | c
4 |
5 |
--------------------------------------------------------------------------------
/old/src/test/dot/c1ok.dot:
--------------------------------------------------------------------------------
1 | val b: { b => {val l: b.X:Bot..Top} & {type X:Bot..Top}} = new (b => val l: b.X:Top..Top = new (); type X:Top..Top)
2 | val a: {val l: b.type} = new (val l = b)
3 | val al: b.type = a.l
4 | val c: al.X:Bot..Top = al.l
5 | val d: Top = c
6 | d
7 |
--------------------------------------------------------------------------------
/old/src/test/dot/e1.dot:
--------------------------------------------------------------------------------
1 | new ( def m(x) = x )
2 |
--------------------------------------------------------------------------------
/old/src/test/dot/e10.dot:
--------------------------------------------------------------------------------
1 | val x: { type Foo: Top .. Top } = new ( type Foo: Top .. Top )
2 | val y: x.Foo = x
3 | x
--------------------------------------------------------------------------------
/old/src/test/dot/e11.dot:
--------------------------------------------------------------------------------
1 | new ( x =>
2 | type A: Top .. Top
3 | type B: Bot .. x.A
4 | )
--------------------------------------------------------------------------------
/old/src/test/dot/e11c.dot:
--------------------------------------------------------------------------------
1 | new { type A: Top .. Top } ( x =>
2 | type A: Top .. Top
3 | type B: Bot .. x.A
4 | )
--------------------------------------------------------------------------------
/old/src/test/dot/e11ok.dot:
--------------------------------------------------------------------------------
1 | new { x => {type A: Top .. Top} & {type B: Bot .. x.A} } ( x =>
2 | type A: Top .. Top
3 | type B: Bot .. x.A
4 | )
5 |
--------------------------------------------------------------------------------
/old/src/test/dot/e12.dot:
--------------------------------------------------------------------------------
1 | new ( x =>
2 | type A: Top .. Top
3 | def m(y: x.A): Top = new ()
4 | )
--------------------------------------------------------------------------------
/old/src/test/dot/e13.dot:
--------------------------------------------------------------------------------
1 | new ( x =>
2 | type A: Top .. Top
3 | def m(y: Top): x.A = new ()
4 | )
--------------------------------------------------------------------------------
/old/src/test/dot/e14.dot:
--------------------------------------------------------------------------------
1 | new ( x =>
2 | type A: Top .. Top
3 | val v: x.A = new ()
4 | )
--------------------------------------------------------------------------------
/old/src/test/dot/e15.dot:
--------------------------------------------------------------------------------
1 | val b: { z => { val l: z.X } & { type X: Top .. Top }} =
2 | new ( z => val l: z.X = new (); type X: Top .. Top )
3 | val c: b.X = b.l
4 | c
--------------------------------------------------------------------------------
/old/src/test/dot/e16.dot:
--------------------------------------------------------------------------------
1 | val a: { type Foo: Top .. Top } = new (type Foo: Top .. Top)
2 | val b: { val a: { type Foo: Top .. Top } } = new (val a = a)
3 | val c: b.a.Foo = new ()
4 | b
--------------------------------------------------------------------------------
/old/src/test/dot/e16n.dot:
--------------------------------------------------------------------------------
1 | val a: { type Foo: Top .. Top } = new (type Foo: Top .. Top)
2 | val b: { val a: { type Foo: Top .. Top } } = new (val a = a)
3 | val ba = b.a
4 | val c: b.a.Foo = new ()
5 | b
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/e16o.dot:
--------------------------------------------------------------------------------
1 | val a: { type Foo: Top .. Top } = new (type Foo: Top .. Top)
2 | val b: { val a: { type Foo: Top .. Top } } = new (val a = a)
3 | val ba: { type Foo: Top .. Top } = b.a
4 | val c: ba.Foo = new ()
5 | b
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/e17.dot:
--------------------------------------------------------------------------------
1 | val l: Top = new ()
2 | val b: {b => {val l: b.Z} & {type Z: Top .. Top}} =
3 | new (b => val l = l; type Z: Top .. Top)
4 | val a: {val b: {b => {val l: b.Z} & {type Z: Top .. Top}}} =
5 | new (val b = b)
6 | l
7 |
--------------------------------------------------------------------------------
/old/src/test/dot/e18.dot:
--------------------------------------------------------------------------------
1 | val r = new ( r =>
2 | type X = Top
3 | def foo(x: r.X): Top = r.foo(x)
4 | )
5 | r
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/e19.dot:
--------------------------------------------------------------------------------
1 | val l: Top = new ()
2 | val b: {b => {val l: b.Z:b.Z..Top} & {type Z: Top .. Top}} =
3 | new (b => val l = l; type Z: Top .. Top)
4 | l
5 |
--------------------------------------------------------------------------------
/old/src/test/dot/e2.dot:
--------------------------------------------------------------------------------
1 | new ()
2 |
--------------------------------------------------------------------------------
/old/src/test/dot/e20.dot:
--------------------------------------------------------------------------------
1 | val l: Top = new ()
2 | val b: {b => {val l: b.Z} & {type Z: Bot .. Top}} =
3 | new {b => {val l: b.Z} & {type Z: Top .. Top}} (b => val l = l; type Z: Top .. Top)
4 | l
5 |
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/e21c.dot:
--------------------------------------------------------------------------------
1 | val l: Top = new ()
2 | new {b => {val l: b.Z} & {type Z: Top .. Top}} (b => val l = l; type Z: Top .. Top)
3 |
4 |
--------------------------------------------------------------------------------
/old/src/test/dot/e22.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new (r =>
3 | type Nat = { def succ(_: Top): r.Nat }
4 | )
5 | r
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/e22a.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new (r =>
3 | type Nat = { def succ(_: Top): r.Nat }
4 | )
5 | r
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/e22b.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new (r =>
3 | type Nat = { n => { def succ(_: Top): r.Nat } }
4 | )
5 | r
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/e22c.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new (r =>
3 | type Nat = { n => { def succ(_: Top): r.Nat } }
4 | def zero(_: Top): r.Nat = new r.Nat (z =>
5 | def succ(_: Top): r.Nat = z
6 | )
7 | )
8 | r
9 |
--------------------------------------------------------------------------------
/old/src/test/dot/e22d.dot:
--------------------------------------------------------------------------------
1 | val r: {r =>
2 | { type Nat = { n => { def succ(_: Top): r.Nat } } } &
3 | { def zero(_: Top): r.Nat }
4 | }
5 | = new (r =>
6 | type Nat = { n => { def succ(_: Top): r.Nat } }
7 | def zero(_: Top): r.Nat = new r.Nat (z =>
8 | def succ(_: Top): r.Nat = z
9 | )
10 | )
11 | r
12 |
--------------------------------------------------------------------------------
/old/src/test/dot/e22e.dot:
--------------------------------------------------------------------------------
1 | val r: { r =>
2 | { type Nat = { n => { def succ(_: Top): r.Nat } } } &
3 | { def zero(_: Top): r.Nat }
4 | }
5 | = new (r =>
6 | type Nat = { n => { def succ(_: Top): r.Nat } }
7 | def zero(_: Top): r.Nat = new r.Nat (z =>
8 | def succ(_: Top): r.Nat = z
9 | )
10 | )
11 | val r2: Top = r
12 | r
13 |
--------------------------------------------------------------------------------
/old/src/test/dot/e22f.dot:
--------------------------------------------------------------------------------
1 | val r: { r =>
2 | { type Nat = { n => { def succ(_: Top): r.Nat } } } &
3 | { def zero(_: Top): r.Nat }
4 | }
5 | = new (r =>
6 | type Nat = { n => { def succ(_: Top): r.Nat } }
7 | def zero(_: Top): r.Nat = new r.Nat (z =>
8 | def succ(_: Top): r.Nat = z
9 | )
10 | )
11 | val z: Top = r.zero(r)
12 | r
13 |
--------------------------------------------------------------------------------
/old/src/test/dot/e22g.dot:
--------------------------------------------------------------------------------
1 | val r: { r =>
2 | { type Nat = { n => { def succ(_: Top): r.Nat } } } &
3 | { def zero(_: Top): r.Nat }
4 | }
5 | = new (r =>
6 | type Nat = { n => { def succ(_: Top): r.Nat } }
7 | def zero(_: Top): r.Nat = new r.Nat (z =>
8 | def succ(_: Top): r.Nat = z
9 | )
10 | )
11 | val z: r.Nat = r.zero(r)
12 | r
13 |
--------------------------------------------------------------------------------
/old/src/test/dot/e22h.dot:
--------------------------------------------------------------------------------
1 | val r: { r =>
2 | { type Nat = { n => { def succ(_: Top): r.Nat } } } &
3 | { def zero(_: Top): r.Nat }
4 | }
5 | = new (r =>
6 | type Nat = { n => { def succ(_: Top): r.Nat } }
7 | def zero(_: Top): r.Nat = new r.Nat (z =>
8 | def succ(_: Top): r.Nat = z
9 | )
10 | )
11 | val z: r.Nat = r.zero(r)
12 | val s: r.Nat = z.succ(r)
13 | r
14 |
--------------------------------------------------------------------------------
/old/src/test/dot/e22i.dot:
--------------------------------------------------------------------------------
1 | val r: { r =>
2 | { type Nat = { n => { def succ(_: Top): r.Nat } } } &
3 | { def zero(_: Top): r.Nat }
4 | }
5 | = new (r =>
6 | type Nat = { n => { def succ(_: Top): r.Nat } }
7 | def zero(_: Top): r.Nat = new r.Nat (z =>
8 | def succ(_: Top): r.Nat = z
9 | )
10 | )
11 | val z: r.Nat = r.zero(r)
12 | val s: r.Nat = z.succ(r)
13 | r.zero(r).succ(r).succ(r).succ(r)
14 |
--------------------------------------------------------------------------------
/old/src/test/dot/e22j.dot:
--------------------------------------------------------------------------------
1 | val r: { r =>
2 | { type Nat: Bot .. { n => { def succ(_: Top): r.Nat } } } &
3 | { def zero(_: Top): r.Nat }
4 | }
5 | = new (r =>
6 | type Nat = { n => { def succ(_: Top): r.Nat } }
7 | def zero(_: Top): r.Nat = new r.Nat (z =>
8 | def succ(_: Top): r.Nat = z
9 | )
10 | )
11 | r
12 |
--------------------------------------------------------------------------------
/old/src/test/dot/e23.dot:
--------------------------------------------------------------------------------
1 | val a : Top | Bot = new ()
2 | a
3 |
--------------------------------------------------------------------------------
/old/src/test/dot/e24.dot:
--------------------------------------------------------------------------------
1 | val a: { val x: Top } | { val x: Bot } = new (val x: Top = new ())
2 | a
3 |
--------------------------------------------------------------------------------
/old/src/test/dot/e25.dot:
--------------------------------------------------------------------------------
1 | val a: {a => { type Foo: Bot .. Top } & { val x: a.Foo } } |
2 | {a => { type Foo: Bot .. Bot } & { val x: a.Foo } }
3 | = new (a =>
4 | type Foo = Top
5 | val x: a.Foo = new ()
6 | )
7 | a
8 |
--------------------------------------------------------------------------------
/old/src/test/dot/e26.dot:
--------------------------------------------------------------------------------
1 | val a = new (type Foo = { val x: Top })
2 | val b = new (type Foo = ({val x: Top} & { val y: Top }))
3 | val c: a.Foo | b.Foo = new (val x: Top = new ())
4 | c.x
5 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Bot .. Top } &
3 | { def succ(n: r.Nat): r.Nat } &
4 | { val zero: r.Nat }
5 | }
6 | = new ( r =>
7 | type Church = { def church(isZero: { def apply(_: Top): Top }): r.Curry }
8 | type Curry = { def curry(isSucc: { def apply(_: r.Nat): Top }): Top }
9 | type Nat = { n => r.Church }
10 | def succ(n: r.Nat): r.Nat = new r.Nat ( sn =>
11 | def church(isZero: { def apply(_: Top): Top }) = new r.Curry (
12 | def curry(isSucc: { def apply(_: r.Nat): Top }): Top =
13 | isSucc.apply(n)
14 | )
15 | )
16 | val zero: r.Nat = new r.Nat ( z =>
17 | def church(isZero: { def apply(_: Top): Top }) = new r.Curry (
18 | def curry(isSucc: { def apply(_: r.Nat): Top }): Top =
19 | isZero.apply(z)
20 | )
21 | )
22 | )
23 | r
24 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27a.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Bot .. Top }
3 | }
4 | = new { r =>
5 | { type Church: Bot .. Top } &
6 | { type Curry: Bot .. Top } &
7 | { type Nat: Bot .. Top }
8 | } ( r =>
9 | type Church = { def church(isZero: { def apply(_: Top): Top }): r.Curry }
10 | type Curry = { def curry(isSucc: { def apply(_: r.Nat): Top }): Top }
11 | type Nat = { n => r.Church }
12 | )
13 | r
14 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27b.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Bot .. Top }
3 | }
4 | = new ( r =>
5 | type Church = { def church(isZero: { def apply(_: Top): Top }): r.Curry }
6 | type Curry = { def curry(isSucc: { def apply(_: r.Nat): Top }): Top }
7 | type Nat: Bot .. Top
8 | )
9 | r
10 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27c.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Bot .. Top }
3 | }
4 | = new { r =>
5 | { type Church: Bot .. Top } &
6 | { type Curry: Bot .. Top } &
7 | { type Nat: Bot .. Top }
8 | } ( r =>
9 | type Church = { def church(isZero: { def apply(_: Top): Top }): r.Curry }
10 | type Curry = { def curry(isSucc: { def apply(_: r.Nat): Top }): Top }
11 | type Nat = r.Church
12 | )
13 | r
14 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27d.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new { r =>
3 | { type Church: Bot .. Top } &
4 | { type Curry: Bot .. Top } &
5 | { type Nat: Bot .. Top }
6 | }
7 | ( r =>
8 | type Church = { def apply(isZero: { def apply(_: Top): Top }): r.Curry }
9 | type Curry = { def apply(isSucc: { def apply(_: Top): Top }): Top }
10 | type Nat = r.Church
11 | )
12 | r
13 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27e.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Bot .. Top } &
3 | { def succ(n: r.Nat): r.Nat }
4 | }
5 | = new { r =>
6 | { type Church: Bot .. Top } &
7 | { type Curry: Bot .. Top } &
8 | { type Nat: Bot .. Top } &
9 | { def succ(n: r.Nat): r.Nat }
10 | } ( r =>
11 | type Church = { def church(isZero: { def apply(_: Top): Top }): r.Curry }
12 | type Curry = { def curry(isSucc: { def apply(_: r.Nat): Top }): Top }
13 | type Nat = { n => r.Church }
14 | def succ(n: r.Nat): r.Nat = n
15 | )
16 | r
17 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27f.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new { r =>
3 | { type A: Bot .. Top }
4 | }
5 | ( r =>
6 | type A = { def foo(x: Top): r.A }
7 | )
8 | r
9 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27g.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new { r =>
3 | { type A: Bot .. Top } &
4 | { def id(x: r.A): r.A }
5 | }
6 | ( r =>
7 | type A = { def foo(x: Top): r.A }
8 | def id(x: r.A): r.A = x
9 | )
10 | r
11 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27h.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new { r =>
3 | { type A: Bot .. Top }
4 | }
5 | ( r =>
6 | type A = { def foo(x: Top): r.A }
7 | def id(x: r.A): r.A = x
8 | )
9 | r
10 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27i.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new
3 | ( r =>
4 | type A: Bot .. Top
5 | def id(x: r.A): r.A = x
6 | )
7 | r
8 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27j.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new { r =>
3 | { type A: Bot .. Top } &
4 | { def id(x: r.A): r.A }
5 | }
6 | ( r =>
7 | type A: Bot .. Bot
8 | def id(x: r.A): r.A = x
9 | )
10 | r
11 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27k.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new { r =>
3 | { type A: Bot .. Bot } &
4 | { def id(x: r.A): r.A }
5 | }
6 | ( r =>
7 | type A: Bot .. Bot
8 | def id(x: r.A): r.A = x
9 | )
10 | r
11 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27l.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new { r =>
3 | { type A: Bot .. Top } &
4 | { def id(x: r.A): r.A }
5 | }
6 | ( r =>
7 | type A = { val l: r.A }
8 | def id(x: r.A): r.A = x
9 | )
10 | r
11 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27m.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new { r =>
3 | { type A: Bot .. Top } &
4 | { def id(x: r.A): r.A }
5 | }
6 | ( r =>
7 | type A = { val l: r.A }
8 | def id(x: r.A): r.A = x.l
9 | )
10 | r
11 |
--------------------------------------------------------------------------------
/old/src/test/dot/e27n.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new { r =>
3 | { type A = { val l: r.A } } &
4 | { def id(x: r.A): r.A }
5 | }
6 | ( r =>
7 | type A = { val l: r.A }
8 | def id(x: r.A): r.A = x.l
9 | )
10 | r
11 |
--------------------------------------------------------------------------------
/old/src/test/dot/e28.dot:
--------------------------------------------------------------------------------
1 | new ( r =>
2 | def succ(n: Top): Top = new (
3 | def a(isZero: { def a(_: Top): Top }): Top = new (
4 | def a(isSucc: { def a(_: Top): Top }): Top =
5 | isZero.a(n)
6 | )
7 | )
8 | )
9 |
--------------------------------------------------------------------------------
/old/src/test/dot/e28a.dot:
--------------------------------------------------------------------------------
1 | new ( r =>
2 | def a(n: Top): Top = new (
3 | def a(n2: Top): Top = new (
4 | def a(n3: Bot): Bot = n3
5 | )
6 | )
7 | )
8 |
--------------------------------------------------------------------------------
/old/src/test/dot/e3.dot:
--------------------------------------------------------------------------------
1 | val x = new (); x
--------------------------------------------------------------------------------
/old/src/test/dot/e4.dot:
--------------------------------------------------------------------------------
1 | val x = new ()
2 | val y = new ( val v = x )
3 | y
--------------------------------------------------------------------------------
/old/src/test/dot/e5.dot:
--------------------------------------------------------------------------------
1 | val x: Top = new ()
2 | val y: { val v: Top } = new ( val v: Top = x )
3 | y
--------------------------------------------------------------------------------
/old/src/test/dot/e6.dot:
--------------------------------------------------------------------------------
1 | val x = new ()
2 | val y = new ( def m(z) = x )
3 | y
--------------------------------------------------------------------------------
/old/src/test/dot/e7.dot:
--------------------------------------------------------------------------------
1 | val x = new ()
2 | val y: { def m(z: Top): Top } = new ( def m(z) = x )
3 | y
--------------------------------------------------------------------------------
/old/src/test/dot/e8.dot:
--------------------------------------------------------------------------------
1 | val f: { def m(_:Top):Top } = new ( def m(x) = x )
2 | f
--------------------------------------------------------------------------------
/old/src/test/dot/e9.dot:
--------------------------------------------------------------------------------
1 | val x: { type Foo: Top .. Top } = new ( type Foo: Top .. Top )
2 | x
--------------------------------------------------------------------------------
/old/src/test/dot/ex_cow.dot:
--------------------------------------------------------------------------------
1 | val u = new (u =>
2 | type Animal = { a =>
3 | { type Food: Bot .. Top } &
4 | { def eat(_: a.Food): Top } &
5 | { def find(_: Top): a.Food }
6 | }
7 | type Grass: Bot .. Top
8 | type Cow = u.Animal & { type Food = u.Grass }
9 | )
10 | val c2a = new (
11 | def cast(x: u.Cow): u.Animal = x
12 | )
13 | u
14 |
--------------------------------------------------------------------------------
/old/src/test/dot/ex_list.dot:
--------------------------------------------------------------------------------
1 | val re = new ( re => def err(d: Top): Bot = re.err(d) )
2 | val r : { r => {
3 | type List : Bot .. { l =>
4 | { type E : Bot .. Top } &
5 | { val hd : l.E } &
6 | { def tl(_: Top): r.List & { type E = l.E } }
7 | } }
8 | }
9 | = new (r =>
10 | type List = { l =>
11 | { type E : Bot .. Top } &
12 | { val hd : l.E } &
13 | { def tl(_: Top): r.List & { type E = l.E } }
14 | }
15 | )
16 | r
17 |
--------------------------------------------------------------------------------
/old/src/test/dot/ex_nat.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Bot .. { n =>
3 | { def succ(_: Top): r.Nat }
4 | }} &
5 | { def zero(_: Top): r.Nat }
6 | }
7 | = new ( r =>
8 | type Nat = { n =>
9 | { def succ(_: Top): r.Nat }
10 | }
11 | def zero(_: Top): r.Nat = new (z =>
12 | def succ(_: Top): r.Nat = z
13 | )
14 | )
15 | val zero: r.Nat = r.zero(r)
16 | r.zero(r).succ(r)
17 |
--------------------------------------------------------------------------------
/old/src/test/dot/ex_nat_anf.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Bot .. { n =>
3 | { def succ(_: Top): r.Nat }
4 | }} &
5 | { def zero(_: Top): r.Nat }
6 | }
7 | = new ( r =>
8 | type Nat = { n =>
9 | { def succ(_: Top): r.Nat }
10 | }
11 | def zero(_: Top): r.Nat = new (z =>
12 | def succ(_: Top): r.Nat = z
13 | )
14 | )
15 | val z: r.Nat = r.zero(r)
16 | val sz: r.Nat = z.succ(r)
17 | val ssz: r.Nat = sz.succ(r)
18 | sz
19 |
--------------------------------------------------------------------------------
/old/src/test/dot/ex_nat_church.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Bot .. Top } &
3 | { def succ(n: r.Nat): r.Nat } &
4 | { val zero: r.Nat }
5 | }
6 | = new ( r =>
7 | type Church = { def church(isZero: { def apply(_: Top): Top }): r.Curry }
8 | type Curry = { def curry(isSucc: { def apply(_: r.Nat): Top }): Top }
9 | type Nat = { n => r.Church }
10 | def succ(n: r.Nat): r.Nat = new r.Nat ( sn =>
11 | def church(isZero: { def apply(_: Top): Top }) = new r.Curry (
12 | def curry(isSucc: { def apply(_: r.Nat): Top }): Top =
13 | isSucc.apply(n)
14 | )
15 | )
16 | val zero: r.Nat = new r.Nat ( z =>
17 | def church(isZero: { def apply(_: Top): Top }) = new r.Curry (
18 | def curry(isSucc: { def apply(_: r.Nat): Top }): Top =
19 | isZero.apply(z)
20 | )
21 | )
22 | )
23 | r
24 |
--------------------------------------------------------------------------------
/old/src/test/dot/ex_nat_church_a.dot:
--------------------------------------------------------------------------------
1 | val r
2 | = new ( r =>
3 | type Church = { def church(isZero: { def apply(_: Top): Top }): r.Curry }
4 | type Curry = { def curry(isSucc: { def apply(_: r.Nat): Top }): Top }
5 | type Nat = r.Church
6 | val zero: r.Nat = new (
7 | def church(isZero: { def apply(_: Top): Top }): r.Curry = new (
8 | def curry(isSucc: { def apply(_: r.Nat): Top }): Top =
9 | isZero.apply(new())
10 | )
11 | )
12 | )
13 | r
14 |
--------------------------------------------------------------------------------
/old/src/test/dot/ex_nat_church_b.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat : Bot .. Top } &
3 | { val zero: r.Nat }
4 | }
5 | = new ( r =>
6 | type Church = { def church(isZero: { def apply(_: Top): Top }): r.Curry }
7 | type Curry = { def curry(isSucc: { def apply(_: r.Nat): Top }): Top }
8 | type Nat = r.Church
9 | val zero: r.Nat = new (
10 | def church(isZero: { def apply(_: Top): Top }): r.Curry = new (
11 | def curry(isSucc: { def apply(_: r.Nat): Top }): Top =
12 | isZero.apply(new())
13 | )
14 | )
15 | )
16 | r
17 |
--------------------------------------------------------------------------------
/old/src/test/dot/ex_nat_church_c.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat : Bot .. Top } &
3 | { val zero: r.Nat }
4 | }
5 | = new ( r =>
6 | type Church = { def a(isZero: { def a(_: Top): Top }): r.Curry }
7 | type Curry = { def a(isSucc: { def a(_: Top): Top }): Top }
8 | type Nat = r.Church
9 | def succ(n: r.Nat): r.Nat = new (
10 | def a(isZero: { def a(_: Top): Top }): r.Curry = new (
11 | def a(isSucc: { def a(_: Top): Top }): Top =
12 | isSucc.a(n)
13 | )
14 | )
15 | val zero: r.Nat = new (
16 | def a(isZero: { def a(_: Top): Top }): r.Curry = new (
17 | def a(isSucc: { def a(_: Top): Top }): Top =
18 | isZero.a(new())
19 | )
20 | )
21 | )
22 | r
23 |
--------------------------------------------------------------------------------
/old/src/test/dot/ex_nat_church_d.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat : Bot .. Top } &
3 | { val zero: r.Nat }
4 | }
5 | = new ( r =>
6 | type Church = { def a(isZero: { def a(_: Top): Top }): r.Curry }
7 | type Curry = { def a(isSucc: { def a(_: r.Nat): Top }): Top }
8 | type Nat = r.Church
9 | def succ(n: r.Nat): r.Nat = new (
10 | def a(isZero: { def a(_: Top): Top }): r.Curry = new (
11 | def a(isSucc: { def a(_: r.Nat): Top }): Top =
12 | isSucc.a(n)
13 | )
14 | )
15 | val zero: r.Nat = new (
16 | def a(isZero: { def a(_: Top): Top }): r.Curry = new (
17 | def a(isSucc: { def a(_: r.Nat): Top }): Top =
18 | isZero.a(new())
19 | )
20 | )
21 | )
22 | r
23 |
--------------------------------------------------------------------------------
/old/src/test/dot/ex_nat_church_e.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat : Bot .. Top } &
3 | { def succ(n: r.Nat): r.Nat } &
4 | { val zero: r.Nat }
5 | }
6 | = new ( r =>
7 | type Church = { def a(isZero: { def a(_: Top): Top }): r.Curry }
8 | type Curry = { def a(isSucc: { def a(_: r.Nat): Top }): Top }
9 | type Nat = r.Church
10 | def succ(n: r.Nat): r.Nat = new (
11 | def a(isZero: { def a(_: Top): Top }): r.Curry = new (
12 | def a(isSucc: { def a(_: r.Nat): Top }): Top =
13 | isSucc.a(n)
14 | )
15 | )
16 | val zero: r.Nat = new (
17 | def a(isZero: { def a(_: Top): Top }): r.Curry = new (
18 | def a(isSucc: { def a(_: r.Nat): Top }): Top =
19 | isZero.a(new())
20 | )
21 | )
22 | )
23 | r
24 |
--------------------------------------------------------------------------------
/old/src/test/dot/ex_norec_nat.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Bot .. Top } &
3 | { def succ(n: r.Nat): r.Nat } &
4 | { val zero: r.Nat }
5 | }
6 | = new ( r =>
7 | type Nat = Top
8 | def succ(n: r.Nat): r.Nat = n
9 | val zero: r.Nat = new ()
10 | )
11 | val z: r.Nat = r.zero
12 | val sz: r.Nat = r.succ(z)
13 | val ssz: r.Nat = r.succ(sz)
14 | val three: r.Nat = r.succ(r.succ(r.succ(r.zero)))
15 | three
16 |
--------------------------------------------------------------------------------
/old/src/test/dot/ex_norec_nat_a.dot:
--------------------------------------------------------------------------------
1 | val r : { r =>
2 | { type Nat: Bot .. Top } &
3 | { def succ(n: r.Nat): r.Nat } &
4 | { val zero: r.Nat }
5 | }
6 | = new ( r =>
7 | type Nat = Top
8 | def succ(n: r.Nat): r.Nat = n
9 | val zero: r.Nat = new ()
10 | )
11 | val sz: r.Nat = r.succ(r.zero)
12 | val sz2: r.Nat = r.succ(sz)
13 | sz
14 |
--------------------------------------------------------------------------------
/old/src/test/dot/p1.dot:
--------------------------------------------------------------------------------
1 | val a = new ()
2 | val b: {val v: Top} = new ( val v = a )
3 | val c: {val v: {val v: Top }} = new ( val v = b )
4 | c.v.v
--------------------------------------------------------------------------------
/old/src/test/dot/p10.dot:
--------------------------------------------------------------------------------
1 | new (x => val l:Top = new (); type Foo: Top .. Top ; type Bar: x.Foo .. x.Foo )
2 |
--------------------------------------------------------------------------------
/old/src/test/dot/p11.dot:
--------------------------------------------------------------------------------
1 | new {type Foo: Top .. Top} (x => val l:Top = new (); type Foo: Top .. Top ; type Bar: x.Foo .. x.Foo )
2 |
--------------------------------------------------------------------------------
/old/src/test/dot/p12.dot:
--------------------------------------------------------------------------------
1 | new (type Cell = {val v: Top})
2 |
--------------------------------------------------------------------------------
/old/src/test/dot/p12a.dot:
--------------------------------------------------------------------------------
1 | new (type Cell: Bot .. {c => {val Cell: Top}})
2 |
--------------------------------------------------------------------------------
/old/src/test/dot/p12b.dot:
--------------------------------------------------------------------------------
1 | new (type X = {c => {type X: Bot .. Top} & {val v: c.X}})
2 |
--------------------------------------------------------------------------------
/old/src/test/dot/p12c.dot:
--------------------------------------------------------------------------------
1 | val r: {r => {type X = {c => {type X: Bot .. Top} & {val v: c.X}}}} =
2 | new (type X = {c => {type X: Bot .. Top} & {val v: c.X}})
3 | val c1 = new (c => type X: Top .. Top ; val v: c.X = new ())
4 | r
5 |
--------------------------------------------------------------------------------
/old/src/test/dot/p13.dot:
--------------------------------------------------------------------------------
1 | val x: { x => {type A: Bot .. Top} & {type B: x.A .. x.A} & {val l: x.B} } = new (x => type A: Top .. Top; type B: x.A .. x.A; val l: x.B = new ())
2 | val d = new ( def m(x: x.type): Top = val y: x.B = x.l; y )
3 | val y: x.B = x.l
4 | d.m(x)
5 |
--------------------------------------------------------------------------------
/old/src/test/dot/p13a.dot:
--------------------------------------------------------------------------------
1 | val x: { x => {type A: Bot .. Top} & {type B: x.A .. x.A} & {val l: x.B} } = new (x => type A: Top .. Top; type B: x.A .. x.A; val l: x.B = new ())
2 | val d = new ( def m(x: { x => {type A: Bot .. Top} & {type B: x.A .. x.A} & {val l: x.B} }): Top = val y: x.B = x.l; y )
3 | val y: x.B = x.l
4 | d.m(x)
5 |
--------------------------------------------------------------------------------
/old/src/test/dot/p14.dot:
--------------------------------------------------------------------------------
1 | val f = new (def m(a: Top): { x => {type A: Bot .. Top} & {type B: x.A .. x.A} & {val l: x.B} } = new (x => type A: Top .. Top; type B: x.A .. x.A; val l: x.B = a))
2 | val a = new ()
3 | f.m(a)
4 |
--------------------------------------------------------------------------------
/old/src/test/dot/p1i.dot:
--------------------------------------------------------------------------------
1 | val a = new ()
2 | val b = new ( val v = a )
3 | val c = new ( val v = b )
4 | c.v.v
--------------------------------------------------------------------------------
/old/src/test/dot/p2.dot:
--------------------------------------------------------------------------------
1 | val c = new ( val v = new ( val v = new () ) )
2 | c.v.v
--------------------------------------------------------------------------------
/old/src/test/dot/p2c.dot:
--------------------------------------------------------------------------------
1 | val c: {val v: {val v: Top}} = new ( val v: {val v: Top } = new ( val v: Top = new () ))
2 | c.v.v
--------------------------------------------------------------------------------
/old/src/test/dot/p3.dot:
--------------------------------------------------------------------------------
1 | val x: {x => {type A: Top .. Top} }= new ( type A: Top .. Top )
2 | val y: x.A = new ()
3 | y
--------------------------------------------------------------------------------
/old/src/test/dot/p4.dot:
--------------------------------------------------------------------------------
1 | val x: {x => {type A: Top .. Top} }= new ( type A: Top .. Top )
2 | val y: x.A = new ()
3 | y
--------------------------------------------------------------------------------
/old/src/test/dot/p5.dot:
--------------------------------------------------------------------------------
1 | val d: { val l: Top } = new (val l = new ())
2 | val a: { type A: {val l: Top} .. Top } = new (type A: {val l: Top} .. {val l: Top})
3 | val dp: a.A = d
4 | val b: { b => {type A: {val l: Top} .. Top} } = a
5 | val c: {val l: a.A} = new (val l = dp)
6 | val e: { e => {type A: {val l: Top} .. a.A} } = new (type A: {val l: Top} .. a.A)
7 | d.l
8 |
--------------------------------------------------------------------------------
/old/src/test/dot/p6.dot:
--------------------------------------------------------------------------------
1 | new (x => type Foo: Top .. Top ; type Bar: x.Foo .. x.Foo )
2 |
--------------------------------------------------------------------------------
/old/src/test/dot/p6a.dot:
--------------------------------------------------------------------------------
1 | new (x => type Foo: Top .. Top ; type Bar: x.Foo .. x.Foo; type Baz: Bot .. Top )
2 |
--------------------------------------------------------------------------------
/old/src/test/dot/p7.dot:
--------------------------------------------------------------------------------
1 | val x: {x => {type Foo: Top .. Top} & {type Bar: x.Foo .. x.Foo}} =
2 | new (x => type Foo: Top .. Top ; type Bar: x.Foo .. x.Foo )
3 | val xp: x.Foo = x
4 | val xpp: x.Bar = x
5 | xp
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/p8.dot:
--------------------------------------------------------------------------------
1 | val x: {x => {type Foo: Top .. Top} & {type Bar: x.Foo .. x.Foo}} =
2 | new (x => type Foo: Top .. Top ; type Bar: x.Foo .. x.Foo )
3 | val d = new ()
4 | val y = new Top (val Foo = x)
5 | d
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/p9.dot:
--------------------------------------------------------------------------------
1 | val d = new (val l = new ())
2 | val x: {x => {type Foo: Top .. Top} & {type Bar: x.Foo .. x.Foo}} =
3 | new (x => type Foo: Top .. Top ; type Bar: x.Foo .. x.Foo )
4 | val y = new Top (val l = x)
5 | d
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/t1.dot:
--------------------------------------------------------------------------------
1 | { val _: Top }
--------------------------------------------------------------------------------
/old/src/test/dot/t10.dot:
--------------------------------------------------------------------------------
1 | { r =>
2 | { type A: Bot .. Bot } &
3 | { def id(x: r.A): r.A }
4 | }
5 |
--------------------------------------------------------------------------------
/old/src/test/dot/t11.dot:
--------------------------------------------------------------------------------
1 | { r =>
2 | { type A: Bot .. Top } &
3 | { def id(x: r.A): r.A }
4 | }
5 |
--------------------------------------------------------------------------------
/old/src/test/dot/t2.dot:
--------------------------------------------------------------------------------
1 | {def _(_:Top): Top} & { val _: Top } & { type _: Bot .. Top }
--------------------------------------------------------------------------------
/old/src/test/dot/t3.dot:
--------------------------------------------------------------------------------
1 | { x => {type A: Top .. Top} & {type B: x.A .. x.A } }
--------------------------------------------------------------------------------
/old/src/test/dot/t4.dot:
--------------------------------------------------------------------------------
1 | { x =>
2 | { def m(_:Top): Top } &
3 | { val v: Top } &
4 | {type A: Top .. Top} &
5 | {type B: x.A .. x.A }
6 | }
7 |
--------------------------------------------------------------------------------
/old/src/test/dot/t5.dot:
--------------------------------------------------------------------------------
1 | { x =>
2 | {type A: Top .. Top} &
3 | {type B: x.A .. x.A } &
4 | Top
5 | }
6 |
--------------------------------------------------------------------------------
/old/src/test/dot/t6.dot:
--------------------------------------------------------------------------------
1 | { x =>
2 | { def m(_:Top): x.A } &
3 | { val v: Top } &
4 | {type A: Top .. Top} &
5 | {type B: x.A .. x.A }
6 | }
7 |
--------------------------------------------------------------------------------
/old/src/test/dot/t7.dot:
--------------------------------------------------------------------------------
1 | {b => {val l: b.Z} & {type Z: Top .. Top}}
--------------------------------------------------------------------------------
/old/src/test/dot/t8.dot:
--------------------------------------------------------------------------------
1 | {b => {val l: b.Z} & {type Z: Bot .. Top}}
--------------------------------------------------------------------------------
/old/src/test/dot/t9.dot:
--------------------------------------------------------------------------------
1 | { r => { type A = { def foo(x: Top): r.A } } }
2 |
--------------------------------------------------------------------------------
/old/src/test/scala/dot/GenerateElf.scala:
--------------------------------------------------------------------------------
1 | package dot
2 |
3 | import java.io._
4 | import org.scalatest.FunSuite
5 | import org.junit.runner.RunWith
6 | import org.scalatest.junit.JUnitRunner
7 |
8 | @RunWith(classOf[JUnitRunner])
9 | class GenerateElf extends FunSuite with ElfPrinter with DotParsing {
10 | val overwrite = true // should be false
11 | val src = "src/test/dot/"
12 | val prefix = "src/main/elf/"
13 | def readFile(name: String): String = {
14 | try {
15 | val buf = new Array[Byte](new File(name).length().toInt)
16 | val fis = new FileInputStream(name)
17 | fis.read(buf)
18 | fis.close()
19 | new String(buf)
20 | } catch {
21 | case e: IOException => ""
22 | }
23 | }
24 | def writeFile(name: String, content: String) {
25 | val out = new java.io.PrintWriter(new File(name))
26 | out.write(content)
27 | out.close()
28 | }
29 | def check(label: String, code: String) = {
30 | val fileprefix = prefix+label
31 | val name = fileprefix+".check.elf"
32 | val aname = fileprefix+".actual.elf"
33 | val expected = readFile(name)
34 | if (expected != code) {
35 | val oname = if (overwrite) name else aname
36 | println((if (overwrite) "over" else "")+"writing " + oname)
37 | writeFile(oname, code)
38 | }
39 | assert(expected == code, name)
40 | }
41 | def exec(label: String, code: String) = {
42 | val fileprefix = prefix+label
43 | val aname = fileprefix+".actual.elf"
44 | writeFile(aname, code)
45 | }
46 |
47 | import scala.collection.JavaConversions._
48 | def getFileTree(f: File): Stream[File] = f #::
49 | (if (f.isDirectory) f.listFiles().toStream.flatMap(getFileTree) else Stream.empty)
50 | def srcTree = getFileTree(new File(src))
51 |
52 | for (f <- srcTree) {
53 | val name = f.getName
54 | if (name.endsWith(".dot") && !name.contains("#")) {
55 | test("sanity-checking elf of "+name) {
56 | val in = readFile(f.toString)
57 | phrase(if (name.startsWith("t")) Parser.typ else Parser.term)(new lexical.Scanner(in)) match {
58 | case Success(e, _) => check(name, "%abbrev "+name.substring(0, name.length-4)+" = "+print(e)+".")
59 | case r@_ => sys.error("error parsing " + name + r)
60 | }
61 | }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/old/src/test/scala/dot/TestDotParser.scala:
--------------------------------------------------------------------------------
1 | package dot
2 |
3 | import org.scalatest._
4 | import org.junit.runner.RunWith
5 | import org.scalatest.junit.JUnitRunner
6 |
7 | @RunWith(classOf[JUnitRunner])
8 | class TestDotParser extends FunSuite with DotParsing {
9 | import terms._
10 | import types._
11 | import init._
12 |
13 | def parse[T](p: Parser[T])(in: String) = phrase(p)(new lexical.Scanner(in))
14 |
15 | def ok[T](p: Parser[T], expected: Option[T] = None)(in: String) = parse(p)(in) match {
16 | case Success(actual, _) => expected.foreach(e => expectResult(e)(actual))
17 | case _@r => fail("expected success, got " + r)
18 | }
19 | def bad[T](p: Parser[T], expectedMsg: Option[String] = None)(in: String) = parse(p)(in) match {
20 | case Failure(msg, _) => expectedMsg.foreach(e => expectResult(e)(msg))
21 | case _@r => fail("expected failure, got " + r)
22 | }
23 |
24 | test("Bot") { ok(Parser.typ)("Bot") }
25 | test("Top") { ok(Parser.typ)("Top") }
26 |
27 | test("And") { ok(Parser.typ)("Top & Top") }
28 | test("Or") { ok(Parser.typ)("Top | Top") }
29 | test("TypeGrouping1") { ok(Parser.typ, Some(Or(And(Top, Top), Top)))("Top & Top | Top") }
30 | test("TypeGrouping2") { ok(Parser.typ, Some(Or(Top, And(Top, Top))))("Top | Top & Top") }
31 |
32 | test("MemType") { ok(Parser.typ)("{ type A: Bot .. Top }") }
33 | test("MemTypeAlias") { ok(Parser.typ)("{ type A = Top }") }
34 | test("MemDef") { ok(Parser.typ)("{ def m(_: Bot): Top }") }
35 | test("MemVal") { ok(Parser.typ)("{ val v: Top }") }
36 | test("TRec/Tsel") { ok(Parser.typ)("{ x => { type A: Bot .. x.B } & { type B: Bot .. Top } }") }
37 |
38 | test("termVar") { ok(Parser.term) ("val x = new ( x => ); x") }
39 | test("termSel") { ok(Parser.term) ("val x = new ( x => val v = x ); x.v") }
40 | test("termApp") { ok(Parser.term) ("val x = new ( x => def m(a)=a ); x.m(x)") }
41 | }
42 |
--------------------------------------------------------------------------------
/old/src/test/scala/dot/TestElfPrinter.scala:
--------------------------------------------------------------------------------
1 | package dot
2 |
3 | import org.scalatest._
4 | import org.junit.runner.RunWith
5 | import org.scalatest.junit.JUnitRunner
6 |
7 | @RunWith(classOf[JUnitRunner])
8 | class TestElfPrinter extends FunSuite with ElfPrinter with DotParsing {
9 | import terms._
10 | import types._
11 | import init._
12 |
13 | def ok[U](f: Term => U)(in: String)(expected: U) = phrase(Parser.term)(new lexical.Scanner(in)) match {
14 | case Success(t, _) => expectResult(expected)(f(t))
15 | case r@_ => sys.error("parsing failed: " + r)
16 | }
17 |
18 | def tags(ls: String*) = ls.toList.map(Tag)
19 |
20 | test("collectTags1") {
21 | ok(collectTags){"""
22 | val x = new ( x => type Bar: Bot .. x.Foo ); x
23 | """}(tags("Bar", "Foo"))
24 | }
25 |
26 | test("collectTags2") {
27 | ok(collectTags){"""
28 | val x = new ( x => def m(y): x.Bar = y; type Foo: Bot .. Top ); x.yo
29 | """}(tags("m", "Bar", "Foo", "yo"))
30 | }
31 |
32 | test("collectTagsNoDups") {
33 | ok(collectTags){"""
34 | val x = new ( x => def m(y): x.Bar = y; type Foo: Bot .. x.Bar ); x.yo
35 | """}(tags("m", "Bar", "Foo", "yo"))
36 | }
37 |
38 | test("printNat") {
39 | expectResult("(s (s (s z)))"){printNat(3)}
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/old/tex/dot_custom.tex:
--------------------------------------------------------------------------------
1 | \renewcommand{\aaaadd}[3]{\text{#1 + #2 = #3}}
2 | \renewcommand{\aaalte}[2]{\text{#1 $\leq$ #2}}
3 | \renewcommand{\aaaeq}[2]{\text{#1 = #2}}
4 | \renewcommand{\aaane}[2]{\text{#1 $\neq$ #2}}
5 |
6 | \renewcommand{\aaavnil}[0]{\text{$\emptyset$}}
7 | \renewcommand{\aaavcons}[2]{\text{{#1}$::${#2}}}
8 | \renewcommand{\aaavsize}[2]{\text{$|${#1}$|$$=${#2}}}
9 | \renewcommand{\aaavlookup}[3]{\text{{#2} $\mapsto$ {#3} $\in$ {#1}}}
10 |
11 | \renewcommand{\aaatnil}[0]{\text{$\emptyset$}}
12 | \renewcommand{\aaatcons}[2]{\text{{#1}$::${#2}}}
13 | \renewcommand{\aaatsize}[2]{\text{$|${#1}$|$$=${#2}}}
14 | \renewcommand{\aaatlookup}[3]{\text{{#2} $\mapsto$ {#3} $\in$ {#1}}}
15 |
16 | \renewcommand{\aaasubenv}[2]{\text{#1 $\sqsubseteq$ #2}}
17 | \renewcommand{\aaasubenvsize}[3]{\text{#1 $\sqsubseteq_\text{#2}$ #3}}
18 | \renewcommand{\aaapatheval}[4]{\text{#2 $\ts$ #3 $\ni_\text{#1}$ #4}}
19 | \renewcommand{\aaatlookexp}[3]{\text{#1 $\ts$ #2 $\ni_0$ #3}}
20 |
21 | \renewcommand{\aaaempty}[0]{\text{\{$\emptyset_e$\}}}
22 | \renewcommand{\aaafun}[9]{\text{{\bf new} {#1} \{{\bf def }{#2}(\_:{#3}):{#4}={#5};{\bf val }{#6}:{#7}={#8};{\bf types }{#9}\}}}
23 | \renewcommand{\aaaapp}[3]{\text{#1.#2(#3)}}
24 | \renewcommand{\aaasel}[2]{\text{#1.#2}}
25 |
26 | \renewcommand{\aaatop}[0]{\text{$\top$}}
27 | \renewcommand{\aaabot}[0]{\text{$\bot$}}
28 | \renewcommand{\aaaarrow}[3]{\text{\{{\bf def } #1 : #2 $\rightarrow$ #3\}}}
29 | \renewcommand{\aaarect}[3]{\text{\{\bf type } #1 : #2 .. #3\}}
30 | \renewcommand{\aaarecv}[2]{\text{\{{\bf val } #1 : #2\}}}
31 | \renewcommand{\aaatsel}[2]{\text{#1.#2}}
32 | \renewcommand{\aaabind}[2]{\text{\{ #1 $\Rightarrow$ #2 \}}}
33 | \renewcommand{\aaaand}[2]{\text{#1 $\wedge$ #2}}
34 | \renewcommand{\aaaor}[2]{\text{#1 $\vee$ #2}}
35 |
36 | \renewcommand{\aaaemptyv}[0]{\text{\{$\emptyset_v$\}}}
37 | \renewcommand{\aaaclos}[5]{\text{$<\{${\bf def} #1 = #2; {\bf val } #3 = #4$\}$ {\bf in } #5$>_v$}}
38 |
39 | \renewcommand{\aaawftp}[3]{\text{#2 $\ts$ #3 {\bf wf$_\text{#1}$}}}
40 | \renewcommand{\aaasubtp}[5]{\text{{#2} $\vdash$ {#3} $<:_\text{#1}$ {#5} $\dashv$ {#4}}}
41 |
42 | \renewcommand{\aaaevalexp}[3]{\text{{#1} $\ts$ {#2} $\Downarrow$ {#3}}}
43 | \renewcommand{\aaatypeexp}[3]{\text{{#1} $\ts$ {#2} : {#3}}}
44 | \renewcommand{\aaawfval}[3]{\text{#1 $\ts$ #2 {\bf wf$_v$}}}
45 |
46 | \renewcommand{\aaatnone}[0]{\text{$\emptyset_T$}}
47 | \renewcommand{\aaatsome}[1]{\text{#1}}
48 | \renewcommand{\aaaexptp}[4]{\text{#1 $\ts$ #2 $\prec_\text{#3}$ #4}}
49 |
50 | \renewcommand{\aaatoptand}[3]{\text{#1 $\wedge$ #2 = #3}}
51 | \renewcommand{\aaatoptor}[3]{\text{#1 $\vee$ #2 = #3}}
52 |
53 | \renewcommand{\aaastrict}[0]{\text{$!$}}
54 | \renewcommand{\aaalenient}[0]{\text{$\approx$}}
55 |
--------------------------------------------------------------------------------
/old/tex/fullpage.sty:
--------------------------------------------------------------------------------
1 | %%
2 | %% This is file `fullpage.sty',
3 | %% generated with the docstrip utility.
4 | %%
5 | %% The original source files were:
6 | %%
7 | %% fullpage.dtx (with options: `package')
8 | %% =============================================
9 | %% IMPORTANT NOTICE:
10 | %%
11 | %% This program can be redistributed and/or modified under the terms
12 | %% of the LaTeX Project Public License Distributed from CTAN
13 | %% archives in directory macros/latex/base/lppl.txt; either
14 | %% version 1 of the License, or any later version.
15 | %%
16 | %% This is a generated file.
17 | %% It may not be distributed without the original source file fullpage.dtx.
18 | %%
19 | %% Full documentation can be obtained by LaTeXing that original file.
20 | %% Only a few abbreviated comments remain here to describe the usage.
21 | %% =============================================
22 | %% Copyright 1994-1999 Patrick W Daly
23 | %% Max-Planck-Institut f\"ur Aeronomie
24 | %% Max-Planck-Str. 2
25 | %% D-37191 Katlenburg-Lindau
26 | %% Germany
27 | %% E-mail: daly@linmpi.mpg.de
28 | \NeedsTeXFormat{LaTeX2e}[1994/06/01]
29 | \ProvidesPackage{fullpage}
30 | [1999/02/23 1.1 (PWD)]
31 | % Sets all 4 margins to be either 1 inch or 1.5 cm, and specifies
32 | % the page style
33 | % Call as \usepackage[options]{fullpage}
34 | % Options = in (default) for 1 inch
35 | % cm for 1.5 cm
36 | % plain (default) sets \pagestyle{plain}
37 | % empty sets \pagestyle{empty}
38 | % headings sets \pagestyle{headings}
39 | % myheadings sets \pagestyle{myheadings}
40 | %-----------------------------------------------------------
41 | \newlength{\FP@margin}
42 | \DeclareOption{in}{\setlength{\FP@margin}{1in}}
43 | \DeclareOption{cm}{\setlength{\FP@margin}{1.5cm}}
44 | \newif\ifFP@plain
45 | \newif\ifFP@empty
46 | \DeclareOption{plain}{\FP@plaintrue \FP@emptyfalse
47 | \pagestyle{plain}}
48 | \DeclareOption{empty}{\FP@plaintrue \FP@emptytrue
49 | \pagestyle{empty}}
50 | \DeclareOption{headings}{\FP@plainfalse \FP@emptyfalse
51 | \pagestyle{headings}}
52 | \DeclareOption{myheadings}{\FP@plainfalse \FP@emptyfalse
53 | \pagestyle{myheadings}}
54 | \ExecuteOptions{in,plain}
55 | \ProcessOptions*
56 | \ifFP@plain
57 | \setlength{\headheight}{0pt}
58 | \setlength{\headsep}{0pt}
59 | \fi
60 | \ifFP@empty
61 | \setlength{\footskip}{0pt}
62 | \fi
63 | \setlength{\textwidth}{\paperwidth}
64 | \addtolength{\textwidth}{-2\FP@margin}
65 | \setlength{\oddsidemargin}{\FP@margin}
66 | \addtolength{\oddsidemargin}{-1in}
67 | \setlength{\evensidemargin}{\oddsidemargin}
68 | \setlength{\textheight}{\paperheight}
69 | \addtolength{\textheight}{-\headheight}
70 | \addtolength{\textheight}{-\headsep}
71 | \addtolength{\textheight}{-\footskip}
72 | \addtolength{\textheight}{-2\FP@margin}
73 | \setlength{\topmargin}{\FP@margin}
74 | \addtolength{\topmargin}{-1in}
75 | %%
76 | %% <<<<< End of generated file <<<<<<
77 | %%
78 | %% End of file `fullpage.sty'.
79 |
--------------------------------------------------------------------------------
/old/tex/macros.tex:
--------------------------------------------------------------------------------
1 | % ----- listings
2 |
3 | \lstdefinelanguage{Scala}%
4 | {morekeywords={abstract,%
5 | case,catch,char,class,%
6 | def,else,extends,final,finally,for,%
7 | if,import,implicit,%
8 | match,module,%
9 | new,null,%
10 | object,override,%
11 | package,private,protected,public,%
12 | for,public,return,super,sealed,%
13 | this,throw,trait,try,type,%
14 | val,var,%
15 | with,while,%
16 | yield%
17 | },%
18 | sensitive,%
19 | morecomment=[l]//,%
20 | morecomment=[s]{/*}{*/},%
21 | morestring=[b]",%
22 | morestring=[b]',%
23 | showstringspaces=false%
24 | }[keywords,comments,strings]%
25 |
26 | \lstset{language=Scala,%
27 | mathescape=true,%
28 | % columns=[c]fixed,%
29 | % basewidth={0.5em, 0.40em},%
30 | aboveskip=5pt,%\smallskipamount,
31 | belowskip=5pt,%\negsmallskipamount,
32 | lineskip=-0.2pt,
33 | basewidth={0.54em, 0.4em},%
34 | % backgroundcolor=\color{listingbg},
35 | basicstyle=\small\ttfamily,
36 | keywordstyle=\keywordstyle
37 | % commentstyle=\commentstyle
38 | % xleftmargin=0.5cm
39 | }
40 |
41 | \definecolor{listingbg}{RGB}{240, 240, 240}
42 |
43 | \newcommand{\commentstyle}[1]{\slseries{#1}}
44 | \newcommand{\keywordstyle}[1]{\bfseries{#1}}
45 |
46 | \lstnewenvironment{listing}{\lstset{language=Scala,mathescape=true}}{}
47 | \lstnewenvironment{listingtiny}{\lstset{language=Scala,mathescape=truebasicstyle=\scriptsize\ttfamily}}{}
48 |
49 | \newcommand{\code}[1]{\lstinline[language=Scala,mathescape=true,columns=fixed,basicstyle=\ttfamily]|#1|}
50 |
51 | % ----- Common inline listings (keywords, library methods etc.)
52 | \newcommand{\lval}{\code{val}}
53 | \newcommand{\ldef}{\code{def}}
54 | \newcommand{\lfor}{\code{for}}
55 | \newcommand{\lRand}[1][]{\code{Rand#1}}
56 | \newcommand{\lflatMap}[1][]{\code{flatMap#1}}
57 | \newcommand{\lchoice}[1][]{\code{choice#1}}
58 | \newcommand{\lalways}[1][]{\code{always#1}}
59 | \newcommand{\lnever}{\code{never}}
60 | \newcommand{\lflip}[1][]{\code{flip#1}}
61 | \newcommand{\lif}{\code{if}}
62 | \newcommand{\lopand}{\code{\&\&}}
63 | \newcommand{\lopor}{\code{||}}
64 | \newcommand{\lopeq}{\code{==}}
65 | \newcommand{\lplus}{\code{+}}
66 | \newcommand{\lminus}{\code{-}}
67 |
68 | % ----- packed items, so we don't waste space
69 | \newenvironment{sitemize}{
70 | \begin{itemize}
71 | \setlength{\itemsep}{1pt}
72 | \setlength{\parskip}{0pt}
73 | \setlength{\parsep}{0pt}
74 | }{\end{itemize}}
75 |
76 | \newenvironment{senumerate}{
77 | \begin{enumerate}
78 | \setlength{\itemsep}{1pt}
79 | \setlength{\parskip}{0pt}
80 | \setlength{\parsep}{0pt}
81 | }{\end{enumerate}}
82 |
83 | \newcommand{\mypar}[1]{{\bf #1.}}
84 |
85 | % ----- comments and todo
86 |
87 | \newcommand{\remark}[1]{{\bf $\clubsuit$ #1 $\spadesuit$}}
88 | %\newcommand{\note}[1]{\remark{\color{red}[#1]}}
89 | \newcommand{\note}[1]{{\color{red}[#1]}}
90 | \newcommand{\todo}[1]{\note{TODO: #1}}
91 |
92 | \newcommand{\comment}[1]{}
93 |
--------------------------------------------------------------------------------
/old/tex/math.sty:
--------------------------------------------------------------------------------
1 | %
2 | % Frame for paste-in figures or tables
3 | \def\mpicplace#1#2{%#1 = width #2 = height
4 | \vbox{\@tempdima=#2\advance\@tempdima by-2\fboxrule
5 | \hrule\@height \fboxrule\@width #1
6 | \hbox to #1{\vrule\@width \fboxrule\@height\@tempdima\hfil
7 | \vrule\@width \fboxrule\@height\@tempdima}\hrule\@height
8 | \fboxrule\@width #1}}
9 |
--------------------------------------------------------------------------------
/old/tex/minidot.tex:
--------------------------------------------------------------------------------
1 | \documentclass[preprint,nocopyrightspace,onecolumn,9pt]{sigplanconf}
2 |
3 | \usepackage{amsmath}
4 | \usepackage{amssymb}
5 | \usepackage[T1]{fontenc}
6 | \usepackage[scaled=0.8]{luximono}
7 | \usepackage[usenames]{color}
8 | \usepackage{url}
9 | \usepackage{listings}
10 |
11 | \usepackage{math}
12 | \usepackage{fleqn}
13 | \usepackage{latexsym}
14 | \usepackage{bcprules}
15 | \usepackage{prooftree}
16 |
17 | \usepackage{multicol}
18 |
19 | \input{macros}
20 | \input{dot_macros}
21 | \input{dot_auto}
22 | \input{dot_custom}
23 |
24 | \begin{document}
25 |
26 | % \special{papersize=8.5in,11in}
27 | % \setlength{\pdfpageheight}{\paperheight}
28 | % \setlength{\pdfpagewidth}{\paperwidth}
29 |
30 | % \conferenceinfo{TODO '14}{TODOmonth TODOday1-dayn, TODOcity.}
31 | % \copyrightyear{2013}
32 | % \copyrightdata{[to be supplied]}
33 |
34 | \title{minidot}
35 | % \subtitle{rules}
36 |
37 | \authorinfo{Nada Amin$^\ast$
38 | \and Tiark Rompf$^{\;\dagger\ast}$
39 | \and Martin Odersky$^\ast$} {
40 | $^\ast$EPFL: \texttt{\{first.last\}@epfl.ch}\qquad \\
41 | $^\dagger$Oracle Labs: \texttt{\{first.last\}@oracle.com}
42 | }
43 |
44 | \lstMakeShortInline[keywordstyle=,%
45 | flexiblecolumns=false,%
46 | %basewidth={0.56em, 0.52em},%
47 | mathescape=true,%
48 | basicstyle=\tt]@
49 |
50 |
51 | \maketitle
52 |
53 | % \begin{abstract}
54 | % ... TODO abstract ...
55 | % \end{abstract}
56 |
57 | %\category{D.3.3}{Language Constructs and Features}{Abstract data types, Classes and objects, polymorphism}
58 | %\category{D.3.1}{Formal Definitions and Theory}{Syntax, Semantics}
59 | %\category{F.3.3}{Studies of Program Constructs}{Object-oriented constructs, type structure}
60 | %\category{F.3.2}{Semantics or Programming Languages}{Operational semantics}
61 |
62 | %\terms
63 | %Languages, Theory
64 |
65 | %\keywords
66 | %calculus, objects, dependent types
67 |
68 | % \section{Rules}
69 |
70 | \input{rules}
71 |
72 | %\bibliographystyle{abbrvnat}
73 | %\bibliography{dot}
74 |
75 | % \appendix
76 | % \section{Appendix Title}
77 |
78 | % \acks
79 |
80 | \end{document}
81 |
--------------------------------------------------------------------------------
/old/tex/rules.tex:
--------------------------------------------------------------------------------
1 | \boxfig{exptp}{Expansion and Membership}{
2 | \begin{multicols}{2}[\judgement{Expansion}{\fbox{$\aaaexptp {G} {T} {N} {T'}$}}]
3 | {\allrulesaaaexptp}
4 | \end{multicols}
5 |
6 | \judgement{Expanding Intersections}{\fbox{$\aaatoptand {T1} {T2} {T3}$}}
7 | {\allrulesaaatoptand}
8 | \linesep
9 |
10 | \judgement{Expanding Unions}{\fbox{$\aaatoptor {T1} {T2} {T3}$}}
11 | {\allrulesaaatoptor}
12 | \linesep
13 |
14 | \judgement{Expanded Lookup}{\fbox{$\aaatlookexp {G} {E} {T}$}}
15 | {\allrulesaaatlookexp}
16 |
17 | \judgement{Membership}{\fbox{$\aaapatheval {M} {G} {E} {T}$}}
18 | {\allrulesaaapatheval}
19 | }
20 |
21 | \boxfig{subtp}{Subtyping}{
22 | \begin{multicols}{2}[\judgement{Subtyping}{\fbox{$\aaasubtp {M} {G1} {T1} {G2} {T2}$}}]
23 | {\allrulesaaasubtp}
24 | \end{multicols}
25 | }
26 |
27 | \boxfig{wftp}{Well-Formedness}{
28 | \begin{multicols}{2}[\judgement{Well-Formedness}{\fbox{$\aaawftp {M} {G} {T}$}}]
29 | {\allrulesaaawftp}
30 | \end{multicols}
31 | }
32 |
33 | \boxfig{typeexp}{Typing}{
34 | \judgement{Typing}{\fbox{$\aaatypeexp {G} {E} {T}$}}
35 | {\allrulesaaatypeexp}
36 | }
37 |
38 | \boxfig{evalexp}{Evaluation}{
39 | \judgement{Evaluation}{\fbox{$\aaaevalexp {H} {E} {V}$}}
40 | {\allrulesaaaevalexp}
41 | }
42 |
43 | \boxfig{evalexp}{Value Typing}{
44 | \judgement{Value Typing}{\fbox{$\aaawfval {H} {E} {V}$}}
45 | {\allrulesaaawfval}
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/old/tex/twelf.tex:
--------------------------------------------------------------------------------
1 | \documentclass{article}
2 | \usepackage[cm]{fullpage}
3 | \usepackage{amsmath}
4 | \usepackage{bcprules}
5 |
6 | \newcommand{\ts}{\,\vdash\,}
7 |
8 | \newcommand{\aaatype}[0]{\text{type}}
9 | \newcommand{\aaais}[2]{\text{#1 is #2}}
10 |
11 | \input{dot_auto}
12 | \input{dot_custom}
13 |
14 | \begin{document}
15 | \allrules
16 | \end{document}
17 |
--------------------------------------------------------------------------------
/oopsla16/README.md:
--------------------------------------------------------------------------------
1 | ## Type Soundness for Dependent Object Types (DOT) ##
2 |
3 | ### Mechanization in Coq ###
4 |
5 | The Coq scripts compile with the command `make`, using `coqc --version` 8.4pl6 (July 2015).
6 |
7 | - [`dot.v`](dot.v) -- model and common infrastructure and lemmas
8 | - [`dot_soundness.v`](dot_soundness.v) -- main soundness proof, based on subtyping transitivity pushback
9 | - [`dot_soundness_alt.v`](dot_soundness_alt.v) -- alternative soundness proof, based on directly invertible value typing aka possible types
10 | - [`dot_exs.v`](dot_exs.v) -- some examples, just sanity checks for expressivity
11 |
12 | Appendix A of the paper, _Type Soundness for Dependent Object Types (DOT)_ ([PDF](http://lampwww.epfl.ch/~amin/dot/soundness_oopsla16.pdf)), outlines a correspondence between the formalism on paper and in Coq.
13 |
--------------------------------------------------------------------------------
/popl17/README.md:
--------------------------------------------------------------------------------
1 | Type Soundness Proofs with Definitional Interpreters
2 | ====================================================
3 |
4 | Paper (POPL 2017): [[pdf](http://cs.purdue.edu/~rompf/papers/amin-popl17a.pdf)]
5 |
6 | The Coq scripts compile with the command `make`, using `coqc --version` 8.4pl6 (July 2015).
7 |
8 | - [STLC](stlc.v)
9 | - [F<:](fsub.v)
10 | - [F<: Equivalence with Small-Step](fsub_equiv.v)
11 | - [F<: with Mutable References](fsub_mut.v)
12 | - [F<: with Exceptions](fsub_exn.v)
13 | - [F<:> from the System D Square](fsubsup.v)
14 | - [D<:> from the System D Square](dsubsup.v)
15 | - [DOT in Big-Step](dot.v)
16 |
17 | For Step-by-Step Instructions, please see Appendix A of the paper (_Type Soundness Proofs with Definitional Interpreters_), which outlines a correspondence between the formalisms in the paper and in Coq.
18 |
--------------------------------------------------------------------------------