Synthesizing models with classes for automating code generation
-
Upload
gareth-cummings -
Category
Documents
-
view
17 -
download
0
description
Transcript of Synthesizing models with classes for automating code generation
1
Synthesizing models with classes for automating code generation
Cleanscape SourceMillautomatic source code generator
04/19/23
Cleanscape Confidential -- bd2k2
Automatically generate code from models
Common software developer issues*
Time to market pressure
Cross platform development
Changing design requirements
Shrinking budgets
High cost of failure
* Source: Cleanscape 2001 Software Industry Survey
04/19/23
Cleanscape Confidential -- bd2k3
Automatically generate code from models
Criteria for resolving common developer issues
Issue Criteria for resolution
Time to market pressures •Reduce coding phase by 60%
• Speed development process by 15%
Cross platform development • Automatically create consistency across versions and platforms
Changing design requirements
• Automate implementation and enforcement of standards
Shrinking budgets •Reallocate up to 20% of resources to other phases or projects
High cost of failure • Automatically eliminate 70% of potential source code problems
04/19/23
Cleanscape Confidential -- bd2k4
Automatically generate code from models
Solution for common developer issues
Automatically generate commercial-grade code from models with Cleanscape SourceMill
04/19/23
Cleanscape Confidential -- bd2k6
Automatically generate code from models
Synthesizing similar elements for different results
04/19/23
Cleanscape Confidential -- bd2k7
Automatically generate code from models
What is Cleanscape SourceMill?
Classification Automatic source code
generation engine
Function Automatically
generates commercial-grade code for virtually any language or platform from industry-standard models defined during the design phase of a software development project
Benefits Facilitates rapid
development of software Bridges the gap between
design and coding Continuously enhances
application development productivity
Creates consistency across versions and platforms
Implements and enforces standards
Enhances the ability to rapidly develop and modify applications
04/19/23
Cleanscape Confidential -- bd2k8
Automatically generate code from models
What is needed to automatically generate code?
Object model The “formula” for creating the code High-level structure that describes part of an application. Defines data objects, state transitions, process interactions, etc.
Template file The “storehouse” of classes, or “ingredients” required by user
to generate code for multiple languages and/or platforms Defines a set of code patterns, which provide code fragments
and algorithms needed to instantiate the object model.
SourceMill Synthesizes Model requirements with Template’s classes Automatically generates clean code for the object model based
on the template file.
04/19/23
Cleanscape Confidential -- bd2k9
Automatically generate code from models
Automatic code generation
Object model The “Formula”. Provides
SourceMill with a framework. Tells what objects, or
ingredients, it needs from Template, and how they should be put together.
Template A “storehouse” of all classes
available for languages and platforms defined by user.
Code generation engine Synthesizes Model &
Template by extracting from Template classes, or ingredients, defined in Model for target language and/or platform.
04/19/23
Cleanscape Confidential -- bd2k11
Automatically generate code from models
Generating code with Cleanscape SourceMill
Define object model “Formula”
Build template file Storehouse of
“Ingredients”
Synthesize Mix
Code Picture-perfect
04/19/23
Cleanscape Confidential -- bd2k12
Automatically generate code from models
Generating code with Cleanscape SourceMill
04/19/23
Cleanscape Confidential -- bd2k13
Automatically generate code from models
SourceMill Interface: simple, powerful… clean
Let’s see how easy it is to automatically build GUI frameworks for multiple languages using the same object model
04/19/23
Cleanscape Confidential -- bd2k14
Automatically generate code from models
First, select an object model file
04/19/23
Cleanscape Confidential -- bd2k15
Automatically generate code from models
First, select an object model file
04/19/23
Cleanscape Confidential -- bd2k16
Automatically generate code from models
First, select an object model file
04/19/23
Cleanscape Confidential -- bd2k17
Automatically generate code from models
Second, select the template file
04/19/23
Cleanscape Confidential -- bd2k18
Automatically generate code from models
Second, select the template file
04/19/23
Cleanscape Confidential -- bd2k19
Automatically generate code from models
Third, let Cleanscape SourceMill generate the code…
04/19/23
Cleanscape Confidential -- bd2k20
Automatically generate code from models
Third, let Cleanscape SourceMill generate the code…
04/19/23
Cleanscape Confidential -- bd2k21
Automatically generate code from models
Let’s inspect the generated source
04/19/23
Cleanscape Confidential -- bd2k22
Automatically generate code from models
You have generated a complete GUI framework
Commercial-grade code
Automatically generated
Perfectly adheres to standards
04/19/23
Cleanscape Confidential -- bd2k23
Automatically generate code from models
Now, compile to see your TKL/TK GUI
04/19/23
Cleanscape Confidential -- bd2k24
Automatically generate code from models
Let’s use the same object model to generate code in Python
04/19/23
Cleanscape Confidential -- bd2k25
Automatically generate code from models
Select the Python template file
04/19/23
Cleanscape Confidential -- bd2k26
Automatically generate code from models
Let Cleanscape SourceMill generate the code
04/19/23
Cleanscape Confidential -- bd2k27
Automatically generate code from models
Let Cleanscape SourceMill generate the code
04/19/23
Cleanscape Confidential -- bd2k28
Automatically generate code from models
Inspect the generated code
04/19/23
Cleanscape Confidential -- bd2k29
Automatically generate code from models
Compile to see your Python GUI
04/19/23
Cleanscape Confidential -- bd2k30
Automatically generate code from models
Let’s review
In just a few seconds, Cleanscape SourceMill just helped you: Generate hundreds of lines of
commercial-grade code that is consist across versions and platforms and that perfectly adheres to standards
Overall, Cleanscape SourceMill will help you: Cut programming hours up to
70% Reduce coding phase by 60% Speed the entire development
process by 15% Reallocate up to 20% of
resources to other phases or projects
Automatically eliminate 70% of potential source code problems