Recent from talks
Nothing was collected or created yet.
Domain-specific modeling
View on WikipediaDomain-specific modeling (DSM) is a software engineering methodology for designing and developing systems, such as computer software. It involves systematic use of a domain-specific language to represent the various facets of a system.
Domain-specific modeling languages tend to support higher-level abstractions than general-purpose modeling languages, so they require less effort and fewer low-level details to specify a given system.
Overview
[edit]Domain-specific modeling often also includes the idea of code generation: automating the creation of executable source code directly from the domain-specific language models. Being free from the manual creation and maintenance of source code means domain-specific language can significantly improve developer productivity.[1] The reliability of automatic generation compared to manual coding will also reduce the number of defects in the resulting programs thus improving quality.
Domain-specific language differs from earlier code generation attempts in the CASE tools of the 1980s or UML tools of the 1990s. In both of these, the code generators and modeling languages were built by tool vendors.[citation needed] While it is possible for a tool vendor to create a domain-specific language and generators, it is more normal for domain-specific language to occur within one organization. One or a few expert developers creates the modeling language and generators, and the rest of the developers use them.
Having the modeling language and generator built by the organization that will use them allows a tight fit with their exact domain and in response to changes in the domain.
Domain-specific languages can usually cover a range of abstraction levels for a particular domain. For example, a domain-specific modeling language for mobile phones could allow users to specify high-level abstractions for the user interface, as well as lower-level abstractions for storing data such as phone numbers or settings. Likewise, a domain-specific modeling language for financial services could permit users to specify high-level abstractions for clients, as well as lower-level abstractions for implementing stock and bond trading algorithms.
Topics
[edit]Defining domain-specific languages
[edit]To define a language, one needs a language to write the definition in. The language of a model is often called a metamodel, hence the language for defining a modeling language is a meta-metamodel. Meta-metamodels can be divided into two groups: those that are derived from or customizations of existing languages, and those that have been developed specifically as meta-metamodels.
Derived meta-metamodels include entity–relationship diagrams, formal languages, extended Backus–Naur form (EBNF), ontology languages, XML schema, and Meta-Object Facility (MOF). The strengths of these languages tend to be in the familiarity and standardization of the original language.
The ethos of domain-specific modeling favors the creation of a new language for a specific task, and so there are unsurprisingly new languages designed as meta-metamodels. The most widely used family of such languages is that of OPRR,[2][3] GOPRR,[4] and GOPPRR, which focus on supporting things found in modeling languages with the minimum effort.
Tool support for domain-specific languages
[edit]Many General-Purpose Modeling languages already have tool support available in the form of CASE tools. Domain-specific language languages tend to have too small a market size to support the construction of a bespoke CASE tool from scratch. Instead, most tool support for domain-specific language languages is built based on existing domain-specific language frameworks or through domain-specific language environments.
A domain-specific language environment may be thought of as a metamodeling tool, i.e., a modeling tool used to define a modeling tool or CASE tool. The resulting tool may either work within the domain-specific language environment, or less commonly be produced as a separate stand-alone program. In the more common case, the domain-specific language environment supports an additional layer of abstraction when compared to a traditional CASE tool.
Using a domain-specific language environment can significantly lower the cost of obtaining tool support for a domain-specific language, since a well-designed domain-specific language environment will automate the creation of program parts that are costly to build from scratch, such as domain-specific editors, browsers and components. The domain expert only needs to specify the domain specific constructs and rules, and the domain-specific language environment provides a modeling tool tailored for the target domain.
Most existing domain-specific language takes place with domain-specific language environments, either commercial such as MetaEdit+ or Actifsource, open source such as GEMS, or academic such as GME. The increasing popularity of domain-specific language has led to domain-specific language frameworks being added to existing IDEs, e.g. Eclipse Modeling Project (EMP) with EMF and GMF, or in Microsoft's DSL Tools for Software Factories.
Domain-specific language and UML
[edit]The Unified Modeling Language (UML) is a general-purpose modeling language for software-intensive systems that is designed to support mostly object oriented programming. Consequently, in contrast to domain-specific language languages, UML is used for a wide variety of purposes across a broad range of domains. The primitives offered by UML are those of object oriented programming, while domain-specific languages offer primitives whose semantics are familiar to all practitioners in that domain. For example, in the domain of automotive engineering, there will be software models to represent the properties of an anti-lock braking system, or a steering wheel, etc.
UML includes a profile mechanism that allows it to be constrained and customized for specific domains and platforms. UML profiles use stereotypes, stereotype attributes (known as tagged values before UML 2.0), and constraints to restrict and extend the scope of UML to a particular domain. Perhaps the best known example of customizing UML for a specific domain is SysML, a domain specific language for systems engineering.
UML is a popular choice for various model-driven development approaches whereby technical artifacts such as source code, documentation, tests, and more are generated algorithmically from a domain model. For instance, application profiles of the legal document standard Akoma Ntoso can be developed by representing legal concepts and ontologies in UML class objects.[5]
See also
[edit]References
[edit]- ^ Kelly, S. and Tolvanen, J.-P., (2008) Domain-Specific Modeling: Enabling Full Code Generation, John Wiley & Sons, New Jersey. ISBN 978-0-470-03666-2 [1]
- ^ R.J. Welke. The CASE Repository: More than another database application. In W.W. Cotterman and J.A. Senn, editors, Proceedings of 1988 INTEC Symposium Systems Analysis and Design: A Research Strategy, Atlanta, Georgia, 1988. Georgia State University. [2]
- ^ Smolander, K., (1992) OPRR - A Model for Modeling Systems Development Methods. In: Next Generation CASE Tools (eds. K. Lyytinen, V.-P. Tahvanainen) IOS Press, Amsterdam, Netherlands, pp. 224-239.[3]
- ^ Kelly, S., Lyytinen, K., and Rossi, M., "MetaEdit+: A Fully Configurable Multi-User and Multi-Tool CASE Environment," Proceedings of CAiSE'96, 8th Intl. Conference on Advanced Information Systems Engineering, Lecture Notes in Computer Science 1080, Springer-Verlag, pp. 1-21, 1996. (in Ph.D. thesis as 3metools.pdf)
- ^ Flatt, Amelie; Langner, Arne; Leps, Olof (2022). Model-Driven Development of Akoma Ntoso Application Profiles - A Conceptual Framework for Model-Based Generation of XML Subschemas (1st ed.). Heidelberg: Sprinter Nature. ISBN 978-3-031-14131-7.
External links
[edit]- Domain-specific modeling for generative software development Archived 2010-01-31 at the Wayback Machine, Web-article by Martijn Iseger, 2010
- Domain Specific Modeling in IoC frameworks Web-article by Ke Jin, 2007
- Domain-Specific Modeling for Full Code Generation from Methods & Tools Web-article by Juha-Pekka Tolvanen, 2005
- Creating a Domain-Specific Modeling Language for an Existing Framework Web-article by Juha-Pekka Tolvanen, 2006
Domain-specific modeling
View on GrokipediaFundamentals
Definition and Core Concepts
Domain-specific modeling (DSM) is a software engineering paradigm that employs domain-specific languages (DSLs) to develop models customized to a particular application domain, thereby achieving higher levels of abstraction compared to general-purpose modeling languages.[1] This approach allows developers to specify systems directly using concepts inherent to the domain, such as insurance policies or mobile phone interfaces, rather than low-level programming constructs, facilitating automated code generation from these models.[5] At its core, DSM revolves around several key concepts. A domain refers to the specific problem space or application area, encompassing the entities, relationships, and behaviors relevant to that field, such as financial transactions in banking or sensor data in embedded systems.[6] A model is an abstraction of the system being developed, constructed using domain-specific notations to represent its structure and behavior at a high level of detail.[1] The metamodel defines the syntax, semantics, and constraints of the modeling language itself, serving as the blueprint for valid models by specifying the allowable domain concepts and their interconnections.[5] Finally, transformation rules enable the automatic generation of executable code or other artifacts from the models, mapping domain elements to platform-specific implementations, often achieving complete code generation without manual intervention.[6] DSM distinguishes itself from general-purpose modeling approaches by emphasizing domain-tailored abstractions that closely align with end-user terminology and requirements, in contrast to broader notations like UML, which provide generic diagrams applicable across software engineering but require extensive customization for specific domains.[1] For instance, while UML might use class diagrams for any object-oriented system, DSM in finance could employ notations directly representing business rules like loan approvals, reducing cognitive overhead and error rates in modeling.[5] The basic workflow of DSM begins with domain analysis to identify and formalize the key concepts, followed by defining the metamodel and DSL based on those insights.[6] Modelers then create domain-specific models conforming to the metamodel, which are subsequently processed via transformation rules to generate code, deployable artifacts, or even simulations, closing the loop from specification to execution.[1] This iterative process supports rapid prototyping and maintenance within the constrained scope of the domain.[5]Historical Development
The roots of domain-specific modeling (DSM) trace back to the 1970s, when structured programming paradigms emphasized abstraction and modularity, laying groundwork for higher-level, domain-oriented approaches to software development.[7] In the 1980s, fourth-generation languages (4GLs) emerged as early prototypes of domain-specific languages (DSLs), with SQL exemplifying a query language tailored to database management, enabling non-programmers to interact with relational data models proposed by Edgar F. Codd in 1970.[8] These developments highlighted the value of specialized languages over general-purpose ones, influencing later modeling techniques by prioritizing domain concepts over low-level code.[9] The 1990s marked the formal emergence of DSM through metaCASE tools, which allowed customization of modeling environments for specific domains. A pivotal example was the MetaEdit tool, developed in 1991 as a research prototype for graphical metamodeling at the University of Jyväskylä, enabling the definition of domain-specific graphical languages.[10] This evolved into MetaEdit+, commercially released in 1995 by MetaCase (founded in 1991), which supported full lifecycle DSM with code generation and became a benchmark for situational method engineering.[11] These tools shifted focus from rigid CASE systems to flexible, domain-tailored modeling, fostering early industrial adoption in areas like embedded systems. In the 2000s, standardization accelerated DSM's growth via the Object Management Group's (OMG) Meta-Object Facility (MOF), adopted in 1997 as a metamodeling standard to define extensible models for model-driven engineering (MDE).[12] MOF underpinned the Model-Driven Architecture (MDA), promoting automated transformation from domain models to code and integrating DSM into enterprise practices.[13] Concurrently, the Eclipse Modeling Framework (EMF), released in June 2002, provided a Java-based implementation of an MOF subset (Ecore), facilitating open-source DSM tool development and model-to-code generation.[14] Key contributors to DSM's maturation include Juha-Pekka Tolvanen and Steven Kelly, who advanced practical DSM tools since the early 1990s through MetaEdit and MetaEdit+, emphasizing graphical language design and full code generation.[11] Their work, documented in over 50 publications and culminating in the 2008 book Domain-Specific Modeling: Enabling Full Code Generation, demonstrated productivity gains like 10x improvements in industrial projects such as Nokia's feature phones.[10] By the 2010s, DSM evolved with a pronounced shift toward graphical DSLs, supported by frameworks like EMF and the Graphical Modeling Framework (GMF), which enabled intuitive visual notations over purely textual ones for complex domains.[15] This facilitated broader adoption in MDE, with tools like JetBrains MPS allowing hybrid graphical-textual languages for enhanced expressiveness.[16] In the 2020s, DSM has integrated with agile methodologies and DevOps pipelines, as seen in approaches like ACCORDANT (2020), which combines domain-specific models with DevOps for big data analytics deployment, and model-based DevOps for continuous delivery in cyber-physical systems.[17] Recent advancements as of 2025 include bridging model-driven engineering with artificial intelligence for automated DSML design and evolution, as well as the adoption of SysML v2 for extensible domain-specific modeling in systems engineering.[18][19] These integrations support agile iterations and automated CI/CD, addressing modern demands for rapid, reliable software evolution.Domain-Specific Languages
Characteristics and Design Principles
Domain-specific languages (DSLs) in domain-specific modeling are characterized by notations tailored to particular application domains, which can be graphical or textual to align with domain experts' mental models and workflows.[20] Graphical notations often employ diagrams resembling domain artifacts, such as flowcharts for process modeling, while textual notations use domain-inspired keywords and structures to enhance readability.[21] A core characteristic is constrained syntax, enforced through well-formedness rules that limit valid constructs to those meaningful in the domain, thereby preventing invalid models and reducing errors during creation.[20] Semantics are tightly coupled to domain-specific rules, incorporating validation mechanisms for consistency, such as ensuring referential integrity in entity relationships or compliance with business constraints like transaction limits.[21] Design principles for DSLs emphasize domain analysis as the foundational step, involving systematic identification of key abstractions, concepts, and variabilities within the target domain to inform language construction.[20] This analysis draws from informal interviews, formal feature modeling like FODA, or reverse-engineering existing artifacts to capture essential domain knowledge without extraneous details.[20] User-friendliness follows the principle of least astonishment, prioritizing intuitive constructs that minimize surprises for non-programmer domain experts by adopting familiar notations and avoiding overly complex features.[21] Separation of concerns is upheld by distinguishing language definition—encompassing metamodeling and syntax rules—from its application, allowing modular evolution and reuse across tools.[21] DSLs comprise three primary components: abstract syntax, defined via a metamodel that specifies the structural elements and relationships independent of notation; concrete syntax, which maps the abstract syntax to a user-facing representation like diagrams or code-like text; and operational semantics, outlining the behavioral rules and transformations, often through model-to-model or model-to-code mappings.[20] These components enable DSLs to raise the level of abstraction from low-level code statements to high-level domain entities; for instance, in banking, a DSL might allow modeling a "customer transaction" as a single entity encompassing account balances, fees, and regulatory checks, rather than hundreds of lines of general-purpose code.[20] This abstraction facilitates rapid prototyping and maintenance by domain specialists, aligning closely with metamodeling techniques for enforcing structure.[21]Types and Classification
Domain-specific languages (DSLs) in domain-specific modeling are classified along several dimensions, including notation, scope, and application orientation, each influencing their design and utility within targeted domains.[22]Classification by Notation
DSLs can employ graphical, textual, or hybrid notations to represent domain concepts. Graphical DSLs use visual elements such as diagrams and icons to model structures, making them intuitive for domains involving spatial or relational data, such as user interface design where drag-and-drop components visualize layouts.[23] Textual DSLs rely on linear syntax akin to scripts or markup, suitable for precise, machine-readable specifications like configuration files in YAML, which serialize hierarchical data for deployment settings. Hybrid approaches combine both, allowing users to switch between visual overviews and detailed textual edits, as seen in tools supporting synchronized graphical and textual views for complex modeling tasks. This classification balances visual expressiveness with textual precision, depending on the domain's need for human interpretability versus automation.[22]Scope-Based Types
The scope of a DSL determines its embedding and coverage within broader language ecosystems. Internal DSLs are embedded within a host general-purpose language (GPL), leveraging its parser and semantics through libraries or metaprogramming, as in Ruby-based DSLs for web routing like Sinatra, which extend Ruby's syntax for domain-specific routing rules.[22] In contrast, external DSLs operate standalone with custom parsers, enabling unique syntaxes unbound by GPL constraints, exemplified by SQL for database queries.[22] Additionally, DSLs vary by breadth: "little" languages offer narrow functionality for specific subtasks, such as Make for build automation with limited constructs, while "big" languages provide broader coverage, like SQL encompassing full database operations across schemas.[22] These distinctions affect development effort, with internal DSLs favoring rapid prototyping via host language reuse and external ones enabling tailored expressiveness at the cost of separate tooling.[24]Application-Oriented Classification
DSLs are further categorized by their paradigm and domain breadth. Declarative DSLs specify desired outcomes without detailing execution steps, focusing on "what" rather than "how," as in HTML for structuring web content or configuration DSLs describing system states.[22] Imperative DSLs, conversely, outline procedural steps for "how" to achieve results, common in scripting DSLs like Awk for text processing tasks.[22] Regarding domain focus, vertical DSLs target industry-specific applications, such as finance modeling languages for risk assessment in banking, tailoring abstractions to sector-unique concepts like derivatives or compliance rules.[25] Horizontal DSLs apply across industries to common activities, like testing frameworks using Gherkin syntax for behavior-driven development in software quality assurance.[25] This orientation ensures alignment with application needs, with declarative styles enhancing readability in specification-heavy domains and vertical scopes maximizing relevance in specialized contexts.[22]Criteria for Selection
Selecting a DSL type involves evaluating trade-offs in key attributes. Expressiveness measures how concisely and naturally a DSL captures domain concepts, with graphical notations often outperforming textual ones in visual domains by reducing abstraction gaps, though overly complex syntax can hinder usability.[22] Learnability assesses ease of adoption, favoring internal or little DSLs that build on familiar GPLs or simple constructs, thereby lowering the barrier for domain experts without deep programming skills.[22] Interoperability evaluates integration with existing systems, where external declarative DSLs excel via generators that map to multiple platforms, but internal hybrids may limit portability due to host language dependencies.[22] These criteria guide choices: for instance, vertical imperative DSLs suit bespoke automation in narrow domains despite interoperability challenges, while horizontal declarative ones prioritize broad learnability for cross-team use.[26]Modeling Tools and Environments
Metamodeling Techniques
Metamodeling serves as the foundational process for defining the structure and semantics of domain-specific languages (DSLs) in domain-specific modeling (DSM), where a metamodel acts as a model of models that specifies the abstract syntax elements, relationships, and constraints applicable to models within a particular domain.[27] This role enables the precise tailoring of modeling languages to domain requirements, ensuring that models conform to domain-specific rules while facilitating tool generation and interoperability.[27] A primary technique in metamodeling is the MOF-based approach, standardized by the Object Management Group (OMG), which employs a four-layer architecture to organize modeling hierarchies.[27] In this architecture, the M0 layer represents raw data or real-world instances; the M1 layer contains domain-specific models; the M2 layer defines metamodels that specify the elements and rules for M1 models; and the M3 layer consists of meta-metamodels, such as MOF itself, that define the language for constructing M2 metamodels.[27] This layered structure promotes consistency and extensibility in DSM by allowing metamodels to be defined uniformly across domains.[27] Another widely adopted metamodeling technique is Ecore, the metametamodel provided by the Eclipse Modeling Framework (EMF), which offers a lightweight, Java-centric implementation aligned with the Essential MOF (EMOF) subset of MOF.[28] Ecore facilitates the definition of metamodels through Ecore diagrams or annotations, generating runtime support for model manipulation, including persistence via XMI and reflective APIs, thereby streamlining DSL development in Eclipse-based environments.[28] Key methods for constructing metamodels include top-down and bottom-up approaches, each suited to different development contexts in DSM.[29] The top-down method begins with high-level abstract concepts and domain requirements, progressively refining them into detailed metamodel elements, which is ideal for greenfield DSL design where domain knowledge drives the abstraction.[29] In contrast, the bottom-up approach derives metamodels from existing artifacts, such as legacy code or data structures, by abstracting common patterns, making it effective for evolving or reverse-engineering domain-specific models from implemented systems.[30] To enforce constraints within metamodels, the Object Constraint Language (OCL) is commonly integrated, providing a declarative means to specify invariants, preconditions, and postconditions on model elements.[31] For instance, OCL can define a rule ensuring that every class in a metamodel has at least one attribute, expressed as:context Class inv: self.attributes->size() > 0
context Class inv: self.attributes->size() > 0
