paul · spencer
case · language engineering
home work github
case · research Projectional Editing for Business Rules msc thesis · 2021
portfolio/ selected work/ language engineering
language engineer · msc research · 2021

Language Engineering

In 2021 I conducted research on improving business-rules comprehensibility through projectional editing. The challenge: as business rules grow in number and complexity, they become increasingly difficult to understand and maintain. Using JetBrains MPS and the Drools rules language, I built a prototype demonstrating how projectional editing transforms how developers interact with complex rule systems.

projections
7
DSLs implemented
2
workbench
JetBrains MPS
output
MSc thesis

i. Overview

A research project within Khonraad Software Engineering that doubled as my Master’s thesis — exploring how projectional editing can change the way developers work with business rules.

Drools business rules displayed in projectional editor
plate i — drools rules in the projectional editor

ii. Language Engineering

Acting as a Language Engineer, I developed sophisticated solutions for business-rule representation:

  • Designed and implemented two Drools-based languages in JetBrains MPS: a proof-of-concept “Really Simple Drools” and a more comprehensive “Drools-Lite”.
  • Created a non-invasive extension architecture allowing different projections to be combined without modifying the core language.
  • Implemented complex language features including rule variables, constraints, restriction values, and right-hand-side Java integration.
  • Developed a reference framework demonstrating how projectional editing can be applied to business-rule languages.
JetBrains MPS language implementation for Drools rules showing the proof-of-concept
plate ii — really simple drools, language implementation

iii. Innovative Projections

Projection development that intended to revolutionise how developers interact with business rules:

  • Created seven distinct projections of varying complexity to visualise and edit Drools rules.
  • Implemented advanced tabular projections including a spreadsheet-like editor and a decision table.
  • Developed specialised visual aids including rule filtering, colour-coded indicators, and summary projections.
  • Engineered wireframes demonstrating circuit-diagram and truth-table visualisations for complex rule logic.
  • Built an architecture allowing simultaneous, synchronised editing across multiple projections.
Multiple projectional views of the same business rule showing tabular, decision table, and visual representations
plate iii — the same rule projected as table, not application but a programming language

iv. Integration

Integration solutions that aimed to enhance the development experience:

  • Successfully integrated Drools semantics with the MPS BaseLanguage (Java) for comprehensive rule implementation.
  • Designed and implemented intelligent code completion with context-aware suggestions.
  • Created a cross-referencing system allowing rules to reference facts and properties.
  • Constructed scope-constraint systems to streamline the editing experience.
  • Built substitution mechanisms to allow rapid rule creation and modification.
Annotated Drools rule showing colour-coded language components
plate iv — compact projection of the same fully-functional drools language

v. Key Contributions

  • Developed a novel way to represent and edit business rules using projectional editing.
  • Created an alternative base language for model-to-model transformations in the MPS ecosystem.
  • Implemented a more compact and intuitive way to enter and edit rules compared to traditional text-based approaches.
  • Enabled dynamic visualisation of rule interactions and relationships.
  • Demonstrated real-time synchronised editing across different projections of the same rule system.

vi. Research Thesis

The work formed the basis of my Master’s thesis in Software Engineering at the University of Amsterdam, exploring how projectional editing can change the way we work with business rules.

Master's thesis front page on projectional editing for business rules
msc thesis · pdf
Projectional Editing for Business Rules

vii. Stack

JetBrains MPS Language engineering DSL design Abstract syntax trees Projectional editing Drools Model-driven engineering Smart references Scope & constraint systems

No mail program is configured for this browser, so here is the address:

spencerpj@gmail.com