Computational Science Technical Note CSTN-169

CSTN Home

Engineering Internal Domain-Specific Language Software for Lattice-Based Simulations

K. A. Hawick

Archived: 2012

Abstract

Modern high-level programming languages are making it practical to develop internal domain-specific languages (DSL) for even computationally intensive applications such as complex systems simulations. We present a prototype DSL to implement lattice-based operations for a whole family of simulation models on different lattices and with different neighbourhood localities. We use closure techniques to switch between lattice geometries and neighbourhoods at run-time. We show how a framework can be implemented in both C++ and Java and that a fluent interface DSL command-line layer and a graphical interface layer can both use this same framework. We find that we can drastically speed up the development and testing of a new simulation model that fits our DSL pattern and demonstrate this with significantly reduced lines of code needed for an incrementally added new model. We present results based on two-dimensional lattice models with discrete cell states for topologically square, hexagonal and triangular geometries and describe how these ideas generalise to higher dimensional problems. We also discuss how the use of internal domain specific languages and tools can facilitate further rapid development of other simulation codes and models.

Keywords: domain-specific languages; software engineering; lattices; simulations; closures; fluent interfaces; Java

Full Document Text: PDF version.

Citation Information: BiBTeX database for CSTN Notes.

BiBTeX reference:

@INPROCEEDINGS{CSTN-169,
        author = {K. A. Hawick},
        title = {Engineering Internal Domain-Specific Language Software for Lattice-Based
                Simulations},
        booktitle = {Proc. Int. Conf. on Software Engineering and Applications},
        year = {2012},
        pages = {314-321},
        address = {Las Vegas, USA},
        month = {12-14 November},
        publisher = {IASTED},
        keywords = {domain-specific languages; software engineering; lattices; simulations;
                closures; fluent interfaces; Java},
        owner = {kahawick},
        timestamp = {2012.10.12}
}


[ CSTN Index | CSTN BiBTeX ]