41
Domain Specific Languages for Product Modeling Tim Geisler webXcerpt Software GmbH [email protected] CWG 2011, Cologne 2011-05-10

Domain-Specific Languages for Product Modeling (CWG 2011 Cologne, SAP Configuration Workgroup Conference)

Embed Size (px)

Citation preview

Domain Specific Languagesfor

Product Modeling

Tim Geisler

webXcerpt Software GmbH

[email protected]

CWG 2011, Cologne 2011-05-10

Product Modeling

Product Modeling

Specification Coding in SAP R/3● Materials● BOMs● Classes● Cstics● Procedures● Constraints● Selection Conditions● Interface Designs

Domain-Specific Languages

Domain-Specific Languages

Domain-specific language (noun): a computer programming language of limited expressiveness focused on a particular domain.

The two main reasons why DSLs are popular:● Improving productivity for developers● Improving communication with domain experts

(Martin Fowler)

Customer Project @

Company-wide generic product structure

NSN VC frameworkIPC extensionscoding conventions

Standardizedproductdescriptions

Customer Project @

Company-wide generic product structure

NSN VC frameworkIPC extensionscoding conventions

productdescriptions

Standardized Formalized

Customer Project @

Company-wide generic product structure

NSN VC frameworkIPC extensionscoding conventions

productdescriptions

Standardized Formalized

Tooling: Eclipse-based IDEsConfigModeler

VClipse

Domain Specific LanguagesCML + CMLUI + CMLT

VCML

ConfigModeler and Vclipse:Two DSLs with Eclipse-based IDE

RFC

Editor/IDE

Editor/IDE

ConfigModeler

VClipse

CML

VCML

Code Generation

CML: Customer's abstractions

product structure

grouping for order structure

logical materials

domains

complex expressions

equations

counting

VCML: SAP's abstractions

Language elements for describing VC objects:

● cstic● class● dependency net● …

Embedded SAP languages for dependencies

Code Generation: CML to VCML

Generate VC objects and dependencies● correct ordering of procedures

Use NSN VC framework● use generic variant functions● use generic cstics● use generic procedures and dependency nets● respect NSN naming conventions

Code generation on the fly● using Eclipse builder infrastructure

(CWG 2011 presentationby P. Muthsam/M. Titerea)

Interfacing SAP

Two mechanisms for interfacing SAP● ALE via IDocs (Product Data Replication)● create/change/read/delete objects via RFC

Reading objects via RFC● Model extraction from SAP to VCML

No extraction of CML from SAP possible!

“When you think product modeling,think programming.”

(Peter Illing, CWG 2011)

IDE: Tooling for Modelers

IDE: Tooling for Modelers

Syntax checking

Cross references

Semantic checking

IDE: Tooling for Modelers

OutlineTemplates

Content AssistFolding

Companion Languages

Companion Language I: CMLUINSN UI Enhancement Framework

CWG 2011 presentation by Krisztian Kovacz (Siemens ICT)

Maintenance Dialogs DSL + IDE Tooling

Companion Language II: CMLTAutomated Model Testing

Test tool:Fysbee's ConfigScanCWG 2011 presentation by Winfried Kung

DSL for describing test cases

Transformation into ConfigScan XML input format

Use of ConfigModeler @

More than 100 product models are currently in development using ConfigModeler.

(prototypes not included)

40% of these product models are already on production system.

About 50% of all product models on production system have been built with ConfigModeler.

(size and complexity not taken into account)

Showtime

Product “hiT 7030”

Multiplexes STM-1/STM-4 to 2M, 34/45M, STM-1, STM4

1 uplink board with 2 SFP module slots

3 downlink boards with 0-6 SFP module slots

Life Demo: Modeling with DSLs

Demo: Deployment to SAP

● Using PDR

Technology in Use

Open source technology based on Java● Eclipse: IDE platform● Xtext:

● domain-specific language framework● ANTLR-based parser● IDE generated automatically● adaptable via dependency injection (Google Guice)

● EMF: Eclipse Modeling Framework

SAP JCo / IDocs library

Xtext – Some Code Snippets

What's new wrt. CWG Vienna 2010?

ConfigModeler● ConfigModeler implemented with Xtext● improved language and tooling● language for NSN UI Extensions● language for test cases (Fysbee ConfigScan)● new features: variant functions, modularization

VClipse● delta calculation● minor changes and bugfixes

Future

ConfigModeler + VClipse● migration to Xtext 2.0 and Eclipse Indigo (3.7)

– improved text-hover information– improved performance– code refactoring (e.g. renaming)

● model-validation rules● variant-table contents● Engineering Change Management

VClipse● language reorganisation● features for Advanced Mode

VClipse is Free

VClipse is Free

VClipse.org: Open Source

Use, adapt, integrate, contribute!

Use Cases for VClipse

Mass upload (of parts) of configuration

Model comparison– Use textual or EMF diff tools to compare models

Model versioning– use version control system for textual models

Model refactoring– rename objects, move cstics

Model validation– check own naming conventions– check for syntactic and semantic errors

Conclusion

Conclusion

Textual Domain-Specfic Languages● suitable for product modeling● modern tooling easy to create

with Eclipse / Xtext

VClipse● interface to SAP system when using DSLs ● open-source tool useful for various

product-modeling tasks

Thanks to ...

● various persons at Nokia Siemens Networks● Peter Muthsam & Michael Wilhelm (SAP VC)● Daniel Naus (CWG Sandbox)● various persons at itemis (Xtext)● webXcerpt team

Can product modeling with textual DSLsbe suitable for your domain and your company?