Overview
Context
Changes
Added mttroot/mtt/bin/trans/m/rcs_header.txt version [52b8d3c3d8].
|
1
2
3
4
5
6
7
8
|
+
+
+
+
+
+
+
+
|
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
| | | | | | |
Added mttroot/mtt/bin/trans/makesubs version [afa1ff4b7d].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#! /bin/sh
######################################
##### Model Transformation Tools #####
######################################
# Bourne shell script: makesubs
# Makes the default substitution file
# Copyright (C) 2000 by Peter J. Gawthrop
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
##
###############################################################
#Inform user
echo Creating $1_subs.r
cat > $1_subs.r <<EOF
% Default SUBS file
% File $1_subs.r
% Generated by MTT on `date`.
EOF
cat $MTTPATH/trans/m/rcs_header.txt >> $1_subs.r
cat >> $1_subs.r <<EOF
% Put algebraic substitution commands here
END;
EOF
exit
## NB the following messes up the expansion switch ????
cat >> $1_subs.r <<EOF
% Ordering switch
ORDER
EOF
# Symbolic params first
awk '{
print $1 ","
}' < $1_sympar.txt >> $1_subs.r
# Then states
Nx=`mtt_getsize $1 x` # States
awk 'END{
for (k=1;k<Nx;k++){
printf("mttx%i,\n", k);
}
printf("mttx%i;\n", Nx);
}' Nx=$Nx < $1_sympar.txt >> $1_subs.r
cat >> $1_subs.r <<EOF
END;
EOF
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Added mttroot/mtt/bin/trans/tidy version [5d66b20135].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
mv $1 $1.old
cat $1.old |
#Clear out all (and extraneous) new lines
tr -d '\012' |\
#Squash blanks
tr -s '\040' '\040' |\
#Put in new lines to replace $
tr '\044' '\012' |\
#Remove blanks after E
sed "s/E /E/g" |\
#Put in $ at end of each line
sed "s/$/\$/" >$1
|
| | | | | | | | | | | | | | | | |