+constraintList constraintList_makeFixedArrayConstraints (sRefSet s)
+{
+ constraintList ret;
+ ret = constraintList_new();
+
+ sRefSet_elements (s, el)
+ {
+ llassert (el);
+ if (sRef_isFixedArray(el) )
+ {
+ int s;
+ constraint con;
+ s = sRef_getArraySize(el);
+ DPRINTF( (message("%s is a fixed array with size %d",
+ sRef_unparse(el), s) ) );
+ con = constraint_makeSRefWriteSafeInt (el, (s - 1));
+ ret = constraintList_add(ret, con);
+ }
+ else
+ {
+ DPRINTF( (message("%s is not a fixed array",
+ sRef_unparse(el)) ) );
+ }
+ }
+ end_sRefSet_elements
+
+ return ret;
+}
+
+exprNode makeDataTypeConstraints (exprNode e)
+{
+ constraintList c;
+ DPRINTF(("makeDataTypeConstraints"));
+
+ c = constraintList_makeFixedArrayConstraints (e->uses);
+
+ e->ensuresConstraints = constraintList_addList (e->ensuresConstraints, c);
+
+/* sRefSet_elements (e->uses, el) */
+/* llassert (el); */
+/* if (sRef_isFixedArray(el) ) */
+/* { */
+/* int s; */
+/* constraint con; */
+/* s = sRef_getArraySize(el); */
+/* DPRINTF( (message("%s is a fixed array with size %d", */
+/* sRef_unparse(el), s) ) ); */
+/* con = constraint_makeSRefWriteSafeInt (el, (s - 1)); */
+/* e->ensuresConstraints = constraintList_add(e->ensuresConstraints, */
+/* con); */
+/* } */
+/* else */
+/* { */
+/* DPRINTF( (message("%s is not a fixed array", */
+/* sRef_unparse(el)) ) ); */
+/* } */
+/* end_sRefSet_elements */
+
+ return e;
+}
+
+