[Avida-SVN] r2543 - in branches/uml/source: cpu main

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Mon Apr 21 13:25:28 PDT 2008


Author: hjg
Date: 2008-04-21 16:25:28 -0400 (Mon, 21 Apr 2008)
New Revision: 2543

Modified:
   branches/uml/source/cpu/cHardwareCPU.cc
   branches/uml/source/main/cTaskLib.cc
   branches/uml/source/main/cUMLStateDiagram.cc
Log:


Modified: branches/uml/source/cpu/cHardwareCPU.cc
===================================================================
--- branches/uml/source/cpu/cHardwareCPU.cc	2008-04-21 18:47:04 UTC (rev 2542)
+++ branches/uml/source/cpu/cHardwareCPU.cc	2008-04-21 20:25:28 UTC (rev 2543)
@@ -374,7 +374,7 @@
 					"Add a transition"),		
 */							
 	tInstLibEntry<tMethod>("addTransL", &cHardwareCPU::Inst_AddTransitionFromLabel, false, 
-							 "Add a transition without adding a label."),	  
+							 "Add a transition using a label."),	  
 	tInstLibEntry<tMethod>("addTransT", &cHardwareCPU::Inst_AddTransitionTotal, false, 
 					"Add a transition without adding a label."),	
 	  
@@ -403,11 +403,11 @@
 							 "Absolute move origin state"),						
 	tInstLibEntry<tMethod>("next-orig", &cHardwareCPU::Inst_NextOrigin, false, 
 							 "Next origin state"),	  
-	tInstLibEntry<tMethod>("move-rel-des", &cHardwareCPU::Inst_RelativeMoveDestination, false, 
+	tInstLibEntry<tMethod>("move-rel-dest", &cHardwareCPU::Inst_RelativeMoveDestination, false, 
 							 "Relative move destination state"),		
-	tInstLibEntry<tMethod>("move-abs-des", &cHardwareCPU::Inst_AbsoluteMoveDestination, false, 
+	tInstLibEntry<tMethod>("move-abs-dest", &cHardwareCPU::Inst_AbsoluteMoveDestination, false, 
 							 "Absolute move destination state"),						
-	tInstLibEntry<tMethod>("next-des", &cHardwareCPU::Inst_NextDestination, false, 
+	tInstLibEntry<tMethod>("next-dest", &cHardwareCPU::Inst_NextDestination, false, 
 							 "Next destination state"),	  
 	tInstLibEntry<tMethod>("move-rel-tl", &cHardwareCPU::Inst_RelativeMoveTransLabel, false, 
 							 "Relative move transition label"),		

Modified: branches/uml/source/main/cTaskLib.cc
===================================================================
--- branches/uml/source/main/cTaskLib.cc	2008-04-21 18:47:04 UTC (rev 2542)
+++ branches/uml/source/main/cTaskLib.cc	2008-04-21 20:25:28 UTC (rev 2543)
@@ -3131,10 +3131,10 @@
 
 
 // Commented out to remove overhead...	
-//	std::ostringstream strstrm;
-//	strstrm << "cp tmp.xmi "  << neverclaimFile << "." << m_world->GetStats().GetUpdate() << "." << ctx.getOrganism()->GetID();
-//	strstrm << ".xml";	
-//	if(system(strstrm.str().c_str())!=0) return 0.0;
+	std::ostringstream strstrm;
+	strstrm << "cp tmp.xmi "  << neverclaimFile << "." << m_world->GetStats().GetUpdate() << "." << ctx.getOrganism()->GetID();
+	strstrm << ".xml";	
+	if(system(strstrm.str().c_str())!=0) return 0.0;
 			
 	return 1.0;
 }

Modified: branches/uml/source/main/cUMLStateDiagram.cc
===================================================================
--- branches/uml/source/main/cUMLStateDiagram.cc	2008-04-21 18:47:04 UTC (rev 2542)
+++ branches/uml/source/main/cUMLStateDiagram.cc	2008-04-21 20:25:28 UTC (rev 2543)
@@ -387,7 +387,7 @@
 bool cUMLStateDiagram::relativeJumpOriginState(int jump_amount) 
 {	
 	bool result = true;
-	int num_vert = (int) num_vertices(sd0);
+	unsigned int num_vert = (int) num_vertices(sd0);
 	
 	if (jump_amount > 0) { 
 		orig += (jump_amount % num_vert);
@@ -405,7 +405,7 @@
 bool cUMLStateDiagram::relativeJumpDestinationState(int jump_amount) 
 {	
 	bool result = true;
-	int num_vert = (int) num_vertices(sd0);
+	unsigned int num_vert = (int) num_vertices(sd0);
 	
 	if (jump_amount > 0) { 
 		dest += (jump_amount % num_vert);
@@ -493,11 +493,11 @@
 	add_edge(orig, dest, tp, sd0);
 		
 	// Reset all the indices
-	trigger_index = 0;
-	action_index = 0;
-	guard_index = 0;
-	orig = vertex(0, sd0);
-	dest = vertex(0, sd0);
+//	trigger_index = 0;
+//	action_index = 0;
+//	guard_index = 0;
+//	orig = vertex(0, sd0);
+//	dest = vertex(0, sd0);
 		
 	return true;
 
@@ -652,8 +652,6 @@
 	boost::graph_traits<state_diagram>::edge_descriptor ed;
 
 	int s_count = 0;
-	int t_count = 0;
-
 	// This state is the initial state; thus it should be printed regardless of whether it has an incoming
 	// edge or not.
 
@@ -694,4 +692,4 @@
 					
 		
 	return;
-}
\ No newline at end of file
+}




More information about the Avida-cvs mailing list