]> andersk Git - splint.git/blobdiff - src/constraintResolve.c
Fixed problem with loop guards in loop test effects. New test case
[splint.git] / src / constraintResolve.c
index ba0e28b60aa15b0179cb728b0ca2b07fdd6d9ebe..9cbc788d2feed66d4cdd39d7e2cdf0a3987efddd 100644 (file)
@@ -1,12 +1,36 @@
+/*
+** Splint - annotation-assisted static program checker
+** Copyright (C) 1994-2002 University of Virginia,
+**         Massachusetts Institute of Technology
+**
+** This program is free software; you can redistribute it and/or modify it
+** under the terms of the GNU General Public License as published by the
+** Free Software Foundation; either version 2 of the License, or (at your
+** option) any later version.
+** 
+** This program is distributed in the hope that it will be useful, but
+** WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+** 
+** The GNU General Public License is available from http://www.gnu.org/ or
+** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+** MA 02111-1307, USA.
+**
+** For information on splint: info@splint.org
+** To report a bug: splint-bug@splint.org
+** For more information: http://www.splint.org
+*/
+
 /*
 *
 ** constraintResolve.c
 */
 
-//#define DEBUGPRINT 1
+/* #define DEBUGPRINT 1 */
 
 # include <ctype.h> /* for isdigit */
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
 # include "basic.h"
 # include "cgrammar.h"
 # include "cgrammar_tokens.h"
 # include "exprNodeSList.h"
 
 
-/*@access constraint, exprNode @*/
+/*@access constraint, exprNode @*/ /*!!! NO! Don't do this so recklessly - design your code more carefully so you don't need to! */
+
+/*@-nullderef@*/ /* !!! DRL needs to fix this code! */
+/*@-nullstate@*/ /* !!! DRL needs to fix this code! */
+/*@-nullpass@*/ /* !!! DRL needs to fix this code! */
+/*@-temptrans@*/ /* !!! DRL needs to fix this code! */
+
 
 
 static constraint  inequalitySubstitute  (/*@returned@*/ constraint p_c, constraintList p_p);
@@ -56,8 +86,6 @@ static /*@only@*/ constraintList reflectChangesEnsuresFree1 (/*@only@*/ constrai
   constraintList ret;
   constraintList temp;
 
-  //ret = constraintList_makeNew();
-
   llassert(constraintList_isDefined(list1) );
   llassert(constraintList_isDefined(list2) );
 
@@ -82,8 +110,6 @@ static /*@only@*/ constraintList reflectChangesEnsuresFree1 (/*@only@*/ constrai
   
 
   return temp;
-  //ret = constraintList_addList (ret, list2);
-  //return ret;
 }
 
 
@@ -105,6 +131,13 @@ static /*@only@*/ constraintList reflectChangesEnsuresFree1 (/*@only@*/ constrai
 
   DPRINTF((message ("constraintList_mergeRequires: merging  %s and %s ", constraintList_print (list1), constraintList_print(list2) ) ) );
 
+  if (context_getFlag (FLG_REDUNDANTCONSTRAINTS) )
+    {
+      ret = constraintList_copy(list1);
+      ret = constraintList_addList(ret, list2); 
+      return ret;
+    }
+    
   /* get constraints in list1 not satified by list2 */
   temp = constraintList_reflectChanges(list1, list2);
   DPRINTF((message ("constraintList_mergeRequires: temp = %s", constraintList_print(temp) ) ) );
@@ -126,9 +159,9 @@ void exprNode_mergeResolve (exprNode parent, exprNode child1, exprNode child2)
 {
   constraintList temp, temp2;
 
-  DPRINTF( (message ("magically merging constraint into parent:%s for", exprNode_unparse (parent) )) );
+  DPRINTF((message ("magically merging constraint into parent:%s for", exprNode_unparse (parent) )) );
 
-  DPRINTF( (message (" children:  %s and %s", exprNode_unparse (child1), exprNode_unparse(child2) ) ) );
+  DPRINTF((message (" children:  %s and %s", exprNode_unparse (child1), exprNode_unparse(child2) ) ) );
 
   if (exprNode_isError (child1)  || exprNode_isError(child2) )
     {
@@ -150,15 +183,13 @@ void exprNode_mergeResolve (exprNode parent, exprNode child1, exprNode child2)
        else
         {
           llassert(exprNode_isError(child2) );
-          //parent->requiresConstraints = constraintList_makeNew();
-          //parent->ensuresConstraints = constraintList_makeNew();
           return;
         }
      }
 
    llassert(!exprNode_isError (child1)  && ! exprNode_isError(child2) );
    
-   DPRINTF( (message ("Child constraints are %s %s and %s %s",
+   DPRINTF((message ("Child constraints are %s %s and %s %s",
                     constraintList_print (child1->requiresConstraints),
                     constraintList_print (child1->ensuresConstraints),
                     constraintList_print (child2->requiresConstraints),
@@ -181,7 +212,7 @@ void exprNode_mergeResolve (exprNode parent, exprNode child1, exprNode child2)
   
   parent->requiresConstraints = temp2;
 
-  DPRINTF( (message ("Parent requires constraints are %s  ",
+  DPRINTF((message ("Parent requires constraints are %s  ",
                     constraintList_print (parent->requiresConstraints)
                     ) ) );
 
@@ -191,7 +222,7 @@ void exprNode_mergeResolve (exprNode parent, exprNode child1, exprNode child2)
                                                           child2->ensuresConstraints);
 
   
-  DPRINTF( (message ("Parent constraints are %s and %s ",
+  DPRINTF((message ("Parent constraints are %s and %s ",
                     constraintList_print (parent->requiresConstraints),
                     constraintList_print (parent->ensuresConstraints)
                     ) ) );
@@ -217,7 +248,7 @@ void exprNode_mergeResolve (exprNode parent, exprNode child1, exprNode child2)
        }
       else
        {
-         DPRINTF ( (message ("Subsuming %s", constraint_print (el) ) ) );
+         DPRINTF ((message ("Subsuming %s", constraint_print (el) ) ) );
        }
     } end_constraintList_elements;
 
@@ -262,13 +293,11 @@ static /*@only@*/ constraintList reflectChangesNoOr (/*@observer@*/ /*@temp@*/ c
          temp = constraint_substitute (el, post1);
          if (!constraintList_resolve (temp, post1) )
            {
-             // try inequality substitution
-             //constraint temp2;
-             
-             // the inequality substitution may cause us to lose information
-             //so we don't want to store the result but we do it anyway
+             /* try inequality substitution
+                the inequality substitution may cause us to lose information
+                so we don't want to store the result but we do it anyway
+             */
              temp2 = constraint_copy (temp);
-             //                  if (context_getFlag (FLG_ORCONSTRAINT) )
              temp2 = inequalitySubstitute (temp2, post1); 
              if (!constraintList_resolve (temp2, post1) )
                {
@@ -363,61 +392,61 @@ static /*@only@*/ constraint doResolve (/*@only@*/ constraint c, constraintList
       
       if (!resolveOr (temp, post1) )
        {
-         // try inequality substitution
+         /* try inequality substitution */
          constraint temp2;
          
-             // the inequality substitution may cause us to lose information
-             //so we don't want to store the result but we do  anyway
-             temp2 = constraint_copy (c);
-             //                  if (context_getFlag (FLG_ORCONSTRAINT) )
-             temp2 = inequalitySubstitute (temp2, post1);
-             if (!resolveOr (temp2, post1) )
+         /* the inequality substitution may cause us to lose information
+            so we don't want to store the result but we do  anyway
+         */
+         temp2 = constraint_copy (c);
+         temp2 = inequalitySubstitute (temp2, post1);
+
+         if (!resolveOr (temp2, post1) )
+           {
+             constraint temp3;
+             temp3 = constraint_copy(temp2);
+             
+             temp3 = inequalitySubstituteStrong (temp3, post1);
+             if (!resolveOr (temp3, post1) )
                {
-                 constraint temp3;
-                 temp3 = constraint_copy(temp2);
-                 
-                 temp3 = inequalitySubstituteStrong (temp3, post1);
-                 if (!resolveOr (temp3, post1) )
-                   {
-                     temp2 = inequalitySubstituteUnsound (temp2, post1); 
-                     if (!resolveOr (temp2, post1) )
-                       {
-                         if (!constraint_same (temp, temp2) )
-                           temp = constraint_addOr (temp, temp2);
-
-                         if (!constraint_same (temp, temp3) && !constraint_same (temp3, temp2) )
-                           temp = constraint_addOr (temp, temp3);
-                         
-                         *resolved = FALSE;
-                         
-                         constraint_free(temp2);
-                         constraint_free(temp3);
-                         constraint_free(c);
-                         
-                         return temp;
-                       }
-                     constraint_free(temp2);
-                     constraint_free(temp3);
-                   }
-                 else
+                 temp2 = inequalitySubstituteUnsound (temp2, post1); 
+                 if (!resolveOr (temp2, post1) )
                    {
+                     if (!constraint_same (temp, temp2) )
+                       temp = constraint_addOr (temp, temp2);
+                     
+                     if (!constraint_same (temp, temp3) && !constraint_same (temp3, temp2) )
+                       temp = constraint_addOr (temp, temp3);
+                     
+                     *resolved = FALSE;
+                     
                      constraint_free(temp2);
                      constraint_free(temp3);
+                     constraint_free(c);
+                     
+                     return temp;
                    }
+                 constraint_free(temp2);
+                 constraint_free(temp3);
                }
              else
                {
                  constraint_free(temp2);
-               }                 
-
+                 constraint_free(temp3);
+               }
            }
-         constraint_free(temp);
+         else
+           {
+             constraint_free(temp2);
+           }             
+         
        }
- constraint_free(c);
- *resolved = TRUE;
- return NULL;
-
+      constraint_free(temp);
+    }
+  constraint_free(c);
+  
+  /*drl bee: pbr*/ *resolved = TRUE;
+  return NULL;
 }
 
 static /*@only@*/ constraint doResolveOr (/*@observer@*/ /*@temp@*/ constraint c, constraintList post1, /*@out@*/bool * resolved)
@@ -431,7 +460,7 @@ static /*@only@*/ constraint doResolveOr (/*@observer@*/ /*@temp@*/ constraint c
 
 
   
-  *resolved = FALSE;
+   /*drl bee: pbr*/ *resolved = FALSE;
 
 
   ret = constraint_copy(c);
@@ -465,7 +494,7 @@ static /*@only@*/ constraint doResolveOr (/*@observer@*/ /*@temp@*/ constraint c
 
       curr = doResolve (curr, post1, resolved);
       
-      if (*resolved)
+    /*drl bee: pbr*/    if (*resolved)
        {
          /* curr is null so we don't try to free it*/
          llassert(curr == NULL);
@@ -531,7 +560,7 @@ static /*@only@*/ constraintList reflectChangesEnsures (/*@observer@*/ constrain
        }
       else
        {
-         DPRINTF ( (message ("Resolved away %s ", constraint_print(el) ) ) );
+         DPRINTF ((message ("Resolved away %s ", constraint_print(el) ) ) );
        }
     } end_constraintList_elements;
 
@@ -559,15 +588,16 @@ static bool constraint_conflict (constraint c1, constraint c2)
       if (c1->ar == EQ)
        if (c1->ar == c2->ar)
          {
-           DPRINTF ( (message ("%s conflicts with %s ", constraint_print (c1), constraint_print(c2) ) ) );
+           DPRINTF ((message ("%s conflicts with %s ", constraint_print (c1), constraint_print(c2) ) ) );
            return TRUE;
          }
     }  
 
-  // This is a slight kludg to prevent circular constraints like
-  // strlen(str) == maxRead(s) + strlen(str);
+  /* This is a slight kludg to prevent circular constraints like
+     strlen(str) == maxRead(s) + strlen(str);
+  */
 
-  /*@i324234*/ //clean this up
+  /*@i324234*/ /* clean this up */
   
   if (c1->ar == EQ)
     if (c1->ar == c2->ar)
@@ -581,7 +611,7 @@ static bool constraint_conflict (constraint c1, constraint c2)
 
              if (constraintTerm_isExprNode(term) )
                {
-                 DPRINTF ( (message ("%s conflicts with %s ", constraint_print (c1), constraint_print(c2) ) ) );
+                 DPRINTF ((message ("%s conflicts with %s ", constraint_print (c1), constraint_print(c2) ) ) );
                  return TRUE;
                }
            }
@@ -589,11 +619,11 @@ static bool constraint_conflict (constraint c1, constraint c2)
 
   if (constraint_tooDeep(c1) || constraint_tooDeep(c2) )
        {
-         DPRINTF ( (message ("%s conflicts with %s (constraint is too deep", constraint_print (c1), constraint_print(c2) ) ) );
+         DPRINTF ((message ("%s conflicts with %s (constraint is too deep", constraint_print (c1), constraint_print(c2) ) ) );
          return TRUE;
        }
   
-  DPRINTF ( (message ("%s doesn't conflict with %s ", constraint_print (c1), constraint_print(c2) ) ) );
+  DPRINTF ((message ("%s doesn't conflict with %s ", constraint_print (c1), constraint_print(c2) ) ) );
 
   return FALSE; 
 
@@ -626,8 +656,11 @@ static bool conflict (constraint c, constraintList list)
 
 }
 
-//check if constraint in list1 conflicts with constraints in List2.  If so we
-//remove form list1 and change list2.
+/*
+  check if constraint in list1 conflicts with constraints in List2.  If so we
+  remove form list1 and change list2.
+*/
+
 constraintList constraintList_fixConflicts (constraintList list1, constraintList list2)
 {
   constraintList ret;
@@ -672,13 +705,13 @@ bool constraintList_resolve (/*@temp@*/ /*@observer@*/ constraint c, /*@temp@*/
     {
       if ( satifies (c, el) )
        {
-         DPRINTF ( (message ("\n%s Satifies %s\n ", constraint_print(el), constraint_print(c) ) ) );
+         DPRINTF ((message ("\n%s Satifies %s\n ", constraint_print(el), constraint_print(c) ) ) );
          return TRUE;
        }
-        DPRINTF ( (message ("\n%s does not satify %s\n ", constraint_print(el), constraint_print(c) ) ) );
+        DPRINTF ((message ("\n%s does not satify %s\n ", constraint_print(el), constraint_print(c) ) ) );
     }
   end_constraintList_elements;
-  DPRINTF ( (message ("no constraints satify %s", constraint_print(c) ) ));
+  DPRINTF ((message ("no constraints satify %s", constraint_print(c) ) ));
   return FALSE;
 }
 
@@ -688,7 +721,7 @@ static bool arithType_canResolve (arithType ar1, arithType ar2)
     {
     case GTE:
     case GT:
-      if ( (ar2 == GT) || (ar2 == GTE) || (ar2 == EQ) )
+      if ((ar2 == GT) || (ar2 == GTE) || (ar2 == EQ) )
        {
          return TRUE;
        }
@@ -701,8 +734,7 @@ static bool arithType_canResolve (arithType ar1, arithType ar2)
 
     case LT:
     case LTE:
-      //      llassert(FALSE); 
-      if ( (ar2 == LT) || (ar2 == LTE) || (ar2 == EQ) )
+      if ((ar2 == LT) || (ar2 == LTE) || (ar2 == EQ) )
        return TRUE;
       break;
     default:
@@ -711,19 +743,142 @@ static bool arithType_canResolve (arithType ar1, arithType ar2)
   return FALSE;          
 }
 
+/*checks for the case expr2 == sizeof buf1  and buf1 is a fixed array*/
+static bool  sizeofBufComp(constraintExpr buf1, constraintExpr expr2)
+{
+  constraintTerm ct;
+  exprNode e, t;
+  sRef s1, s2;
+  /*@access constraintExpr@*/
+  
+  if ((expr2->kind != term) && (buf1->kind != term) )
+    return FALSE;
+
+  
+  ct = constraintExprData_termGetTerm(expr2->data);
+
+  if (!constraintTerm_isExprNode(ct) )
+    return FALSE;
+
+  e = constraintTerm_getExprNode(ct);
+
+  if (e->kind != XPR_SIZEOF)
+    return FALSE;
+  
+  t = exprData_getSingle (e->edata);
+  s1 = exprNode_getSref (t);
+
+  s2 = constraintTerm_getsRef(constraintExprData_termGetTerm(buf1->data) );
+
+  /*@i223@*/ /*this may be the wronge thing to test for */
+  if (sRef_similarRelaxed(s1, s2)   || sRef_sameName (s1, s2) )
+    {
+      /*@i22*/ /* get rid of this test of now */
+      /* if (ctype_isFixedArray (sRef_getType (s2) ) ) */
+       return TRUE;
+    }
+  return FALSE;
+}
+
+/* look for the special case of
+   maxSet(buf) >= sizeof(buf) - 1
+*/
+
+/*@i223@*/ /*need to add some type checking */
+static bool sizeOfMaxSet( /*@observer@*/ /*@temp@*/ constraint c)
+{
+  constraintExpr l, r, buf1, buf2, con;
+
+  DPRINTF(( message("sizeOfMaxSet: checking %s ", constraint_print(c) )
+           ));
+  
+  l = c->lexpr;
+  r = c->expr;
+
+  if (!((c->ar == EQ) || (c->ar == GTE) || (c->ar == LTE) ) )
+    return FALSE;
+
+  /*check if the constraintExpr is MaxSet(buf) */
+  if (l->kind == unaryExpr)
+    {
+      if (constraintExprData_unaryExprGetOp(l->data) == MAXSET)
+       {
+         buf1 = constraintExprData_unaryExprGetExpr(l->data);
+       }
+      else
+       return FALSE;
+    }
+  else
+    return FALSE;
+
+  
+  if (r->kind != binaryexpr)
+    return FALSE;
+  
+  buf2 = constraintExprData_binaryExprGetExpr1(r->data);
+  con = constraintExprData_binaryExprGetExpr2(r->data);
+  
+  if (constraintExprData_binaryExprGetOp(r->data) == BINARYOP_MINUS)
+    {
+      if (constraintExpr_canGetValue(con) )
+       {
+         long i;
+         
+         i = constraintExpr_getValue(con);
+         if (i != 1)
+           {
+             return FALSE;
+           }
+       }
+      else
+       return FALSE;
+    }
+
+  if (constraintExprData_binaryExprGetOp(r->data) == BINARYOP_PLUS)
+    {
+      if (constraintExpr_canGetValue(con) )
+       {
+         long i;
+         
+         i = constraintExpr_getValue(con);
+         if (i != -1)
+           {
+             return FALSE;
+           }
+       }
+      else
+       return FALSE;
+    }
+
+  if (sizeofBufComp(buf1, buf2))
+    {
+      return TRUE;
+    }
+  else
+    {
+     return FALSE;
+    } 
+    
+
+}
+/*@noaccess constraintExpr@*/
+
 /* We look for constraint which are tautologies */
 
 bool constraint_isAlwaysTrue (/*@observer@*/ /*@temp@*/ constraint c)
 {
   constraintExpr l, r;
-  bool /*@unused@*/ lHasConstant, rHasConstant;
-  int /*@unused@*/ lConstant, rConstant;
+  bool rHasConstant;
+  int rConstant;
   
   l = c->lexpr;
   r = c->expr;
 
   DPRINTF(( message("constraint_IsAlwaysTrue:examining %s", constraint_print(c) ) ));
-    
+
+  if (sizeOfMaxSet(c) )
+    return TRUE;
+  
   if (constraintExpr_canGetValue(l) && constraintExpr_canGetValue(r) )
     {
       int cmp;
@@ -770,7 +925,6 @@ bool constraint_isAlwaysTrue (/*@observer@*/ /*@temp@*/ constraint c)
   l = constraintExpr_copy (c->lexpr);
   r = constraintExpr_copy (c->expr);
 
-  //  l = constraintExpr_propagateConstants (l, &lHasConstant, &lConstant);
   r = constraintExpr_propagateConstants (r, &rHasConstant, &rConstant);
 
   if (constraintExpr_similar (l,r) && (rHasConstant ) )
@@ -856,7 +1010,7 @@ static bool rangeCheck (arithType ar1, /*@observer@*/ constraintExpr expr1, arit
                                         return TRUE;
                                       }
                      }
-                 DPRINTF( ("Can't Get value"));
+                 DPRINTF(("Can't Get value"));
 
                  constraintExpr_free(e1);
                  constraintExpr_free(e2);
@@ -910,7 +1064,7 @@ static bool rangeCheck (arithType ar1, /*@observer@*/ constraintExpr expr1, arit
                   constraintExpr_free(e1);
                   constraintExpr_free(e2);
 
-                  DPRINTF( ("Can't Get value"));
+                  DPRINTF(("Can't Get value"));
                   return FALSE;
                 }
 
@@ -944,28 +1098,25 @@ bool constraint_search (constraint c, constraintExpr old) /*@*/
   return ret;
 }
 
-//adjust file locs and stuff
+/* adjust file locs and stuff */
 static constraint constraint_adjust (/*@returned@*/ constraint substitute, /*@observer@*/ constraint old)
 {
   fileloc loc1, loc2, loc3;
 
-  DPRINTF ( (message("Start adjust on %s and %s", constraint_print(substitute),
+  DPRINTF ((message("Start adjust on %s and %s", constraint_print(substitute),
                     constraint_print(old))
                   ));
 
   loc1 = constraint_getFileloc (old);
-
   loc2 = constraintExpr_getFileloc (substitute->lexpr);
-
   loc3 = constraintExpr_getFileloc (substitute->expr);
-
   
-  // special case of an equality that "contains itself"
+  /* special case of an equality that "contains itself" */
   if (constraintExpr_search (substitute->expr, substitute->lexpr) )
       if (fileloc_closer (loc1, loc3, loc2))
       {
        constraintExpr temp;
-       DPRINTF ( (message("Doing adjust on %s", constraint_print(substitute) )
+       DPRINTF ((message("Doing adjust on %s", constraint_print(substitute) )
                   ));
        temp = substitute->lexpr;
        substitute->lexpr = substitute->expr;
@@ -995,18 +1146,13 @@ constraint  inequalitySubstitute  (/*@returned@*/ constraint c, constraintList p
   
   constraintList_elements (p, el)
     {
-      if ( (el->ar == LT )  )
-        //      if (!constraint_conflict (c, el) )
+      if ((el->ar == LT )  )
+       /* if (!constraint_conflict (c, el) ) */ /*@i523 explain this! */
           {
-            //constraint temp;
             constraintExpr  temp2;
             
             /*@i22*/
 
-            //temp = constraint_copy(el);
-            
-            //      temp = constraint_adjust(temp, c);
-
             if (constraintExpr_same (el->expr, c->expr) )
               {
                 DPRINTF((message ("inequalitySubstitute Replacing %q in %q with  %q",
@@ -1052,18 +1198,13 @@ static constraint  inequalitySubstituteStrong  (/*@returned@*/ constraint c, con
     {
       DPRINTF (( message ("inequalitySubstituteStrong examining substituting %s on %s", constraint_print(el), constraint_print(c) ) ));      
 
-      if ( (el->ar == LT ) ||  (el->ar == LTE )  )
-        //      if (!constraint_conflict (c, el) )
+      if ((el->ar == LT ) ||  (el->ar == LTE )  )
+       /* if (!constraint_conflict (c, el) ) */ /*@i523@*/
           {
-            //constraint temp;
             constraintExpr  temp2;
             
             /*@i22*/
 
-            //temp = constraint_copy(el);
-            
-            //      temp = constraint_adjust(temp, c);
-
             if (constraintExpr_same (el->lexpr, c->expr) )
               {
                 DPRINTF((message ("inequalitySubstitute Replacing %s in %s with  %s",
@@ -1073,7 +1214,7 @@ static constraint  inequalitySubstituteStrong  (/*@returned@*/ constraint c, con
                          ));
                 temp2   = constraintExpr_copy (el->expr);
                 constraintExpr_free(c->expr);
-                if ( (el->ar == LTE ) )
+                if ((el->ar == LTE ) )
                   {
                     c->expr = temp2;
                   }
@@ -1109,15 +1250,11 @@ static constraint  inequalitySubstituteUnsound  (/*@returned@*/ constraint c, co
   constraintList_elements (p, el)
     {
   DPRINTF (( message ("inequalitySubstituteUnsound examining substituting %s on %s", constraint_print(el), constraint_print(c) ) ));      
-       if ( ( el->ar == LTE) || (el->ar == LT) )
-        //      if (!constraint_conflict (c, el) )
+       if (( el->ar == LTE) || (el->ar == LT) )
+        /* if (!constraint_conflict (c, el) ) */ /*@i532@*/
           {
-            // constraint temp;
             constraintExpr  temp2;
-            
-            //temp = constraint_copy(el);
-            
-            //      temp = constraint_adjust(temp, c);
+
             temp2   = constraintExpr_copy (el->expr);
             
             if (el->ar == LT)
@@ -1196,7 +1333,7 @@ return ret;
   constraintList_elements(target, el)
   { 
     constraint temp;
-    //drl possible problem : warning make sure that a side effect is not expected
+    /* drl possible problem : warning make sure that a side effect is not expected */
 
     temp = constraint_substitute(el, subList);
     ret = constraintList_add (ret, temp);
@@ -1208,9 +1345,9 @@ return ret;
 
 static constraint constraint_solve (/*@returned@*/ constraint c)
 {
-  DPRINTF( (message ("Solving %s\n", constraint_print(c) ) ) );
+  DPRINTF((message ("Solving %s\n", constraint_print(c) ) ) );
   c->expr = constraintExpr_solveBinaryExpr (c->lexpr, c->expr);
-  DPRINTF( (message ("Solved and got %s\n", constraint_print(c) ) ) );
+  DPRINTF((message ("Solved and got %s\n", constraint_print(c) ) ) );
 
   return c;
 }
This page took 0.133406 seconds and 4 git commands to generate.