[Avida-SVN] r2411 - branches/uml/source/main

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Sun Mar 2 10:28:31 PST 2008


Author: hjg
Date: 2008-03-02 13:28:31 -0500 (Sun, 02 Mar 2008)
New Revision: 2411

Modified:
   branches/uml/source/main/cMDEAbsenceProperty.cc
   branches/uml/source/main/cMDEExistenceProperty.cc
   branches/uml/source/main/cMDEPrecedenceProperty.cc
   branches/uml/source/main/cMDEProperty.cc
   branches/uml/source/main/cMDEPropertyGenerator.cc
   branches/uml/source/main/cMDEResponseProperty.cc
   branches/uml/source/main/cMDEUniversalProperty.cc
Log:


Modified: branches/uml/source/main/cMDEAbsenceProperty.cc
===================================================================
--- branches/uml/source/main/cMDEAbsenceProperty.cc	2008-03-02 18:08:51 UTC (rev 2410)
+++ branches/uml/source/main/cMDEAbsenceProperty.cc	2008-03-02 18:28:31 UTC (rev 2411)
@@ -85,7 +85,7 @@
 	outfile.open (file_name.c_str());
 	assert(outfile.is_open());
 	
-	outfile << "Globally, it is never the case that " << _expr_p  << " holds." << std::endl << std::endl;
+	outfile << "Globally, it is never the case that " << _expr_p  << " holds.     " << _interesting << std::endl << std::endl;
 	
 	outfile.close();
 	

Modified: branches/uml/source/main/cMDEExistenceProperty.cc
===================================================================
--- branches/uml/source/main/cMDEExistenceProperty.cc	2008-03-02 18:08:51 UTC (rev 2410)
+++ branches/uml/source/main/cMDEExistenceProperty.cc	2008-03-02 18:28:31 UTC (rev 2411)
@@ -57,7 +57,7 @@
 	outfile.open (file_name.c_str());
 	assert(outfile.is_open());
 	
-	outfile << "Globally, " << _expr_p  << " eventually holds." << std::endl<< std::endl;
+	outfile << "Globally, " << _expr_p  << " eventually holds.     " << _interesting << std::endl<< std::endl;
 	
 	outfile.close();
 	

Modified: branches/uml/source/main/cMDEPrecedenceProperty.cc
===================================================================
--- branches/uml/source/main/cMDEPrecedenceProperty.cc	2008-03-02 18:08:51 UTC (rev 2410)
+++ branches/uml/source/main/cMDEPrecedenceProperty.cc	2008-03-02 18:28:31 UTC (rev 2411)
@@ -85,7 +85,7 @@
 	assert(outfile.is_open());
 	
 	outfile << "Globally, it is always the case that if " << _expr_p  << " holds, ";
-	outfile << "then "<< _expr_q << " previously held." << std::endl << std::endl;
+	outfile << "then "<< _expr_q << " previously held.     " << _interesting << std::endl << std::endl;
 	
 	outfile.close();
 	

Modified: branches/uml/source/main/cMDEProperty.cc
===================================================================
--- branches/uml/source/main/cMDEProperty.cc	2008-03-02 18:08:51 UTC (rev 2410)
+++ branches/uml/source/main/cMDEProperty.cc	2008-03-02 18:28:31 UTC (rev 2411)
@@ -20,14 +20,12 @@
 
 float cMDEProperty::numWitnesses() {
 	
-//	std::string file_name = "tmp-witness" + _name + ".pr";
 	std::string file_name = "tmp-witness.pr";
 	std::string cmd = "cp tmp.pr "+ file_name;
 	int num_witness = 0;
 	
 	if(system(cmd.c_str())!=0) return 0.0;
 	
-//	cmd = "cat w" + _name + " >> " + file_name + " && ./spin -a " +  file_name + " &> /dev/null";
 	cmd = "cat witness-property >> " + file_name + " && ./spin -a " +  file_name + " &> /dev/null";
 	if(system(cmd.c_str())!=0) return 0.0;
 	
@@ -43,13 +41,11 @@
 
 
 float cMDEProperty::verify() { 
-//	std::string file_name = "tmp-" + _name + ".pr";
 	std::string file_name = "tmp-property.pr";
 	std::string cmd = "cp tmp.pr "+ file_name;
 	if(system(cmd.c_str())!=0) return 0.0;
 	
 	
-//	cmd = "cat " + _name + " >> " + file_name + " && ./spin -a " +  file_name + " &> /dev/null";
 	cmd = "cat property >> " + file_name + " && ./spin -a " +  file_name + " &> /dev/null";
 	if(system(cmd.c_str())!=0) return 0.0;
 	
@@ -83,12 +79,10 @@
 	// if this property passed, then save it to a file
 	if (verify_reward) { 
 		printInEnglish();
-//		cmd = "cat " + _name + " >> " + work_prop;
 		cmd = "cat english-property >> " + work_prop;
 		system(cmd.c_str());
 	}
 	
-//	_reward = wit_reward + verify_reward;
 	_reward = verify_reward;
 	
 }

Modified: branches/uml/source/main/cMDEPropertyGenerator.cc
===================================================================
--- branches/uml/source/main/cMDEPropertyGenerator.cc	2008-03-02 18:08:51 UTC (rev 2410)
+++ branches/uml/source/main/cMDEPropertyGenerator.cc	2008-03-02 18:28:31 UTC (rev 2411)
@@ -40,15 +40,14 @@
 		delete p;
 	}
 	
-	/*for( std::vector<cMDEExpression*>::iterator it = expressions.begin(),
-		 exp = expressions.end(); it != exp; )
+	for( std::vector<cMDEExpression*>::iterator it = expressions.begin();
+		 it != expressions.end(); it++ )
 	{
-		cMDEExpression* p = *it;
-		delete p;
-	}*/
-	
-	//expressions.erase(expressions.begin(), expressions.end());
-
+//		cMDEExpression *p = *it;
+//		expressions.erase(it++);
+		delete *it;
+	}
+	expressions.erase(expressions.begin(), expressions.end());
 }
 
 
@@ -66,13 +65,13 @@
 		val = (*mdepropiter)->getEvaluationInformation();
 		val += (*mdepropiter)->getInteresting();
 	} else {
+		e.setInterestingProperty(interesting);
 		e.evaluate();
 		val = e.getEvaluationInformation();
 		mdeprops.insert(new cMDEExistenceProperty(e));
 		if (val >0) {
 			m_property_success++;
 			m_existence_property_success++;
-			e.setInterestingProperty(interesting);
 		} else { 
 			m_property_failure++;
 			m_existence_property_failure++;
@@ -96,17 +95,17 @@
 		val = (*mdepropiter)->getEvaluationInformation();
 		val += (*mdepropiter)->getInteresting();
 	} else {
+		e.setInterestingProperty(interesting);
 		e.evaluate();
 		val = e.getEvaluationInformation();
 		mdeprops.insert (new cMDEAbsenceProperty(e));
 		if (val >0) {
 			m_property_success++;
 			m_absence_property_success++;
-			e.setInterestingProperty(interesting);
 		} else { 
+			e.setInterestingProperty(0);
 			m_property_failure++;
 			m_absence_property_failure++;
-			e.setInterestingProperty(0);
 		}
 	}
 	
@@ -127,13 +126,13 @@
 		val = (*mdepropiter)->getEvaluationInformation();
 		val += (*mdepropiter)->getInteresting();
 	} else {
+		e.setInterestingProperty(interesting);
 		e.evaluate();
 		val = e.getEvaluationInformation();
 		mdeprops.insert (new cMDEUniversalProperty(e));
 		if (val >0) {
 			m_property_success++;
 			m_universal_property_success++;
-			e.setInterestingProperty(interesting);
 		} else { 
 			m_property_failure++;
 			m_universal_property_failure++;
@@ -159,13 +158,13 @@
 		val = (*mdepropiter)->getEvaluationInformation();
 		val += (*mdepropiter)->getInteresting();
 	} else {
+		e.setInterestingProperty(interesting);
 		e.evaluate();
 		val = e.getEvaluationInformation();
 		mdeprops.insert (new cMDEResponseProperty(e));
 		if (val >0) {
 			m_property_success++;
 			m_response_property_success++;
-			e.setInterestingProperty(interesting);
 		} else { 
 			m_property_failure++;
 			m_response_property_failure++;
@@ -188,6 +187,7 @@
 		val = (*mdepropiter)->getEvaluationInformation();
 		val += (*mdepropiter)->getInteresting();
 	} else {
+		e.setInterestingProperty(interesting);
 		e.evaluate();
 		val = e.getEvaluationInformation();
 		
@@ -195,7 +195,6 @@
 		if (val >0) {
 			m_property_success++;
 			m_precedence_property_success++;
-			e.setInterestingProperty(interesting);
 		} else { 
 			m_property_failure++;
 			m_precedence_property_failure++;

Modified: branches/uml/source/main/cMDEResponseProperty.cc
===================================================================
--- branches/uml/source/main/cMDEResponseProperty.cc	2008-03-02 18:08:51 UTC (rev 2410)
+++ branches/uml/source/main/cMDEResponseProperty.cc	2008-03-02 18:28:31 UTC (rev 2411)
@@ -72,7 +72,7 @@
 	assert(outfile.is_open());
 	
 	outfile << "Globally, it is always the case that if " << _expr_p  << " holds, ";
-	outfile << "then "<< _expr_q << " eventually holds." << std::endl << std::endl;
+	outfile << "then "<< _expr_q << " eventually holds.     " << _interesting  << std::endl << std::endl;
 	
 	outfile.close();
 	

Modified: branches/uml/source/main/cMDEUniversalProperty.cc
===================================================================
--- branches/uml/source/main/cMDEUniversalProperty.cc	2008-03-02 18:08:51 UTC (rev 2410)
+++ branches/uml/source/main/cMDEUniversalProperty.cc	2008-03-02 18:28:31 UTC (rev 2411)
@@ -85,7 +85,7 @@
 	outfile.open (file_name.c_str());
 	assert(outfile.is_open());
 	
-	outfile << "Globally, it is always the case that " << _expr_p  << " holds." << std::endl << std::endl;
+	outfile << "Globally, it is always the case that " << _expr_p  << " holds.     " << _interesting << std::endl << std::endl;
 	
 	outfile.close();
 	




More information about the Avida-cvs mailing list