Ejemplo n.º 1
0
  public ProofObligationList getProofObligations(POContextStack ctxt) {
    ProofObligationList obligations = new ProofObligationList();

    for (PODefinition d : this) {
      ctxt.push(new PONameContext(d.getVariableNames()));
      obligations.addAll(d.getProofObligations(ctxt));
      ctxt.pop();
    }

    return obligations;
  }
Ejemplo n.º 2
0
  @Override
  public ProofObligationList getProofObligations(POContextStack ctxt) {
    ProofObligationList obligations = new ProofObligationList();

    int count = 0;
    boolean hasIgnore = false;

    for (POCaseAlternative alt : cases) {
      if (alt.pattern instanceof POIgnorePattern) {
        hasIgnore = true;
      }

      // PONotCaseContext pushed by the POCaseAlternative...
      obligations.addAll(alt.getProofObligations(ctxt, expType));
      count++;
    }

    if (others != null) {
      obligations.addAll(others.getProofObligations(ctxt));
    }

    for (int i = 0; i < count; i++) {
      ctxt.pop();
    }

    if (others == null && !hasIgnore) {
      obligations.add(new CasesExhaustiveObligation(this, ctxt));
    }

    return obligations;
  }