I started looking at ASM_9004 a couple of days again and various fixes
are needed in the builders. Having worked with the builders for a long
time I've come to the conclusion that their current configuration,
which has evolved over the last couple of years, has become
un-maintainable. The primary reason for this is the jumble of logic
across the 14 active builders we have. It's very difficult to spot and
isolate what rules are being applied to the creation of the model and
hence whether these rules comply with the specs.
Given that we have a model that combines both a representation of the
static assembly model and the runtime model that is derived from it
(I'm not brave enough to suggest that we move away from this
configuration) I think there are a number of distinct phases the build
phase has to go through. The primary thrust of this is to move away
from the seemingly arbitrary and inconsistent traverses through the
model toward a clearly defined pattern of processing.
============
Pre-processing
rationalize includes
etc.
Static model processing
build the component type of each composite (non-composite component
types are previously calculated at the resolve stage)
Apply the OASIS rules for promotion of
properties/services/references/policy
configure each component based on its component type
Apply the OASIS rules for promotion of properties/services/references/policy
Runtime model processing
augment the static model with the runtime information
Component URIs
Binding URIs
Endpoints
Endpoint references
etc.
Post-processing
not sure if there is anything that goes here
============
At r801592 I've started adding a ModelBuilder to replace the
CompositeBuilder to follow this kind of pattern. In reality I haven't
done much at all and it neither runs nor affects the current builder
code (it would be switched on via META-INF/services). I want to get
thoughts on this before spending real effort.
Regards
Simon