*/
# include "splintMacros.nf"
-# include "llbasic.h"
+# include "basic.h"
/*@iter constraintList_elements_private_only (sef constraintList x, yield only constraint el); @*/
# define constraintList_elements_private_only(x, m_el) \
int i;
constraint *newelements;
- llassert (constraintList_isDefined (s));
+ llassertfatal (constraintList_isDefined (s));
s->nspace += constraintListBASESIZE;
newelements = (constraint *) dmalloc (sizeof (*newelements)
constraintList
constraintList_add (/*@returned@*/ constraintList s, /*@only@*/ constraint el)
{
- llassert (constraintList_isDefined (s));
+ llassertfatal (constraintList_isDefined (s));
/*drl7x */
- if (constraintList_resolve (el, s) )
+ if (constraintList_resolve (el, s))
{
+ DPRINTF (("Resolved constraint: %s", constraint_unparse (el)));
constraint_free (el);
return s;
}
+
+ DPRINTF (("Adding constraint: %s", constraint_unparse (el)));
if (s->nspace <= 0)
constraintList_grow (s);
/*@only@*/ constraintList constraintList_addList (/*@only@*/ /*@returned@*/ constraintList s, /*@observer@*/ /*@temp@*/ constraintList newList)
{
- llassert(constraintList_isDefined(s) );
- llassert(constraintList_isDefined(newList) );
+ llassert(constraintList_isDefined (s));
+ llassert(constraintList_isDefined (newList));
if (newList == constraintList_undefined)
return s;
constraintList_elements (newList, elem)
{
- s = constraintList_add (s, constraint_copy(elem) );
+ s = constraintList_add (s, constraint_copy(elem));
}
end_constraintList_elements;
constraintList constraintList_addListFree (/*@returned@*/ constraintList s, /*@only@*/ constraintList newList)
{
- llassert(constraintList_isDefined(s) );
- llassert(constraintList_isDefined(newList) );
-
- if (constraintList_isUndefined(newList) )
+ if (constraintList_isUndefined (newList))
return s;
+
+ llassert (constraintList_isDefined (s));
+ llassert (constraintList_isDefined (newList));
constraintList_elements_private_only(newList, elem)
{
- s = constraintList_add (s, elem);
- }
- end_constraintList_elements_private_only
-
- constraintList_freeShallow(newList);
- return s;
+ s = constraintList_add (s, elem);
+ } end_constraintList_elements_private_only;
+
+ constraintList_freeShallow (newList);
+ return s;
}
-
constraintList constraintList_removeSurpressed (/*@only@*/ constraintList s)
{
constraintList ret;
fileloc loc;
- llassert(constraintList_isDefined(s) );
+ llassert (constraintList_isDefined (s));
ret = constraintList_makeNew();
- constraintList_elements_private_only(s, elem)
+ constraintList_elements_private_only (s, elem)
{
loc = constraint_getFileloc(elem);
{
ret = constraintList_add (ret, elem);
}
-
else if (context_suppressFlagMsg(FLG_BOUNDSWRITE, loc) )
{
DPRINTF ((message ("constraintList_removeSurpressed getting rid of surpressed constraint %q",
constraint_unparse(elem))));
constraint_free(elem);
}
-
else if (!constraint_hasMaxSet(elem) && context_suppressFlagMsg(FLG_BOUNDSREAD, loc))
{
DPRINTF ((message("constraintList_removeSurpressed getting rid of surpressed constraint %q",
ret = constraintList_add (ret, elem);
}
fileloc_free(loc);
- }
- end_constraintList_elements_private_only;
+ } end_constraintList_elements_private_only;
constraintList_freeShallow(s);
-
return ret;
}
if (context_getFlag (FLG_ORCONSTRAINT))
{
- temp1 = constraint_unparseOr(current);
+ temp1 = constraint_unparseOr (current);
}
else
{
return st;
}
-void constraintList_unparseErrorPostConditions (constraintList s, fileloc loc)
+void constraintList_printErrorPostConditions (constraintList s, fileloc loc)
{
constraintList_elements (s, elem)
return;
}
-void constraintList_unparseError (constraintList s, fileloc loc)
+void constraintList_printError (constraintList s, fileloc loc)
{
constraintList_elements (s, elem)
end_constraintList_elements; ;
}
-
constraintList constraintList_sort (/*@returned@*/ constraintList ret)
{
if (constraintList_isUndefined(ret) )
llassert(FALSE);
return ret;
}
+
qsort (ret->elements, (size_t) ret->nelements,
(sizeof (*ret->elements)),
(int (*)(const void *, const void *)) constraint_compare);