[GME-commit] GMESRC/GME/ConstraintManager OclViolation.h,1.1,1.2 OCLTypeExBasic.cpp,1.13,1.14 OCLTree.h,1.13,1.14 OCLTree.cpp,1.21,1.22 OCLGMECMFacade.cpp,1.23,1.24

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Fri May 14 11:54:21 CDT 2004


Update of /var/lib/gme/GMESRC/GME/ConstraintManager
In directory braindrain:/tmp/cvs-serv8285

Modified Files:
	OclViolation.h OCLTypeExBasic.cpp OCLTree.h OCLTree.cpp 
	OCLGMECMFacade.cpp 
Log Message:
xor, substr corrected

CVS User: bogyom

Index: OclViolation.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/ConstraintManager/OclViolation.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** OclViolation.h	30 Apr 2004 21:20:02 -0000	1.1
--- OclViolation.h	14 May 2004 15:54:19 -0000	1.2
***************
*** 10,13 ****
--- 10,14 ----
  		string						strMessage;
  		string						strSignature;
+ 		string						methodName;
  		Position					position;
  		StringVector				vecVariables;

Index: OCLTypeExBasic.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/ConstraintManager/OCLTypeExBasic.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** OCLTypeExBasic.cpp	15 Nov 2003 02:15:18 -0000	1.13
--- OCLTypeExBasic.cpp	14 May 2004 15:54:19 -0000	1.14
***************
*** 221,229 ****
  				return;
  			}
! 			if ( iTo >= strThis.length() ) {
! 				ThrowException( "Argument 'to' equals to or is greater than size of string." );
  				return;
  			}
! 			SetResult( CREATE_STRING( GetTypeManager(), strThis.substr( iFrom, iTo ) ) );
  		}
  	};
--- 221,230 ----
  				return;
  			}
! 			if ( iTo > strThis.length() ) {
! 				ThrowException( "Argument 'to' is greater than size of string." );
  				return;
  			}
! 			string res = strThis.substr( iFrom, iTo-iFrom );
! 			SetResult( CREATE_STRING( GetTypeManager(), res ) );
  		}
  	};
***************
*** 357,361 ****
  		{
  			DECL_BOOLEAN( bArg1, GetArgument( 0 ) );
! 			DECL_BOOLEAN( bArg2, GetArgument( 0 ) );
  			SetResult( CREATE_BOOLEAN( GetTypeManager(), bArg1 || bArg2 ) );
  		}
--- 358,362 ----
  		{
  			DECL_BOOLEAN( bArg1, GetArgument( 0 ) );
! 			DECL_BOOLEAN( bArg2, GetArgument( 1 ) );
  			SetResult( CREATE_BOOLEAN( GetTypeManager(), bArg1 || bArg2 ) );
  		}
***************
*** 376,380 ****
  		{
  			DECL_BOOLEAN( bArg1, GetArgument( 0 ) );
! 			DECL_BOOLEAN( bArg2, GetArgument( 0 ) );
  			SetResult( CREATE_BOOLEAN( GetTypeManager(), ! bArg1 || bArg2 ) );
  		}
--- 377,381 ----
  		{
  			DECL_BOOLEAN( bArg1, GetArgument( 0 ) );
! 			DECL_BOOLEAN( bArg2, GetArgument( 1 ) );
  			SetResult( CREATE_BOOLEAN( GetTypeManager(), ! bArg1 || bArg2 ) );
  		}
***************
*** 386,390 ****
  		{
  			DECL_BOOLEAN( bArg1, GetArgument( 0 ) );
! 			DECL_BOOLEAN( bArg2, GetArgument( 0 ) );
  			SetResult( CREATE_BOOLEAN( GetTypeManager(), bArg1 && ! bArg2 || ! bArg1 && bArg2 ) );
  		}
--- 387,391 ----
  		{
  			DECL_BOOLEAN( bArg1, GetArgument( 0 ) );
! 			DECL_BOOLEAN( bArg2, GetArgument( 1 ) );
  			SetResult( CREATE_BOOLEAN( GetTypeManager(), bArg1 && ! bArg2 || ! bArg1 && bArg2 ) );
  		}

Index: OCLTree.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/ConstraintManager/OCLTree.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** OCLTree.h	30 Apr 2004 21:08:48 -0000	1.13
--- OCLTree.h	14 May 2004 15:54:19 -0000	1.14
***************
*** 397,401 ****
  	{
  		private:
! 			static int m_iteratorLevel;
  
  		public :		string 						m_strName;
--- 397,401 ----
  	{
  		private:
! 			static int	m_stackLevel;
  
  		public :		string 						m_strName;

Index: OCLTree.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/ConstraintManager/OCLTree.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** OCLTree.cpp	30 Apr 2004 21:08:48 -0000	1.21
--- OCLTree.cpp	14 May 2004 15:54:19 -0000	1.22
***************
*** 1265,1269 ****
  //
  //##############################################################################################################################################
! 	int MethodNode::m_iteratorLevel = 0;
  
  	MethodNode::MethodNode( TreeManager* pManager )
--- 1265,1269 ----
  //
  //##############################################################################################################################################
! 	int MethodNode::m_stackLevel = 0;
  
  	MethodNode::MethodNode( TreeManager* pManager )
***************
*** 1522,1526 ****
  	OclMeta::Object MethodNode::Evaluate( ObjectContext& context )
  	{
! 		LevelCounter level(&m_iteratorLevel);
  
  		if ( m_pIterator )
--- 1522,1526 ----
  	OclMeta::Object MethodNode::Evaluate( ObjectContext& context )
  	{
! 		LevelCounter level(&m_stackLevel);
  
  		if ( m_pIterator )
***************
*** 1534,1538 ****
  		OclSignature::Method signature( m_strName, m_pThisNode->m_vecType[ 0 ], vecTypes );
  
! 		if (m_iteratorLevel >= MAX_CONSTR_FUNC_LEVEL)
  		{
  			string message = "possibly infinite loop broken";
--- 1534,1538 ----
  		OclSignature::Method signature( m_strName, m_pThisNode->m_vecType[ 0 ], vecTypes );
  
! 		if (m_stackLevel >= MAX_CONSTR_FUNC_LEVEL)
  		{
  			string message = "possibly infinite loop broken";
***************
*** 1578,1582 ****
--- 1578,1586 ----
  			int num = vec.size();
  			for (int kk=0; kk<num; kk++)
+ 			{
+ 				string signo = signature.Print();
+ 				vec[kk].methodName = signo;
  				AddViolation(context, vec[kk]);
+ 			}
  
  			return CheckFalseResult( context, spResult, iLineFeatureName, signature.Print() );

Index: OCLGMECMFacade.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/ConstraintManager/OCLGMECMFacade.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** OCLGMECMFacade.cpp	6 May 2004 19:37:39 -0000	1.23
--- OCLGMECMFacade.cpp	14 May 2004 15:54:19 -0000	1.24
***************
*** 574,577 ****
--- 574,592 ----
  	}
  
+ /*	bool Facade::GetConstraintFunctionText(string &name, string &text)
+ 	{
+ 				text = ..
+ 				for ( i = 0 ; i < m_vecUserConstraintFunctions.size() ; i++ ) 
+ 				{
+ 					if ( m_vecUserConstraintFunctions[ i ]->IsValid()  &&
+ 						 m_vecUserConstraintFunctions[ i ]->GetName() == name)
+ 						{
+ 							text = ..;
+ 							return true;
+ 						}
+ 				}
+ 				return false;
+ 	}*/
+ 
  	HRESULT Facade::EvaluateConstraints( EvaluationRecordVector& vecInputs, bool bShowProgress )
  	{



More information about the GME-commit mailing list