[antlr-interest] Writing a DSL for benchmarking IO

Loring Craymer lgcraymer at yahoo.com
Tue Sep 14 11:05:04 PDT 2010


ANTLR is a good tool for building DSLs, but the major issue here is actually 
language design and documentation.  If you can clearly delimit the problem 
domain, then it is possible to design a minimal language and not have to 
modify/grow it very much.  If not, then your DSL is likely to grow 
uncontrollably and give you versioning headaches; benchmarking and testing is a 
broad enough domain that your DSL is likely to evolve into a general purpose 
language--not a good thing.  As an alternative, I'd suggest using Python 
augmented with runtime support for the specific features you need.  The big 
advantages to this are that you only have to document the features you have 
added along with a minimal Python vocabulary and can point users to existing 
Python documentation and texts if they want to do more; also, some of your users 
will have a smattering of Python to start with and can ask around for help if 
necessary.

Since Python is available in C source form, you should not have much problem in 
getting it on your various platforms; also, SWIG is very handy for adding 
extensions.

--Loring



----- Original Message ----
> From: Sam Crawford <sam at samknows.com>
> To: antlr-interest at antlr.org
> Sent: Tue, September 14, 2010 6:04:29 AM
> Subject: [antlr-interest] Writing a DSL for benchmarking IO
> 
> Hello,
> 
> Please forgive me if this is the wrong list to post to; I  was
> recommended to try here by a friend.
> 
> I run a platform that allows  for benchmarking of various operations
> (I/O, network, etc) across a wide  array of devices. The majority of
> our end users are engineers, but  predominantly without professional
> programming experience. I'm currently  exploring the idea of writing a
> DSL to allow users of our platform to write  their own benchmarks,
> without them having to learn C/C++.
> 
> Ultimately  the idea is that we'd provide a small, simple language
> focussed on the  benchmarking constructs they're interested in, and
> then convert it to C  before compilation (we have many targets - x86,
> ARM, MIPS, etc).
> 
> I  have a broad idea of how this would take shape, but I was wondering  if:
> 
> 1) Anyone was familiar with anything like this in the wild
> 2)  ANTLR would be a good fit for this kind of use-case
> 
> Thanks in  advance,
> 
> Sam
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: 
>http://www.antlr.org/mailman/options/antlr-interest/your-email-address
> 


      



More information about the antlr-interest mailing list