Changes between Initial Version and Version 1 of RefactoringSteps/GenerateFunctionSpecification


Ignore:
Timestamp:
Feb 19, 2012, 11:48:34 PM (13 years ago)
Author:
manualwiki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RefactoringSteps/GenerateFunctionSpecification

    v1 v1  
     1= Generate function specification = 
     2 
     3The “generate function specification” transformation calculates the specification of the selected function and insert the -spec directive in front of the function. 
     4 
     5Inserting specification for function {{{f}}}: 
     6 
     7{{{ 
     8j(X, ok) -> 
     9   X + 2. 
     10}}} 
     11 
     12Result: 
     13 
     14{{{ 
     15-spec(j(float()|int(),atom()) 
     16   ->float()|int()) 
     17 
     18j(X, ok) -> 
     19   X + 2. 
     20}}} 
     21 
     22== Side conditions == 
     23 
     24 * There is no side condition to use this transformation. 
     25 
     26 
     27== Transformation steps and compensations == 
     28 
     29 1. Calculates the specification of the function. 
     30 
     31 2. Inserts the specification.