declarative linking algorithm draft-complete