OCommand: A Domain Specific Language for Type Safe Shell Programming in OCaml
We propose a domain-specic language (DSL), called OCommand, for executing
shell commands from within OCaml programs in a type safe way. OCommand
takes a command specication consisting of types of output columns from the
command and effects of command options on the types of the columns, and
generates an OCaml module that contains a command-executing function and
a set of values representing the command options. The command-executing
function takes options as arguments, runs the command, parses the output
lines, and returns them as a list of records. In order to statically-check
existence and types of elds of the output record that can be changed by
command options, we used generalized algebraic data type. With our
implementation constructed by using Camlp4, we successfully handle typical
Unix commands like ls and ps by using OCommand.
Members
Publications
- Izumi Asakura, Hidehiko Masuhara, Tomoyuki Aotani OCommand: A Domain Specific Language for Type Safe Shell Programming in OCaml
- the 99th IPSJ PRO workshop, June 2014
- Izumi Asakura, Hidehiko Masuhara, Tomoyuki Aotani, “A Domain Specific Language for Type Safe Shell Programming”
- PPL 2014
- poster presentation
- Izumi Asakura, Hidehiko Masuhara, Tomoyuki Aotani, “Safe Domain Specific Language for OCaml Shell Programming”
- JSSST 2013
- poster presentation