Overview
Comment:Now ignores aliasing if no arguments given.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 559301ac43f003618253a8f67aca6fb70380c0772f579d86b01cb6035f1e1c34
User & Date: gawthrop@users.sourceforge.net on 1998-09-24 12:57:44
Other Links: branch diff | manifest | tags
Context
1998-09-29
15:37:18
Declare mttINPUT check-in: 2cbd369d00 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1998-09-24
12:57:44
Now ignores aliasing if no arguments given. check-in: 559301ac43 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:50:11
Initial revision check-in: eaeee17e5e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/cbg2ese.m from [b78d61b0f4] to [f446208c65].

19
20
21
22
23
24
25



26
27
28
29
30
31
32
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35







+
+
+







# Structure matrix [states,nonstates,inputs,outputs,zero_outputs]

# ###############################################################
# ## Version control history
# ###############################################################
# ## $Id$
# ## $Log$
# ## Revision 1.30  1998/09/02 11:14:23  peterg
# ## Revised to use ordered lists of subsystems and ports
# ##
# ## Revision 1.29  1998/08/25 09:22:34  peterg
# ## Correctely recognises port SSs its now easy -- they are in there own
# ## field
# ##
# ## Revision 1.28  1998/08/25 08:31:42  peterg
# ## Fixed bug - didn't find the ports - use deblank
# ##
188
189
190
191
192
193
194



195
196
197
198
199


200

201
202
203
204
205
206
207
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

208
209
210
211
212
213
214
215







+
+
+





+
+
-
+







  # encountered first and so the counters will not be messed up by subsystems.
  local_u_index = 0;
  local_y_index = 0;

  if (length(system_args)==0)
    mtt_info(sprintf("No arguments given so no argument aliasing done for system %s(%s)",\
		     system_name,system_type), infofilenum);
    AliasingArguments=0;
  else
    AliasingArguments=1;
  endif;

  if (length(system_cr)==0)
    mtt_info(sprintf("No cr given so no cr aliasing done for system %s(%s)",\
		     system_name,system_type), infofilenum);
    AliasingCRs=0;
  else
  endif;
    AliasingCRs=1;  endif;


  fields=["ports";"subsystems"]; # Do for both ports and subsystems -
				# ports first
  lists=["portlist";"subsystemlist"];
  for i=1:2
    field=deblank(fields(i,:));
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230















231
232
233
234
235
236
237
224
225
226
227
228
229
230








231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252







-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







    	bond_list = abs(comp);
    	direction = sign(comp)'*[1 1];
				# Convert from arrow orientated to component orientated causality
    	comp_bonds = CBG.bonds(bond_list,:).*direction;
	
    	disp(["---- ", field, " ---"]);    
    	
				# Alias the args list -- if not at top level
    	message = sprintf("\tfor component  %s (%s) within %s",\
			  comp_name,subsystem.type,full_name);    
    	if struct_contains(CBG,"alias")
	  subsystem.arg = alias_args(subsystem.arg,CBG.alias,";",message,infofilenum)
	  subsystem.cr = alias_args(subsystem.cr,CBG.alias,";",message,infofilenum)
    	endif;

	if AliasingArguments	# Alias the args list if appropriate
    	  message = sprintf("\tfor component  %s (%s) within %s",\
			    comp_name,subsystem.type,full_name);    
    	  if struct_contains(CBG,"alias")
	    subsystem.arg = alias_args(subsystem.arg,CBG.alias,";",message,infofilenum)
    	  endif;
	endif;

	if AliasingCRs	# Alias the CR list if appropriate
    	  message = sprintf("\tfor component  %s (%s) within %s",\
			    comp_name,subsystem.type,full_name);    
    	  if struct_contains(CBG,"alias")
	    subsystem.cr = alias_args(subsystem.cr,CBG.alias,";",message,infofilenum)
    	  endif;
	endif;
	
			# Substitute positional ($1 etc) arguments
    	subsystem.cr = subs_arg(subsystem.cr,system_cr, ...
				"lin",full_name,subsystem.type,comp_name,infofilenum);
    	subsystem.arg = subs_arg(subsystem.arg,system_args, ...
				 "1",full_name,subsystem.type,comp_name,infofilenum);
    	


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