⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ada.txt

📁 c#设计模式WithCla
💻 TXT
字号:
              ANSI Ada (Ada83) - Getting Started Ada Scripts

The purpose of this paper is to describe how to generate ANSI Ada code from class diagrams, state diagrams, and object interaction diagrams.  These scripts are "getting started" scripts that must be updated for your development environment.

1.  ANSI Ada - Generating ANSI Ada from Class Diagrams

Class Diagram: adacar.omt
Script Files: ada1.sct
Main File: adauser.ada

The steps to generate ANSI Ada (Ada83) code and to compile the generated files are as follows:

>> Launch With Class from Windows
>> Open adacar.omt.  Note that is diagram has no inheritance relationships because inheritance is not supported in ANSI Ada
>> Select "Utilities - Generate Code File per Class"
>> Enter ada as the custom file extension
>> Select ada1.sct to generate the Ada packages
>> Select "File - Edit File" to examine the generated files, e.g. cars.ada
>> Launch your Ada environment
>> Compile and link each generated file, e.g. cars.ada
>> Compile, link, and execute adauser.ada

Ada Notes:

(1) Enter the basic Ada types in the attribute and operation specification forms: BOOLEAN, CHARACTER, INTEGER, FLOAT, POSITIVE, NATURAL, DURATION, STRING.

(2) Enter operation parameters in the operation specification form parameter_type parameter_name.  Then use the variable ADA_OPERATION_PARAMETERS.

2. ANSI Ada - Generating ANSI Ada from State Diagrams
State Diagram: DEL1STA.OMT and DEL2STA.OMT for Pascal
Script Files: DELSTAT1.SCT and DELSTAT2.SCT create Pascal classes - Must Update for Ada.
Main File: Update ADASTATE.ADA to invoke "process (turnOn)" and "process (turnOff)".

The following are the general steps to test out the ANSI Ada code generation scripts:

- Create a directory for the state .omt files, script files, and Ada files, e.g. WCSTATE.

- Copy the appropriate files into each directory, e.g. copy st*.*.

- In With Class open a state diagram, e.g. DEL1STAT.OMT.

- Select "Utilities - Generate State Code/Report" to generate a text report.  Enter a report file name, e.g. RPTSTATE.TXT.  Select a state report script, e.g. RPTSTATE.SCT, DDSTATE.SCT, or TABSTATE.SCT.  After report generation, select "File - Edit File" to examine the generated report.

- Enter the file name, e.g. CONTROLS.ADA

- Select the code generation script, e.g. DELSTAT1.SCT or DELSTAT2.SCT - must update for Ada.

- Select "Edit - Edit File" and open CONTROLS.ADA for review.

- In your ANSI Ada environment, create a project with ADASTATE.ADA and CONTROLS.ADA.

- Compile and run the program.

- Go back to With Class and update the state diagram with new states, events, conditions, and actions and repeat the entire process.

3.  ANSI Ada - Creating Message Sequence Tables from Object Interaction Diagrams
Object Interaction Diagram: CAROBJ.OMT
Script File: TABOBMSG.SCT

The following are the general steps to generate the message sequence table and then update ANSI Ada code with messages.
- Open the object interaction diagram, e.g. CAROBJ.OMT.
- Select "Utilities - Generate Object Code/Report".
- Enter a report name, e.g. TABMSG.TXT.
- Browse and select the message sequence table script, e.g. TABOBMSG.SCT to generate the message sequence table.
- Cut and paste messages from the message sequence table into you ANSI Ada code.
- As required update the object interaction diagram and the message sequence script (TABOBMSG.SCT) and repeat the process.

4.  I request your recommended changes to these ANSI Ada code generation scripts.  Question - What additional With Class script variables or additional dialog boxes, text boxes, or check boxes are required to fully support Ada-83, Ada-9X, and VHDL.  Please submit new Ada scripts.  Request comments, improvements, and Ada9X scripts to Richard Felsinger 71162.755@compuserve.com telephone 803-881-3648.

5. Many thanks, Richard Felsinger, RCF Associates, 960 Scottland Dr, Mt Pleasant, SC 29464 telephone 803-881-3648 71162.755@compuserve.com.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -