10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
+
+
+
+
|
# Copyright (c) P.J.Gawthrop, 1991, 1994, 1996
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.14 2002/08/30 15:39:04 geraint
## Read fix_c.r before ese.r and explicitly overload ** operator with pow().
## These changes are required for the Codemist version of Reduce.
##
## Revision 1.13 2002/06/28 10:13:40 geraint
## Includes fix_c.r in ese2rdae and def2write_r to eliminate occurrances of x**y.
##
## Revision 1.12.2.2 2002/06/05 17:28:00 geraint
## Cosmetic change.
##
## Revision 1.12.2.1 2002/06/05 11:14:51 geraint
|
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
+
+
+
+
|
include=`echo 'in "'$MTT_LIB'/reduce/fix_c.r";'`
blurb3='fixing c and cc code';
;;
-partition )
partition=yes;
blurb='with partitioning';
;;
-sort )
sort=sort;
blurb1='using sorted equations';
;;
*)
echo "$1 is an invalid argument - ignoring";
exit ;;
esac
shift
done
|
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
+
+
+
+
-
+
+
+
-
+
|
fi
defname=$topname"_def.r"
crname=$topname"_cr.r"
subsname=$topname"_subs.r"
paramname=$topname"_params.r"
daename=$sysname"_rdae.r"
if [ -n "$sort" ]; then
esename=$sysname"_sese.r"
else
esename=$sysname"_ese.r"
esename=$sysname"_ese.r"
fi
logname=ese2rdae.log
if [ -n "${load_cr}" ]; then
load_cr_comm="in \"${crname}\";"
load_subs_comm="in \"${subsname}\";"
fi
# Inform user
echo Creating $daename $blurb $blurb2 $blurb3
echo Creating $daename $blurb $blurb1 $blurb2 $blurb3
# Remove the old log file
rm -f $logname
# Use symbolic algebra to accomplish the transformation
$SYMBOLIC >$logname << EOF
|