Overview
Comment:DD
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: d7dd6516d16208268c8f53fcf283813f73846c392147a9ffe2ef360a68cc3967
User & Date: gawthrop@users.sourceforge.net on 1998-07-25 15:05:54.000
Other Links: branch diff | manifest | tags
Context
1998-07-25
15:06:17
Added DDT VAR check-in: b5d9506f59 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:05:54
DD check-in: d7dd6516d1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
14:59:11
Initial revision check-in: 34ad400448 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes
11
12
13
14
15
16
17




18
19
20
21
22
23
24
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28







+
+
+
+







# Copyright (c) P.J.Gawthrop 1998

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3  1998/07/25 14:03:30  peterg
## Added () to [] conversion when the variable is i j k or an integer or
## combination
##
## Revision 1.2  1998/07/25 12:39:57  peterg
## begin on same line as for and if
##
## Revision 1.1  1998/07/25 09:42:52  peterg
## Initial revision
##
###############################################################
40
41
42
43
44
45
46
47

48
49
50
51
52
53
54
44
45
46
47
48
49
50

51
52
53
54
55
56
57
58







-
+







# Find system constants
Nx=`grep "MTTNx " <$Sys\_def.r | awk '{print $3}' | sed 's/;//'`
Nu=`grep "MTTNu " <$Sys\_def.r | awk '{print $3}' | sed 's/;//'`
Ny=`grep "MTTNy " <$Sys\_def.r | awk '{print $3}' | sed 's/;//'`
 
#Regexps
  name="[a-zA-Z0-9]*"
  fun_name="$name\_$name"
  fun_name="$Sys\_$name"
  space="[ \t]*"
  spaces="[ \t][ \t]*"
  non_space="[^ ]*"

# Heading
(case $rep in
    state)
78
79
80
81
82
83
84
85

86
87
88
89
90
91
92
82
83
84
85
86
87
88

89
90
91
92
93
94
95
96







-
+







	echo "    InputVector  =ARRAY[1..$Nu] OF REAL;"
	echo "    OutputVector =ARRAY[1..$Ny] OF REAL;"
	echo "VAR"
        echo "    t,LAST,DT : REAL;"
	echo "    mttx,mttdx      : StateVector;"
	echo "    mttu            : InputVector;"
	echo "    mtty            : OutputVector;"
	echo "    i,j,k,it,iLast,STEPFACTOR : INTEGER;"
	echo "    i,j,it,iLast,STEPFACTOR : INTEGER;"
	echo "    METHOD : STRING;"
        ;;
    *)	echo "PROCEDURE $Sys_rep;"
        ;;
esac) > $Filename

cat<<EOF >> $Filename
167
168
169
170
171
172
173
174

175
176
177
178
179
180
181
171
172
173
174
175
176
177

178
179
180
181
182
183
184
185







-
+







          if ($1=="for"){
          sub(/:/," TO ",$0)
          sub(/=/,":=",$0)
          printf("%s DO BEGIN\n", $0) 
          }
          else {
            sub(/=/,":=",$0)
            sub(/\^/,"**",$0)
            gsub(/\^/,"**",$0)
            printf("%s\n",$0)
          }
        }
      }
    }
  }
}

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]