extern void context_addMetaState (/*@only@*/ cstring, /*@only@*/ metaStateInfo)
/*@modifies internalState@*/ ;
-extern valueTable context_createValueTable (sRef p_s, /*@only@*/ stateInfo p_sinfo)
+extern valueTable context_createValueTable (sRef p_s, /*@only@*/ stateInfo p_info)
/*@globals internalState@*/ ;
-extern valueTable context_createGlobalMarkerValueTable (/*@only@*/ stateInfo p_sinfo)
+extern valueTable context_createGlobalMarkerValueTable (/*@only@*/ stateInfo p_info)
/*@globals internalState@*/ ;
extern int context_getBugsLimit (void) /*@*/ ;
# define context_getBugsLimit() ((int)context_getValue(FLG_BUGSLIMIT))
-/*drl 12/30/2001 these are some ugly functions that were added to facilitate struct annotations */
-/*drl 1/6/2001: I didn't think these functions were solid enough to include in the
- stable release of splint. I commented them out so that they won't break anything
- but didn't delete them because they will be fixed and included later
-*/
-
-/*extern void setGlobalStructInfo(ctype p_ct, constraintList p_list); */
-
-/*extern constraintList getInvariants (ctype p_ct); */
-
-/* static int getSref (ctype ct, sRef s); */
-
-/* sRef fixSref (ctype p_ct, sRef p_base, sRef p_fix); */
-
extern ctype context_setLastStruct (/*@returned@*/ ctype p_s) /*@modifies internalState@*/;
extern ctype context_getLastStruct (/*@returned@*/ /*ctype p_s*/) /*@modifies internalState@*/;
/*@null@*/ annotationInfo context_lookupAnnotation (cstring annot)
{
- annotationInfo ainfo;
-
- ainfo = annotationTable_lookup (gc.annotTable, annot);
-
- return ainfo;
+ return annotationTable_lookup (gc.annotTable, annot);
}
-void context_addAnnotation (annotationInfo ainfo)
+void context_addAnnotation (annotationInfo info)
{
- if (annotationTable_contains (gc.annotTable, annotationInfo_getName (ainfo)))
+ if (annotationTable_contains (gc.annotTable, annotationInfo_getName (info)))
{
voptgenerror
(FLG_SYNTAX,
- message ("Duplicate annotation declaration: %s", annotationInfo_getName (ainfo)),
- annotationInfo_getLoc (ainfo));
+ message ("Duplicate annotation declaration: %s", annotationInfo_getName (info)),
+ annotationInfo_getLoc (info));
- annotationInfo_free (ainfo);
+ annotationInfo_free (info);
}
else
{
- annotationTable_insert (gc.annotTable, ainfo);
+ annotationTable_insert (gc.annotTable, info);
}
}
}
}
-valueTable context_createValueTable (sRef s, stateInfo sinfo)
+valueTable context_createValueTable (sRef s, stateInfo info)
{
if (metaStateTable_size (gc.stateTable) > 0)
{
(res,
cstring_copy (metaStateInfo_getName (msi)),
stateValue_createImplicit (metaStateInfo_getDefaultValue (msi, s),
- stateInfo_copy (sinfo)));
+ stateInfo_copy (info)));
}
else
{
}
end_metaStateTable_elements ;
- stateInfo_free (sinfo);
+ stateInfo_free (info);
DPRINTF (("Value table: %s", valueTable_unparse (res)));
return res;
}
else
{
- stateInfo_free (sinfo);
+ stateInfo_free (info);
return valueTable_undefined;
}
}
-valueTable context_createGlobalMarkerValueTable (stateInfo sinfo)
+valueTable context_createGlobalMarkerValueTable (stateInfo info)
{
if (metaStateTable_size (gc.stateTable) > 0)
{
valueTable_insert (res,
cstring_copy (metaStateInfo_getName (msi)),
stateValue_create (metaStateInfo_getDefaultGlobalValue (msi),
- stateInfo_copy (sinfo)));
+ stateInfo_copy (info)));
}
end_metaStateTable_elements ;
- stateInfo_free (sinfo);
+ stateInfo_free (info);
DPRINTF (("Value table: %s", valueTable_unparse (res)));
return res;
}
else
{
- stateInfo_free (sinfo);
+ stateInfo_free (info);
return valueTable_undefined;
}
}
}
}
-static /*@observer@*/ stateInfo stateInfo_sort (/*@temp@*/ stateInfo sinfo)
+static /*@observer@*/ stateInfo stateInfo_sort (/*@temp@*/ stateInfo stinfo)
/* Sorts in reverse location order */
{
- DPRINTF (("Sorting: %s", stateInfo_unparse (sinfo)));
+ DPRINTF (("Sorting: %s", stateInfo_unparse (stinfo)));
- if (sinfo == NULL || sinfo->previous == NULL)
+ if (stinfo == NULL || stinfo->previous == NULL)
{
- return sinfo;
+ return stinfo;
}
else
{
- stateInfo snext = stateInfo_sort (sinfo->previous);
+ stateInfo snext = stateInfo_sort (stinfo->previous);
stateInfo sfirst = snext;
- DPRINTF (("sinfo/sext: %s // %s", stateInfo_unparse (sinfo), stateInfo_unparse (snext)));
+ DPRINTF (("stinfo/sext: %s // %s", stateInfo_unparse (stinfo), stateInfo_unparse (snext)));
llassert (snext != NULL);
- if (!fileloc_lessthan (sinfo->loc, snext->loc))
+ if (!fileloc_lessthan (stinfo->loc, snext->loc))
{
- /*@i2@*/ sinfo->previous = sfirst; /* spurious? */
- DPRINTF (("Sorted ==> %s", stateInfo_unparse (sinfo)));
- /*@i2@*/ return sinfo; /* spurious? */
+ /*@i2@*/ stinfo->previous = sfirst; /* spurious? */
+ DPRINTF (("Sorted ==> %s", stateInfo_unparse (stinfo)));
+ /*@i2@*/ return stinfo; /* spurious? */
}
else
{
- while (snext != NULL && fileloc_lessthan (sinfo->loc, snext->loc))
+ while (snext != NULL && fileloc_lessthan (stinfo->loc, snext->loc))
{
/*
** swap the order
stateAction taction = snext->action;
sRef tref = snext->ref;
- DPRINTF (("in while: sinfo/sext: %s // %s", stateInfo_unparse (sinfo), stateInfo_unparse (snext)));
+ DPRINTF (("in while: stinfo/sext: %s // %s", stateInfo_unparse (stinfo), stateInfo_unparse (snext)));
- snext->loc = sinfo->loc;
- snext->action = sinfo->action;
+ snext->loc = stinfo->loc;
+ snext->action = stinfo->action;
/*@-modobserver@*/
- snext->ref = sinfo->ref; /* Doesn't actually modifie sfirst */
+ snext->ref = stinfo->ref; /* Doesn't actually modifie sfirst */
/*@=modobserver@*/
- sinfo->loc = tloc;
- sinfo->action = taction;
- sinfo->ref = tref;
+ stinfo->loc = tloc;
+ stinfo->action = taction;
+ stinfo->ref = tref;
/*@-mustfreeonly@*/
- sinfo->previous = snext->previous;
+ stinfo->previous = snext->previous;
/*@=mustfreeonly@*/
snext = snext->previous;
- DPRINTF (("in while: sinfo/sext: %s // %s", stateInfo_unparse (sinfo), stateInfo_unparse (snext)));
+ DPRINTF (("in while: stinfo/sext: %s // %s", stateInfo_unparse (stinfo), stateInfo_unparse (snext)));
}
DPRINTF (("Sorted ==> %s", stateInfo_unparse (sfirst)));