 
 
 
 
 
   
 Next: 3 Position: Compose software
Up: Towards A Model For
 Previous: 1 Background
 
One of the main problems that hampers software extensibility is that uses of components have a fixed view how to access subcomponents. Often subcomponents can be accessed by ordered enumeration. Such a total ordering implies that component-uses need to be adapted in source if component-definitions are extended. Second, ordering is necessary because subcomponents are anonymous.
Example
1  Pattern matching has also been applied successfully in functional
  languages and specification languages of compiler generators.  However, when
  specifications become quite huge (in the order of ten-thousands of lines),
  experience shows![[*]](foot_motif.gif) that positional pattern matching hampers modular
  development seriously.  When object types in intermediate data structures
  of compilers are extended by new fields, all
  pattern matches on the type have to be updated.  This is not only annoying,
  but a severe source of bugs, especially in tools that support wildcard
  patterns, because with wildcards the number of subpatterns cannot be
  checked on completeness anymore.
 that positional pattern matching hampers modular
  development seriously.  When object types in intermediate data structures
  of compilers are extended by new fields, all
  pattern matches on the type have to be updated.  This is not only annoying,
  but a severe source of bugs, especially in tools that support wildcard
  patterns, because with wildcards the number of subpatterns cannot be
  checked on completeness anymore.
As in CoSy data objects in the repository are composed and aggregated from
  view specifications, their final layout is only known to the system's
  compiler and positional pattern matching is not possible.  Hence a CoSy
  tool has to supply pattern match on named subpatterns.  Thus the
  specifications can be extended quite easily: pattern matches on objects
  only need to be changed, when a new subpattern match is necessary.   
 
 
 
 
 
   Uwe Assmann and Rainer Schmidt