<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://lambda-the-ultimate.org">
<channel>
 <title>Lambda the Ultimate - Type Theory</title>
 <link>http://lambda-the-ultimate.org/taxonomy/term/21/0</link>
 <description></description>
 <language>en</language>
<item>
 <title>Programming as collaborative reference</title>
 <link>http://lambda-the-ultimate.org/node/4444</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://okmij.org/ftp/Computation/index.html#collaborative-PL&quot;&gt;Programming as collaborative reference&lt;/a&gt; (extended abstract and slides) by everybody&#039;s favorite PLT tag team, Oleg and Chung-chieh, from the &lt;a href=&quot;http://www.cs.princeton.edu/~dpw/obt/&quot;&gt;Off-the-beaten track workshop&lt;/a&gt; affiliated with POPL 2012:&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;We argue that programming-language theory should face the pragmatic fact that humans develop software by interacting with computers in real time [hear, hear]. This interaction not only relies on but also bears on the core design and tools of programming languages, so it should not be left to Eclipse plug-ins and StackOverflow. We further illustrate how this interaction could be improved by drawing from existing research on natural-language dialogue, specifically on collaborative reference.&lt;/p&gt;
&lt;p &gt;Overloading resolution is one immediate application. Here, collaborative reference can resolve the tension between fancy polymorphism and the need to write long type annotations everywhere. The user will submit a source code fragment with few or no annotations. If the compiler gets stuck -- e.g., because of ambiguous overloading -- it will ask the user for a hint. At the successful conclusion of the dialogue, the compiler saves all relevant context, in the form of inserted type annotations or as a proof tree attached to the source code. When revisiting the code later on, the same or a different programmer may ask the compiler questions about the inferred types and the reasons for chosen overloadings. We argue that such an interactive overloading resolution should be designed already in the type system (e.g., using oracles).&lt;/p&gt;&lt;/blockquote&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/10">Paradigms</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Sat, 04 Feb 2012 11:48:09 -0500</pubDate>
</item>
<item>
 <title>The Algebra of Data, and the Calculus of Mutation</title>
 <link>http://lambda-the-ultimate.org/node/4443</link>
 <description>&lt;p &gt;Kalani Thielen&#039;s &lt;a href=&quot;http://blog.lab49.com/archives/3011&quot;&gt;The Algebra of Data, and the Calculus of Mutation&lt;/a&gt; is a &lt;em &gt;very&lt;/em&gt; good explanation of ADTs, and also scratches the surfaces of Zippers:&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;With the spreading popularity of languages like F# and Haskell, many people are encountering the concept of an algebraic data type for the first time.  When that term is produced without explanation, it almost invariably becomes a source of confusion.  In what sense are data types algebraic?  Is there a one-to-one correspondence between the structures of high-school algebra and the data types of Haskell?  Could I create a polynomial data type?  Do I have to remember the quadratic formula?  Are the term-transformations of (say) differential calculus meaningful in the context of algebraic data types?  Isn’t this all just a bunch of general abstract nonsense?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;(hat tip to &lt;a href=&quot;https://twitter.com/dyokomizo&quot;&gt;Daniel Yokomizo&lt;/a&gt;, who used to be an LtU member...)&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/18">Teaching &amp; Learning</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Fri, 03 Feb 2012 10:53:09 -0500</pubDate>
</item>
<item>
 <title>Vellvm: Formalizing the LLVM Intermediate Representation for Verified Program Transformations</title>
 <link>http://lambda-the-ultimate.org/node/4440</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://www.cis.upenn.edu/~jianzhou/Vellvm/&quot;&gt;Vellvm: Formalizing the LLVM Intermediate Representation for Verified Program Transformations&lt;/a&gt; by Jianzhou Zhao, Santosh Nagarakatte, Milo M. K. Martin, and Steve Zdancewic, POPL 2012&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
This paper presents Vellvm (&lt;em &gt;verified&lt;/em&gt; &lt;a href=&quot;http://llvm.org/&quot;&gt;LLVM&lt;/a&gt;), a framework for reasoning about programs expressed in &lt;a href=&quot;http://llvm.org/docs/LangRef.html&quot;&gt;LLVM&#039;s intermediate representation&lt;/a&gt; and transformations that operate on it. Vellvm provides a mechanized formal semantics of LLVM&#039;s intermediate representation, its type system, and properties of its &lt;a href=&quot;http://en.wikipedia.org/wiki/Static_single_assignment_form&quot;&gt;SSA&lt;/a&gt; form. The framework is built using the &lt;a href=&quot;http://coq.inria.fr/&quot;&gt;Coq&lt;/a&gt; interactive theorem prover. It includes multiple operational semantics and proves relations among them to facilitate different reasoning styles and proof techniques.&lt;/p&gt;
&lt;p &gt;To validate Vellvm&#039;s design, we extract an interpreter from the Coq formal semantics that can execute programs from LLVM &lt;a href=&quot;http://llvm.org/docs/TestingGuide.html#quicktestsuite&quot;&gt;test suite&lt;/a&gt; and thus be compared against LLVM reference implementations. To demonstrate Vellvm&#039;s practicality, we formalize and verify a &lt;a href=&quot;http://www.cis.upenn.edu/acg/softbound/&quot;&gt;previously proposed transformation&lt;/a&gt; that hardens C programs against spatial memory safety violations. Vellvm&#039;s tools allow us to &lt;a href=&quot;http://coq.inria.fr/refman/Reference-Manual027.html&quot;&gt;extract&lt;/a&gt; a new, verified implementation of the transformation pass that plugs into the real LLVM infrastructure; its performance is competitive with the non-verified, ad-hoc original.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;This obviously represents huge progress in marrying the theoretical benefits of tools like Coq with the practical benefits of tools like LLVM. We can only hope that this spurs further development in practical certified software development.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/20">Lambda Calculus</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/29">Semantics</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Sat, 28 Jan 2012 10:57:08 -0500</pubDate>
</item>
<item>
 <title>Deca, an LtU-friendly bare metal systems programming language</title>
 <link>http://lambda-the-ultimate.org/deca</link>
 <description>&lt;p &gt;The &lt;a href=&quot;http://code.google.com/p/decac/&quot;&gt;Deca programming language&lt;/a&gt; is &quot;&lt;i &gt;a language designed to provide the advanced features of sophisticated, high-level programming languages while still programming as close as possible to the bare metal. It brings in the functional, object-oriented, and generic programming paradigms without requiring a garbage collector or a threading system, so programmers really only pay in performance for the features they use.&lt;/i&gt;&quot;  The latter link provides a list of features that Deca does, will, and won&#039;t provide.  Features provided include type inference, universally- and existentially- quantified types, and &quot;a strong region-and-effect system that prohibits unsafe escaping pointers and double-free errors&quot;.&lt;/p&gt;
&lt;p &gt;The Deca language and ideas behind it are documented in a thesis, &lt;a href=&quot;http://decac.googlecode.com/files/Deca%20Thesis.pdf&quot;&gt;The design and implementation of a modern systems programming language&lt;/a&gt; (PDF):&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
Low-level systems programming has remained one of the most consistently difficult tasks in software engineering, since systems programmers must routinely deal with details that programming-language and systems researchers have preferred to abstract away. At least partially, the difficulty arises from not applying the state of the art in programming-languages research to systems programming. I therefore describe the design and implementation of Deca, a systems language based on modern PL principles. Deca makes use of decades in programming-languages research, particularly drawing from the state of the art in functional programming, type systems, extensible data-types and subroutines, modularity, and systems programming-languages research. I describe Deca&#039;s feature-set, examine the relevant literature, explain design decisions, and give some of the implementation details for Deca language features. I have been writing a compiler for Deca to translate it into machine code, and I describe the overall architecture of this compiler and some of its details.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;The source code for the Deca compiler, decac, is &lt;a href=&quot;http://code.google.com/p/decac/source/checkout&quot;&gt;available here&lt;/a&gt;.  The compiler is implemented in Scala and generates LLVM bytecode.  (The author points out in the comments below that this implementation is a work in progress.)&lt;/p&gt;
&lt;p &gt;The author of Deca is LtU member Eli Gottlieb, who back in 2008 posted in the forum asking for feedback on his language: &lt;a href=&quot;http://lambda-the-ultimate.org/node/2898&quot;&gt;Practical Bits of Making a Compiler for a New Language&lt;/a&gt;.&lt;/p&gt;
&lt;p &gt;There&#039;s some more discussion of Deca over at &lt;a href=&quot;http://news.ycombinator.com/item?id=3413936&quot;&gt;Hacker News&lt;/a&gt;.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/8">Implementation</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/20">Lambda Calculus</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/12">Object-Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Sun, 01 Jan 2012 21:40:53 -0500</pubDate>
</item>
<item>
 <title>LTL types FRP</title>
 <link>http://lambda-the-ultimate.org/node/4402</link>
 <description>Alan Jeffrey (to appear 2012) &lt;a href=&quot;http://ect.bell-labs.com/who/ajeffrey/papers/plpv12.pdf&quot;&gt;LTL types FRP: Linear-time Temporal Logic Propositions as Types, Proofs as Functional Reactive Programs&lt;/a&gt;.  To be presented at next year&#039;s &lt;i &gt;Programming Languages meets Program Verification&lt;/i&gt;, &lt;a href=&quot;http://research.microsoft.com/en-us/um/people/nswamy/plpv12/&quot;&gt;(PLPV 2012)&lt;/a&gt;.

&lt;blockquote &gt;
Functional Reactive Programming (FRP) is a form of reactive programming whose model is pure functions over signals. FRP is often expressed in terms of arrows with loops, which is the type class
for a Freyd category (that is a premonoidal category with a cartesian centre) equipped with a premonoidal trace. This type system
sufﬁces to deﬁne the dataﬂow structure of a reactive program, but
does not express its temporal properties. In this paper, we show
that Linear-time Temporal Logic (LTL) is a natural extension of
the type system for FRP, which constrains the temporal behaviour
of reactive programs. We show that a constructive LTL can be deﬁned in a dependently typed functional language, and that reactive
programs form proofs of constructive LTL properties. In particular,
implication in LTL gives rise to stateless functions on streams, and
the “constrains” modality gives rise to causal functions. We show
that reactive programs form a partially traced monoidal category,
and hence can be given as a form of arrows with loops, where the
type system enforces that only decoupled functions can be looped.
&lt;/blockquote&gt;

Via &lt;a href=&quot;https://plus.google.com/u/0/111927747393309805563/posts/Vde6MSMwSSb&quot;&gt;Alan&#039;s G+ feed&lt;/a&gt;.</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Mon, 14 Nov 2011 05:48:12 -0500</pubDate>
</item>
<item>
 <title>Extensible Programming with First-Class Cases</title>
 <link>http://lambda-the-ultimate.org/node/4394</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://ttic.uchicago.edu/~wchae/files/icfp06.pdf&quot;&gt;Extensible Programming with First-Class Cases&lt;/a&gt;, by Matthias Blume, Umut A. Acar, and Wonseok Chae:&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;We present language mechanisms for polymorphic, extensible records and their exact dual, polymorphic sums with extensible first-class cases. These features make it possible to easily extend existing code with new cases. In fact, such extensions do not require any changes to code that adheres to a particular programming style. Using that style, individual extensions can be written independently and later be composed to form larger components. These language mechanisms provide a solution to the expression problem.&lt;/p&gt;
&lt;p &gt;We study the proposed mechanisms in the context of an implicitly typed, purely functional language PolyR. We give a type system for the language and provide rules for a 2-phase transformation: first into an explicitly typed λ-calculus with record polymorphism, and finally to efficient index-passing code. The first phase eliminates sums and cases by taking advantage of the duality with records.&lt;/p&gt;
&lt;p &gt;We implement a version of PolyR extended with imperative features and pattern matching—we call this language MLPolyR. Programs in MLPolyR require no type annotations—the implementation employs a reconstruction algorithm to infer all types. The compiler generates machine code (currently for PowerPC) and optimizes the representation of sums by eliminating closures generated by the dual construction.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;This is an elegant solution to the expression problem for languages with pattern matching. This paper &lt;a href=&quot;http://lambda-the-ultimate.org/node/3338&quot;&gt;was posted twice in LtU comments&lt;/a&gt;, but it definitely deserves its own story. Previous solutions to the exression problem are rather more involved, like &lt;a href=&quot;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.38.8079&quot;&gt;Garrigue&#039;s use of recursion and polymorphic variants&lt;/a&gt;, because they lack support for extensible records which makes this solution so elegant.&lt;/p&gt;
&lt;p &gt;Extensible records and first-class cases unify object-oriented and functional paradigms on a deeper level, since they enable first-class messages to be directly encoded. Add a sensible system for dynamics, and I argue you have most of the power people claim of dynamic languages without sacrificing the safety of static typing.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/17">Software Engineering</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/19">Theory</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Sun, 30 Oct 2011 17:41:17 -0400</pubDate>
</item>
<item>
 <title>The SAFE Platform</title>
 <link>http://lambda-the-ultimate.org/node/4353</link>
 <description>A. Dehon, B. Karel, B. Montagu, B. Pierce, J. Smith, T. Knight, S. Ray, G. Sullivan, G. Malecha, G. Morrisett, R. Pollack, R. Morisset &amp;amp; O. Shivers. &lt;a href=&quot;http://www.crash-safe.org/sites/default/files/plos11-submission.pdf&quot;&gt;Preliminary design of the SAFE platform&lt;/a&gt;. In &lt;i &gt;Proceedings of the 6th Workshop on Programming Languages and Operating Systems&lt;/i&gt; (PLOS 2011). ACM, Oct. 2011.
&lt;blockquote &gt;
ABSTRACT &amp;mdash; Safe is a clean-slate design for a secure host architecture,
coupling advances in programming languages, operating
systems, and hardware, and incorporating formal methods
at every step. The project is still at an early stage, but we
have identiﬁed a set of fundamental architectural choices
that we believe will work together to yield a high-assurance
system. We sketch the current state of the design and
discuss several of these choices.
&lt;/blockquote&gt;
Proving an operating system correct down to the hardware specification and against a threat model &lt;i &gt;does&lt;/i&gt; seem to demand &lt;a href=&quot;http://lambda-the-ultimate.org/node/4351&quot;&gt;new programming languages&lt;/a&gt; and higher-order constructive type theory.</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/6">General</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Mon, 12 Sep 2011 07:41:28 -0400</pubDate>
</item>
<item>
 <title>Lightweight Monadic Programming in ML</title>
 <link>http://lambda-the-ultimate.org/node/4321</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://www.cs.umd.edu/~mwh/papers/swamy11monad.html&quot;&gt;Lightweight Monadic Programming in ML&lt;/a&gt;&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
Many useful programming constructions can be expressed as monads. Examples include probabilistic modeling, functional reactive programming, parsing, and information flow tracking, not to mention effectful functionality like state and I/O. In this paper, we present a type-based rewriting algorithm to make programming with arbitrary monads as easy as using ML&#039;s built-in support for state and I/O. Developers write programs using monadic values of type &lt;i &gt;M t&lt;/i&gt; as if they were of type &lt;i &gt;t&lt;/i&gt;, and our algorithm inserts the necessary binds, units, and monad-to-monad morphisms so that the program type checks. Our algorithm, based on Jones&#039; qualified types, produces principal types. But principal types are sometimes problematic: the program&#039;s semantics could depend on the choice of instantiation when more than one instantiation is valid. In such situations we are able to simplify the types to remove any ambiguity but without adversely affecting typability; thus we can accept strictly more programs. Moreover, we have proved that this simplification is &lt;i &gt;efficient&lt;/i&gt; (linear in the number of constraints) and &lt;i &gt;coherent&lt;/i&gt;: while our algorithm induces a particular rewriting, all related rewritings will have the same semantics. We have implemented our approach for a core functional language and applied it successfully to simple examples from the domains listed above, which are used as illustrations throughout the paper.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;This is an intriguing paper, with an implementation in about 2,000 lines of OCaml. I&#039;m especially interested in its application to probabilistic computing, yielding a result related to Kiselyov and Shan&#039;s Hansei effort, but without requiring delimited continuations (not that there&#039;s anything wrong with delimited continuations). On a theoretical level, it&#039;s nice to see such a compelling example of what can be done once types are freed from the shackle of &quot;describing how bits are laid out in memory&quot; (another such compelling example, IMHO, is type-directed partial evaluation, but that&#039;s literally another story).&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/22">Category Theory</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/8">Implementation</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/29">Semantics</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Thu, 28 Jul 2011 14:11:27 -0400</pubDate>
</item>
<item>
 <title>Kleisli Arrows of Outrageous Fortune</title>
 <link>http://lambda-the-ultimate.org/node/4273</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://personal.cis.strath.ac.uk/~conor/Kleisli.pdf&quot;&gt;Kleisli Arrows of Outrageous Fortune&lt;/a&gt;&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
When we program to interact with a turbulent world, we are to some extent at its mercy. To achieve safety, we must ensure that programs act in accordance with what is known about the state of the world, as determined dynamically. Is there any hope to enforce safety policies for dynamic interaction by static typing? This paper answers with a cautious ‘yes’.&lt;/p&gt;
&lt;p &gt;Monads provide a type discipline for effectful programming, mapping value types to computation types. If we index our types by data approximating the ‘state of the world’, we refine our values to witnesses for some condition of the world. Ordinary monads for indexed types give a discipline for effectful programming contingent on state, modelling the whims of fortune in way that Atkey’s indexed monads for ordinary types do not (Atkey, 2009). Arrows in the corresponding Kleisli category represent computations which a reach a given postcondition from a given precondition: their types are just specifications in a Hoare logic!&lt;/p&gt;
&lt;p &gt;By way of an elementary introduction to this approach, I present the example of a monad for interacting with a file handle which is either ‘open’ or ‘closed’, constructed from a command interface specfied Hoare-style. An attempt to open a file results in a state which is statically unpredictable but dynamically detectable. Well typed programs behave accordingly in either case. Haskell’s dependent type system, as exposed by the Strathclyde Haskell Enhancement preprocessor, provides a suitable basis for this simple experiment.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;I discovered this Googling around in an attempt to find some decent introductory material to Kleisli arrows. This isn&#039;t introductory, but it&#039;s a good resource. :-) The good introductory material I found was &lt;a href=&quot;http://blog.downstairspeople.org/2010/06/14/a-brutal-introduction-to-arrows/&quot;&gt;this&lt;/a&gt;.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/22">Category Theory</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Sat, 14 May 2011 11:19:08 -0400</pubDate>
</item>
<item>
 <title>Asynchronous Proof Processing with Isabelle/Scala and Isabelle/jEdit</title>
 <link>http://lambda-the-ultimate.org/node/4260</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://www4.in.tum.de/~wenzelm/papers/async-isabelle-scala.pdf&quot;&gt;Asynchronous Proof Processing with Isabelle/Scala and Isabelle/jEdit&lt;/a&gt;. Makarius Wenzel, UITP 2010. &lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
After several decades, most proof assistants are still centered around TTY-based interaction in a tight read-eval-print loop. Even well-known Emacs modes for such provers follow this synchronous model based on single commands with immediate response, meaning that the editor waits for the prover after each command. There have been some attempts to re-implement prover interfaces in big IDE frameworks, while keeping the old interaction model. Can we do better than that? &lt;/p&gt;
&lt;p &gt;Ten years ago, the Isabelle/Isar proof language already emphasized the idea of proof document (structured text) instead of proof script (sequence of commands), although the implementation was still emulating TTY interaction in order to be able to work with the then emerging Proof General interface. After some recent reworking of Isabelle internals, to support parallel processing of theories and proofs, the original idea of structured document processing has surfaced again. &lt;/p&gt;
&lt;p &gt;Isabelle versions from 2009 or later already provide some support for interactive proof documents with asynchronous checking, which awaits to be connected to a suitable editor framework or full-scale IDE. The remaining problem is how to do that systematically, without having to specify and implement complex protocols for prover interaction.&lt;/p&gt;
&lt;p &gt;This is the point where we introduce the new Isabelle/Scala layer, which is meant to expose certain aspects of Isabelle/ML to the outside world. The Scala language (by Martin Odersky) is suﬃciently close to ML in order to model well-known prover concepts conveniently, but Scala also runs on the JVM and can access existing Java libraries directly. By building more and more external system wrapping for Isabelle in Scala, we eventually reach the point where we can integrate the prover seamlessly into existing IDEs (say Netbeans).&lt;/p&gt;
&lt;p &gt;To avoid getting side-tracked by IDE platform complexity, our current experiments are focused on jEdit, which is a powerful editor framework written in Java that can be easily extended by plugin modules. Our plugins are written again in Scala for our convenience, and to leverage the Scala actor library for parallel and interactive programming. Thanks to the Isabelle/Scala layer, the Isabelle/jEdit implementation is very small and simple.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;I thought this was a nice paper on the pragmatics of incremental, interactive proof editing. I&#039;ve suspected for a while that as programming languages and IDEs grow more sophisticated and do more computationally-intensive checks at compile time (including but not limited to theorem proving), it will become similarly important to design our languages to support modular and incremental analysis. &lt;/p&gt;
&lt;p &gt;However, IDE designs also need more experimentation, and unfortunately the choice of IDEs to extend seem to be limited to archaic systems like Emacs or industrial behemoths like Eclipse or Visual Studio, both of which constrain the scope for new design -- Emacs is too limited, and the API surface of Eclipse/VS is just too big and irregular. (Agda-mode for Emacs is a heroic but somewhat terrifying piece of elisp.)&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/8">Implementation</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/17">Software Engineering</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Fri, 22 Apr 2011 11:06:17 -0400</pubDate>
</item>
<item>
 <title>Type-checking Modular Multiple Dispatch with Parametric Polymorphism and Multiple Inheritance</title>
 <link>http://lambda-the-ultimate.org/node/4236</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://www.mpi-sws.org/~skilpat/papers/multipoly-ecoop.pdf&quot;&gt;Type-checking Modular Multiple Dispatch with Parametric Polymorphism and Multiple Inheritance&lt;/a&gt;. Eric Allen, Justin Hilburn, Scott Kilpatrick, Sukyoung Ryu, David Chase, Victor Luchangco, and Guy L. Steele Jr. Submitted for publication, December 2010.&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;Multiple dynamic dispatch poses many problems for a statically typed language with nominal subtyping and multiple inheritance. In particular, there is a tension between modularity and extensibility when trying to ensure at compile time that each function call dispatches to a unique most specific definition at run time. We have previously shown how requiring that each set of overloaded definitions forms a meet semi-lattice allows one to statically ensure the absence of ambiguous calls while maintaining modularity and extensibility.&lt;/p&gt;
&lt;p &gt;In this paper, we extend the rules for ensuring safe overloaded functions to a type system with parametric polymorphism. We show that such an extension can be reduced to the problem of determining subtyping relationships between universal and existential types. We also ensure that syntactically distinct types inhabited by the same sets of values are equivalent under subtyping. Our system has been implemented as part of the open source Fortress compiler.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;So it&#039;s Sunday, and I&#039;m researching the interaction of multiple dispatch, type-checking, and  parametric polymorphism, when Google spits out this new paper by the Fortress team.&lt;/p&gt;
&lt;p &gt;Scott Kilpatrick&#039;s Master&#039;s Thesis &lt;a href=&quot;http://www.mpi-sws.org/~skilpat/papers/kilpatrick-masters-thesis.pdf&quot;&gt;Ad Hoc: Overloading and Language Design&lt;/a&gt; puts it into perspective:&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;The intricate concepts of ad-hoc polymorphism and overloading permeate the field of programming languages despite their somewhat nebulous definitions. With the perspective afforded by the state of the art, object-oriented Fortress programming language, this thesis presents a contemporary account of ad-hoc polymorphism and overloading in theory and in practice. Common language constructs are reinterpreted with a new emphasis on overloading as a key facility.&lt;/p&gt;
&lt;p &gt;Furthermore, concrete problems with overloading in Fortress, encountered during the author&#039;s experience in the development of the language, are presented with an emphasis on the ad hoc nature of their solutions.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;All of this is a bit over my head, unfortunately, but I find it very interesting nevertheless.  And it&#039;s heartening that the somewhat neglected multiple dispatch (and multiple inheritance!) is further developed by such a high caliber team.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/10">Paradigms</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Sun, 20 Mar 2011 12:28:15 -0400</pubDate>
</item>
<item>
 <title>The Triumph of Types: Principia Mathematica&#039;s Impact on Computer Science</title>
 <link>http://lambda-the-ultimate.org/node/4145</link>
 <description>&lt;small&gt;&lt;a href=&quot;http://www.srcf.ucam.org/principia/files/rc.pdf&quot;&gt;The Triumph of Types: Principia Mathematica&#039;s Impact on Computer Science&lt;/a&gt;. Robert L. Constable&lt;/small&gt;&lt;p&gt;
The role the ideas of Principia Mathematica played in type theory in programming languages is often alluded to in our discussions, making this contribution to a &lt;a href=&quot;http://www.srcf.ucam.org/principia/&quot;&gt;meeting&lt;/a&gt; celebrating the hundredth anniversary of Whitehead-and-Russell&#039;s opus provocative.&lt;p&gt;
To get your juices going here is a quote from page 3:&lt;p&gt;
&lt;blockquote&gt;
...I will discuss later our efforts at Cornell to create one such type theory, Computational Type Theory (CTT), very closely related to two others, the Calculus of Inductive Constructions (CIC) implemented in the Coq prover and widely used, and Intuitionistic Type Theory (ITT) implemented in the Alf and Agda provers. All three of these efforts, but especially CTT and ITT, were strongly influenced by Principia and the work of Bishop presented in his book Foundations of Constructive Analysis.
&lt;/blockquote&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/7">History</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Sat, 27 Nov 2010 13:59:22 -0500</pubDate>
</item>
<item>
 <title>Generative Type Abstraction and Type-level Computation</title>
 <link>http://lambda-the-ultimate.org/node/4126</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://www.cis.upenn.edu/~sweirich/newtypes.pdf&quot;&gt;Generative Type Abstraction and Type-level Computation (Extended Version)&lt;/a&gt;, by Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie Weirich, Steve Zdancewic:&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;Modular languages support &lt;em &gt;generative type abstraction&lt;/em&gt;, ensuring that an abstract type is distinct from its representation, except inside the implementation where the two are synonymous. We show that this well-established feature is in tension with the &lt;em &gt;non-parametric features&lt;/em&gt; of newer type systems, such as indexed type families and GADTs. In this paper we solve the problem by using kinds to distinguish between parametric and non-parametric contexts. The result is directly applicable to Haskell, which is rapidly developing support for type-level computation, but the same issues should arise whenever generativity and non-parametric features are combined.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;Type-level computation is becoming more common and more elaborate, thanks to recent extensions such as type families. Other non-parametric features allow the developer to reason about the concrete types used in a computation. Unfortunately, something as simple as a type-based dispatch can be unsound when combined with coercion lifting. This paper solves the tensions between these two useful features using a kind system extended with &quot;roles&quot;.&lt;/p&gt;
&lt;p &gt;In fact, this isn&#039;t the first time coercion lifting has caused trouble. In capability security terminology, coercion lifting is a &quot;rights amplification&quot; operation, and there are previously known examples of seemingly innocuous coercion lifting across an abstraction/implementation boundary &lt;a href=&quot;http://lambda-the-ultimate.org/node/2706&quot;&gt;resulting in Confused Deputies&lt;/a&gt;. There&#039;s no discussion of this connection in the paper, and the paper cannot solve the problem discussed at that link, which exposes a much deeper issue than confusing parametric/non-parametric contexts.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Thu, 04 Nov 2010 23:32:15 -0400</pubDate>
</item>
<item>
 <title>Omega - Language of the Future</title>
 <link>http://lambda-the-ultimate.org/node/4088</link>
 <description>&lt;p &gt;When I discovered Tim Sheard&#039;s &lt;a href=&quot;http://web.cecs.pdx.edu/~sheard/papers/LangOfTheFuture.ps&quot;&gt;Languages of the Future&lt;/a&gt;, I realized that PLs do indeed have a future (beyond asymptotically approaching CLOS and/or adding whimsical new rules to your type checker).  Compared to languages like Lisp, pre-generics Java, and Python, the &quot;futuristic&quot; languages like Haskell and O&#039;Caml seemed to mainly offer additional static verification, and some other neat patterns, but the &quot;bang for the buck&quot; seemed somewhat low, especially since these languages have their own costs (they are much more complex, they rule out many &quot;perfectly fine&quot; programs).&lt;/p&gt;
&lt;p &gt;&lt;a href=&quot;http://web.cecs.pdx.edu/~sheard/&quot;&gt;&amp;Omega;mega&lt;/a&gt; seems like a true revolution to me - it shows what can be done with a really fancy typesystem, and this seems like the first astounding advancement over existing languages, from Python to Haskell.  Its mantra is that it&#039;s possible to reap many (all?) benefits of dependent programming, without having to suffer its problems, by adding two much more humble notions to the widely understood, ordinary functional programming setting: &lt;a href=&quot;http://web.cecs.pdx.edu/~sheard/papers/GADT+ExtKinds.ps&quot;&gt;GADTs + Extensible Kinds&lt;/a&gt;.&lt;/p&gt;
&lt;p &gt;Sheard and coworkers show that these two simple extensions allow &lt;a href=&quot;http://web.cecs.pdx.edu/~sheard/papers/SumSchNotes.ps&quot;&gt;the succinct expression of many dependently-typed and related examples&lt;/a&gt; from the literature.  Fine examples are implementations of AVL and red-black trees that are always balanced &lt;em &gt;by construction&lt;/em&gt; -  it&#039;s simply impossible to create an unbalanced tree; this is checked by the type-system.  It seems somewhat obvious that sooner than later all code will be written in this (or a similar) way.&lt;/p&gt;
&lt;p &gt;How to understand this stuff: my route was through the generics of Java and C# (especially Featherweight Generic Java, &lt;a href=&quot;http://lamp.epfl.ch/~cremet/FGJ-omega/&quot;&gt;FGJ&lt;sub &gt;&amp;omega;&lt;/sub&gt;&lt;/a&gt;, and &lt;a href=&quot;http://research.microsoft.com/en-us/um/people/akenn/generics/index.html&quot;&gt;A. Kennedy&#039;s generics papers&lt;/a&gt;).  Once you understand basic notions like type constructors, variance, and kinds, you know everything to understand why &lt;a href=&quot;http://lambda-the-ultimate.org/node/689&quot;&gt;GADTs + Extensible Kinds = Dependent Programming&lt;/a&gt; (and also esoteric stuff like &lt;a href=&quot;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.6.6746&amp;amp;rep=rep1&amp;amp;type=pdf&quot;&gt;polytypic values have polykinded types&lt;/a&gt; for that matter).&lt;/p&gt;
&lt;p &gt;It is my belief that &lt;em &gt;you must understand &amp;Omega;mega now!&lt;/em&gt; Even if you&#039;re never going to use it, or something like it, you&#039;ll still learn a whole lot about programming.  Compared to &amp;Omega;mega, other languages are puny. ;P&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/5">Fun</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/15">Meta-Programming</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/10">Paradigms</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Fri, 24 Sep 2010 20:49:20 -0400</pubDate>
</item>
<item>
 <title>Type Classes as Objects and Implicits</title>
 <link>http://lambda-the-ultimate.org/node/4039</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://ropas.snu.ac.kr/~bruno/papers/TypeClasses.pdf&quot;&gt;Type Classes as Objects and Implicits&lt;/a&gt;&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
&lt;em &gt;Type classes&lt;/em&gt; were originally developed in Haskell as a disciplined alternative to ad-hoc polymorphism. Type classes have been shown to provide a type-safe solution to important challenges in software engineering and programming languages such as, for example, &lt;em &gt;retroactive extension&lt;/em&gt; of programs. They are also recognized as a good mechanism for &lt;em &gt;concept&lt;/em&gt;-based &lt;em &gt;generic programming&lt;/em&gt; and, more recently, have evolved into a mechanism for type-level computation. This paper presents a lightweight approach to type classes in object-oriented (OO) languages with generics using the CONCEPT pattern and &lt;em &gt;implicits&lt;/em&gt; (a type-directed implicit parameter passing mechanism).&lt;/p&gt;
&lt;p &gt;This paper also shows how Scala’s type system conspires with implicits to enable, and even surpass, many common extensions of the Haskell type class system, making Scala ideally suited for generic programming in the large.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;Martin Odersky and team&#039;s design decisions around how to do type classes in a unified OO and FP language continue to bear fascinating fruit. Implicits look less and less like &quot;poor man&#039;s type classes,&quot; and more and more like an improvement upon type classes, in my opinion given a quick read of this paper.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/8">Implementation</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/12">Object-Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/32">Scala</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Wed, 04 Aug 2010 18:25:48 -0400</pubDate>
</item>
</channel>
</rss>

