Nelumbo

Grow your own language.

Nelumbo is a logic meta-language for specifying declarative languages. You define your DSL's syntax and semantics - the semantics in pure logic - and every construct is live on the very next line.

Why Nelumbo

Syntax and semantics, in one file.

Language workbenches let you define structure and notation. Nelumbo goes further: you also define what your language means, as inference rules - and the language runs while you are still writing it.

Syntax, declared

One pattern line - Boolean ::= <Person> likes <Person> - and the new notation is first-class syntax, with IDE support included.

Semantics, in logic

Meaning is written as inference rules over honest three-valued logic. Logic is the medium, not the target: you write your domain, the engine does the reasoning.

Live on the next line

Nelumbo executes immediately: a construct defined on line n is available from line n+1 on. No generators, no compile step, no deployment loop.

Beyond MPS & EMF

Everything a language workbench gives you, plus executable semantics - with live IDE support in the browser, VS Code, IntelliJ and Eclipse, and an MCP server for AI assistants.

See it grow

Define it. Use it. Same file.

This is real Nelumbo: one line declares new syntax, one rule gives it meaning in logic, and the query at the bottom already speaks the new language - the editor verifies the expected answer live. Try it yourself in the feature tour; no install needed.

grandparent.nl
import nelumbo.logic Person :: Object FactType ::= pc(<Person>,<Person>) Boolean ::= <Person> is a grandparent of <Person> #30 // new syntax... Person g, p, c g is a grandparent of c <=> E[p](pc(g,p) & pc(p,c)) // ...meaning, in logic... Person ::= Hendrik, Juliana, Beatrix fact pc(Hendrik, Juliana), pc(Juliana, Beatrix) g is a grandparent of Beatrix ? [(g=Hendrik)][..] // ...used immediately

Plant a language. Watch it bloom.

Take the tour Star on GitHub