# include "exprChecks.h"
# include "aliasChecks.h"
# include "exprNodeSList.h"
-//# include "exprData.i"
/*@access constraint, exprNode @*/
temp = constraintList_subsumeEnsures (list2, ret);
temp = constraintList_addList (temp, ret);
-
+ constraintList_free(ret);
+
DPRINTF(( message ("constraintList_mergeEnsures: returning %s ",
constraintList_print(temp) )
));
DPRINTF((message ("constraintList_mergeRequires: ret = %s", constraintList_print(ret) ) ) );
- ret = constraintList_addList (ret, temp);
+ ret = constraintList_addListFree (ret, temp);
DPRINTF((message ("constraintList_mergeRequires: returning %s", constraintList_print(ret) ) ) );
if (preconditions != constraintList_undefined)
{
- preconditions= constraintList_togglePost (preconditions);
+ preconditions = constraintList_togglePost (preconditions);
+ preconditions = constraintList_preserveCallInfo(preconditions, fcn);
preconditions = constraintList_doSRefFixConstraintParam (preconditions, arglist);
}
else
if (preconditions == NULL)
preconditions = constraintList_makeNew();
}
-
+ DPRINTF (( message("Done checkCall\n") ));
+ DPRINTF (( message("Returning list %q ", constraintList_printDetailed(preconditions) ) ));
return preconditions;
}
if (*resolved)
{
- constraint_free(next);
- constraint_free(ret);
- return NULL;
+ if (next != NULL)
+ constraint_free(next);
+
+ /*we don't need to free ret when resolved is false*/
+ // constraint_free(ret);
+ /*@i1*/ return NULL;
}
while (next != NULL)
curr = doResolve (curr, post1, resolved);
if (*resolved)
{
- constraint_free(curr);
- constraint_free(next);
+ /* curr is null so we don't try to free it*/
+ //constraint_free(curr);
+
+ if (next != NULL)
+ constraint_free(next);
constraint_free(ret);
- return NULL;
+ /*@i1*/ return NULL;
}
ret = constraint_addOr (ret, curr);
+ constraint_free(curr);
}
- constraint_free(curr);
+
return ret;
}
constraintList_elements(target, el)
{
constraint temp;
- #warning make sure this side effect is the right things
#warning make sure that a side effect is not expected
temp = substitute(el, subList);
return ret;
}
-constraint constraint_solve (constraint c)
+constraint constraint_solve (/*@returned@*/ constraint c)
{
DPRINTF( (message ("Solving %s\n", constraint_print(c) ) ) );
c->expr = constraintExpr_solveBinaryExpr (c->lexpr, c->expr);