• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » What is Generative Programming

By Abhishek Ghosh March 13, 2024 8:22 pm Updated on March 17, 2024

What is Generative Programming

Advertisement

Generative programming is a programming paradigm in methodical software development. Characteristic of generative programming is the automatic generation of program code by a generator. A program generator can best be understood as an ordinary program based on the EVA principle. Based on certain input parameters, the program generator generates a certain output, the so-called generate. However, the output of a generative program is in turn a program code, namely the code that is to be executed for the specific situation.

 

How a program generator works

 

The basis for automatically generated code is the abstraction of frequently occurring program constructs in formal models. Programming is divided into three phases:

  1. The programming of a specific program generator
  2. The parameterization or addition and configuration of the formal model to a specific model
  3. Calling the program generator with the specific input parameters, which then creates the specific target program

A program generator or code generator is therefore specialized in a generic class of applications and programs. It refers to a specific, underlying generic program model, from which it generates the target code after concretizing the parameterization. This can be source code, intermediate code, or binary code.

Advertisement

---

While a normal, functionally programmed program covers the variance of the tasks exclusively with data variables, generative programming also works with variabilized program code, which only becomes unambiguous with regard to the target code.

This approach is particularly suitable for problem solutions that occur in practice in a correspondingly large number of variations, as a considerable amount of effort must be planned for the creation of the model and the generator. This effort can be amortized due to higher quality of the program code and shorter development time. Often, the target programs are only temporarily generated for one-time use and then deleted again. As a result, the program code that persists at a certain point in time, e.g. measured by the number of lines of code, can be reduced by a few powers of ten, if necessary.

Generative programming is useful wherever certain parts of code are to be combined into a large number of target programs in the form of variable text modules. Generative programming also allows the creation of target programs whose target parameters are not yet known at the time of coding the program generator.

 

Persistent target code

 

The target code generated by a program code:

  • can be created once, stored persistently and then used permanently, or
  • can be dynamically created and executed as needed and then deleted again.

If a target code is created once and then persisted, the program generation and the execution of the target program can be decoupled in time. The program generation and the execution of the target program are dependent on each other only insofar as the generation takes place before the execution of the target code. The code generation is then typically initiated by the programmer or by a system administrator during software installation, i.e. typically not by the end user.

For example, a code wizard used to create the base code of a program class queries various parameters, such as class names, number, names and types of class properties, number and names of class methods, and then creates the program code of the class.
A new generation is only necessary if there are changes to the generation parameters.

What is Generative Programming

 

Dynamically generated target code

 

In the second case, the program generation and execution of the target code is usually initiated directly by the end user. Ideally, the program generation is so fast that the end user does not even notice that the part of the program he is using has only been automatically programmed a few fractions of a second ago. The sequence of this dynamic process should be traced in individual steps:

  1. The user makes a selection of the input parameters, e.g. the name of a database table.
  2. The program builder takes the table name from the end user, reads the fields, field types, and foreign key relationships from the database’s data dictionary, and uses these control parameters to generate the program target code of a search form for displaying data for the database table specified by the user.
  3. The program target code is now compiled briefly and then executed by the program builder with a dynamic call.

The last step places certain requirements on the programming language used:

  • It must be possible in the program generator to call a routine whose name is variable and not necessarily known in the context of the program generator (e.g. default of the routine to be called by a string variable, late binding).
  • The necessary flexibility in program generation requires an interpreted language, i.e. as a rule, an interpreter code is generated as the target code and not a machine code. Basically, the target code can be anything, i.e. source code, intermediate code, or binary code.

Sensibly, the dynamically generated target code is often coded in the same language as the code-generating program module. A program generator is a code generator that specializes in a generic class of applications and programs. It refers to a specific, underlying generic program model, from which it generates the target code after concretizing the parameterization. Complex parameterization can be carried out, for example, via a tabular model in a database, which controls flexible code generation.

Also read:

  • Application Examples of Generative Programming
  • What is Large Language Model (LLM)
  • AI Generated Art and Generative Art
Tagged With already7hj
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to What is Generative Programming

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Application Examples of Generative Programming

    In our earlier article, we have explained that generative programming is a programming paradigm in methodical software development. Characteristic of generative programming is the automatic generation of program code by a generator. The basis for automatically generated code is the abstraction of frequently occurring program constructs in formal models. UML UML allows the creation of […]

  • Programming Language

    Programming Language is a formal language for giving instructions to a computer or automated device which can be automatically translated into machine code.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

vpsdime

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Cloud-Powered Play: How Streaming Tech is Reshaping Online GamesSeptember 3, 2025
  • How to Use Transcribed Texts for MarketingAugust 14, 2025
  • nRF7002 DK vs ESP32 – A Technical Comparison for Wireless IoT DesignJune 18, 2025
  • Principles of Non-Invasive Blood Glucose Measurement By Near Infrared (NIR)June 11, 2025
  • Continuous Non-Invasive Blood Glucose Measurements: Present Situation (May 2025)May 23, 2025
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2026 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy