DSL

MathLang

MathLang is next to what the name suggest: a mathematical language, also a framework for writing mathematical texts. It allows for more formalisation than the normal Common Mathematical Language does in such a way that one can check the correctness of the text (on some given level) but also convert it to even more stringent forms so that it can be checked by proof checkers such as (Mizar, Coq, PVS, etc.).

A Monadic Semantics for Core Curry

A Monadic Semantics for Core Curry

The structure of our semantics sheds some light on how the basic components
of the language interact. In particular, we can see that the addition
of non-determinism, logic variables and narrowing can be accomplished just
by making a suitable shift in interpretation monad. We could emphasize
this modularity further by presenting the relevant monads as compositions of
monad transformers.

While being primarily an "interpreter as semantics" paper, it looks like a nice example of a DSL in Haskell.

As a bonus, it also discusses some features of logic programming.

Microsoft Atlas

A screencast about Microsoft's Atlas toolkit (Flash, Windows Media and QuickTime formats available).

Atlas it ASP.Net's AJAX solution, and it seems quite well thought out from what I can tell.

Both the ASP.Net Atlas code and the Atlas XML Script DSL provide a declarative programming model, which should help build AJAX applications which otherwise require a somewhat confusing programming model for beginners.

It sohuld be interesting to see how this approach compares with web frameworks such as Rails (whose DWIM approach makes it quite DSL-ish), and with the approach Wadler takes with Links.

DSLs: How and When?

There's a discussion on Artima about domain-specific language development. Actually, there isn't too much discussion (yet), but there's a link to this ACM Computing Survey article (PDF), which looks quite good. It has a survey of DSL use cases, implementation techniques, etc., and explores some reasons to choose whether to implement a new DSL.

Active Libraries and Universal Languages

Active Libraries and Universal Languages

The ideas in this dissertation had their early origins in the years I spent working on the Blitz++
library for numerical arrays. Rather than relying on the compiler to optimize arrays, it performed
these optimizations itself using template techniques (‘expression templates’ and ‘template metaprograms’).
The fact this could be done made me wonder about the general problem of domainspecific
code optimization. From reading the literature it seemed a widespread debate: where ought
domain-specific optimizations be performed? In compilers? Compiler plug-ins? Metalevel code?
Preprocessors? Libraries? The C++ experience indicates that with a sufficiently powerful language
and compiler, libraries can define their own optimizations, and we can package abstractions and
optimizations together as a coherent library. Template metaprogramming is, let’s be frank, a rather
miserable programming environment — its popularity suggests a real need in this area. The definition
of Active Libraries helped turn these vague thoughts into a concrete goal: to realize
compilers and languages to support such libraries in earnest.
This dissertation proposes one possible direction for this.

Or, shorter:

Roughly speaking, this thesis addresses the question: How might we provide DSLs that are fast
and safe?

MyHDL

(via Daily Python-URL)

The key idea behind MyHDL is the use of Python generators to model hardware concurrency. Generators are best described as resumable functions. In MyHDL, generators are used in a specific way so that they become similar to always blocks in Verilog or processes in VHDL.

A hardware module is modeled as a function that returns any number of generators. This approach makes it straightforward to support features such as arbitrary hierarchy, named port association, arrays of instances, and conditional instantiation.

MyHDL is an open-source package for using Python as a hardware description and verification language. A Verilog converter is also included.

EE Times provides some background on MyHDL in this article.

A Formal Language for Analyzing Contracts

By pure serendipity I just stumbled upon this proposal, on Nick Szabo's website; it should appeal to those who found the earlier stories on Lexifi and the Composing Contracts paper interesting. It is not a fresh story (2002) but AFAIK it has not been mentioned here before; also, there is as yet no implementation.

Semantic Distance: NLP Not a Resource Sink

Following the story on Mind Mappers and other RDF comments of late, I thought this NLP slide show (PDF) should get a story. Dr. Adrian Walker offers an interesting perspective in a friendly crayon-colored format, including a critique of RDF. Source site Internet Business Logic has other offerings including an online demo.

Rebol - Dialects, Spreadsheets

Gregg Irwin just sent an interesting email (about Rebol) to the pragprog mailing list. I can't work out how to access the Yahoo archives so instead I'll post chunks here. But first I'll give some background links (there's also two links at the very end of this post to a two part article on an implementation of a spreadsheet in Rebol - I'm not sure how the cells communicate, but that might be interesting):

  1. Rebol dialects - blocks that carry condensed meaning through the use of a different grammar (ordering) of values and words. Dialects are usually unique and well-suited to the problems they are designed to solve. (DSLs)
  2. Tutorial
  3. License - a bit odd/worrying (how can you not modify a language that expressly encourages DSLs?)

Fragments of the email inside...

Lego Mindstorms NXT Robotics Announced

(via Lemonodor)

This looks cool.

I am not sure about the details of how these bricks are to be programmed, but from the Slashdot dicussion is seems that there is some kind of dataflow language. Even more interesting is the claim that the VM is going to be documented, so third party language developers can target this low end robotics platform.

XML feed