Differences From Artifact [268bf69a52]:

To Artifact [781ceb84d9]:


335
336
337
338
339
340
341
342
343


344
345
346


347
348
349
350
351
352
353
    head_bond = eval(head_str);
    tail_bond = eval(tail_str);
    
    ## check compatible sizes
    head.n_subs = size(struct_elements(head_bond))(1) - 2;
    tail.n_subs = size(struct_elements(tail_bond))(1) - 2;
    if (head.n_subs != tail.n_subs)
      mtt_error(sprintf("Vector ports %s and %s are not compatible",
			head_bond.label, tail_bond.label), errorfile);


    elseif (head.n_subs > 1)
      mtt_info(sprintf("Vector port %s matches %s",
		       head_bond.label, tail_bond.label), infofile);


    endif

    ## write type at other end
    eval(sprintf("%s.other_end_type = '%s';",
		 head_str, tail.type));
    eval(sprintf("%s.other_end_type = '%s';",
		 tail_str, head.type));







|
|
>
>

|
|
>
>







335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
    head_bond = eval(head_str);
    tail_bond = eval(tail_str);
    
    ## check compatible sizes
    head.n_subs = size(struct_elements(head_bond))(1) - 2;
    tail.n_subs = size(struct_elements(tail_bond))(1) - 2;
    if (head.n_subs != tail.n_subs)
      mtt_error(sprintf("Vector ports '%s' (%s:%s) and '%s' (%s:%s) are not compatible",
			head_bond.label, head.type, head_name,
			tail_bond.label, tail.type, tail_name),
		errorfile);
    elseif (head.n_subs > 1)
      mtt_info(sprintf("Vector port '%s'(%s:%s) matches '%s' (%s:%s)",
		       head_bond.label, head.type, head_name,
		       tail_bond.label, tail.type, tail_type),
	       infofile);
    endif

    ## write type at other end
    eval(sprintf("%s.other_end_type = '%s';",
		 head_str, tail.type));
    eval(sprintf("%s.other_end_type = '%s';",
		 tail_str, head.type));

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