Domain specific languages (DSLs) are an effective way to bridge the gap between business requirements and their implementation. In this talk we present a DSL, Droidspeak, that we created to conveniently express decision tree paths and compile them into provably complete decision trees.
On a recent project, our client provided us with detailed decision trees describing the decision-making flow of a human operator. Creating a DSL to represent these decision trees gave us several advantages. As well as leading to compact code, with provably correct output, this approach was invaluable for client communication, as we could automatically generate visual representations and documentation.
We’ll talk about the journey we followed from initially coding the business logic directly in Scala, the problems we encountered with that, and how that led us to develop Droidspeak.
Doug is a freelance programmer living in the South-East of England. He has been programming for far more years than he’d care to think about and in many languages and paradigms. He’s currently most enthused about Functional Programming and type systems, working mainly in Scala for the past 6 years.
Martin is a freelance programmer from Brighton, England. He’s worked in many industries on projects of many different shapes, and is massively passionate about functional programming.