Skip to content

Commit

Permalink
Clean polymorphic getProofObligations
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle committed Oct 18, 2023
1 parent 9a9e51a commit db1bc1a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ public ProofObligationList getProofObligations(POContextStack ctxt, Environment

TCNameList pids = new TCNameList();
boolean matchNeeded = false;
boolean polymorphic = (typeParams != null && !typeParams.isEmpty());

for (POPatternList pl: paramPatternList)
{
Expand All @@ -153,12 +152,6 @@ public ProofObligationList getProofObligations(POContextStack ctxt, Environment
}
}

if (polymorphic)
{
// Cannot generate POs for polymorphic fns (yet), so unchecked
// ctxt.push(new PONoCheckContext());
}

if (type.hasTotal())
{
ctxt.push(new POFunctionDefinitionContext(this, true));
Expand Down Expand Up @@ -207,12 +200,6 @@ public ProofObligationList getProofObligations(POContextStack ctxt, Environment

ctxt.pop();

if (polymorphic)
{
// Cannot generate POs for polymorphic fns (yet), so unchecked
// ctxt.pop();
}

if (annotations != null) annotations.poAfter(this, obligations, ctxt);
return obligations;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ public ProofObligationList getProofObligations(POContextStack ctxt, Environment
(annotations != null) ? annotations.poBefore(this, ctxt) : new ProofObligationList();
TCNameList pids = new TCNameList();
boolean matchNeeded = false;
boolean polymorphic = (typeParams != null && !typeParams.isEmpty());

for (POPatternListTypePair pltp: parameterPatterns)
{
Expand All @@ -150,12 +149,6 @@ public ProofObligationList getProofObligations(POContextStack ctxt, Environment
}
}

if (polymorphic)
{
// Cannot generate POs for polymorphic fns (yet), so unchecked
// ctxt.push(new PONoCheckContext());
}

if (pids.hasDuplicates() || matchNeeded)
{
obligations.add(new ParameterPatternObligation(this, ctxt));
Expand Down Expand Up @@ -213,12 +206,6 @@ public ProofObligationList getProofObligations(POContextStack ctxt, Environment
ctxt.pop();
}

if (polymorphic)
{
// Cannot generate POs for polymorphic fns (yet), so unchecked
// ctxt.pop();
}

if (annotations != null) annotations.poAfter(this, obligations, ctxt);
return obligations;
}
Expand Down

0 comments on commit db1bc1a

Please sign in to comment.