SlideShare a Scribd company logo
1 of 3
Download to read offline
gsl_example
If you are looking for usage examples of the FOR&IF control flow statement of iMatix GSL code
generator, I created a simplified C program functions model in XML and use GSL to generate C
header and source files.
GSL can be found here https://github.com/imatix/gsl (1)
GSL specification can be found here https://imatix-legacy.github.io/gslgen/gsldoc4.htm (2)
Demo
The GSL application concept for the demo
(cppsystem.xml) (cppsystem.gsl, cmake,gsl, main,gsl,
service_cpp.gsl, service_h.gsl)
XML ------ 1..* -- GSL template
|
1
|
|
|
GSL command line ------ * -- output text file
(CMakeLists.txt, ex_serv1.cpp, ex_serv2.cpp
serv1.cpp, serv1.h, serv2.cpp, serv2.h)
GSL command line program
You will have to install the GSL command line program. GSL installation guide can be found here
https://github.com/imatix/gsl
What I have on my computer
$ gsl
GSL/4.1.4 Copyright (c) 1996-2016 iMatix Corporation
syntax: gsl -<option> ... -<attr>[:<value>] ... <filename> ...
.. more detail about the command-line options omitted
CMake (https://cmake.org/) is required if you want to compile the example C code files demonstrated
by this project
Generate code
$ git clone https://github.com/vorachet/gsl_example.git
$ cd gsl_example
$ mkdir generated
$ gsl cppsystem
Once the command  gsl cppsystem can be executed successfully, generated code files will be
saved in the ```generated`` folder
gsl_example/generated
├── CMakeLists.txt
├── ex_serv1.cpp
├── ex_serv2.cpp
├── serv1.cpp
├── serv1.h
├── serv2.cpp
└── serv2.h
Compile code
This step is optional. It deonstrates the creation of  CMakeLists.txt and how to create executable C
programs ( ex_serv1 ,  ex_serv2 ) from the example project.
$ cd generated
$ mkdir build
$ cd build
$ cmake ..
$ make
gsl_example/generated/build
├── CMakeCache.txt
├── CMakeFiles/ many files here
├── Makefile
├── cmake_install.cmake
├── ex_serv1
└── ex_serv2
What I've learned
Advantages of GSL
Super Fast
Tiny program (<1Mb)
Good Documentation
No need to develop metamodels
Built-in XML-based metamodel parser
No IDE/Workbech/GUI required
GSL can be one of your productive software engineering tools. GSL has developed by Pieter. (R.I.P
Pieter Hintjens - the creator of ZMQ and GSL). Pieter contributed many productive works to the
software industry.
I am still looking for a solution for the following GSL
application issues
Issue-1 Merge task - How to use GSL to preserve manual code modifications across re-
generations ?
Issue-2 To parse the  attr2 tag (XML element rather than XML attribute) with the following
example XML model seems not possible with GSL?
<concept attr1="value1">
<attr2>value2</attr2>
</concept>
As an MDE learner who uses more than one code generation tool, the following notes may be useful
if you are going to fix the issues and don't mind using alternative tools differnt approach. Eclipse
Epsilon (https://www.eclipse.org/epsilon) The Epsilon has features to satsify the issues. Issue-1 can
be satisfied by https://www.eclipse.org/epsilon/doc/egl/#merge-engine. Issue-2 can be satisfied by
the Eclipse Flexmi https://www.eclipse.org/epsilon/doc/flexmi/
I very much like a shell based environment and often perform MDE tasks with shell scripts. I
developed  mdeshell , a bash shell script based modeling environment that facilitates the definition of
XML-based EMF metamodels/models and the execution of Model-2-Text transformation based on
Model-Driven Engineering system implemented by the Eclipse Emfatic and the Epsilon
Flexmi/EGL/EGX. Find more detail here https://github.com/vorachet/mdeshell

More Related Content

Similar to GSL code generation examples using FOR&IF control flow

Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...Databricks
 
Elm Detroit 9/7/17 - Planting Seeds with Elm
Elm Detroit 9/7/17 - Planting Seeds with ElmElm Detroit 9/7/17 - Planting Seeds with Elm
Elm Detroit 9/7/17 - Planting Seeds with ElmElm Detroit
 
Deep AutoViML For Tensorflow Models and MLOps Workflows
Deep AutoViML For Tensorflow Models and MLOps WorkflowsDeep AutoViML For Tensorflow Models and MLOps Workflows
Deep AutoViML For Tensorflow Models and MLOps WorkflowsBill Liu
 
SEMjs - Planting Seeds with Elm
SEMjs - Planting Seeds with ElmSEMjs - Planting Seeds with Elm
SEMjs - Planting Seeds with ElmMike Onslow
 
Python* Scalability in Production Environments
Python* Scalability in Production EnvironmentsPython* Scalability in Production Environments
Python* Scalability in Production EnvironmentsIntel® Software
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learnedbasisspace
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CILingvokot
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CIColCh
 
Embedded Graphics Drivers in Mesa (ELCE 2019)
Embedded Graphics Drivers in Mesa (ELCE 2019)Embedded Graphics Drivers in Mesa (ELCE 2019)
Embedded Graphics Drivers in Mesa (ELCE 2019)Igalia
 
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Benoit Combemale
 
Evaluation of meta modeling tools for domain specific modeling language chnjl
Evaluation of meta modeling   tools for domain specific modeling language chnjlEvaluation of meta modeling   tools for domain specific modeling language chnjl
Evaluation of meta modeling tools for domain specific modeling language chnjlPG Scholar
 
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"Fwdays
 
HSA HSAIL Introduction Hot Chips 2013
HSA HSAIL Introduction  Hot Chips 2013 HSA HSAIL Introduction  Hot Chips 2013
HSA HSAIL Introduction Hot Chips 2013 HSA Foundation
 
Sample Project using design patterns and agile
Sample Project using design patterns and agileSample Project using design patterns and agile
Sample Project using design patterns and agileVicente Bolea
 
IBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation CustomizationIBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation Customizationgjuljo
 
TenYearsCPOptimizer
TenYearsCPOptimizerTenYearsCPOptimizer
TenYearsCPOptimizerPaulShawIBM
 
AD215 - Practical Magic with DXL
AD215 - Practical Magic with DXLAD215 - Practical Magic with DXL
AD215 - Practical Magic with DXLStephan H. Wissel
 

Similar to GSL code generation examples using FOR&IF control flow (20)

Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
 
Elm Detroit 9/7/17 - Planting Seeds with Elm
Elm Detroit 9/7/17 - Planting Seeds with ElmElm Detroit 9/7/17 - Planting Seeds with Elm
Elm Detroit 9/7/17 - Planting Seeds with Elm
 
Computer graphics workbook
Computer graphics workbookComputer graphics workbook
Computer graphics workbook
 
Deep AutoViML For Tensorflow Models and MLOps Workflows
Deep AutoViML For Tensorflow Models and MLOps WorkflowsDeep AutoViML For Tensorflow Models and MLOps Workflows
Deep AutoViML For Tensorflow Models and MLOps Workflows
 
SEMjs - Planting Seeds with Elm
SEMjs - Planting Seeds with ElmSEMjs - Planting Seeds with Elm
SEMjs - Planting Seeds with Elm
 
D3ML Session
D3ML SessionD3ML Session
D3ML Session
 
Python* Scalability in Production Environments
Python* Scalability in Production EnvironmentsPython* Scalability in Production Environments
Python* Scalability in Production Environments
 
Intel python 2017
Intel python 2017Intel python 2017
Intel python 2017
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learned
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CI
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CI
 
Embedded Graphics Drivers in Mesa (ELCE 2019)
Embedded Graphics Drivers in Mesa (ELCE 2019)Embedded Graphics Drivers in Mesa (ELCE 2019)
Embedded Graphics Drivers in Mesa (ELCE 2019)
 
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
 
Evaluation of meta modeling tools for domain specific modeling language chnjl
Evaluation of meta modeling   tools for domain specific modeling language chnjlEvaluation of meta modeling   tools for domain specific modeling language chnjl
Evaluation of meta modeling tools for domain specific modeling language chnjl
 
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
 
HSA HSAIL Introduction Hot Chips 2013
HSA HSAIL Introduction  Hot Chips 2013 HSA HSAIL Introduction  Hot Chips 2013
HSA HSAIL Introduction Hot Chips 2013
 
Sample Project using design patterns and agile
Sample Project using design patterns and agileSample Project using design patterns and agile
Sample Project using design patterns and agile
 
IBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation CustomizationIBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation Customization
 
TenYearsCPOptimizer
TenYearsCPOptimizerTenYearsCPOptimizer
TenYearsCPOptimizer
 
AD215 - Practical Magic with DXL
AD215 - Practical Magic with DXLAD215 - Practical Magic with DXL
AD215 - Practical Magic with DXL
 

More from Vorachet Jaroensawas

Digital Twin Consortium ได้เผยแพร่คู่มือให้ภาพรวมเกี่ยวกับประโยชน์ที่เป็นไปได...
Digital Twin Consortium ได้เผยแพร่คู่มือให้ภาพรวมเกี่ยวกับประโยชน์ที่เป็นไปได...Digital Twin Consortium ได้เผยแพร่คู่มือให้ภาพรวมเกี่ยวกับประโยชน์ที่เป็นไปได...
Digital Twin Consortium ได้เผยแพร่คู่มือให้ภาพรวมเกี่ยวกับประโยชน์ที่เป็นไปได...Vorachet Jaroensawas
 
เรือผิวน้ำไร้คนขับ Unmanned Surface Vessel
เรือผิวน้ำไร้คนขับ Unmanned Surface Vesselเรือผิวน้ำไร้คนขับ Unmanned Surface Vessel
เรือผิวน้ำไร้คนขับ Unmanned Surface VesselVorachet Jaroensawas
 
Generic Roles and Tasks Common to Most Associations.pdf
Generic Roles and Tasks Common to Most Associations.pdfGeneric Roles and Tasks Common to Most Associations.pdf
Generic Roles and Tasks Common to Most Associations.pdfVorachet Jaroensawas
 
Extending the McCumber Cube to Model Software System Maintenance Tasks
Extending the McCumber Cube to Model Software System Maintenance TasksExtending the McCumber Cube to Model Software System Maintenance Tasks
Extending the McCumber Cube to Model Software System Maintenance TasksVorachet Jaroensawas
 
OSLC Adapter for Publishing Information on FMUs (Functional Mockup Units)
OSLC Adapter for Publishing Information on FMUs (Functional Mockup Units)OSLC Adapter for Publishing Information on FMUs (Functional Mockup Units)
OSLC Adapter for Publishing Information on FMUs (Functional Mockup Units)Vorachet Jaroensawas
 

More from Vorachet Jaroensawas (8)

Digital Twin Consortium ได้เผยแพร่คู่มือให้ภาพรวมเกี่ยวกับประโยชน์ที่เป็นไปได...
Digital Twin Consortium ได้เผยแพร่คู่มือให้ภาพรวมเกี่ยวกับประโยชน์ที่เป็นไปได...Digital Twin Consortium ได้เผยแพร่คู่มือให้ภาพรวมเกี่ยวกับประโยชน์ที่เป็นไปได...
Digital Twin Consortium ได้เผยแพร่คู่มือให้ภาพรวมเกี่ยวกับประโยชน์ที่เป็นไปได...
 
เรือผิวน้ำไร้คนขับ Unmanned Surface Vessel
เรือผิวน้ำไร้คนขับ Unmanned Surface Vesselเรือผิวน้ำไร้คนขับ Unmanned Surface Vessel
เรือผิวน้ำไร้คนขับ Unmanned Surface Vessel
 
Situational Awareness
Situational AwarenessSituational Awareness
Situational Awareness
 
Generic Roles and Tasks Common to Most Associations.pdf
Generic Roles and Tasks Common to Most Associations.pdfGeneric Roles and Tasks Common to Most Associations.pdf
Generic Roles and Tasks Common to Most Associations.pdf
 
mdeshell
mdeshellmdeshell
mdeshell
 
OSLC4j FMI 1.1.0
OSLC4j FMI 1.1.0OSLC4j FMI 1.1.0
OSLC4j FMI 1.1.0
 
Extending the McCumber Cube to Model Software System Maintenance Tasks
Extending the McCumber Cube to Model Software System Maintenance TasksExtending the McCumber Cube to Model Software System Maintenance Tasks
Extending the McCumber Cube to Model Software System Maintenance Tasks
 
OSLC Adapter for Publishing Information on FMUs (Functional Mockup Units)
OSLC Adapter for Publishing Information on FMUs (Functional Mockup Units)OSLC Adapter for Publishing Information on FMUs (Functional Mockup Units)
OSLC Adapter for Publishing Information on FMUs (Functional Mockup Units)
 

Recently uploaded

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 

Recently uploaded (20)

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 

GSL code generation examples using FOR&IF control flow

  • 1. gsl_example If you are looking for usage examples of the FOR&IF control flow statement of iMatix GSL code generator, I created a simplified C program functions model in XML and use GSL to generate C header and source files. GSL can be found here https://github.com/imatix/gsl (1) GSL specification can be found here https://imatix-legacy.github.io/gslgen/gsldoc4.htm (2) Demo The GSL application concept for the demo (cppsystem.xml) (cppsystem.gsl, cmake,gsl, main,gsl, service_cpp.gsl, service_h.gsl) XML ------ 1..* -- GSL template | 1 | | | GSL command line ------ * -- output text file (CMakeLists.txt, ex_serv1.cpp, ex_serv2.cpp serv1.cpp, serv1.h, serv2.cpp, serv2.h) GSL command line program You will have to install the GSL command line program. GSL installation guide can be found here https://github.com/imatix/gsl What I have on my computer $ gsl GSL/4.1.4 Copyright (c) 1996-2016 iMatix Corporation syntax: gsl -<option> ... -<attr>[:<value>] ... <filename> ... .. more detail about the command-line options omitted CMake (https://cmake.org/) is required if you want to compile the example C code files demonstrated by this project
  • 2. Generate code $ git clone https://github.com/vorachet/gsl_example.git $ cd gsl_example $ mkdir generated $ gsl cppsystem Once the command  gsl cppsystem can be executed successfully, generated code files will be saved in the ```generated`` folder gsl_example/generated ├── CMakeLists.txt ├── ex_serv1.cpp ├── ex_serv2.cpp ├── serv1.cpp ├── serv1.h ├── serv2.cpp └── serv2.h Compile code This step is optional. It deonstrates the creation of  CMakeLists.txt and how to create executable C programs ( ex_serv1 ,  ex_serv2 ) from the example project. $ cd generated $ mkdir build $ cd build $ cmake .. $ make gsl_example/generated/build ├── CMakeCache.txt ├── CMakeFiles/ many files here ├── Makefile ├── cmake_install.cmake ├── ex_serv1 └── ex_serv2 What I've learned Advantages of GSL
  • 3. Super Fast Tiny program (<1Mb) Good Documentation No need to develop metamodels Built-in XML-based metamodel parser No IDE/Workbech/GUI required GSL can be one of your productive software engineering tools. GSL has developed by Pieter. (R.I.P Pieter Hintjens - the creator of ZMQ and GSL). Pieter contributed many productive works to the software industry. I am still looking for a solution for the following GSL application issues Issue-1 Merge task - How to use GSL to preserve manual code modifications across re- generations ? Issue-2 To parse the  attr2 tag (XML element rather than XML attribute) with the following example XML model seems not possible with GSL? <concept attr1="value1"> <attr2>value2</attr2> </concept> As an MDE learner who uses more than one code generation tool, the following notes may be useful if you are going to fix the issues and don't mind using alternative tools differnt approach. Eclipse Epsilon (https://www.eclipse.org/epsilon) The Epsilon has features to satsify the issues. Issue-1 can be satisfied by https://www.eclipse.org/epsilon/doc/egl/#merge-engine. Issue-2 can be satisfied by the Eclipse Flexmi https://www.eclipse.org/epsilon/doc/flexmi/ I very much like a shell based environment and often perform MDE tasks with shell scripts. I developed  mdeshell , a bash shell script based modeling environment that facilitates the definition of XML-based EMF metamodels/models and the execution of Model-2-Text transformation based on Model-Driven Engineering system implemented by the Eclipse Emfatic and the Epsilon Flexmi/EGL/EGX. Find more detail here https://github.com/vorachet/mdeshell