Abstract
A domain-specific language should offer syntax and abstractions tailored to a domain, reduce boilerplate, and stand reasonably independent of a general-purpose host language. We assess SML (Semantic Modeling Language) — a declarative language for defining dimensions, hierarchies, relationships, and calculated metrics in business intelligence — against these criteria. Using the classical view that a language is characterized by the abstractions and binding mechanisms it provides [1, 2], SML satisfies the substantive DSL criteria — domain-aligned syntax, domain abstractions, boilerplate reduction — while retaining borrowed mental models (MDX-style expressions) that keep it partly in framework territory. "DSL vs. framework" is a spectrum, not a binary: SML sits on the DSL side of it, tethered on the single axis of host-language independence.
Body
What SML is. SML is a declarative language for semantic modeling in business intelligence:
datasets, dimensions, hierarchies, relationships, and calculated metrics are defined in a dedicated
syntax — a metric_calc object carrying an MDX-style expression; a relationship object joining a
fact dataset to a date dimension with join_columns and a role_play label. These examples are
[ILLUSTRATIVE] of the language's shape rather than a specification of its grammar.
Criteria for a DSL. Following the classical account of what distinguishes one language from another — the abstractions, naming, and binding mechanisms it makes first-class [1], and the value of raising the level at which one composes domain operations [2] — a DSL is conventionally expected to: (1) provide domain-specific syntax rather than a thin wrapper over a host language; (2) offer abstractions aligned with domain concepts; (3) reduce boilerplate; and (4) remain usable without deep knowledge of a general-purpose language.
Assessment.
- Domain syntax (1): SML defines models and calculations in its own declarative form — satisfied.
- Domain abstractions (2): dimensions, hierarchies, relationships, and metrics map directly to business-intelligence concepts — satisfied.
- Boilerplate reduction (3): declaring relationships and metrics is more concise than the equivalent hand-written SQL/ORM plumbing — satisfied.
- Independence (4): partial. SML requires neither Python nor SQL, but its calculation expressions borrow MDX-style syntax and mental models, which tether it to prior query paradigms.
Verdict. SML meets the substantive DSL criteria — domain syntax, domain abstractions, boilerplate reduction — and falls short only on strict independence. Answered on the spectrum, SML is a domain-specific language that retains some framework-like borrowing; where exactly it sits depends on how strictly one weights criterion (4). The assessment is qualitative and carries no numeric score: the four criteria resolve to satisfied/partial, and that resolution is the result — a percentage would add precision the judgment does not have.
Evidence & Scope
This is a qualitative analysis against language-design criteria, and it stands as one. The four DSL criteria are the common working definition [1, 2] — a definition built instead around formal grammar or compiler tooling would weight the axes differently, and criterion (4) is where that weighting decides the verdict. The syntax snippets are [ILLUSTRATIVE] of SML's shape for the argument, not an authoritative account of its grammar. On these criteria the finding is firm: SML is a DSL that borrows on independence, and "DSL vs. framework" is a spectrum position, not a binary label.
References
- Christopher Strachey (2000). Fundamental Concepts in Programming Languages. Higher-Order and Symbolic Computation. [Reprint of 1967 lecture notes]
- John Backus (1978). Can Programming Be Liberated from the von Neumann Style? A Functional Style and Its Algebra of Programs. Communications of the ACM. [1977 ACM Turing Award Lecture]