Applying Denotational Semantics to design of Programs


30

I've read a bit on denotational semantics (DS) and I'm very intrigued about the process of designing computer programs where types and functions have strong and clear mappings to mathematics.

Are there any resources that discuss designing programs based on DS in detail? I've seen a few superficial treatments of the subject.

I'm conversant in Haskell, Scala, Common Lisp, and a bit of Scheme so any resources that use those languages would be greatly appreciated.


7
You should check out the work by Conal Elliott: conal.net

2
Curry-Howard isomorphism is the keyword, if you didn't know already.
pedrofurla

2
I thought a similar thing. I tried to design numerical simulation of points, rigid bodies and fluid. This (github.com/takagi/SimulationDSL) is one of my experiment in which I expressed vector algebra and partial equations in Haskell DSL. I also checked Conal Elliott's work.

3
You should check out LtU. There are probably some good old discussions there, or at least your question would be a better fit there than on SO

3
You might want to read Samuel Kamin's "An implementation-oriented semantics of Wadler's pretty-printing combinators". It compares operational and denotational approaches to implementing a well known, real world example and includes advocacy for a denotational approach.
stephen tetley

উত্তর:


13

Denotational design (program design rooted in and flowing from denotational semantics) is my primary methodology. A few years ago while writing about FRP, I got much clearer about what I'd been doing. See Push-pull functional reactive programming. For a more explicit description of the paradigm and a variety of examples, see Denotational design with type class morphisms. Once I became conscious of the pattern, I started looking for it everywhere. Where it fails, I know I have an abstraction leak. For an early, informal description, see Luke Palmer's blog post Semantic Design.

I'm always interested in applications of denotational design, so I'd love to hear about your explorations.


Thanks for the great resources. I'm going to check them out before I mark the question as answered.
Tim Stewart

Thanks for giving the links to your work! It's the 2nd time I turn to studying it. Unfortunately, conal.net does not answer. Are there other places where one can get it?
imz -- Ivan Zakharyaschev


1
@imz--IvanZakharyaschev Sorry. My web server went down. Back up now. Hopefully I'll have it migrated soon, and it will be more stable.
Conal

7

We have applied denotational semantics to language design itself, arguing that the design of languages, in particular, domain-specific languages, should start with the definition of the semantics. If you are interested in the details, you might want to take a look at Semantics-Driven DSL Design and Semantics First! Rethinking the Language Design Process.


Thanks for the great resources. I'm going to check them out before I mark the question as answered.
Tim Stewart
আমাদের সাইট ব্যবহার করে, আপনি স্বীকার করেছেন যে আপনি আমাদের কুকি নীতি এবং গোপনীয়তা নীতিটি পড়েছেন এবং বুঝতে পেরেছেন ।
Licensed under cc by-sa 3.0 with attribution required.