User loginNavigation |
FunctionalGoing functional on exotic trades
Simon Frankau, Diomidis Spinellis, Nick Nassuphis, Christoph Burgard. Going functional on exotic trades. JFP 19(01):27-45.
The Functional Payout Framework (fpf) is a Haskell application that uses an embedded domain-specific functional language to represent and process exotic financial derivatives. Whereas scripting languages for pricing exotic derivatives are common in banking, fpf uses multiple interpretations to not only price such trades, but also to analyse the scripts to provide lifecycle support and more. This paper discusses fpf in relation to the wider trading workflow and our experiences in using a functional language in such a system as both an implementation language and a domain-specific language. Section 3 is a nice discussion of why Haskell was chosen. Section 4 illustrates one of the major benefits of using DSLs, namely that different backends can be applied to programs written in the DSL, allowing various types of runtime behavior and analysis without the need to re-code each program for each purpose (thus n+m, rather than n*m programs). Another topic that may be worth discussing is the authors' dislike of point free style. What we really need, of course, are DSLs for financial regulation (and possibly for specifying various definitions of honesty), but that's a separate issue... Types are Calling ConventionsIf optimization and intermediate languages for lazy functional languages are your things, take a look at Types are Calling Conventions by Max Bolingbroke and Simon Peyton Jones.
By James Iry at 2009-05-16 23:29 | Functional | Implementation | 8 comments | other blogs | 5297 reads
Polymorphic Delimited ContinuationsPolymorphic Delimited Contiunations by Kenichi Asai and Yukiyoshi Kameyama, in the 5th ASIAN Symposium on Programming Languages and Systems (2007).
Now, the real reason that I post this is because of Oleg's ShiftResetGenuine, which implements polymorphic delimited continuations in Haskell, and primarily cites this paper as well as Robert Atkey's Parameterized Notions of Computation. So if you find this paper challenging to read, Oleg provides you with a concrete playground in which to experiment. It's also notable that Matthieu Sozeau has GenuineShiftReset available, which is a Coq version of Oleg's code. Practical Implementation of a Dependently Typed Functional Programming LanguageThis blog post about Idris led me to Edwin C. Brady's 2005 PhD thesis, Practical Implementation of a Dependently Typed Functional Programming Language.
What's the current state of the art in optimization of dependently typed languages? By James Iry at 2009-04-14 20:36 | Functional | Type Theory | login or register to post comments | other blogs | 3073 reads
Ensuring Correct-by-Construction Resource Usage by using Full-Spectrum Dependent TypesEnsuring Correct-by-Construction Resource Usage by using Full-Spectrum Dependent Types
More ammunition for the importance of embedded domain-specific languages, dependent types, and correctness-by-construction. By Paul Snively at 2009-03-04 17:17 | DSL | Functional | Implementation | Type Theory | 2 comments | other blogs | 2804 reads
Denotational design with type class morphismsDenotational design with type class morphisms. Conal Elliott.
To continue in our new all-Conal format... This paper brings together a bunch of things that Conal's been talking about lately, and "algebra of programming" fans will probably like his approach. (I have a hunch that what he calls a "type class morphism" could be described using standard categorical jargon, but I haven't given it much thought. Suggestions?) By Matt Hellige at 2009-02-19 21:35 | Functional | Semantics | 11 comments | other blogs | 3741 reads
DanaLuke Palmer and Nick Szabo can shoot me for this if they want, but I think this is warranted, and I want to connect a couple of dots as well. Luke is one of a number of computer scientists, with Conal Elliott probably being the best known, who have devoted quite a bit of attention to Functional Reactive Programming, or FRP. FRP has been discussed on LtU off and on over the years, but, unusually for LtU IMHO, does not seem to have gotten the traction that some other similarly abstruse subjects have. In parallel, LtU has had a couple of interesting threads about Second Life's economy, smart contracts, usage control, denial of service, technical vs. legal remedies, and the like. I would particularly like to call attention to this post by Nick Szabo, in which he discusses a contract language that he designed:
In recent private correspondence, Nick commented that he'd determined that he was reinventing synchronous programming à la Esterel, and mentioned "Reactive" programming. Ding! To make a potentially long entry somewhat shorter, Luke is working on a new language, Dana, which appears to have grown out of some frustration with existing FRP systems, including Conal Elliot's Reactive, currently perhaps the lynchpin of FRP research. Luke's motivating kickoff post for the Dana project can be found here, and there are several follow-up posts, including links to experimental source code repositories. Of particularly motivating interest, IMHO, is this post, where Luke discusses FRP's interaction with garbage collection succinctly but nevertheless in some depth. Luke's most recent post makes the connection from Dana, which Luke has determined needs to have a dependently-typed core, to Illative Combinatory Logic, explicit, and offers a ~100 line type checker for the core. I find this very exciting, as I believe strongly in the project of being able to express computation centered on time, in the sense of Nick's contract language, in easy and safe ways extremely compelling. I've intuited for some time now that FRP represents a real breakthrough in moving us past the Von Neumann runtime paradigm in fundamental ways, and between Conal Elliott's and Luke's work (and no doubt that of others), it seems to me that my sense of this may be borne out, with Nick's contract language, or something like it, as an initial application realm. So I wanted to call attention to Luke's work, and by extension recapitulate Conal's and Nick's, both for the PLT aspects that Luke's clearly represents, but also as a challenge to the community to assist in the realization of Nick's design efforts, if at all possible. By Paul Snively at 2009-02-18 21:55 | Functional | General | Implementation | Lambda Calculus | Semantics | Theory | Type Theory | 16 comments | other blogs | 6386 reads
Functional Pearl: Type-safe pattern combinatorsFunctional Pearl: Type-safe pattern combinators, by Morten Rhiger:
This approach relies on continuation-passing style for a full encoding of pattern matching. Tullsen's First-Class Patterns relies on a monadic encoding of pattern matching to achieve abstraction over patterns. Given the relationship between CPS and monads, the two approaches likely share an underlying structure. Abstracting over patterns yields a whole new level of abstraction, which could significantly improve code reuse. The only concern is compiling these more flexible structures to the same efficient pattern matching code we get when the language natively supports patterns. Section 4.9 discusses the efficiency concerns, and suggests that partial evaluation can completely eliminate the overhead. PinS and RWH are Jolt FinalistsBooks on two of the languages that get a lot of airplay on LtU have made the finalist list for this year's Jolt awards.
Congratulations to Martin, Lex, Bill, John, Bryan, and Don! Whether or not either book wins, it's quite a sea change that two sophisticated, statically typed functional programming languages with research origins are getting so much mainstream attention. From the FAQ
Programmable Concurrency in a Pure and Lazy LanguageProgrammable Concurrency in a Pure and Lazy Language, Peng Li's 2008 PhD dissertation, is a bit more implementation focused than is common on LtU. The paper does touch on a wide range of concurrency mechanisms so it might have value to any language designer considering ways to tackle the concurrency beast.
The paper's summary explains what I like most about it:
Even if concurrency isn't your thing, section 6.3 describes the author's findings on the pros and cons of both purity and laziness in a systems programming context. By James Iry at 2008-12-15 03:00 | Functional | Implementation | Parallel/Distributed | 11 comments | other blogs | 5449 reads
|
Browse archivesActive forum topics |