/// <summary> /// Refines the given state according to the knowledge stored in the egraph about sv /// /// In addition, the state can be null when the knowledge is inconsistent. /// </summary> /// <param name="cv">symbolic value we assume to be non-null (true)</param> /// <param name="state">state if sv is non-null (true)</param> private static void AssumeTrue(ISymValue cv, ref ExposureState state) { if (state == null) return; foreach(EGraphTerm t in state.egraph.EqTerms(cv)){ ISymValue op = t.Args[0]; if (t.Function == ExposureState.EqIsExposedId){ // EqIsExposed(op) == true, therefore op *is* exposed state.AssignFrameForExposed(op); }else if (t.Function == ExposureState.EqIsExposableId){ state.AssignFrameForExposable(op); } } }