Better algo for linking reference architecture and runtime architecture