int count=0;
    public void process(CdlDocument document) throws IOException, CdlException, ParsingException {        int count=0;        stateInferrer.process(document);        ResolveEnum state= ResolveEnum.ResolvedUnknown;        boolean finished;        SystemElement system = document.getSystem();        ResolveEnum resolvedSystem = resolveList(system);        state = state.merge(resolvedSystem);        finished = state == ResolveEnum.ResolvedComplete;        if(!finished) {            throw new CdlResolutionException("Gave up trying to resolve this document ");        }    }