Block-based environments are visual programming environments that allow users to program by interactively arranging visual jigsaw-like blocks. They have shown to be helpful in several domains but often require experienced developers for their creation. Previous research investigated the use of language workbenches to generate block-based editors based on grammars, but the generated block-based editors sometimes provided too many unnecessary blocks, leading to verbose environments and programs. To reduce the number of interactions, we propose a set of transformations to simplify the original grammar, yielding a reduction of the number of (useful) kinds of blocks available in the resulting editors. We show that our generated block-based editors are improved for a set of observed aesthetic criteria up to a certain complexity. As such, analyzing and simplifying grammars before generating block-based editors allows us to derive more compact and potentially more usable block-based editors, making reuse of existing grammars through automatic generation feasible.
14th ACM SIGPLAN International Conference on Software Language Engineering, SLE 2021
Software Analysis and Transformation

Verano Merino, M, Beckmann, T, van der Storm, T, Hirschfeld, R.A, & Vinju, J.J. (2021). Getting grammars into shape for block-based editors. In SLE 2021 - Proceedings of the 14th ACM SIGPLAN International Conference on Software Language Engineering (pp. 83–98). doi:10.1145/3486608.3486908