Visual Paradigm Desktop’s Instant Code Generator for Ada95 enables software designers and developers to transform UML class models into Ada95 source code. By generating implementation-oriented source files directly from a visual model, teams can reduce repetitive coding work, establish a consistent starting point for implementation, and maintain a closer relationship between software design and source code.
Overview of Instant Code Generator for Ada95
The Ada95 Instant Code Generator is a code-generation feature in Visual Paradigm Desktop that generates Ada95 source files from UML class models. It allows developers to define classes, attributes, operations, and structural relationships visually before producing corresponding source code.
The generator belongs to Visual Paradigm’s Instant Generation capabilities, which are part of its broader code engineering toolset. It provides a model-to-code workflow: users prepare a UML class model, select the model elements to generate, configure the generation settings, and produce Ada95 source files in a specified output directory.
What is Ada95?
Ada95 is an object-oriented extension of the Ada programming language, standardized as ISO/IEC 8652:1995. It introduced object-oriented programming capabilities, including tagged types, inheritance, and dynamic dispatching, while retaining Ada’s emphasis on reliability, strong typing, and maintainability.
Ada95 is relevant to software projects involving long-lived systems, embedded applications, safety-conscious engineering environments, and other applications where structured programming and strong language-level guarantees are important.
What does the Ada95 Instant Generator do?
The generator translates selected UML class model elements into Ada95 source code using Visual Paradigm’s built-in or customized generation templates. It provides a way to move from a high-level structural design to an implementation-oriented source-code foundation.
Instead of manually writing every corresponding source declaration, developers can use the UML model as the starting point for generating code and then continue implementation in their preferred Ada development environment.
Where does it fit into Visual Paradigm Desktop?
Ada95 generation is part of Tools > Code > Instant Generator. It is a language-specific option within the general Instant Generator workflow.
It should be distinguished from Java and C++ round-trip engineering. Instant Generation is designed for producing source code from a model at a particular point in time. It is not the same as an automatically synchronized, continuous two-way relationship between a model and its source code.
Why Use the Ada95 Instant Code Generator?
The Ada95 Instant Code Generator helps software teams reduce the manual effort involved in translating UML class designs into source code. It also provides a repeatable way to establish source-code structures from a shared model.
Reduce repetitive implementation work
Manually translating a large class model into source declarations can be time-consuming. Developers must repeatedly interpret class names, attributes, operations, and other model information and express them using the target programming language.
Code generation automates part of this translation process, allowing developers to spend more time reviewing the design, implementing business logic, and validating application behavior.
Maintain consistency between design and implementation
When source code is generated from a common UML model, corresponding structural elements can follow consistent generation conventions. This is particularly useful when multiple developers implement different parts of the same system.
Consistent generation can also reduce discrepancies caused by manually translating similar design structures in different ways.
Support model-driven development
The generator supports a model-driven development workflow in which the UML class model acts as an important design reference for implementation.
Architects can develop the structural model first, allowing developers to use that model as a foundation for lower-level implementation work.
Generate selected classes instead of the entire model
Visual Paradigm allows users to select the classes to generate. This means developers can work with a specific subset of a model rather than being required to generate every class in the project.
Selective generation is useful when implementing a system incrementally or when different development stages require different groups of model elements.
Adapt generated code to project conventions
Generation options and customizable templates provide control over aspects of the resulting source code. Teams can configure naming-related settings, default types, file encoding, and other supported generation behaviors.
What happens without code generation?
Without the generator, developers must manually translate the UML model into Ada95 source code. This can introduce several inefficiencies:
- Repeated manual translation of class structures into source declarations.
- Inconsistent naming and coding conventions across generated structures.
- Increased risk of overlooking attributes or operations during implementation.
- Additional effort when the model contains many classes.
- Greater difficulty maintaining consistency between the documented design and the implementation.
Code generation reduces these repetitive tasks, although developers remain responsible for reviewing the generated source and implementing application-specific behavior.
Edition Availability
Ada95 code generation is available in the following Visual Paradigm Desktop editions according to the published edition comparison:
| Visual Paradigm Edition | Ada95 Code Generation |
|---|---|
| Enterprise | Supported |
| Professional | Supported |
| Standard | Supported |
| Modeler | Not listed as supported |
| Community | Not listed as supported |
Important: Edition entitlements can change. Refer to the current Visual Paradigm Edition Comparison for the latest availability information before purchasing or upgrading.
Requirements and Preparation
Before generating Ada95 source code, prepare a UML class model containing the classes that should be translated into source code.
Create a UML class model
The generator works with UML class models. A class diagram provides the structural information that forms the basis of code generation.
Depending on the design, the model may contain:
- Classes: Represent the principal types or objects in the software design.
- Attributes: Represent the properties or data members associated with classes.
- Operations: Represent the behaviors or operations defined by classes.
- Relationships: Represent structural relationships between classes.
- Packages: Organize related model elements into logical groups.
Review class definitions
Before generation, review the selected classes to ensure their names, attributes, operations, and types reflect the intended design.
Pay particular attention to attributes and parameters that do not have explicitly defined types. The generator provides default-type options for these cases, but the defaults should be reviewed to ensure they are appropriate for the intended implementation.
Prepare an output directory
Choose a directory in which Visual Paradigm can create the generated source files. Using a dedicated output directory makes it easier to identify generated files, review the results, and distinguish generated code from manually maintained application code.
Functionality Breakdown
The Ada95 Instant Generator provides several controls for determining what gets generated, where the source files are stored, and how the generated code is formatted.
Language selection
The Language setting determines the programming language used for source-code generation.
For this workflow, select Ada95. Visual Paradigm then uses the Ada95 generation templates and associated configuration options.
Model element selection
The model element tree displays packages and classes that can be considered for code generation. Users must select the classes they want to generate.
Visual Paradigm provides two ways to select classes:
- Diagrams tab: Select diagrams and generate code for the classes contained in the selected diagrams.
- Model Elements tab: Browse the model elements and select individual classes directly.
These selection methods provide flexibility when the required implementation scope is defined either by diagram organization or by individual model elements.
General generation options
The Instant Generator window displays commonly used generation settings. More detailed configuration is available through Advanced Options.
Output path
The Output Path specifies the directory in which the generated Ada95 source files will be saved.
Users should select an appropriate destination before starting generation. This makes it easier to organize generated code and inspect the output afterward.
Template directory
The Template Directory determines which code-generation templates Visual Paradigm uses.
- Built-in templates: Leave the template directory unchanged to use Visual Paradigm’s built-in generation templates.
- Customized templates: Specify a directory containing customized templates to change how source code is generated.
Templates control how model information is translated into source-code text. For example, developers can customize templates to introduce project-specific formatting or company conventions.
Advanced Options
The Advanced Options window provides more detailed control over the Ada95 generation process.
The documented Ada95-specific options include:
Encoding
Determines the character encoding used when writing generated source files. Select an encoding suitable for the development environment and any character requirements in the source content.
Attribute prefix
Specifies text to prepend to generated attribute names. This allows developers to apply a naming convention to attributes in the generated source code.
Parameter prefix
Specifies text to prepend to generated parameter names. This can help establish consistent naming conventions for operation parameters.
This Parameter Name
Specifies the name of the pointer used to access the object itself. This setting controls a name used by the Ada95 generation template when referring to the current object.
Default attribute type
Specifies the type used for an attribute when no type has been explicitly defined in the UML model.
This setting provides a fallback for incompletely specified attributes. It does not replace explicitly defined attribute types.
Default parameter type
Specifies the type used for an operation parameter when the parameter does not have an explicitly defined type.
It provides a fallback for parameters whose type information is missing from the model.
Allow from linked project
Controls whether classes from referenced projects are also included in code generation.
When working with linked projects, this option can be useful if the generated implementation requires classes defined in referenced project models.
Pointer type name
Specifies the name of the pointer used to access an associated class. It allows developers to configure a type name used by the generation template for this purpose.
Internal type name suffix
Specifies the suffix used for the type generated for internal purposes. This provides additional control over the naming of internally generated types.
Private component name
Specifies the name of the type used to contain private members. This option controls a naming aspect of the generated private-member structure.
Overwrite confirmation
The Prompt to Confirm Overwrite File option determines how Visual Paradigm handles existing files that would be replaced during generation.
- Enabled: Visual Paradigm asks for confirmation when a generated file already exists.
- Disabled: Existing files are overwritten automatically without prompting for confirmation.
Enabling overwrite confirmation is recommended when generated files may contain manual modifications or when developers need to review replacement decisions.
Code preview
The Preview function allows users to inspect the code content that would be generated.
Previewing code does not generate files in the output directory. It is an inspection function, not an alternative execution of the Generate command.
Preview is particularly useful for reviewing the effects of configuration changes before committing to file generation.
Output pane
The Output pane displays information about the generation process, including warnings, errors, and progress messages.
Users should inspect this area after generation to identify any reported problems and determine whether the operation completed as expected.
Open output folder
The Open Output Folder function opens the configured output directory using the system browser or file manager. It provides convenient access to the generated source files without requiring users to navigate to the directory manually.
Generate
The Generate command starts the actual code-generation process using the selected classes, output path, template directory, and configured options.
Close
The Close command closes the Instant Generator window.
How to Generate Ada95 Source Code from UML
Follow these steps to generate Ada95 source code from a UML class model in Visual Paradigm Desktop.
Step: Open Instant Generator
Open the Visual Paradigm project containing the UML class model. From the application toolbar, select:
Tools > Code > Instant Generator
This opens the Instant Generator window.
Step: Select Ada95 as the language
In the Instant Generator window, locate the Language setting and select Ada95.
This specifies Ada95 as the target programming language for the generation process.
Step: Specify the output path
Enter the directory where the generated Ada95 source files should be saved.
Make sure the selected directory is appropriate for the project and that you can access the generated files afterward.
Step: Select the classes to generate
Choose the UML classes that should be translated into Ada95 source code.
You can select classes using either of the following approaches:
- Open the Diagrams tab and select the diagrams containing the required classes.
- Open the Model Elements tab and select the required classes directly.
Remember that selecting the appropriate classes is necessary for code generation.
Step: Configure generation options
Optionally configure the available general options and Advanced Options.
For example, you can specify encoding, configure attribute and parameter prefixes, define default types, and determine whether classes from linked projects should also be generated.
You can also specify a customized template directory if you want to use your own code-generation templates instead of the built-in templates.
Step: Review the generated code
Optionally click Preview to inspect the code content before generating the source files.
Previewing does not write files to the output directory, so use the Generate command when you are ready to produce the actual source files.
Step: Generate Ada95 source files
Click Generate to start the generation process.
Visual Paradigm generates the source files for the selected classes using the configured settings and templates.
Step: Review the generation results
Check the Output pane for progress information, warnings, or errors.
When necessary, use Open Output Folder to access the generated files and inspect the results.
The generated source code can then be reviewed and used as a starting point for further implementation in an Ada95 development environment.
Customizing Ada95 Code Generation Templates
Visual Paradigm supports customizable code-generation templates. This allows developers to modify how model information is translated into source code rather than being restricted to the default output format.
What are code-generation templates?
Code-generation templates define the rules used to produce source code from UML model elements. They determine how model information is processed and how the resulting source-code text is constructed.
Visual Paradigm uses the Apache Velocity template engine for Instant Generator templates. Templates can be modified to accommodate specific project requirements and coding conventions.
Where are the templates stored?
The templates are stored under the following directory in the Visual Paradigm installation:
%Visual-Paradigm-Installation-Directory%/resources/instantgenerator
Within this directory, language-specific subfolders contain the templates associated with individual programming languages.
Recommended template customization workflow
Visual Paradigm recommends maintaining a separate development directory for customized templates instead of directly modifying the installation files.
- Create a working directory for customized templates.
- Navigate to the Visual Paradigm installation’s resources/instantgenerator directory.
- Copy the relevant language-specific template folder into the working directory.
- Open the required template files in a text editor.
- Modify the template logic to implement the desired output conventions.
- Save the customized templates.
- Open Instant Generator and select the appropriate programming language.
- Specify the customized directory in the Template Directory field.
- Select the classes, specify the output path, and generate the source code.
Why use a separate template directory?
Maintaining customized templates outside the Visual Paradigm installation directory offers two important advantages:
- It reduces the risk of losing customized templates when Visual Paradigm is uninstalled.
- It reduces the risk of customized files being replaced during product updates.
Examples of template customization
Depending on the template logic, customization can be used to implement project-specific source-code formatting, naming conventions, and other generation requirements.
For example, a development team may want generated source files to follow an internal coding convention or include additional standardized content.
Not every customization is available through the standard generator options. Requirements that involve changing the structure or content of generated files may require template modifications.
Technical knowledge required
Template customization is intended for users who are comfortable working with text-based templates and programming constructs. Understanding Apache Velocity syntax and the way Visual Paradigm exposes model information to templates is useful when implementing advanced changes.
Instant Generation vs. Round-Trip Engineering
Instant Generation and round-trip engineering are different code engineering approaches in Visual Paradigm.
Instant Generation
Instant Generation produces source code from a UML model at a particular point in time. The developer selects the model elements, configures the generator, and generates the corresponding source files.
The Ada95 generator belongs to this category.
Round-trip engineering
Round-trip engineering provides a model-and-code synchronization workflow in which changes can be reflected between supported source code and UML models.
Visual Paradigm documents dedicated Java and C++ round-trip engineering capabilities. These should not be confused with the Ada95 Instant Generator.
Key differences
| Aspect | Ada95 Instant Generation | Round-Trip Engineering |
|---|---|---|
| Primary purpose | Generate source code from UML models | Maintain synchronization between supported models and source code |
| Workflow | One-off generation operation | Model-and-code synchronization workflow |
| Direction | Model to source code | Two-way synchronization for supported languages |
| Ada95 support | Supported | Not documented as a dedicated round-trip capability |
For Ada95 projects, use Instant Generation when the objective is to produce source code from a UML class model. Do not assume that subsequent changes to generated Ada95 files will automatically update the UML model.
Limitations and Important Considerations
Although Instant Generation automates the production of source code, it should be understood as a model-to-code generation facility rather than a complete application development or compilation environment.
Generated code requires developer review
Generated source code should be inspected before being incorporated into a production application. Developers should verify the generated declarations, types, naming conventions, and overall structure against the project requirements.
Business logic may require additional implementation
A UML class model primarily describes structural aspects of a software system. Generating source code from that model does not automatically implement every application-specific business rule or algorithm.
Developers should expect to review and complete the implementation where additional logic is required.
Generation depends on model information
The quality of the generated source code depends on the quality and completeness of the UML model and the generation settings.
Missing attribute or parameter types may require the use of default-type settings. Developers should review these settings rather than assuming that an unspecified type will automatically be resolved to the intended Ada95 type.
Existing files may be overwritten
When generated files already exist, the overwrite-confirmation setting determines whether Visual Paradigm asks for confirmation or replaces the files automatically.
Developers should take care when regenerating files that may contain manual modifications. Keeping generated output separate from manually maintained source files can help reduce accidental loss of work.
Generation is not compilation
The Generate command produces source files. It does not mean that the generated code has been compiled, executed, or validated against the requirements of the target application.
Compilation and testing should be performed separately using an appropriate Ada development toolchain.
Not every UML diagram is a code-generation input
The Ada95 Instant Generator is based on UML class models. It should not be described as a general-purpose feature that generates Ada95 source code from every UML diagram type.
Not an automatic synchronization mechanism
Instant Generation is a one-off model-to-code process. Users should not assume that changes made to generated Ada95 files will be automatically synchronized back into the UML model.
Best Practices for Ada95 Code Generation
Maintain a clear UML class model
Use meaningful class names, well-defined attributes, appropriately specified types, and clearly structured operations. A well-organized model provides a better foundation for code generation.
Generate only the necessary classes
Use the Diagrams or Model Elements selection options to control the scope of generation. Generating a relevant subset can make incremental implementation easier to manage.
Configure default types deliberately
Review the Default Attribute Type and Default Parameter Type settings before generation. These settings affect model elements that do not have explicitly defined types.
Establish naming conventions early
Determine appropriate attribute and parameter naming conventions before generating large groups of classes. Configure the corresponding prefixes consistently when needed.
Preview before generating
Use Preview to inspect the generated code content before writing files. This provides an opportunity to identify unexpected output or configuration issues.
Keep customized templates separate
Maintain customized templates in a dedicated working directory instead of editing the installed templates directly. This protects customizations from product updates and uninstallation.
Protect existing source files
Enable overwrite confirmation when there is a possibility that generated files already contain manually maintained code. Use version control and backups as additional safeguards.
Validate generated source code
Review the generated Ada95 files, compile them with an appropriate Ada compiler, and perform the required testing before using them in a production system.
Troubleshooting and Common Questions
Ada95 is not available in the Language selection
Check whether the installed Visual Paradigm Desktop edition includes Ada95 code generation. According to the published edition comparison, the feature is supported in Enterprise, Professional, and Standard editions, but is not listed for Modeler or Community.
Also verify the installed product version and available feature entitlements.
No source files are generated
Check that the required classes have been selected in the Diagrams or Model Elements tab. The generator requires class selections. Also review the output path and the Output pane for warnings or errors.
Some classes from a referenced project are missing
Review the Allow from linked project option. This setting controls whether classes from referenced projects are included in generation.
Generated attributes have unexpected types
Review the type definitions in the UML model and check the Default Attribute Type option. The default type is used when an attribute does not have an explicitly specified type.
Generated parameters have unexpected types
Review the operation parameter definitions and the Default Parameter Type option. The configured default applies when a parameter does not have a specified type.
Generated names do not follow project conventions
Review the Attribute Prefix, Parameter Prefix, This Parameter Name, Pointer Type Name, Internal Type Name Suffix, and Private Component Name settings as appropriate.
If the required naming or formatting behavior is not covered by the available settings, consider customizing the generation templates.
Existing generated files are replaced
Check the Prompt to Confirm Overwrite File option. Enable it if confirmation is required before existing generated files are replaced.
Preview does not create source files
This is expected behavior. Preview displays the code content without writing it to the output directory. Click Generate to create the actual source files.
Customized templates are not being applied
Verify that the Template Directory field points to the directory containing the customized templates. Also confirm that the templates correspond to the selected programming language.
Generated code does not compile
Instant Generation and compilation are separate operations. Review the generated source, check the UML model and generation settings, and use the compiler’s diagnostic messages to identify any implementation or language-compatibility issues.
Frequently Asked Questions
What is the Ada95 Instant Code Generator in Visual Paradigm?
It is a Visual Paradigm Desktop code-generation feature that produces Ada95 source files from UML class models. Users select the classes to generate, configure generation settings, specify an output directory, and generate the source code.
Can Visual Paradigm generate Ada95 code from UML class diagrams?
Yes. Visual Paradigm supports generating Ada95 source code from UML class models using Tools > Code > Instant Generator.
Which Visual Paradigm editions support Ada95 code generation?
The published edition comparison lists Ada95 code generation as supported in Enterprise, Professional, and Standard editions. It is not listed as supported in Modeler or Community editions. Check the current edition comparison for the latest entitlements.
How do I open the Ada95 Instant Generator?
Open your Visual Paradigm project and select Tools > Code > Instant Generator. Select Ada95 in the Language field.
Can I generate code for selected classes only?
Yes. You can select diagrams containing the required classes through the Diagrams tab or select individual classes through the Model Elements tab.
Can I generate code from multiple class diagrams?
Yes. The Diagrams tab allows you to select diagrams for code generation. The generator produces code for classes in the selected diagrams.
Can I generate code for classes in referenced projects?
Yes. The Allow from linked project option controls whether classes in referenced projects are also included in code generation.
Can I choose where generated Ada95 files are saved?
Yes. Specify the destination directory in the Output Path field of the Instant Generator window.
Can I preview Ada95 code before generating it?
Yes. Click Preview to inspect the code content. Previewing does not create files in the output directory. Use Generate to write the source files.
Can I customize the generated Ada95 code?
Yes. You can configure supported generation options, such as encoding, attribute prefixes, parameter prefixes, default types, and internal type naming. You can also customize the code-generation templates for more specific output requirements.
Can I use my own code-generation templates?
Yes. Specify the directory containing your customized templates in the Template Directory field. Visual Paradigm uses Apache Velocity for Instant Generator templates.
Does the Ada95 generator support default attribute types?
Yes. The Default Attribute Type option specifies the type used when an attribute in the UML model does not have an explicitly defined type.
Does the Ada95 generator support default parameter types?
Yes. The Default Parameter Type option specifies the type used when an operation parameter does not have an explicitly defined type.
Can I control attribute and parameter naming?
Yes. The generator provides Attribute Prefix and Parameter Prefix options. Additional naming-related settings include This Parameter Name, Pointer Type Name, Internal Type Name Suffix, and Private Component Name.
Can I prevent generated files from overwriting existing files?
You can enable Prompt to Confirm Overwrite File so Visual Paradigm asks for confirmation when a target file already exists. Disabling this option allows automatic overwriting.
Does Instant Generation automatically synchronize Ada95 source code back to UML?
No. Ada95 Instant Generation is a one-way, model-to-code generation workflow. Do not assume that changes to generated Ada95 source files are automatically reflected in the UML model.
Is Ada95 code generation the same as Ada95 round-trip engineering?
No. Instant Generation produces source code from a model. Round-trip engineering involves synchronization between source code and UML models for supported languages. Visual Paradigm’s documented dedicated round-trip engineering capabilities include Java and C++.
Does Visual Paradigm compile generated Ada95 code?
The Instant Generator produces source files. Compilation and execution are separate activities that should be performed using an appropriate Ada development toolchain.
Can the generator produce a complete working application?
The generator produces source code based on the selected UML class model and its generation templates. It should not be considered an automatic application implementation tool. Developers may need to add business logic, complete implementation details, compile the source, and test the application.
What is the difference between Preview and Generate?
Preview displays the code content for inspection without writing files to the output directory. Generate performs the actual source-code generation and writes the resulting files to the specified output path.
Where can I find the generated Ada95 files?
The generated files are saved in the directory specified by Output Path. Use Open Output Folder to access that directory directly.
Can I use Ada95 code generation for a state machine diagram?
The Ada95 Instant Generator documented here is intended for UML class models. Visual Paradigm has separate state machine code-generation functionality, but the Ada95 Instant Generator should not be assumed to generate Ada95 state machine implementations.
Summary
Visual Paradigm Desktop’s Instant Code Generator for Ada95 provides a model-to-code workflow for transforming UML class models into Ada95 source files. It allows developers to select classes through diagrams or model elements, specify an output directory, configure generation options, preview the generated code, and customize templates when required.
By automating the translation of UML class structures into source code, the feature reduces repetitive implementation work and helps teams establish consistent source-code foundations. It is particularly useful for projects that use Ada95 and benefit from a structured, model-driven approach to software development.
Developers should remember that Instant Generation is a one-off model-to-code operation rather than automatic two-way synchronization. Generated source files should be reviewed, completed where necessary, compiled, and tested before being used in production applications.
VISUAL PARADIGM