(c) Larry Ewing, Simon Budig, Garrett LeSage
” 1994 «.
Computer Science Department
PetrSU | Software projects | AMICT | Staff | News archive | Contact | Search

Text Specifications Usage for Program Code Generation

Prof. Igor L.~Bratchikov, Ilya S.~Lebedev

Software development is enough intensive process the system approach demanding. One of the first problems standing at construction of information systems, consists in processing the text of the technical project on working out in result, suitable for the further analysis [1]. One of the fist steep is text of the technical project  processing. After that we have   a set of natural language  specification. It can be  used  for technical scheme creation, analysis and testing program units. For example:

Next steep is specifications scheme present as:


For automatic calculation specification text  we need receive text structures  and use parsec rules. Natural language analisator set next view of information struct:
The Application shall provide the user with the test description before Camera Test execution.
N% word        struct                           type
008     shall provide                          	[action]
002        before                               [when?]
003            Test                            	[what?]
005              Camera                       	[what?]
006        The Application                  	[what?]
009        the user                             [whom?]
010        description                          [what?]
012          test                               [what?]
We can see three parts of structure after identification process  of morphological tags. Its are Action, Object and Condition.
< Condition:   before Camera Test execution >
< Action:   The Application shall provide the user with the test description >
< Object:   <<  Application >>    > 
Object  has private methods and properties. We can take methods and properties from a database 
for realisation or  receive after "reading" of all specifications. In this way specifications in example give next object:
              PARAMETR-CONDITION1  	:   Before Camera Test execution; 
              PARAMETR-CONDITION 2  	:   During the Camera Test;   
            < ACTION2:   shall prompt the user to capture the image >
Describe action as procedure  and  parameters as variables and  receive follow class: 
class App        
    { bool par1; //  PARAMETR-CONDITION1   :   Before Camera Test execution; 
      bool par2;    //  PARAMETR-CONDITION1   :   During Camera Test execution;
     obj action1();//  
     obj action2(); // < ACTION2:   shall prompt the user to capture the image >
Detailing of methods and procedures depends on development. It can be different in projects. Every part of structure can be more detailed.
The objects set by conditions, define external relations between objects of specifications. On the basis of their properties state solution on a choice of the specification.  
IF(Test.execution == true) 

Object parametres can be used for a choice of an executable method:  
IF (par1==true)

This method use application events.  Specfication notation includes conditions. If condition is actual then action start.
While(App_.param_n== true)
   case 1: App_.action1(par1); break;
   case 2: App_.action2(par2); break;
   case N: App_.actionN(parN); break;
   default :
In the conclusion it is possible to notice that the basic development of technologies of programming is set by methods of automatic processing of the information and knowledge. 
Using the described approach it is possible to calculate objects of the program and communication between them.