[Avida-SVN] r2677 - in branches/uml-merge: Avida.xcodeproj source/actions source/cpu source/main source/orchid
hjg at myxo.css.msu.edu
hjg at myxo.css.msu.edu
Mon Jun 23 11:33:37 PDT 2008
Author: hjg
Date: 2008-06-23 14:33:37 -0400 (Mon, 23 Jun 2008)
New Revision: 2677
Modified:
branches/uml-merge/Avida.xcodeproj/project.pbxproj
branches/uml-merge/source/actions/DriverActions.cc
branches/uml-merge/source/actions/PrintActions.cc
branches/uml-merge/source/cpu/cHardwareOrchid.cc
branches/uml-merge/source/cpu/cHardwareOrchid.h
branches/uml-merge/source/main/cBirthChamber.cc
branches/uml-merge/source/main/cOrganism.cc
branches/uml-merge/source/main/cOrganism.h
branches/uml-merge/source/main/cPopulation.h
branches/uml-merge/source/main/cStats.cc
branches/uml-merge/source/main/cStats.h
branches/uml-merge/source/main/cTaskLib.cc
branches/uml-merge/source/main/cTaskLib.h
branches/uml-merge/source/orchid/cMDEAbsenceProperty.cc
branches/uml-merge/source/orchid/cMDEAbsenceProperty.h
branches/uml-merge/source/orchid/cMDECompoundExpression.h
branches/uml-merge/source/orchid/cMDEExistenceProperty.cc
branches/uml-merge/source/orchid/cMDEExistenceProperty.h
branches/uml-merge/source/orchid/cMDEExpression.h
branches/uml-merge/source/orchid/cMDEExpressionAttribute.h
branches/uml-merge/source/orchid/cMDEPrecedenceProperty.cc
branches/uml-merge/source/orchid/cMDEPrecedenceProperty.h
branches/uml-merge/source/orchid/cMDEProperty.cc
branches/uml-merge/source/orchid/cMDEProperty.h
branches/uml-merge/source/orchid/cMDEPropertyGenerator.cc
branches/uml-merge/source/orchid/cMDEPropertyGenerator.h
branches/uml-merge/source/orchid/cMDEResponseProperty.cc
branches/uml-merge/source/orchid/cMDEResponseProperty.h
branches/uml-merge/source/orchid/cMDESimpleAttAttExpression.h
branches/uml-merge/source/orchid/cMDESimpleAttValExpression.h
branches/uml-merge/source/orchid/cMDESimpleExpression.h
branches/uml-merge/source/orchid/cMDESimpleOperationExpression.h
branches/uml-merge/source/orchid/cMDEUniversalProperty.cc
branches/uml-merge/source/orchid/cMDEUniversalProperty.h
branches/uml-merge/source/orchid/cUMLClass.cc
branches/uml-merge/source/orchid/cUMLClass.h
branches/uml-merge/source/orchid/cUMLModel.cc
branches/uml-merge/source/orchid/cUMLModel.h
branches/uml-merge/source/orchid/cUMLStateDiagram.cc
branches/uml-merge/source/orchid/cUMLStateDiagram.h
Log:
refactoring for avida code standards and stats.
Modified: branches/uml-merge/Avida.xcodeproj/project.pbxproj
===================================================================
--- branches/uml-merge/Avida.xcodeproj/project.pbxproj 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/Avida.xcodeproj/project.pbxproj 2008-06-23 18:33:37 UTC (rev 2677)
@@ -424,7 +424,7 @@
424EE6380E0F0E0800E6E1C7 /* cUMLStateDiagram.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cUMLStateDiagram.cc; sourceTree = "<group>"; };
424EE6390E0F0E0800E6E1C7 /* cUMLStateDiagram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cUMLStateDiagram.h; sourceTree = "<group>"; };
424EE6550E0F0E3300E6E1C7 /* cHardwareOrchid.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cHardwareOrchid.cc; sourceTree = "<group>"; };
- 424EE6560E0F0E3300E6E1C7 /* cHardwareOrchid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cHardwareOrchid.h; sourceTree = "<group>"; };
+ 424EE6560E0F0E3300E6E1C7 /* cHardwareOrchid.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = cHardwareOrchid.h; sourceTree = "<group>"; tabWidth = 2; usesTabs = 1; };
42777E5B0C7F123600AFA4ED /* cOrgMessage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cOrgMessage.h; sourceTree = "<group>"; };
5629D80D0C3EE13500C5F152 /* cTextWindow.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cTextWindow.cc; sourceTree = "<group>"; };
5629D80E0C3EE13500C5F152 /* cTextWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cTextWindow.h; sourceTree = "<group>"; };
@@ -692,7 +692,7 @@
70B0872508F5E82D00FC65FE /* cResourceLib.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cResourceLib.cc; sourceTree = "<group>"; };
70B0872608F5E82D00FC65FE /* cSpatialCountElem.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cSpatialCountElem.cc; sourceTree = "<group>"; };
70B0872708F5E82D00FC65FE /* cSpatialResCount.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cSpatialResCount.cc; sourceTree = "<group>"; };
- 70B0872B08F5E82D00FC65FE /* cStats.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cStats.cc; sourceTree = "<group>"; };
+ 70B0872B08F5E82D00FC65FE /* cStats.cc */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = cStats.cc; sourceTree = "<group>"; tabWidth = 2; usesTabs = 1; };
70B0872D08F5E82D00FC65FE /* cTaskLib.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cTaskLib.cc; sourceTree = "<group>"; };
70B0875A08F5EC8900FC65FE /* nGeometry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = nGeometry.h; sourceTree = "<group>"; };
70B0875C08F5ECBC00FC65FE /* nReaction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = nReaction.h; sourceTree = "<group>"; };
@@ -921,7 +921,7 @@
DCC315CE076253A5008F7A48 /* environment.rotate */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = environment.rotate; sourceTree = "<group>"; };
DCC315D0076253A5008F7A48 /* task_event_gen.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = task_event_gen.cc; sourceTree = "<group>"; };
DCC315D1076253A5008F7A48 /* task_event_gen.old.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = task_event_gen.old.cc; sourceTree = "<group>"; };
- DCC3164D07626CF3008F7A48 /* avida */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = avida; sourceTree = BUILT_PRODUCTS_DIR; };
+ DCC3164D07626CF3008F7A48 /* avida */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = avida; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -1930,7 +1930,6 @@
DCC30C4D0762532C008F7A48 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 702442D70859E0B00059BD9B /* Build configuration list for PBXProject "Avida" */;
- compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 0;
mainGroup = DCC30C490762532C008F7A48;
productRefGroup = DCC3164E07626CF3008F7A48 /* Products */;
@@ -2314,6 +2313,10 @@
buildSettings = {
DEPLOYMENT_POSTPROCESSING = NO;
GCC_ENABLE_CPP_RTTI = YES;
+ HEADER_SEARCH_PATHS = (
+ /opt/local/include,
+ "$(inherited)",
+ );
PRODUCT_NAME = "avida-core";
};
name = Development;
@@ -2323,6 +2326,10 @@
buildSettings = {
DEPLOYMENT_POSTPROCESSING = NO;
GCC_ENABLE_CPP_RTTI = YES;
+ HEADER_SEARCH_PATHS = (
+ /opt/local/include,
+ "$(inherited)",
+ );
PRODUCT_NAME = "avida-core";
};
name = Deployment;
@@ -2332,6 +2339,10 @@
buildSettings = {
DEPLOYMENT_POSTPROCESSING = NO;
GCC_ENABLE_CPP_RTTI = YES;
+ HEADER_SEARCH_PATHS = (
+ /opt/local/include,
+ "$(inherited)",
+ );
PRODUCT_NAME = "avida-core";
};
name = "Deployment-G5";
@@ -2341,6 +2352,10 @@
buildSettings = {
DEPLOYMENT_POSTPROCESSING = NO;
GCC_ENABLE_CPP_RTTI = YES;
+ HEADER_SEARCH_PATHS = (
+ /opt/local/include,
+ "$(inherited)",
+ );
PRODUCT_NAME = "avida-core";
};
name = "Deployment-Universal";
@@ -2350,6 +2365,10 @@
buildSettings = {
DEPLOYMENT_POSTPROCESSING = NO;
GCC_ENABLE_CPP_RTTI = YES;
+ HEADER_SEARCH_PATHS = (
+ /opt/local/include,
+ "$(inherited)",
+ );
PRODUCT_NAME = "avida-core";
};
name = Profile;
Modified: branches/uml-merge/source/actions/DriverActions.cc
===================================================================
--- branches/uml-merge/source/actions/DriverActions.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/actions/DriverActions.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -205,7 +205,7 @@
void Process(cAvidaContext& ctx)
{
- if (m_world->GetStats().getPropTotal() > m_threshold ) {
+ if (m_world->GetStats().GetPropTotal() > m_threshold ) {
m_world->GetDriver().SetDone();
}
}
Modified: branches/uml-merge/source/actions/PrintActions.cc
===================================================================
--- branches/uml-merge/source/actions/PrintActions.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/actions/PrintActions.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -2529,7 +2529,7 @@
if(cell.IsOccupied()) {
// then need to call something on the model that determines its value...
- uml_val = cell.GetOrganism()->getUMLModel()->getUMLValue();
+ uml_val = cell.GetOrganism()->GetUMLModel()->GetUMLValue();
// uml_val = 0;
} else {
uml_val = -1;
Modified: branches/uml-merge/source/cpu/cHardwareOrchid.cc
===================================================================
--- branches/uml-merge/source/cpu/cHardwareOrchid.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/cpu/cHardwareOrchid.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -6882,7 +6882,7 @@
//organism->modelCheck(ctx);
- return organism->getStateDiagram()->addTransitionFromLabel();
+ return organism->GetStateDiagram()->AddTransitionFromLabel();
}
@@ -6892,324 +6892,322 @@
//organism->modelCheck(ctx);
- return organism->addTransitionTotal();
+ return organism->AddTransitionTotal();
}
bool cHardwareOrchid::Inst_StateDiag0(cAvidaContext& ctx)
-{ return (organism->absoluteJumpStateDiagram(0)); }
+{ return (organism->AbsoluteJumpStateDiagram(0)); }
bool cHardwareOrchid::Inst_StateDiag1(cAvidaContext& ctx)
-{ return (organism->absoluteJumpStateDiagram(1)); }
+{ return (organism->AbsoluteJumpStateDiagram(1)); }
bool cHardwareOrchid::Inst_StateDiag2(cAvidaContext& ctx)
-{ return (organism->absoluteJumpStateDiagram(2)); }
+{ return (organism->AbsoluteJumpStateDiagram(2)); }
bool cHardwareOrchid::Inst_StateDiag3(cAvidaContext& ctx)
-{ return (organism->absoluteJumpStateDiagram(3)); }
+{ return (organism->AbsoluteJumpStateDiagram(3)); }
bool cHardwareOrchid::Inst_OrigState0(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(0)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(0)); }
bool cHardwareOrchid::Inst_OrigState1(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(1)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(1)); }
bool cHardwareOrchid::Inst_OrigState2(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(2)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(2)); }
bool cHardwareOrchid::Inst_OrigState3(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(3)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(3)); }
bool cHardwareOrchid::Inst_OrigState4(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(4)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(4)); }
bool cHardwareOrchid::Inst_OrigState5(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(5)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(5)); }
bool cHardwareOrchid::Inst_OrigState6(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(6)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(6)); }
bool cHardwareOrchid::Inst_OrigState7(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(7)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(7)); }
bool cHardwareOrchid::Inst_OrigState8(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(8)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(8)); }
bool cHardwareOrchid::Inst_OrigState9(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(9)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(9)); }
bool cHardwareOrchid::Inst_OrigState10(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(10)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(10)); }
bool cHardwareOrchid::Inst_OrigState11(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(11)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(11)); }
bool cHardwareOrchid::Inst_OrigState12(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpOriginState(12)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(12)); }
bool cHardwareOrchid::Inst_DestState0(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(0)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(0)); }
bool cHardwareOrchid::Inst_DestState1(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(1)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(1)); }
bool cHardwareOrchid::Inst_DestState2(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(2)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(2)); }
bool cHardwareOrchid::Inst_DestState3(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(3)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(3)); }
bool cHardwareOrchid::Inst_DestState4(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(4)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(4)); }
bool cHardwareOrchid::Inst_DestState5(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(5)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(5)); }
bool cHardwareOrchid::Inst_DestState6(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(6)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(6)); }
bool cHardwareOrchid::Inst_DestState7(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(7)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(7)); }
bool cHardwareOrchid::Inst_DestState8(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(8)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(8)); }
bool cHardwareOrchid::Inst_DestState9(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(9)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(9)); }
bool cHardwareOrchid::Inst_DestState10(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(10)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(10)); }
bool cHardwareOrchid::Inst_DestState11(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(11)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(11)); }
bool cHardwareOrchid::Inst_DestState12(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpDestinationState(12)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(12)); }
bool cHardwareOrchid::Inst_TransLab0(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(0)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(0)); }
bool cHardwareOrchid::Inst_TransLab1(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(1)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(1)); }
bool cHardwareOrchid::Inst_TransLab2(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(2)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(2)); }
bool cHardwareOrchid::Inst_TransLab3(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(3)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(3)); }
bool cHardwareOrchid::Inst_TransLab4(cAvidaContext& ctx)
{
-return (organism->getStateDiagram()->absoluteJumpTransitionLabel(4)); }
+return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(4)); }
bool cHardwareOrchid::Inst_TransLab5(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(5)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(5)); }
bool cHardwareOrchid::Inst_TransLab6(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(6)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(6)); }
bool cHardwareOrchid::Inst_TransLab7(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(7)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(7)); }
bool cHardwareOrchid::Inst_TransLab8(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(8)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(8)); }
bool cHardwareOrchid::Inst_TransLab9(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(9)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(9)); }
bool cHardwareOrchid::Inst_TransLab10(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(10)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(10)); }
bool cHardwareOrchid::Inst_TransLab11(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(11)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(11)); }
bool cHardwareOrchid::Inst_TransLab12(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(12)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(12)); }
bool cHardwareOrchid::Inst_TransLab13(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(13)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(13)); }
bool cHardwareOrchid::Inst_TransLab14(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(14)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(14)); }
bool cHardwareOrchid::Inst_TransLab15(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(15)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(15)); }
bool cHardwareOrchid::Inst_TransLab16(cAvidaContext& ctx)
-{ return (organism->getStateDiagram()->absoluteJumpTransitionLabel(16)); }
+{ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(16)); }
-
-/*
bool cHardwareOrchid::Inst_Trigger0(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpTrigger(0)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpTrigger(0)); }
bool cHardwareOrchid::Inst_Trigger1(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpTrigger(1)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpTrigger(1)); }
bool cHardwareOrchid::Inst_Trigger2(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpTrigger(2)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpTrigger(2)); }
bool cHardwareOrchid::Inst_Trigger3(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpTrigger(3)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpTrigger(3)); }
bool cHardwareOrchid::Inst_Trigger4(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpTrigger(4)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpTrigger(4)); }
bool cHardwareOrchid::Inst_Trigger5(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpTrigger(5)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpTrigger(5)); }
bool cHardwareOrchid::Inst_Trigger6(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpTrigger(6)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpTrigger(6)); }
bool cHardwareOrchid::Inst_Trigger7(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpTrigger(7)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpTrigger(7)); }
bool cHardwareOrchid::Inst_Trigger8(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpTrigger(8)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpTrigger(8)); }
bool cHardwareOrchid::Inst_Trigger9(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpTrigger(9)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpTrigger(9)); }
bool cHardwareOrchid::Inst_Trigger10(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpTrigger(10)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpTrigger(10)); }
bool cHardwareOrchid::Inst_Trigger11(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpTrigger(11)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpTrigger(11)); }
bool cHardwareOrchid::Inst_Guard0(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpGuard(0)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpGuard(0)); }
bool cHardwareOrchid::Inst_Guard1(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpGuard(1)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpGuard(1)); }
bool cHardwareOrchid::Inst_Guard2(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpGuard(2)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpGuard(2)); }
bool cHardwareOrchid::Inst_Guard3(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpGuard(3)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpGuard(3)); }
bool cHardwareOrchid::Inst_Guard4(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpGuard(4)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpGuard(4)); }
bool cHardwareOrchid::Inst_Action0(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(0)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(0)); }
bool cHardwareOrchid::Inst_Action1(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(1)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(1)); }
bool cHardwareOrchid::Inst_Action2(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(2)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(2)); }
bool cHardwareOrchid::Inst_Action3(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(3)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(3)); }
bool cHardwareOrchid::Inst_Action4(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(4)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(4)); }
bool cHardwareOrchid::Inst_Action5(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(5)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(5)); }
bool cHardwareOrchid::Inst_Action6(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(6)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(6)); }
bool cHardwareOrchid::Inst_Action7(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(7)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(7)); }
bool cHardwareOrchid::Inst_Action8(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(8)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(8)); }
bool cHardwareOrchid::Inst_Action9(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(9)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(9)); }
bool cHardwareOrchid::Inst_Action10(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(10)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(10)); }
bool cHardwareOrchid::Inst_Action11(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(11)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(11)); }
bool cHardwareOrchid::Inst_Action12(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(12)); }
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(12)); }
bool cHardwareOrchid::Inst_Action13(cAvidaContext& ctx)
- { return (organism->getStateDiagram()->absoluteJumpAction(13)); }
- */
+ { return (organism->GetStateDiagram()->AbsoluteJumpAction(13)); }
+
bool cHardwareOrchid::Inst_RelativeMoveTrigger(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getStateDiagram()->relativeJumpTrigger(jump_amount));
+ return (organism->GetStateDiagram()->RelativeJumpTrigger(jump_amount));
}
bool cHardwareOrchid::Inst_AbsoluteMoveTrigger(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getStateDiagram()->absoluteJumpTrigger(jump_amount));
+ return (organism->GetStateDiagram()->AbsoluteJumpTrigger(jump_amount));
}
bool cHardwareOrchid::Inst_NextTrigger(cAvidaContext& ctx)
{
- return (organism->getStateDiagram()->relativeJumpTrigger(1));
+ return (organism->GetStateDiagram()->RelativeJumpTrigger(1));
}
bool cHardwareOrchid::Inst_RelativeMoveGuard(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getStateDiagram()->relativeJumpGuard(jump_amount));
+ return (organism->GetStateDiagram()->RelativeJumpGuard(jump_amount));
}
bool cHardwareOrchid::Inst_AbsoluteMoveGuard(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getStateDiagram()->absoluteJumpGuard(jump_amount));
+ return (organism->GetStateDiagram()->AbsoluteJumpGuard(jump_amount));
}
bool cHardwareOrchid::Inst_NextGuard(cAvidaContext& ctx)
{
- return (organism->getStateDiagram()->relativeJumpGuard(1));
+ return (organism->GetStateDiagram()->RelativeJumpGuard(1));
}
bool cHardwareOrchid::Inst_RelativeMoveAction(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getStateDiagram()->relativeJumpAction(jump_amount));
+ return (organism->GetStateDiagram()->RelativeJumpAction(jump_amount));
}
bool cHardwareOrchid::Inst_AbsoluteMoveAction(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getStateDiagram()->absoluteJumpAction(jump_amount));
+ return (organism->GetStateDiagram()->AbsoluteJumpAction(jump_amount));
}
bool cHardwareOrchid::Inst_NextAction(cAvidaContext& ctx)
{
- return (organism->getStateDiagram()->relativeJumpAction(1));
+ return (organism->GetStateDiagram()->RelativeJumpAction(1));
}
bool cHardwareOrchid::Inst_RelativeMoveOrigin(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getStateDiagram()->relativeJumpOriginState(jump_amount));
+ return (organism->GetStateDiagram()->RelativeJumpOriginState(jump_amount));
}
bool cHardwareOrchid::Inst_AbsoluteMoveOrigin(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getStateDiagram()->absoluteJumpOriginState(jump_amount));
+ return (organism->GetStateDiagram()->AbsoluteJumpOriginState(jump_amount));
}
bool cHardwareOrchid::Inst_NextOrigin(cAvidaContext& ctx)
{
- return (organism->getStateDiagram()->relativeJumpOriginState(1));
+ return (organism->GetStateDiagram()->RelativeJumpOriginState(1));
}
@@ -7217,38 +7215,38 @@
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getStateDiagram()->relativeJumpDestinationState(jump_amount));
+ return (organism->GetStateDiagram()->RelativeJumpDestinationState(jump_amount));
}
bool cHardwareOrchid::Inst_AbsoluteMoveDestination(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getStateDiagram()->absoluteJumpDestinationState(jump_amount));
+ return (organism->GetStateDiagram()->AbsoluteJumpDestinationState(jump_amount));
}
bool cHardwareOrchid::Inst_NextDestination(cAvidaContext& ctx)
{
- return (organism->getStateDiagram()->relativeJumpDestinationState(1));
+ return (organism->GetStateDiagram()->RelativeJumpDestinationState(1));
}
bool cHardwareOrchid::Inst_RelativeMoveTransLabel(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getStateDiagram()->relativeJumpTransitionLabel(jump_amount));
+ return (organism->GetStateDiagram()->RelativeJumpTransitionLabel(jump_amount));
}
bool cHardwareOrchid::Inst_AbsoluteMoveTransLabel(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getStateDiagram()->absoluteJumpTransitionLabel(jump_amount));
+ return (organism->GetStateDiagram()->AbsoluteJumpTransitionLabel(jump_amount));
}
bool cHardwareOrchid::Inst_NextTransLabel(cAvidaContext& ctx)
{
- return (organism->getStateDiagram()->relativeJumpTransitionLabel(1));
+ return (organism->GetStateDiagram()->RelativeJumpTransitionLabel(1));
}
bool cHardwareOrchid::Inst_AbsenceProperty(cAvidaContext& ctx)
@@ -7256,11 +7254,11 @@
float val = 0;
// Call a function on the model to create this property.
// Currently it just uses p
- cMDEPropertyGenerator* pg = organism->getUMLModel()->getPropertyGenerator();
- cMDEPropertyGenerator* pop_pg = m_world->GetPopulation().getUMLModel()->getPropertyGenerator();
+ cMDEPropertyGenerator* pg = organism->GetUMLModel()->GetPropertyGenerator();
+ cMDEPropertyGenerator* pop_pg = m_world->GetPopulation().GetUMLModel()->GetPropertyGenerator();
- val = pop_pg->addAbsenceProperty(pg->getP());
- pg->addPropertyReward(val);
+ val = pop_pg->AddAbsenceProperty(pg->GetP());
+ pg->AddPropertyReward(val);
if (val) m_world->GetStats().newProperty();
@@ -7272,12 +7270,12 @@
float val = 0;
// Call a function on the model to create this property.
// Currently it just uses p
- cMDEPropertyGenerator* pg = organism->getUMLModel()->getPropertyGenerator();
- cMDEPropertyGenerator* pop_pg = m_world->GetPopulation().getUMLModel()->getPropertyGenerator();
+ cMDEPropertyGenerator* pg = organism->GetUMLModel()->GetPropertyGenerator();
+ cMDEPropertyGenerator* pop_pg = m_world->GetPopulation().GetUMLModel()->GetPropertyGenerator();
- val = pop_pg->addUniversalProperty(pg->getP());
- pg->addPropertyReward(val);
+ val = pop_pg->AddUniversalProperty(pg->GetP());
+ pg->AddPropertyReward(val);
if (val) m_world->GetStats().newProperty();
@@ -7289,12 +7287,12 @@
float val = 0;
// Call a function on the model to create this property.
// Currently it just uses p
- cMDEPropertyGenerator* pg = organism->getUMLModel()->getPropertyGenerator();
- cMDEPropertyGenerator* pop_pg = m_world->GetPopulation().getUMLModel()->getPropertyGenerator();
+ cMDEPropertyGenerator* pg = organism->GetUMLModel()->GetPropertyGenerator();
+ cMDEPropertyGenerator* pop_pg = m_world->GetPopulation().GetUMLModel()->GetPropertyGenerator();
- val = pop_pg->addExistenceProperty(pg->getP());
- pg->addPropertyReward(val);
+ val = pop_pg->AddExistenceProperty(pg->GetP());
+ pg->AddPropertyReward(val);
if (val) m_world->GetStats().newProperty();
@@ -7304,12 +7302,12 @@
bool cHardwareOrchid::Inst_PrecedenceProperty(cAvidaContext& ctx)
{
float val = 0;
- cMDEPropertyGenerator* pg = organism->getUMLModel()->getPropertyGenerator();
- cMDEPropertyGenerator* pop_pg = m_world->GetPopulation().getUMLModel()->getPropertyGenerator();
+ cMDEPropertyGenerator* pg = organism->GetUMLModel()->GetPropertyGenerator();
+ cMDEPropertyGenerator* pop_pg = m_world->GetPopulation().GetUMLModel()->GetPropertyGenerator();
- val = pop_pg->addPrecedenceProperty(pg->getP(), pg->getQ());
- pg->addPropertyReward(val);
+ val = pop_pg->AddPrecedenceProperty(pg->GetP(), pg->GetQ());
+ pg->AddPropertyReward(val);
if (val) m_world->GetStats().newProperty();
return val;
@@ -7318,11 +7316,11 @@
bool cHardwareOrchid::Inst_ResponseProperty(cAvidaContext& ctx)
{
float val = 0;
- cMDEPropertyGenerator* pg = organism->getUMLModel()->getPropertyGenerator();
- cMDEPropertyGenerator* pop_pg = m_world->GetPopulation().getUMLModel()->getPropertyGenerator();
+ cMDEPropertyGenerator* pg = organism->GetUMLModel()->GetPropertyGenerator();
+ cMDEPropertyGenerator* pop_pg = m_world->GetPopulation().GetUMLModel()->GetPropertyGenerator();
- val = pop_pg->addResponseProperty(pg->getP(), pg->getQ());
- pg->addPropertyReward(val);
+ val = pop_pg->AddResponseProperty(pg->GetP(), pg->GetQ());
+ pg->AddPropertyReward(val);
if (val) m_world->GetStats().newProperty();
return val;
@@ -7332,96 +7330,96 @@
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getUMLModel()->getPropertyGenerator()->relativeMoveExpressionP(jump_amount));
+ return (organism->GetUMLModel()->GetPropertyGenerator()->RelativeMoveExpressionP(jump_amount));
}
bool cHardwareOrchid::Inst_NextExpressionP(cAvidaContext& ctx)
{
- return (organism->getUMLModel()->getPropertyGenerator()->relativeMoveExpressionP(1));
+ return (organism->GetUMLModel()->GetPropertyGenerator()->RelativeMoveExpressionP(1));
}
bool cHardwareOrchid::Inst_PrevExpressionP(cAvidaContext& ctx)
{
- return (organism->getUMLModel()->getPropertyGenerator()->relativeMoveExpressionP(-1));
+ return (organism->GetUMLModel()->GetPropertyGenerator()->RelativeMoveExpressionP(-1));
}
bool cHardwareOrchid::Inst_AbsoluteMoveExpressionP(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getUMLModel()->getPropertyGenerator()->absoluteMoveExpressionP(jump_amount));
+ return (organism->GetUMLModel()->GetPropertyGenerator()->AbsoluteMoveExpressionP(jump_amount));
}
bool cHardwareOrchid::Inst_RelativeMoveExpressionQ(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getUMLModel()->getPropertyGenerator()->relativeMoveExpressionQ(jump_amount));
+ return (organism->GetUMLModel()->GetPropertyGenerator()->RelativeMoveExpressionQ(jump_amount));
}
bool cHardwareOrchid::Inst_NextExpressionQ(cAvidaContext& ctx)
{
- return (organism->getUMLModel()->getPropertyGenerator()->relativeMoveExpressionQ(1));
+ return (organism->GetUMLModel()->GetPropertyGenerator()->RelativeMoveExpressionQ(1));
}
bool cHardwareOrchid::Inst_PrevExpressionQ(cAvidaContext& ctx)
{
- return (organism->getUMLModel()->getPropertyGenerator()->relativeMoveExpressionQ(-1));
+ return (organism->GetUMLModel()->GetPropertyGenerator()->RelativeMoveExpressionQ(-1));
}
bool cHardwareOrchid::Inst_AbsoluteMoveExpressionQ(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getUMLModel()->getPropertyGenerator()->absoluteMoveExpressionQ(jump_amount));
+ return (organism->GetUMLModel()->GetPropertyGenerator()->AbsoluteMoveExpressionQ(jump_amount));
}
bool cHardwareOrchid::Inst_RelativeMoveExpressionR(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getUMLModel()->getPropertyGenerator()->relativeMoveExpressionR(jump_amount));
+ return (organism->GetUMLModel()->GetPropertyGenerator()->RelativeMoveExpressionR(jump_amount));
}
bool cHardwareOrchid::Inst_NextExpressionR(cAvidaContext& ctx)
{
- return (organism->getUMLModel()->getPropertyGenerator()->relativeMoveExpressionR(1));
+ return (organism->GetUMLModel()->GetPropertyGenerator()->RelativeMoveExpressionR(1));
}
bool cHardwareOrchid::Inst_PrevExpressionR(cAvidaContext& ctx)
{
- return (organism->getUMLModel()->getPropertyGenerator()->relativeMoveExpressionR(-1));
+ return (organism->GetUMLModel()->GetPropertyGenerator()->RelativeMoveExpressionR(-1));
}
bool cHardwareOrchid::Inst_AbsoluteMoveExpressionR(cAvidaContext& ctx)
{
ReadLabel();
int jump_amount = GetLabel().AsInt(NUM_NOPS);
- return (organism->getUMLModel()->getPropertyGenerator()->absoluteMoveExpressionR(jump_amount));
+ return (organism->GetUMLModel()->GetPropertyGenerator()->AbsoluteMoveExpressionR(jump_amount));
}
bool cHardwareOrchid::Inst_ANDExpressions(cAvidaContext& ctx)
{
- bool val = organism->getUMLModel()->getPropertyGenerator()->ANDExpressions();
+ bool val = organism->GetUMLModel()->GetPropertyGenerator()->ANDExpressions();
if (val) m_world->GetStats().newProposition();
return val;
}
bool cHardwareOrchid::Inst_ORExpressions(cAvidaContext& ctx)
{
- bool val = organism->getUMLModel()->getPropertyGenerator()->ORExpressions();
+ bool val = organism->GetUMLModel()->GetPropertyGenerator()->ORExpressions();
if (val) m_world->GetStats().newProposition();
return val;
}
bool cHardwareOrchid::Inst_StartLoop(cAvidaContext& ctx)
{
- organism->getStateDiagram()->startLooping();
+ organism->GetStateDiagram()->StartLooping();
return true;
}
bool cHardwareOrchid::Inst_EndLoop(cAvidaContext& ctx)
{
- organism->getStateDiagram()->endLooping();
+ organism->GetStateDiagram()->EndLooping();
return true;
}
Modified: branches/uml-merge/source/cpu/cHardwareOrchid.h
===================================================================
--- branches/uml-merge/source/cpu/cHardwareOrchid.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/cpu/cHardwareOrchid.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -657,16 +657,8 @@
// -------- Orchid instructions --------
//// UML Element Construction ////
- // bool Inst_AddState(cAvidaContext& ctx);
- // bool Inst_Next(cAvidaContext& ctx);
- // bool Inst_Prev(cAvidaContext& ctx);
- // bool Inst_JumpIndex(cAvidaContext& ctx);
- // bool Inst_JumpDist(cAvidaContext& ctx);
- // bool Inst_AddTransitionLabel(cAvidaContext& ctx);
bool Inst_AddTransitionFromLabel(cAvidaContext& ctx);
bool Inst_AddTransitionTotal(cAvidaContext& ctx);
- // bool Inst_Last(cAvidaContext& ctx);
- // bool Inst_First(cAvidaContext& ctx);
bool Inst_StateDiag0(cAvidaContext& ctx);
bool Inst_StateDiag1(cAvidaContext& ctx);
@@ -745,42 +737,42 @@
bool Inst_TransLab14(cAvidaContext& ctx);
bool Inst_TransLab15(cAvidaContext& ctx);
bool Inst_TransLab16(cAvidaContext& ctx);
- /*
- bool Inst_Trigger0(cAvidaContext& ctx);
- bool Inst_Trigger1(cAvidaContext& ctx);
- bool Inst_Trigger2(cAvidaContext& ctx);
- bool Inst_Trigger3(cAvidaContext& ctx);
- bool Inst_Trigger4(cAvidaContext& ctx);
- bool Inst_Trigger5(cAvidaContext& ctx);
- bool Inst_Trigger6(cAvidaContext& ctx);
- bool Inst_Trigger7(cAvidaContext& ctx);
- bool Inst_Trigger8(cAvidaContext& ctx);
- bool Inst_Trigger9(cAvidaContext& ctx);
- bool Inst_Trigger10(cAvidaContext& ctx);
- bool Inst_Trigger11(cAvidaContext& ctx);
+
+ bool Inst_Trigger0(cAvidaContext& ctx);
+ bool Inst_Trigger1(cAvidaContext& ctx);
+ bool Inst_Trigger2(cAvidaContext& ctx);
+ bool Inst_Trigger3(cAvidaContext& ctx);
+ bool Inst_Trigger4(cAvidaContext& ctx);
+ bool Inst_Trigger5(cAvidaContext& ctx);
+ bool Inst_Trigger6(cAvidaContext& ctx);
+ bool Inst_Trigger7(cAvidaContext& ctx);
+ bool Inst_Trigger8(cAvidaContext& ctx);
+ bool Inst_Trigger9(cAvidaContext& ctx);
+ bool Inst_Trigger10(cAvidaContext& ctx);
+ bool Inst_Trigger11(cAvidaContext& ctx);
+
+ bool Inst_Guard0(cAvidaContext& ctx);
+ bool Inst_Guard1(cAvidaContext& ctx);
+ bool Inst_Guard2(cAvidaContext& ctx);
+ bool Inst_Guard3(cAvidaContext& ctx);
+ bool Inst_Guard4(cAvidaContext& ctx);
+
+
+ bool Inst_Action0(cAvidaContext& ctx);
+ bool Inst_Action1(cAvidaContext& ctx);
+ bool Inst_Action2(cAvidaContext& ctx);
+ bool Inst_Action3(cAvidaContext& ctx);
+ bool Inst_Action4(cAvidaContext& ctx);
+ bool Inst_Action5(cAvidaContext& ctx);
+ bool Inst_Action6(cAvidaContext& ctx);
+ bool Inst_Action7(cAvidaContext& ctx);
+ bool Inst_Action8(cAvidaContext& ctx);
+ bool Inst_Action9(cAvidaContext& ctx);
+ bool Inst_Action10(cAvidaContext& ctx);
+ bool Inst_Action11(cAvidaContext& ctx);
+ bool Inst_Action12(cAvidaContext& ctx);
+ bool Inst_Action13(cAvidaContext& ctx);
- bool Inst_Guard0(cAvidaContext& ctx);
- bool Inst_Guard1(cAvidaContext& ctx);
- bool Inst_Guard2(cAvidaContext& ctx);
- bool Inst_Guard3(cAvidaContext& ctx);
- bool Inst_Guard4(cAvidaContext& ctx);
-
-
- bool Inst_Action0(cAvidaContext& ctx);
- bool Inst_Action1(cAvidaContext& ctx);
- bool Inst_Action2(cAvidaContext& ctx);
- bool Inst_Action3(cAvidaContext& ctx);
- bool Inst_Action4(cAvidaContext& ctx);
- bool Inst_Action5(cAvidaContext& ctx);
- bool Inst_Action6(cAvidaContext& ctx);
- bool Inst_Action7(cAvidaContext& ctx);
- bool Inst_Action8(cAvidaContext& ctx);
- bool Inst_Action9(cAvidaContext& ctx);
- bool Inst_Action10(cAvidaContext& ctx);
- bool Inst_Action11(cAvidaContext& ctx);
- bool Inst_Action12(cAvidaContext& ctx);
- bool Inst_Action13(cAvidaContext& ctx);
- */
// UML instructions used to construct properties
bool Inst_AbsenceProperty(cAvidaContext& ctx);
@@ -806,7 +798,6 @@
bool Inst_AbsoluteMoveExpressionR(cAvidaContext& ctx);
bool Inst_StartLoop(cAvidaContext& ctx);
bool Inst_EndLoop(cAvidaContext& ctx);
- // bool
};
Modified: branches/uml-merge/source/main/cBirthChamber.cc
===================================================================
--- branches/uml-merge/source/main/cBirthChamber.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/main/cBirthChamber.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -181,10 +181,10 @@
child_genotype->IncDeferAdjust();
- // FOR UML branch - hjg
- child_array[0]->setParentXMI(parent.getUMLModel()->getXMI());
- child_array[0]->setParentBonus(parent.getParentBonus());
- child_array[0]->setParentScenarioCompletion(parent.getUMLModel()->getScenarioCompletion());
+ // For orchid -- provides the offspring with information about its parent's model.
+ child_array[0]->SetParentXMI(parent.GetUMLModel()->GetXMI());
+ child_array[0]->SetParentBonus(parent.GetParentBonus());
+ child_array[0]->SetParentScenarioCompletion(parent.GetUMLModel()->GetScenarioCompletion());
return true;
}
Modified: branches/uml-merge/source/main/cOrganism.cc
===================================================================
--- branches/uml-merge/source/main/cOrganism.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/main/cOrganism.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -697,88 +697,44 @@
}
-/// UML Functions ///
+//-------- Orchid functions --------
/// This function is a copy of DoOutput ///
-void cOrganism::modelCheck(cAvidaContext& ctx)
+void cOrganism::ModelCheck(cAvidaContext& ctx)
{
if(GetCellID()==-1) return;
- if (m_model.getGenMode() == 0) {
- m_model.printXMI();
+ if (m_model.GetGenMode() == 0) {
+ m_model.PrintXMI();
// Update the value of max trans
- if (m_model.numTrans() > m_model.getMaxTrans()) {
- m_model.setMaxTrans(m_model.numTrans());
+ if (m_model.NumTrans() > m_model.GetMaxTrans()) {
+ m_model.SetMaxTrans(m_model.NumTrans());
}
}
DoOutput(ctx, true);
- // Refactor:
- // m_world->GetStats().PostModelCheck(m_world->GetPopulation().GetUMLModel());
- // Put all logic for each of the below stats-tracking in one method (e.g., PostModelChecking)
- // in the cStats object. Ditto for above - consider "PreModelCheck."
- // See cPopulation::ReplaceDeme for example.
+ cUMLModel* org_model = GetUMLModel();
+ cUMLModel* pop_model = m_world->GetPopulation().GetUMLModel();
+ m_world->GetStats().OrchidStatsPostTaskCheck(org_model, pop_model);
+ m_model.GetPropertyGenerator()->ResetPropertyReward();
- m_world->GetStats().addState(m_model.numStates());
- m_world->GetStats().addTrans(m_model.numTrans());
- m_world->GetStats().addTriggers(m_model.numTriggers());
- m_world->GetStats().addGuards(m_model.numGuards());
- m_world->GetStats().addActions(m_model.numActions());
- m_world->GetStats().addStateDiagrams(m_model.numSDs());
-
- if ((m_model.getBonusInfo("spinn1") > 0) &&
- (m_model.getBonusInfo("spinn2") > 0)) {
- m_world->GetStats().N1andN2Passed();
- }
-
- cUMLModel* pop_model = m_world->GetPopulation().getUMLModel();
- m_world->GetStats().propSuccess(pop_model->getPropertyGenerator()->numSuccess());
- m_world->GetStats().propFailure(pop_model->getPropertyGenerator()->numFailure());
- m_world->GetStats().propTotal(pop_model->getPropertyGenerator()->numTotalProperty());
- m_world->GetStats().absPropSuccess(pop_model->getPropertyGenerator()->numAbsencePropertySuccess());
- m_world->GetStats().absPropFailure(pop_model->getPropertyGenerator()->numAbsencePropertyFailure());
- m_world->GetStats().absPropTotal(pop_model->getPropertyGenerator()->numAbsencePropertyTotal());
- m_world->GetStats().uniPropSuccess(pop_model->getPropertyGenerator()->numUniversalPropertySuccess());
- m_world->GetStats().uniPropFailure(pop_model->getPropertyGenerator()->numUniversalPropertyFailure());
- m_world->GetStats().uniPropTotal(pop_model->getPropertyGenerator()->numUniversalPropertyTotal());
- m_world->GetStats().existPropSuccess(pop_model->getPropertyGenerator()->numExistencePropertySuccess());
- m_world->GetStats().existPropFailure(pop_model->getPropertyGenerator()->numExistencePropertyFailure());
- m_world->GetStats().existPropTotal(pop_model->getPropertyGenerator()->numExistencePropertyTotal());
- m_world->GetStats().precPropSuccess(pop_model->getPropertyGenerator()->numPrecedencePropertySuccess());
- m_world->GetStats().precPropFailure(pop_model->getPropertyGenerator()->numPrecedencePropertyFailure());
- m_world->GetStats().precPropTotal(pop_model->getPropertyGenerator()->numPrecedencePropertyTotal());
- m_world->GetStats().respPropSuccess(pop_model->getPropertyGenerator()->numResponsePropertySuccess());
- m_world->GetStats().respPropFailure(pop_model->getPropertyGenerator()->numResponsePropertyFailure());
- m_world->GetStats().respPropTotal(pop_model->getPropertyGenerator()->numResponsePropertyTotal());
- m_world->GetStats().suppressedTotal(pop_model->getPropertyGenerator()->numSuppressed());
-// int x = pop_model->propertySize();
-// int y = pop_model->numTotalProperty();
-
-
- m_model.getPropertyGenerator()->resetPropertyReward();
-
-
-
-// m_world->GetStats().addTransLabel(transition_labels.size());
-
-
}
-cUMLModel* cOrganism::getUMLModel()
+cUMLModel* cOrganism::GetUMLModel()
{
return &m_model;
}
-bool cOrganism::absoluteJumpStateDiagram (int amount )
+bool cOrganism::AbsoluteJumpStateDiagram (int amount )
{
m_state_diag = 0;
- return relativeJumpStateDiagram(amount);
+ return RelativeJumpStateDiagram(amount);
}
-bool cOrganism::relativeJumpStateDiagram (int amount )
+bool cOrganism::RelativeJumpStateDiagram (int amount )
{
- int size = getUMLModel()->getStateDiagramSize();
+ int size = GetUMLModel()->GetStateDiagramSize();
if (size == 0) {
return false;
@@ -798,118 +754,40 @@
return true;
}
-cUMLStateDiagram* cOrganism::getStateDiagram()
+cUMLStateDiagram* cOrganism::GetStateDiagram()
{
- return m_model.getStateDiagram(m_state_diag);
+ return m_model.GetStateDiagram(m_state_diag);
}
-// Determines if this is the transition the organism is about to add
-/*bool cOrganism::currTrans (int sd, int orig, int dest, int tr, int gu, int act)
-{
- // check if it is manipulating this diagram
- if (sd != m_state_diag) return false;
-
- cUMLStateDiagram* s = getUMLModel()->getStateDiagram(m_state_diag);
- s->absoluteJumpOriginState(m_orig_state_index);
- s->absoluteJumpDestinationState(m_dest_state_index);
- s->absoluteJumpTrigger(m_trigger_index);
- s->absoluteJumpGuard(m_guard_index);
- s->absoluteJumpAction(m_action_index);
-
- return (s->currTrans(orig, dest, tr, gu, act));
-}
-*/
-/*
-bool cOrganism::absoluteJumpGuard(int amount)
+bool cOrganism::AbsoluteJumpOriginState(int amount)
{
- m_guard_index = 0;
- return (relativeJumpGuard(amount));
-}
-
-bool cOrganism::absoluteJumpAction(int amount)
-{
- m_action_index = 0;
- return (relativeJumpAction(amount));
-
-}
-
-bool cOrganism::absoluteJumpTrigger(int amount)
-{
- m_trigger_index = 0;
- return (relativeJumpTrigger(amount));
-}
-
-bool cOrganism::absoluteJumpTransitionLabel(int amount)
-{
- m_trans_label_index =0;
- return (relativeJumpTransitionLabel(amount));
-}
-*/
-
-bool cOrganism::absoluteJumpOriginState(int amount)
-{
m_orig_state_index = 0;
- return (relativeJumpOriginState(amount));
+ return (RelativeJumpOriginState(amount));
}
-bool cOrganism::absoluteJumpDestinationState(int amount)
+bool cOrganism::AbsoluteJumpDestinationState(int amount)
{
m_dest_state_index = 0;
- return (relativeJumpDestinationState(amount));
+ return (RelativeJumpDestinationState(amount));
}
-bool cOrganism::addTransitionTotal()
+bool cOrganism::AddTransitionTotal()
{
bool val;
-// val = getStateDiagram()->addTransitionTotal(m_orig_state_index, m_dest_state_index, m_trigger_index, m_guard_index, m_action_index);
- val = getStateDiagram()->addTransitionTotal();
-
+ val = GetStateDiagram()->AddTransitionTotal();
-/* if (val) {
- m_orig_state_index = 0;
- m_dest_state_index = 0;
- m_trigger_index = 0;
- m_action_index = 0;
- m_guard_index = 0;
- } */
-
return val;
}
-/*
-bool cOrganism::relativeJumpGuard(int amount)
+bool cOrganism::RelativeJumpOriginState(int amount)
{
- m_guard_index += amount;
- return true;
-}
-
-bool cOrganism::relativeJumpAction(int amount)
-{
- m_action_index += amount;
- return true;
-}
-
-bool cOrganism::relativeJumpTrigger(int amount)
-{
- m_trigger_index += amount;
- return true;
-}
-
-bool cOrganism::relativeJumpTransitionLabel(int amount)
-{
- m_trans_label_index += amount;
- return true;
-}
-*/
-bool cOrganism::relativeJumpOriginState(int amount)
-{
m_orig_state_index += amount;
return true;
}
-bool cOrganism::relativeJumpDestinationState(int amount)
+bool cOrganism::RelativeJumpDestinationState(int amount)
{
m_dest_state_index += amount;
return true;
Modified: branches/uml-merge/source/main/cOrganism.h
===================================================================
--- branches/uml-merge/source/main/cOrganism.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/main/cOrganism.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -149,15 +149,11 @@
};
cNetSupport* m_net;
- // UML
+//-------- Orchid variables --------
int m_state_diag; // Index of the state diagram that the organism is currently
// manipulating
int m_orig_state_index;
int m_dest_state_index;
-/* int m_trans_label_index;
- int m_trigger_index;
- int m_guard_index;
- int m_action_index;*/
cUMLModel m_model;
std::string m_parent_xmi;
std::map<std::string, float> m_parent_bonus;
@@ -415,50 +411,30 @@
- // UML
- void modelCheck(cAvidaContext& ctx);
- cUMLModel* getUMLModel();
-// cUMLModel* getParentUMLModel() { return m_parent_model; }
- std::string getParentXMI() { return m_parent_xmi; }
- int getStateDiagramIndex() { return m_state_diag; }
-// bool lastStateDiagram () { m_state_diag = getUMLModel()->getStateDiagramSize(); }
-// bool firstStateDiagram() { m_state_diag = 0; }
- bool currTrans (int, int, int, int, int, int);
- cUMLStateDiagram* getStateDiagram();
-// void printStats();
-// void setParentModel(cUMLModel* m) { m_parent_model = m; }
- void setParentXMI(std::string s) { m_parent_xmi = s; }
- void setParentBonus (std::map<std::string, float> v) { m_parent_bonus = v; }
- float getParentBonus (std::string s) { return m_parent_bonus[s]; }
- std::map<std::string, float> getParentBonus() { return m_parent_bonus; }
- std::vector<double> getParentScenarioCompletion() { return m_parent_scenario_completion; }
- void setParentScenarioCompletion (std::vector<double> s) { m_parent_scenario_completion = s; }
+//-------- Orchid functions --------
+ void ModelCheck(cAvidaContext& ctx);
+ cUMLModel* GetUMLModel();
+ std::string GetParentXMI() { return m_parent_xmi; }
+ int GetStateDiagramIndex() { return m_state_diag; }
+ bool CurrTrans (int, int, int, int, int, int);
+ cUMLStateDiagram* GetStateDiagram();
+ void SetParentXMI(std::string s) { m_parent_xmi = s; }
+ void SetParentBonus (std::map<std::string, float> v) { m_parent_bonus = v; }
+ float GetParentBonus (std::string s) { return m_parent_bonus[s]; }
+ std::map<std::string, float> GetParentBonus() { return m_parent_bonus; }
+ std::vector<double> GetParentScenarioCompletion() { return m_parent_scenario_completion; }
+ void SetParentScenarioCompletion (std::vector<double> s) { m_parent_scenario_completion = s; }
// The jump functions jump the index of the various vectors either forward (+ int) or backwards (- int)
-/*
- bool absoluteJumpGuard(int);
- bool absoluteJumpAction(int);
- bool absoluteJumpTrigger(int);
- bool absoluteJumpTransitionLabel(int);
-*/
- bool absoluteJumpOriginState(int);
+ bool AbsoluteJumpOriginState(int);
+ bool AbsoluteJumpDestinationState(int);
+ bool AbsoluteJumpStateDiagram (int);
+ bool RelativeJumpOriginState(int amount);
+ bool RelativeJumpDestinationState(int amount);
+ bool RelativeJumpStateDiagram (int);
+ bool AddTransitionTotal();
- bool absoluteJumpDestinationState(int);
- bool absoluteJumpStateDiagram (int);
-/*
- bool relativeJumpGuard(int amount);
- bool relativeJumpAction(int amount);
- bool relativeJumpTrigger(int amount);
- bool relativeJumpTransitionLabel(int amount);
-*/
- bool relativeJumpOriginState(int amount);
- bool relativeJumpDestinationState(int amount);
- bool relativeJumpStateDiagram (int);
-
- bool addTransitionTotal();
-// bool addTransitionFromLabel();
-
};
Modified: branches/uml-merge/source/main/cPopulation.h
===================================================================
--- branches/uml-merge/source/main/cPopulation.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/main/cPopulation.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -325,8 +325,9 @@
void UpdateResourceCount(const int Verbosity);
- // UML branch -- get the UML model
- cUMLModel* getUMLModel() { return &m_model; }
+//-------- Orchid function --------
+// get at the population's model.
+ cUMLModel* GetUMLModel() { return &m_model; }
};
Modified: branches/uml-merge/source/main/cStats.cc
===================================================================
--- branches/uml-merge/source/main/cStats.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/main/cStats.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -1747,6 +1747,51 @@
}
+void cStats::OrchidStatsPostTaskCheck(cUMLModel* org_mod, cUMLModel* pop_mod)
+{
+ /*++m_deme_num_repls;
+ m_deme_gestation_time.Add(source_deme.GetAge());
+ m_deme_births.Add(source_deme.GetBirthCount());
+ m_deme_merit.Add(source_deme.GetHeritableDemeMerit().GetDouble());
+ m_deme_generation.Add(source_deme.GetGeneration());*/
+
+ // update the stats based on the organism's model.
+ av_number_of_states.Add(org_mod->NumStates());
+ av_number_of_trans.Add(org_mod->NumTrans());
+ av_number_of_triggers.Add(org_mod->NumTriggers());
+ av_number_of_guards.Add(org_mod->NumGuards());
+ av_number_of_actions.Add(org_mod->NumActions());
+ av_number_of_state_diagrams.Add(org_mod->NumSDs());
+
+ if ((org_mod->GetBonusInfo("spinn1") > 0) &&
+ (org_mod->GetBonusInfo("spinn2") > 0)) {
+ m_N1andN2Passed.Add(1);
+ }
+
+ // update the property stats based on the population's model.
+ m_propertySuccess = pop_mod->GetPropertyGenerator()->NumSuccess();
+ m_propertyFailure = pop_mod->GetPropertyGenerator()->NumFailure();
+ m_propertyTotal = pop_mod->GetPropertyGenerator()->NumTotalProperty();
+ m_absPropertySuccess = pop_mod->GetPropertyGenerator()->NumAbsencePropertySuccess();
+ m_absPropertyFailure = pop_mod->GetPropertyGenerator()->NumAbsencePropertyFailure();
+ m_absPropertyTotal = pop_mod->GetPropertyGenerator()->NumAbsencePropertyTotal();
+ m_uniPropertySuccess = pop_mod->GetPropertyGenerator()->NumUniversalPropertySuccess();
+ m_uniPropertyFailure = pop_mod->GetPropertyGenerator()->NumUniversalPropertyFailure();
+ m_uniPropertyTotal = pop_mod->GetPropertyGenerator()->NumUniversalPropertyTotal();
+ m_existPropertySuccess = pop_mod->GetPropertyGenerator()->NumExistencePropertySuccess();
+ m_existPropertyFailure = pop_mod->GetPropertyGenerator()->NumExistencePropertyFailure();
+ m_existPropertyTotal = pop_mod->GetPropertyGenerator()->NumExistencePropertyTotal();
+ m_precPropertySuccess = pop_mod->GetPropertyGenerator()->NumPrecedencePropertySuccess();
+ m_precPropertyFailure = pop_mod->GetPropertyGenerator()->NumPrecedencePropertyFailure();
+ m_precPropertyTotal = pop_mod->GetPropertyGenerator()->NumPrecedencePropertyTotal();
+ m_respPropertySuccess = pop_mod->GetPropertyGenerator()->NumResponsePropertySuccess();
+ m_respPropertyFailure = pop_mod->GetPropertyGenerator()->NumResponsePropertyFailure();
+ m_respPropertyTotal = pop_mod->GetPropertyGenerator()->NumResponsePropertyTotal();
+ m_suppressed = pop_mod->GetPropertyGenerator()->NumSuppressed();
+
+}
+
+
void cStats::PrintPropertyData(const cString& filename)
{
Modified: branches/uml-merge/source/main/cStats.h
===================================================================
--- branches/uml-merge/source/main/cStats.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/main/cStats.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -76,6 +76,7 @@
class cOrgMovementPredicate;
class cDeme;
class cGermline;
+class cUMLModel;
struct flow_rate_tuple {
cIntSum orgCount;
@@ -866,7 +867,7 @@
void newProposition() { m_new_propositions.Add(1); }
void newProperty() { m_properties.Add(1); }
-
+ /*
void propSuccess(int x) {m_propertySuccess = x; }
void propFailure(int x) {m_propertyFailure = x; }
void propTotal(int x) {m_propertyTotal= x; }
@@ -885,10 +886,13 @@
void respPropSuccess(int x) {m_respPropertySuccess =x; }
void respPropFailure(int x) {m_respPropertyFailure =x;}
void respPropTotal(int x) {m_respPropertyTotal =x;}
- int getPropTotal () { return m_propertyTotal; }
- void suppressedTotal(int x) { m_suppressed = x; }
+ void suppressedTotal(int x) { m_suppressed = x; }*/
void addScenarioCompletion(std::vector<double>);
+ void OrchidStatsPostTaskCheck(cUMLModel*, cUMLModel*);
+ int GetPropTotal () { return m_propertyTotal; }
+
+
private:
// Stats for UML state diagrams
cDoubleSum av_number_of_states;
Modified: branches/uml-merge/source/main/cTaskLib.cc
===================================================================
--- branches/uml-merge/source/main/cTaskLib.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/main/cTaskLib.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -422,35 +422,9 @@
else if(name == "event_killed")
NewTask(name, "Killed event", &cTaskLib::Task_EventKilled);
- // UML tasks
- else if (name == "trans1") //
- NewTask(name, "Successfully created trans 1", &cTaskLib::Task_Trans1);
- else if (name == "trans2") //
- NewTask(name, "Successfully created trans 2", &cTaskLib::Task_Trans2);
- else if (name == "trans3") //
- NewTask(name, "Successfully created trans 3", &cTaskLib::Task_Trans3);
- else if (name == "trans4") //
- NewTask(name, "Successfully created trans 4", &cTaskLib::Task_Trans4);
- else if (name == "trans5") //
- NewTask(name, "Successfully created trans 5", &cTaskLib::Task_Trans5);
- else if (name == "trans6") //
- NewTask(name, "Successfully created trans 6", &cTaskLib::Task_Trans6);
- else if (name == "trans7") //
- NewTask(name, "Successfully created trans 7", &cTaskLib::Task_Trans7);
- else if (name == "trans8") //
- NewTask(name, "Successfully created trans 8", &cTaskLib::Task_Trans8);
- else if (name == "trans9") //
- NewTask(name, "Successfully created trans 9", &cTaskLib::Task_Trans9);
- else if (name == "trans10") //
- NewTask(name, "Successfully created trans 10", &cTaskLib::Task_Trans10);
+//-------- Orchid tasks --------
else if (name == "scens") //
- NewTask(name, "Successfully created scenarios", &cTaskLib::Task_Scenarios);
- else if (name == "numStates") //
- NewTask(name, "Successfully created 5 states", &cTaskLib::Task_NumStates);
- else if (name == "numTrans") //
- NewTask(name, "Successfully created 5 transitions", &cTaskLib::Task_NumTrans);
- else if (name == "prop-tr") //
- NewTask(name, "Diagram included trigger", &cTaskLib::Task_PropTrigger);
+ NewTask(name, "Successfully created scenarios", &cTaskLib::Task_Scenarios);
else if (name == "hydra") //
NewTask(name, "Successfully ran hydra", &cTaskLib::Task_Hydra);
else if (name == "spin1") //
@@ -470,8 +444,7 @@
else if (name == "check-props")
NewTask(name, "Check Properties", &cTaskLib::Task_Properties);
-/* else if (name == "mult_trans") //
- NewTask(name, "Successfully completed multiple transitions", &cTaskLib::Task_MultTrans);*/
+
// Make sure we have actually found a task
if (task_array.GetSize() == start_size) {
@@ -3087,181 +3060,8 @@
return 0.0;
}
-double cTaskLib::Task_Trans1(cTaskContext& ctx) const
-{
- double bonus = 0.0;
-
- //Init
-// ctx.m_task_success_complete = true;
-// if (ctx.organism->currTrans(1, -1, -1, -1, -1, "^TempSensor.getOpState()")) {
-// if (ctx.organism->currTrans(1, -1, -1, -1, -1, 1)) {
-// if (ctx.organism->getUMLModel()->getStateDiagram(1)->findTrans(-1, -1, -1, -1, 1))
-// tagaaa
-// if (ctx.organism->getUMLModel()->getStateDiagram(0)->findTrans(0, 1, 1, 2, 3))
-// temp sensor
- if (ctx.GetOrganism()->getUMLModel()->getStateDiagram(1)->findTrans(0, 1, 0, 0, 0))
- {
- // ctx.m_task_success_complete += 1;
- bonus = 1.0;
- }
-
-// ctx.m_task_success_complete = ctx.m_task_success_complete && bonus;
- return bonus;
-}
-
-double cTaskLib::Task_Trans2(cTaskContext& ctx) const
-{
- double bonus = 0.0;
-// if (ctx.organism->currTrans(0, -1, -1, "setTempOpState", -1, -1)) {
-// if (ctx.organism->currTrans(1, -1, -1, 1, -1, -1)) {
-// if (ctx.organism->getUMLModel()->getStateDiagram(1)->findTrans(-1, -1, 1, -1, -1))
-// tagaaa
-// if (ctx.organism->getUMLModel()->getStateDiagram(0)->findTrans(1, 2, 0, 0, 0))
-// temp sensor
- if (ctx.GetOrganism()->getUMLModel()->getStateDiagram(1)->findTrans(1, 2, 0, 0, 2))
- {
- bonus = 1.0;
- }
-
-// ctx.m_task_success_complete = ctx.m_task_success_complete && bonus;
- return bonus;
-
-}
-
-double cTaskLib::Task_Trans3(cTaskContext& ctx) const
-{
- double bonus = 0.0;
-// if (ctx.organism->currTrans(0, -1, -1, "getOpState", -1, -1)) {
-// if (ctx.organism->currTrans(0, -1, -1, 1, -1, -1)) {
-// if (ctx.organism->getUMLModel()->getStateDiagram(0)->findTrans(-1, -1, 1, -1, -1))
-// tagaaa
-// if (ctx.organism->getUMLModel()->getStateDiagram(0)->findTrans(2, 3, 0, 3, 1))
-// temp sensor
- if (ctx.GetOrganism()->getUMLModel()->getStateDiagram(1)->findTrans(2, 3, 2, 0, 0))
- {
- bonus = 1.0;
- }
-
-// ctx.m_task_success_complete = ctx.m_task_success_complete && bonus;
- return bonus;
-
-}
-
-double cTaskLib::Task_Trans4(cTaskContext& ctx) const
-{
- double bonus = 0.0;
-// if (ctx.organism->currTrans(0, -1, -1, -1, -1, "op_state:=1")) {
-// if (ctx.organism->currTrans(0, -1, -1, -1, -1, 3)) {
-// if (ctx.organism->getUMLModel()->getStateDiagram(0)->findTrans(-1, -1, -1, -1, 3))
-// tagaaa
-// if (ctx.organism->getUMLModel()->getStateDiagram(0)->findTrans(3, 4, 2, 1, 2))
-// temp sensor
- if (ctx.GetOrganism()->getUMLModel()->getStateDiagram(1)->findTrans(3, 1, 0, 0, 0))
- {
- bonus = 1.0;
- }
-
-// ctx.m_task_success_complete = ctx.m_task_success_complete && bonus;
- return bonus;
-
-}
-
-double cTaskLib::Task_Trans5(cTaskContext& ctx) const
-{
- double bonus = 0.0;
-// if (ctx.organism->currTrans(0, -1, -1, -1, -1, "^SoftwareSensor.setTempOpState(op_state)")) {
- //if (ctx.organism->currTrans(0, -1, -1, -1, -1, 1))
-// if (ctx.organism->getUMLModel()->getStateDiagram(0)->findTrans(-1, -1, -1, -1, 1))
- if (ctx.GetOrganism()->getUMLModel()->getStateDiagram(0)->findTrans(4, 0, 3, 0, 0))
- {
- bonus = 1.0;
- }
-
- //ctx.m_task_success_complete = ctx.m_task_success_complete && bonus;
- return bonus;
-
-}
-
-
-double cTaskLib::Task_Trans6(cTaskContext& ctx) const
-{
- double bonus = 0.0;
-// if (ctx.organism->currTrans(1, -1, -1, -1, -1, "^TempSensor.getOpState()")) {
-// if (ctx.organism->currTrans(1, -1, -1, -1, -1, 1)) {
-// if (ctx.organism->getUMLModel()->getStateDiagram(1)->findTrans(-1, -1, -1, -1, 1))
- if (ctx.GetOrganism()->getUMLModel()->getStateDiagram(1)->findTrans(0, 4, 2, 1, 0))
- {
- bonus = 1.0;
- }
-
-// ctx.m_task_success_complete = ctx.m_task_success_complete && bonus;
- return bonus;
-}
-
-double cTaskLib::Task_Trans7(cTaskContext& ctx) const
-{
- double bonus = 0.0;
-// if (ctx.organism->currTrans(0, -1, -1, "setTempOpState", -1, -1)) {
-// if (ctx.organism->currTrans(1, -1, -1, 1, -1, -1)) {
-// if (ctx.organism->getUMLModel()->getStateDiagram(1)->findTrans(-1, -1, 1, -1, -1))
- if (ctx.GetOrganism()->getUMLModel()->getStateDiagram(1)->findTrans(4, 1, 0, 1, 0))
- {
- bonus = 1.0;
- }
-
-// ctx.m_task_success_complete = ctx.m_task_success_complete && bonus;
- return bonus;
-
-}
-
-double cTaskLib::Task_Trans8(cTaskContext& ctx) const
-{
- double bonus = 0.0;
-// if (ctx.organism->currTrans(0, -1, -1, "getOpState", -1, -1)) {
-// if (ctx.organism->currTrans(0, -1, -1, 1, -1, -1)) {
-// if (ctx.organism->getUMLModel()->getStateDiagram(0)->findTrans(-1, -1, 1, -1, -1))
- if (ctx.GetOrganism()->getUMLModel()->getStateDiagram(1)->findTrans(1, 3, 1, 1, 1))
- {
- bonus = 1.0;
- }
-
-// ctx.m_task_success_complete = ctx.m_task_success_complete && bonus;
- return bonus;
-
-}
-
-double cTaskLib::Task_Trans9(cTaskContext& ctx) const
-{
- double bonus = 0.0;
-// if (ctx.organism->currTrans(0, -1, -1, -1, -1, "op_state:=1")) {
-// if (ctx.organism->currTrans(0, -1, -1, -1, -1, 3)) {
-// if (ctx.organism->getUMLModel()->getStateDiagram(0)->findTrans(-1, -1, -1, -1, 3))
- if (ctx.GetOrganism()->getUMLModel()->getStateDiagram(1)->findTrans(3, 2, 2, 0, 3))
- {
- bonus = 1.0;
- }
-
-// ctx.m_task_success_complete = ctx.m_task_success_complete && bonus;
- return bonus;
-
-}
-
-double cTaskLib::Task_Trans10(cTaskContext& ctx) const
-{
- double bonus = 0.0;
-// if (ctx.organism->currTrans(0, -1, -1, -1, -1, "^SoftwareSensor.setTempOpState(op_state)")) {
- //if (ctx.organism->currTrans(0, -1, -1, -1, -1, 1))
-// if (ctx.organism->getUMLModel()->getStateDiagram(0)->findTrans(-1, -1, -1, -1, 1))
- if (ctx.GetOrganism()->getUMLModel()->getStateDiagram(1)->findTrans(2, 4, 3, 2, 1))
- {
- bonus = 1.0;
- }
-
-// ctx.m_task_success_complete = ctx.m_task_success_complete && bonus;
- return bonus;
-}
-
+//-------- Orchid tasks --------
double cTaskLib::Task_Scenarios(cTaskContext& ctx) const
{
double bonus = 0.0;
@@ -3270,17 +3070,17 @@
cOrganism* org = ctx.GetOrganism();
// Check if this model is different than the organism's parent's model
- if (org->getParentXMI() != org->getUMLModel()->getXMI()) {
- bonus = org->getUMLModel()->checkForScenarios();
+ if (org->GetParentXMI() != org->GetUMLModel()->GetXMI()) {
+ bonus = org->GetUMLModel()->checkForScenarios();
} else {
- bonus = org->getParentBonus("scenarios");
- org->getUMLModel()->setScenarioCompletion(org->getParentScenarioCompletion());
+ bonus = org->GetParentBonus("scenarios");
+ org->GetUMLModel()->SetScenarioCompletion(org->GetParentScenarioCompletion());
}
// Set bonus info for current model
- org->getUMLModel()->setBonusInfo("scenarios", bonus);
+ org->GetUMLModel()->SetBonusInfo("scenarios", bonus);
- m_world->GetStats().addScenarioCompletion(org->getUMLModel()->getScenarioCompletion());
+ m_world->GetStats().addScenarioCompletion(org->GetUMLModel()->GetScenarioCompletion());
return bonus;
}
@@ -3292,39 +3092,17 @@
//cPopulation* pop = (&m_world->GetPopulation());
// call some sort of check properties function for the model.
- bonus = org->getUMLModel()->getPropertyGenerator()->getPropertyReward();
- //pop->getUMLModel()->checkProperties();
- //m_world->GetStats().propSuccess(pop->getUMLModel()->numSuccess());
- //m_world->GetStats().propFailure(pop->getUMLModel()->numFailure());
+ bonus = org->GetUMLModel()->GetPropertyGenerator()->GetPropertyReward();
+ //pop->GetUMLModel()->checkProperties();
+ //m_world->GetStats().propSuccess(pop->GetUMLModel()->numSuccess());
+ //m_world->GetStats().propFailure(pop->GetUMLModel()->numFailure());
return bonus;
}
-double cTaskLib::Task_NumStates(cTaskContext& ctx) const
-{
- double ns = (double) ctx.GetOrganism()->getStateDiagram()->numStates();
-
- if (ns <= 5 ) {
- return (ns/5);
- } else{
- return 0.0;
- }
-
-}
-double cTaskLib::Task_NumTrans(cTaskContext& ctx) const
-{
- double nt = (double) ctx.GetOrganism()->getStateDiagram()->numTrans();
-
- if (nt <= 5 ) {
- return (nt/5);
- } else{
- return 1;
- }
-}
-
double cTaskLib::Task_Hydra(cTaskContext& ctx) const
{
cOrganism* organism = ctx.GetOrganism();
@@ -3332,23 +3110,23 @@
double bonus = 0.0;
- temp = organism->getUMLModel()->getXMI();
+ temp = organism->GetUMLModel()->GetXMI();
// call hydra when a // all scenario hits its max?
// all are non-zero?
- if (!organism->getUMLModel()->readyForHydra()) {
+ if (!organism->GetUMLModel()->ReadyForHydra()) {
- organism->getUMLModel()->setBonusInfo("hydra", bonus);
+ organism->GetUMLModel()->SetBonusInfo("hydra", bonus);
return 0;
}
m_world->GetStats().HydraAttempt();
- if (organism->getParentXMI() == temp) {
+ if (organism->GetParentXMI() == temp) {
- bonus = organism->getParentBonus("hydra");
- organism->getUMLModel()->setBonusInfo("hydra", bonus);
+ bonus = organism->GetParentBonus("hydra");
+ organism->GetUMLModel()->SetBonusInfo("hydra", bonus);
return bonus;
}
@@ -3382,7 +3160,7 @@
close(to_subavida[0]);
close(from_subavida[1]);
- // At this point, forget about subavida - It's running.
+ // At this point, forGet about subavida - It's running.
// Write the model to to_subavida[1]. Close to_subavida[1] (which wakes up subavida).
// Then, read from from_subavida[0] as long as is possible, after which point subavida will die.
@@ -3431,7 +3209,7 @@
bonus = 1.0;
}
- organism->getUMLModel()->setBonusInfo("hydra", bonus);
+ organism->GetUMLModel()->SetBonusInfo("hydra", bonus);
return bonus;
}
@@ -3464,7 +3242,7 @@
strstrm2 << neverclaimFile << "." << m_world->GetStats().GetUpdate() << "." << ctx.GetOrganism()->GetID();
// print the relevant information about the scenarios
// std::string temp_str = neverclaimFile + "." + m_world->GetStats().GetUpdate() + "."; // + ctx.GetOrganism()->GetID();
- ctx.GetOrganism()->getUMLModel()->printScenarioUtility(strstrm2.str().c_str());
+ ctx.GetOrganism()->GetUMLModel()->PrintScenarioUtility(strstrm2.str().c_str());
return 1.0;
}
@@ -3496,21 +3274,21 @@
cOrganism* organism = ctx.GetOrganism();
double bonus = 0.0;
- /*if (organism->getUMLModel()->getBonusInfo("spinw1") <= 1)
+ /*if (organism->GetUMLModel()->GetBonusInfo("spinw1") <= 1)
{
- organism->getUMLModel()->setBonusInfo("spinn1", bonus);
+ organism->GetUMLModel()->SetBonusInfo("spinn1", bonus);
return bonus;
}*/
- if (organism->getUMLModel()->getWitnessMode()) {
- if (organism->getUMLModel()->getBonusInfo("spinw1") < 1)
+ if (organism->GetUMLModel()->GetWitnessMode()) {
+ if (organism->GetUMLModel()->GetBonusInfo("spinw1") < 1)
{
- organism->getUMLModel()->setBonusInfo("spinn1", bonus);
+ organism->GetUMLModel()->SetBonusInfo("spinn1", bonus);
return bonus;
}
} else {
- if (organism->getUMLModel()->getBonusInfo("hydra") == 0)
+ if (organism->GetUMLModel()->GetBonusInfo("hydra") == 0)
{
- organism->getUMLModel()->setBonusInfo("spinn1", bonus);
+ organism->GetUMLModel()->SetBonusInfo("spinn1", bonus);
return bonus;
}
}
@@ -3519,15 +3297,15 @@
m_world->GetStats().N1Attempt();
- if (organism->getParentXMI() == organism->getUMLModel()->getXMI()) {
+ if (organism->GetParentXMI() == organism->GetUMLModel()->GetXMI()) {
- bonus = organism->getParentBonus("spinn1");
+ bonus = organism->GetParentBonus("spinn1");
} else {
bonus = SpinCoprocess(ctx, "N1");
}
- organism->getUMLModel()->setBonusInfo("spinn1", bonus);
+ organism->GetUMLModel()->SetBonusInfo("spinn1", bonus);
if (bonus > 0) m_world->GetStats().N1Passed();
return bonus;
@@ -3540,7 +3318,7 @@
double bonus = 0.0;
- if (organism->getUMLModel()->getBonusInfo("hydra") == 0)
+ if (organism->GetUMLModel()->GetBonusInfo("hydra") == 0)
{
return bonus;
}
@@ -3548,14 +3326,14 @@
m_world->GetStats().W1Attempt();
- if ((organism->getParentXMI()) == (organism->getUMLModel()->getXMI())) {
- bonus = organism->getParentBonus("spinw1");
+ if ((organism->GetParentXMI()) == (organism->GetUMLModel()->GetXMI())) {
+ bonus = organism->GetParentBonus("spinw1");
} else {
bonus = SpinWitnessCoprocess(ctx, "W1");
}
- organism->getUMLModel()->setBonusInfo("spinw1", bonus);
+ organism->GetUMLModel()->SetBonusInfo("spinw1", bonus);
if (bonus > 0) m_world->GetStats().W1Passed();
@@ -3567,16 +3345,16 @@
cOrganism* organism = ctx.GetOrganism();
double bonus = 0.0;
- if (organism->getUMLModel()->getWitnessMode()) {
- if (organism->getUMLModel()->getBonusInfo("spinw2") < 1)
+ if (organism->GetUMLModel()->GetWitnessMode()) {
+ if (organism->GetUMLModel()->GetBonusInfo("spinw2") < 1)
{
- organism->getUMLModel()->setBonusInfo("spinn2", bonus);
+ organism->GetUMLModel()->SetBonusInfo("spinn2", bonus);
return bonus;
}
} else {
- if (organism->getUMLModel()->getBonusInfo("hydra") == 0)
+ if (organism->GetUMLModel()->GetBonusInfo("hydra") == 0)
{
- organism->getUMLModel()->setBonusInfo("spinn2", bonus);
+ organism->GetUMLModel()->SetBonusInfo("spinn2", bonus);
return bonus;
}
}
@@ -3584,15 +3362,15 @@
m_world->GetStats().N2Attempt();
- if (organism->getParentXMI() == organism->getUMLModel()->getXMI()) {
+ if (organism->GetParentXMI() == organism->GetUMLModel()->GetXMI()) {
- bonus = organism->getParentBonus("spinn2");
+ bonus = organism->GetParentBonus("spinn2");
} else {
bonus = SpinCoprocess(ctx, "N2");
}
- organism->getUMLModel()->setBonusInfo("spinn2", bonus);
+ organism->GetUMLModel()->SetBonusInfo("spinn2", bonus);
if (bonus > 0) m_world->GetStats().N2Passed();
return bonus;
@@ -3604,7 +3382,7 @@
cOrganism* organism = ctx.GetOrganism();
double bonus = 0.0;
- if (organism->getUMLModel()->getBonusInfo("hydra") == 0)
+ if (organism->GetUMLModel()->GetBonusInfo("hydra") == 0)
{
return bonus;
}
@@ -3612,14 +3390,14 @@
m_world->GetStats().W2Attempt();
- if (organism->getParentXMI() == organism->getUMLModel()->getXMI()) {
- bonus = organism->getParentBonus("spinw2");
+ if (organism->GetParentXMI() == organism->GetUMLModel()->GetXMI()) {
+ bonus = organism->GetParentBonus("spinw2");
} else {
bonus = SpinWitnessCoprocess(ctx, "W2");
}
- organism->getUMLModel()->setBonusInfo("spinw2", bonus);
+ organism->GetUMLModel()->SetBonusInfo("spinw2", bonus);
if (bonus > 0) m_world->GetStats().W2Passed();
return bonus;
@@ -3627,42 +3405,31 @@
-double cTaskLib::Task_PropTrigger(cTaskContext& ctx) const {
- // This task checks for the trigger of the property.
- cOrganism* organism = ctx.GetOrganism();
- double bonus = 0.0;
-
- if (organism->getStateDiagram()->findTrans(-1,-1,-1,-1,1)){
- bonus = 1.0;
- }
-
- return bonus;
-}
double cTaskLib::Task_MinTrans(cTaskContext& ctx) const {
// This task rewards organisms for having fewer edges
cOrganism* organism = ctx.GetOrganism();
- cUMLModel* mod = organism->getUMLModel();
+ cUMLModel* mod = organism->GetUMLModel();
double bonus = 0.0;
int mt, nt;
-/* if ((organism->getUMLModel()->getBonusInfo("spinw1") == 0) &&
- (organism->getUMLModel()->getBonusInfo("spinw2") == 0)) {
+/* if ((organism->GetUMLModel()->GetBonusInfo("spinw1") == 0) &&
+ (organism->GetUMLModel()->GetBonusInfo("spinw2") == 0)) {
return bonus;
}
- if ((organism->getUMLModel()->getBonusInfo("scenario5") != 9) ||
- (organism->getUMLModel()->getBonusInfo("scenario6") != 4)) {
+ if ((organism->GetUMLModel()->GetBonusInfo("scenario5") != 9) ||
+ (organism->GetUMLModel()->GetBonusInfo("scenario6") != 4)) {
return bonus;
}*/
-/* if (organism->getUMLModel()->getBonusInfo("hydra") == 0){
+/* if (organism->GetUMLModel()->GetBonusInfo("hydra") == 0){
return bonus;
}*/
// Ok. Subtract the number of edges from the maximum number of edges seen so far.
- mt = mod->getMaxTrans();
- nt = mod->numTrans();
+ mt = mod->GetMaxTrans();
+ nt = mod->NumTrans();
if (mt > 0) {
bonus = mt - nt;
@@ -3683,10 +3450,10 @@
double max_bonus=0;
double bonus;
- for(unsigned int i=0; i<organism->getUMLModel()->getStateDiagramSize(); ++i, ++max_bonus) {
- cUMLStateDiagram* sd=organism->getUMLModel()->getStateDiagram(i);
- if(sd->numStates() > 0) {
- nd_penalty += sd->getNumberOfNonDeterministicStates() / sd->numStates();
+ for(unsigned int i=0; i<organism->GetUMLModel()->GetStateDiagramSize(); ++i, ++max_bonus) {
+ cUMLStateDiagram* sd=organism->GetUMLModel()->GetStateDiagram(i);
+ if(sd->NumStates() > 0) {
+ nd_penalty += sd->GetNumberOfNonDeterministicStates() / sd->NumStates();
}
}
@@ -3694,7 +3461,7 @@
if (bonus < 0) bonus = 0;
- organism->getUMLModel()->setBonusInfo("isDeterministic", bonus);
+ organism->GetUMLModel()->SetBonusInfo("isDeterministic", bonus);
return bonus;
}
@@ -3709,11 +3476,11 @@
double bonus = 0.0;
- temp = organism->getUMLModel()->getXMI();
+ temp = organism->GetUMLModel()->GetXMI();
// call hydra when a // all scenario hits its max?
// all are non-zero?
-// if (organism->getUMLModel()->readyForHydra()) {
+// if (organism->GetUMLModel()->readyForHydra()) {
// print the file to output...
// file_name = "file1" + m_world->GetStats().GetUpdate();
// file_name += "." + organism->GetID();
@@ -3722,7 +3489,7 @@
strstrm << "working." << m_world->GetStats().GetUpdate() << "." << ctx.GetOrganism()->GetID();
strstrm << ".xml";
// if(system(strstrm.str().c_str())!=0) return 0.0;
- organism->getUMLModel()->printUMLModelToFile(strstrm.str());
+ organism->GetUMLModel()->PrintUMLModelToFile(strstrm.str());
bonus = 1.0;
// }
Modified: branches/uml-merge/source/main/cTaskLib.h
===================================================================
--- branches/uml-merge/source/main/cTaskLib.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/main/cTaskLib.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -300,21 +300,8 @@
double Task_MoveToEvent(cTaskContext& ctx) const;
double Task_EventKilled(cTaskContext& ctx) const;
- // UML Tasks
- double Task_Trans1(cTaskContext& ctx) const;
- double Task_Trans2(cTaskContext& ctx) const;
- double Task_Trans3(cTaskContext& ctx) const;
- double Task_Trans4(cTaskContext& ctx) const;
- double Task_Trans5(cTaskContext& ctx) const;
- double Task_Trans6(cTaskContext& ctx) const;
- double Task_Trans7(cTaskContext& ctx) const;
- double Task_Trans8(cTaskContext& ctx) const;
- double Task_Trans9(cTaskContext& ctx) const;
- double Task_Trans10(cTaskContext& ctx) const;
+//-------- Orchid tasks --------
double Task_Scenarios(cTaskContext& ctx) const;
- double Task_NumStates(cTaskContext& ctx) const;
- double Task_NumTrans(cTaskContext& ctx) const;
- double Task_PropTrigger(cTaskContext& ctx) const;
double Task_Hydra(cTaskContext& ctx) const;
double SpinCoprocess(cTaskContext& ctx, const std::string& neverclaimFile) const;
double SpinWitnessCoprocess(cTaskContext& ctx, const std::string& neverclaimFile) const;
@@ -323,7 +310,6 @@
double Task_SpinW1(cTaskContext& ctx) const;
double Task_SpinW2(cTaskContext& ctx) const;
double Task_MinTrans(cTaskContext& ctx) const;
-// double Task_MultTrans(cTaskContext& ctx) const;
double Task_Nondeterminism(cTaskContext& ctx) const;
double Task_ExportXMI(cTaskContext& ctx) const;
double Task_Properties(cTaskContext& ctx) const;
Modified: branches/uml-merge/source/orchid/cMDEAbsenceProperty.cc
===================================================================
--- branches/uml-merge/source/orchid/cMDEAbsenceProperty.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEAbsenceProperty.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -9,7 +9,7 @@
#include "cMDEAbsenceProperty.h"
-void cMDEAbsenceProperty::print() {
+void cMDEAbsenceProperty::Print() {
// Create the file...
std::string cmd = "cp " + _promela + " " + _property_file_name;
@@ -35,7 +35,7 @@
}
-void cMDEAbsenceProperty::printWitness() {
+void cMDEAbsenceProperty::PrintWitness() {
// Create the file
std::string cmd = "cp " + _promela + " " + _witness_file_name;
@@ -65,13 +65,13 @@
}
-void cMDEAbsenceProperty::evaluate()
+void cMDEAbsenceProperty::Evaluate()
{
float verify_reward = 0;
- // print the property
- print();
- verify_reward = verify();
+ // Print the property
+ Print();
+ verify_reward = Verify();
std::string cmd;
// std::string work_prop = "properties_that_passed";
@@ -79,14 +79,14 @@
if (verify_reward) {
// cmd = "cat english-property >> " + work_prop;
// system(cmd.c_str());
- printInEnglish();
+ PrintInEnglish();
}
_reward = verify_reward;
}
-void cMDEAbsenceProperty::printInEnglish() {
+void cMDEAbsenceProperty::PrintInEnglish() {
std::ofstream outfile;
outfile.open (_properties.c_str(), std::ios_base::app);
Modified: branches/uml-merge/source/orchid/cMDEAbsenceProperty.h
===================================================================
--- branches/uml-merge/source/orchid/cMDEAbsenceProperty.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEAbsenceProperty.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -30,12 +30,12 @@
_promela = "tmp.pr";
}
virtual ~cMDEAbsenceProperty() {}
- void print(); // { std::cout << _scope << " " << _expr_p << std::endl; }
- void printWitness(); // { std::cout << _scope << " " << _expr_p << std::endl; }
- void printInEnglish();
- void evaluate();
- std::string getPropertyType() { return "Absence"; }
- std::string getPropertyParameters() { return _expr_p; }
+ void Print(); // { std::cout << _scope << " " << _expr_p << std::endl; }
+ void PrintWitness(); // { std::cout << _scope << " " << _expr_p << std::endl; }
+ void PrintInEnglish();
+ void Evaluate();
+ std::string GetPropertyType() { return "Absence"; }
+ std::string GetPropertyParameters() { return _expr_p; }
Modified: branches/uml-merge/source/orchid/cMDECompoundExpression.h
===================================================================
--- branches/uml-merge/source/orchid/cMDECompoundExpression.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDECompoundExpression.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -25,55 +25,55 @@
// Op must be either && or ||
_exp_op = op;
_compound = true;
- _expr = getInPromela();
+ _expr = GetInPromela();
}
-// ~cMDECompoundExpression() {}
// get functions
- std::string getInEnglish() {
+ std::string GetInEnglish() {
std::string s;
- s = "(" + _exp_1->getInEnglish() + " " + _exp_op + " ";
- s = s + _exp_2->getInEnglish() + ")";
+ s = "(" + _exp_1->GetInEnglish() + " " + _exp_op + " ";
+ s = s + _exp_2->GetInEnglish() + ")";
return (s); }
- std::string getInPromela() {
+
+ std::string GetInPromela() {
std::string s;
- s = "(" + _exp_1->getInPromela() + " " + _exp_op + " ";
- s = s + _exp_2->getInPromela() + ")";
+ s = "(" + _exp_1->GetInPromela() + " " + _exp_op + " ";
+ s = s + _exp_2->GetInPromela() + ")";
return (s);}
- std::string getOp() { return _exp_op; }
- cMDEExpression* getLeft() { return _exp_1; }
- cMDEExpression* getRight() { return _exp_2; }
+ std::string GetOp() { return _exp_op; }
+ cMDEExpression* GetLeft() { return _exp_1; }
+ cMDEExpression* GetRight() { return _exp_2; }
// This function is used to see if an expression uses a given attribute
- bool usesAttribute(std::string s) {
- return (_exp_1->usesAttribute(s) || _exp_2->usesAttribute(s)); }
+ bool UsesAttribute(std::string s) {
+ return (_exp_1->UsesAttribute(s) || _exp_2->UsesAttribute(s)); }
// This function is used to see if an expression uses a given operation
- bool usesOperation(std::string s) {
- return (_exp_1->usesOperation(s) || _exp_2->usesOperation(s)); }
+ bool UsesOperation(std::string s) {
+ return (_exp_1->UsesOperation(s) || _exp_2->UsesOperation(s)); }
// This function returns the number of ANDs in a given expression
- int numANDs() {
+ int NumANDs() {
int num = 0;
if (_exp_op == "&&") num = 1;
- return (num + _exp_1->numANDs() + _exp_2->numANDs());
+ return (num + _exp_1->NumANDs() + _exp_2->NumANDs());
}
// This function returns the number of ORs in a given expression
- int numORs() {
+ int NumORs() {
int num = 0;
if (_exp_op == "||") num = 1;
- return (num + _exp_1->numORs() + _exp_2->numORs());
+ return (num + _exp_1->NumORs() + _exp_2->NumORs());
}
void interestingStrongANDExpressionEval() {
float temp =0;
- float no = numORs();
+ float no = NumORs();
// Increase interesting based on the number of ANDs
- temp += numANDs();
+ temp += NumANDs();
// Decrease interesting based on the number of ORs
temp = temp - (no/2);
@@ -82,12 +82,12 @@
}
- void interestingWeakANDExpressionEval() {
+ void InterestingWeakANDExpressionEval() {
float temp =0;
- float na = numANDs();
+ float na = NumANDs();
// Increase interesting based on the number of ORs
- temp += numORs();
+ temp += NumORs();
// Decrease interesting based on the number of ANDs
temp = temp - (na/2);
_interesting = temp;
Modified: branches/uml-merge/source/orchid/cMDEExistenceProperty.cc
===================================================================
--- branches/uml-merge/source/orchid/cMDEExistenceProperty.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEExistenceProperty.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -9,7 +9,7 @@
#include "cMDEExistenceProperty.h"
-void cMDEExistenceProperty::print() {
+void cMDEExistenceProperty::Print() {
// Create the file...
std::string cmd = "cp " + _promela + " " + _property_file_name;
@@ -34,7 +34,7 @@
}
-void cMDEExistenceProperty::printWitness() {
+void cMDEExistenceProperty::PrintWitness() {
// Create the file
std::string cmd = "cp " + _promela + " " + _witness_file_name;
@@ -61,7 +61,7 @@
}
-void cMDEExistenceProperty::printInEnglish() {
+void cMDEExistenceProperty::PrintInEnglish() {
std::ofstream outfile;
outfile.open (_properties.c_str(), std::ios_base::app);
Modified: branches/uml-merge/source/orchid/cMDEExistenceProperty.h
===================================================================
--- branches/uml-merge/source/orchid/cMDEExistenceProperty.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEExistenceProperty.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -33,11 +33,11 @@
virtual ~cMDEExistenceProperty() {}
- void print(); // { std::cout << _scope << " " << _expr_p << std::endl; }
- void printWitness(); // { std::cout << _scope << " " << _expr_p << std::endl; }
- void printInEnglish();
- std::string getPropertyType() { return "Existence"; }
- std::string getPropertyParameters() { return _expr_p; }
+ void Print(); // { std::cout << _scope << " " << _expr_p << std::endl; }
+ void PrintWitness(); // { std::cout << _scope << " " << _expr_p << std::endl; }
+ void PrintInEnglish();
+ std::string GetPropertyType() { return "Existence"; }
+ std::string GetPropertyParameters() { return _expr_p; }
private:
std::string _expr_p;
Modified: branches/uml-merge/source/orchid/cMDEExpression.h
===================================================================
--- branches/uml-merge/source/orchid/cMDEExpression.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEExpression.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -23,55 +23,55 @@
virtual ~cMDEExpression() {}
// A function that returns an expression
- std::string getExpr() const { return _expr; }
+ std::string GetExpr() const { return _expr; }
bool operator==(const cMDEExpression &that) const {
- return (_expr == that.getExpr());
+ return (_expr == that.GetExpr());
}
- virtual std::string getInEnglish() =0;
- virtual std::string getInPromela() =0;
+ virtual std::string GetInEnglish() =0;
+ virtual std::string GetInPromela() =0;
// This function is used to see if an expression uses a given attribute
- virtual bool usesAttribute(std::string) { return false; }
+ virtual bool UsesAttribute(std::string) { return false; }
// This function is used to see if an expression uses a given operation
- virtual bool usesOperation(std::string) { return false; }
+ virtual bool UsesOperation(std::string) { return false; }
// This function calculates the number of ANDs used by a given expression
- virtual int numANDs() { return 0; }
+ virtual int NumANDs() { return 0; }
// This function calculates the number of ORs used by a given expression
- virtual int numORs() { return 0; }
+ virtual int NumORs() { return 0; }
- virtual void interestingStrongANDExpressionEval() { _interesting = 0; }
- virtual void interestingWeakANDExpressionEval() { _interesting = 0; }
- virtual float getInterestingExpressionEval() { return _interesting; }
+ virtual void InterestingStrongANDExpressionEval() { _interesting = 0; }
+ virtual void InterestingWeakANDExpressionEval() { _interesting = 0; }
+ virtual float GetInterestingExpressionEval() { return _interesting; }
// the related classes are the classes that this expression may be
// related to.
- void addRelatedClassName(std::string c) { _related_class_names.insert(c); }
- void setRelatedClassNames(std::set<std::string> s) { _related_class_names = s; }
- std::set<std::string> getRelatedClassNames() { return _related_class_names; }
+ void AddRelatedClassName(std::string c) { _related_class_names.insert(c); }
+ void SetRelatedClassNames(std::set<std::string> s) { _related_class_names = s; }
+ std::set<std::string> GetRelatedClassNames() { return _related_class_names; }
// the classes are the classes involved in the expression
- void addUsedClassName(std::string c) {_used_class_names.insert(c); }
- void setUsedClassNames(std::set<std::string> s) { _used_class_names = s; }
- std::set<std::string> getUsedClassNames() { return _used_class_names; }
+ void AddUsedClassName(std::string c) {_used_class_names.insert(c); }
+ void SetUsedClassNames(std::set<std::string> s) { _used_class_names = s; }
+ std::set<std::string> GetUsedClassNames() { return _used_class_names; }
// the attributes and operations involved in the expression
- void addAttOpName(std::string a) {_at_op_names.insert(a); }
- void setAttOpNames(std::set<std::string> s) { _at_op_names = s; }
- std::set<std::string> getAtOpNames() { return _at_op_names; }
+ void AddAttOpName(std::string a) {_at_op_names.insert(a); }
+ void SetAttOpNames(std::set<std::string> s) { _at_op_names = s; }
+ std::set<std::string> GetAtOpNames() { return _at_op_names; }
- bool getUsesRelatedClasses() { return _uses_related_classes; }
- void setUsesRelatedClasses(bool t) { _uses_related_classes = t; }
+ bool GetUsesRelatedClasses() { return _uses_related_classes; }
+ void SetUsesRelatedClasses(bool t) { _uses_related_classes = t; }
- bool getCompound() { return _compound; }
- virtual std::string getOp() { return ""; }
- virtual cMDEExpression* getLeft() { return 0; }
- virtual cMDEExpression* getRight() { return 0; }
+ bool GetCompound() { return _compound; }
+ virtual std::string GetOp() { return ""; }
+ virtual cMDEExpression* GetLeft() { return 0; }
+ virtual cMDEExpression* GetRight() { return 0; }
protected:
std::string _expr;
Modified: branches/uml-merge/source/orchid/cMDEExpressionAttribute.h
===================================================================
--- branches/uml-merge/source/orchid/cMDEExpressionAttribute.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEExpressionAttribute.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -23,11 +23,11 @@
_att_name =n; _att_type = t; _att_class=c; }
// get functions
- std::string getInEnglish() { return (_att_class + "." + _att_name); }
- std::string getInPromela() { return (_att_class + "_V." + _att_name); }
+ std::string GetInEnglish() { return (_att_class + "." + _att_name); }
+ std::string GetInPromela() { return (_att_class + "_V." + _att_name); }
//std::set<std::string> getRelatedClasses() { return _related_classes; }
- std::string getAttName() { return _att_name; }
- std::string getClassName() { return _att_class; }
+ std::string GetAttName() { return _att_name; }
+ std::string GetClassName() { return _att_class; }
// set functions
//void setRelatedClasses(std::set<std::string> s) { _related_classes = s; }
Modified: branches/uml-merge/source/orchid/cMDEPrecedenceProperty.cc
===================================================================
--- branches/uml-merge/source/orchid/cMDEPrecedenceProperty.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEPrecedenceProperty.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -9,7 +9,7 @@
#include "cMDEPrecedenceProperty.h"
-void cMDEPrecedenceProperty::print() {
+void cMDEPrecedenceProperty::Print() {
// Create the file...
std::string cmd = "cp " + _promela + " " + _property_file_name;
if(system(cmd.c_str())!=0) return;
@@ -52,7 +52,7 @@
}
-void cMDEPrecedenceProperty::printWitness() {
+void cMDEPrecedenceProperty::PrintWitness() {
// Create the file
std::string cmd = "cp " + _promela + " " + _witness_file_name;
@@ -85,7 +85,7 @@
}
-void cMDEPrecedenceProperty::printInEnglish() {
+void cMDEPrecedenceProperty::PrintInEnglish() {
std::ofstream outfile;
outfile.open (_properties.c_str(), std::ios_base::app);
Modified: branches/uml-merge/source/orchid/cMDEPrecedenceProperty.h
===================================================================
--- branches/uml-merge/source/orchid/cMDEPrecedenceProperty.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEPrecedenceProperty.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -34,11 +34,11 @@
virtual ~cMDEPrecedenceProperty() {}
- void print();
- void printWitness();
- void printInEnglish();
- std::string getPropertyType() { return "Precedence"; }
- std::string getPropertyParameters() { return (_expr_p + " " + _expr_q); }
+ void Print();
+ void PrintWitness();
+ void PrintInEnglish();
+ std::string GetPropertyType() { return "Precedence"; }
+ std::string GetPropertyParameters() { return (_expr_p + " " + _expr_q); }
Modified: branches/uml-merge/source/orchid/cMDEProperty.cc
===================================================================
--- branches/uml-merge/source/orchid/cMDEProperty.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEProperty.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -19,7 +19,7 @@
#include <sys/wait.h>
#include <errno.h>
-float cMDEProperty::numWitnesses() {
+float cMDEProperty::NumWitnesses() {
//std::string file_name = "tmp-witness.pr";
std::string cmd; // = "cp tmp.pr "+ WITNESS;
@@ -41,7 +41,7 @@
}
-float cMDEProperty::verify() {
+float cMDEProperty::Verify() {
// std::string file_name = "tmp-property.pr";
std::string cmd; // = "cp tmp.pr "+ _property_file_name;
// if(system(cmd.c_str())!=0) return 0.0;
@@ -59,33 +59,33 @@
}
-void cMDEProperty::evaluate() {
+void cMDEProperty::Evaluate() {
float wit_reward = 0;
- float verify_reward = 0;
+ float Verify_reward = 0;
//std::string cmd;
//std::string work_prop = "properties_that_passed";
- // print the witness property
- printWitness();
- // call numWitnesses
- wit_reward = numWitnesses();
+ // Print the witness property
+ PrintWitness();
+ // call NumWitnesses
+ wit_reward = NumWitnesses();
- // call verify
+ // call Verify
if (wit_reward > 0) {
- // print the property
- print();
- verify_reward = verify();
+ // Print the property
+ Print();
+ Verify_reward = Verify();
}
// if this property passed, then save it to a file
- if (verify_reward) {
- printInEnglish();
+ if (Verify_reward) {
+ PrintInEnglish();
// cmd = "cat english-property >> " + work_prop;
// system(cmd.c_str());
}
- _reward = verify_reward;
+ _reward = Verify_reward;
}
Modified: branches/uml-merge/source/orchid/cMDEProperty.h
===================================================================
--- branches/uml-merge/source/orchid/cMDEProperty.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEProperty.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -19,36 +19,36 @@
public:
virtual ~cMDEProperty() {}
// A function that prints the property to a file.
- virtual void print() = 0;
- virtual void printWitness() = 0;
- virtual void printInEnglish() =0;
- virtual std::string getPropertyType() = 0;
- virtual std::string getPropertyParameters() { return ""; }
+ virtual void Print() = 0;
+ virtual void PrintWitness() = 0;
+ virtual void PrintInEnglish() =0;
+ virtual std::string GetPropertyType() = 0;
+ virtual std::string GetPropertyParameters() { return ""; }
// A function that checks to see if there is a witness trace for the property
- float numWitnesses();
+ float NumWitnesses();
// A function that verifies a property
- float verify();
+ float Verify();
// A function that evaluates a property
- virtual void evaluate();
- void setEvaluationInformation (float eval) { _reward = eval; }
- float getEvaluationInformation() { return _reward; }
+ virtual void Evaluate();
+ void SetEvaluationInformation (float eval) { _reward = eval; }
+ float GetEvaluationInformation() { return _reward; }
- // These functions get and set how interesting a property is. This
+ // These functions Get and set how interesting a property is. This
// information is calculated by the property generator when
// the property is created.
- void setInterestingProperty(float inter) {_interesting = inter; }
- float getInteresting() { return _interesting; }
+ void SetInterestingProperty(float inter) {_interesting = inter; }
+ float GetInteresting() { return _interesting; }
// True means the property's value was determined without checking it.
- void setSuppressed(bool s) { _suppressed = s; }
- bool getSuppressed() { return _suppressed; }
+ void SetSuppressed(bool s) { _suppressed = s; }
+ bool GetSuppressed() { return _suppressed; }
- // These functions get and set whether the expressions used by the property
+ // These functions Get and set whether the expressions used by the property
// involve classes that are (or are not) related to one another.
// This information is calculated and set by the property generator class.
- void setUsesRelatedClasses( bool r) { _uses_related_classes = r; }
- bool getUsesRelatedClasses() { return _uses_related_classes; }
+ void SetUsesRelatedClasses( bool r) { _uses_related_classes = r; }
+ bool GetUsesRelatedClasses() { return _uses_related_classes; }
protected:
@@ -71,8 +71,8 @@
{
std::string name1, name2;
- name1 = p1->getPropertyType() + p1->getPropertyParameters();
- name2 = p2->getPropertyType() + p2->getPropertyParameters();
+ name1 = p1->GetPropertyType() + p1->GetPropertyParameters();
+ name2 = p2->GetPropertyType() + p2->GetPropertyParameters();
// 1st less than 2nd & 2nd never equal to the first.
return (name1 < name2);
Modified: branches/uml-merge/source/orchid/cMDEPropertyGenerator.cc
===================================================================
--- branches/uml-merge/source/orchid/cMDEPropertyGenerator.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEPropertyGenerator.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -50,47 +50,47 @@
expressions.erase(expressions.begin(), expressions.end());
}
-float cMDEPropertyGenerator::addKnownExistenceProperty(std::string s){
+float cMDEPropertyGenerator::AddKnownExistenceProperty(std::string s){
cMDEExistenceProperty* e = new cMDEExistenceProperty(s);
- e->setInterestingProperty(0);
- e->setUsesRelatedClasses(0);
- e->setSuppressed(true);
+ e->SetInterestingProperty(0);
+ e->SetUsesRelatedClasses(0);
+ e->SetSuppressed(true);
return 0;
}
-float cMDEPropertyGenerator::addKnownAbsenceProperty(std::string s){
+float cMDEPropertyGenerator::AddKnownAbsenceProperty(std::string s){
cMDEAbsenceProperty* e = new cMDEAbsenceProperty(s);
- e->setInterestingProperty(0);
- e->setUsesRelatedClasses(0);
- e->setSuppressed(true);
+ e->SetInterestingProperty(0);
+ e->SetUsesRelatedClasses(0);
+ e->SetSuppressed(true);
return 0;
}
-float cMDEPropertyGenerator::addKnownUniversalProperty(std::string s){
+float cMDEPropertyGenerator::AddKnownUniversalProperty(std::string s){
cMDEUniversalProperty* e = new cMDEUniversalProperty(s);
- e->setInterestingProperty(0);
- e->setUsesRelatedClasses(0);
- e->setSuppressed(true);
+ e->SetInterestingProperty(0);
+ e->SetUsesRelatedClasses(0);
+ e->SetSuppressed(true);
return 0;
}
-float cMDEPropertyGenerator::addKnownPrecedenceProperty(std::string s1, std::string s2){
+float cMDEPropertyGenerator::AddKnownPrecedenceProperty(std::string s1, std::string s2){
cMDEPrecedenceProperty* e = new cMDEPrecedenceProperty(s1, s2);
- e->setInterestingProperty(0);
- e->setUsesRelatedClasses(0);
- e->setSuppressed(true);
+ e->SetInterestingProperty(0);
+ e->SetUsesRelatedClasses(0);
+ e->SetSuppressed(true);
return 0;
}
-float cMDEPropertyGenerator::addKnownResponseProperty(std::string s1, std::string s2){
+float cMDEPropertyGenerator::AddKnownResponseProperty(std::string s1, std::string s2){
cMDEResponseProperty* e = new cMDEResponseProperty(s1, s2);
- e->setInterestingProperty(0);
- e->setUsesRelatedClasses(0);
- e->setSuppressed(true);
+ e->SetInterestingProperty(0);
+ e->SetUsesRelatedClasses(0);
+ e->SetSuppressed(true);
return 0;
}
-float cMDEPropertyGenerator::addExistenceProperty(cMDEExpression* expr)
+float cMDEPropertyGenerator::AddExistenceProperty(cMDEExpression* expr)
{
float val = 0;
@@ -99,27 +99,27 @@
bool left = false;
bool right = false;
- // get the string representation of the expression.
- cMDEExistenceProperty e(expr->getExpr());
+ // Get the string representation of the expression.
+ cMDEExistenceProperty e(expr->GetExpr());
// exit if expression is null. (Should never be the case)
- if (expr->getExpr() == "<null>") return val;
+ if (expr->GetExpr() == "<null>") return val;
std::set<cMDEProperty*, ltcMDEProperty>::iterator mdeiterleft, mdeiterright;
// if an OR compound, compute the left & right pieces of the OR.
- if (expr->getCompound()) {
- if (expr->getOp() == "||") {
- cMDEExistenceProperty e_left(expr->getLeft()->getExpr());
- cMDEExistenceProperty e_right(expr->getRight()->getExpr());
+ if (expr->GetCompound()) {
+ if (expr->GetOp() == "||") {
+ cMDEExistenceProperty e_left(expr->GetLeft()->GetExpr());
+ cMDEExistenceProperty e_right(expr->GetRight()->GetExpr());
mdeiterleft = mdeprops.find(&e_left);
mdeiterright = mdeprops.find(&e_right);
if (mdeiterleft != mdeprops.end()) {
- left = ((*mdeiterleft)->getEvaluationInformation());
+ left = ((*mdeiterleft)->GetEvaluationInformation());
}
if (mdeiterright != mdeprops.end()) {
- right = ((*mdeiterright)->getEvaluationInformation());
+ right = ((*mdeiterright)->GetEvaluationInformation());
}
}
@@ -129,36 +129,36 @@
std::set<cMDEProperty*, ltcMDEProperty>::iterator mdepropiter = mdeprops.find(&e);
if (mdepropiter != mdeprops.end()) {
- val = (*mdepropiter)->getEvaluationInformation();
- val += (*mdepropiter)->getInteresting();
+ val = (*mdepropiter)->GetEvaluationInformation();
+ val += (*mdepropiter)->GetInteresting();
m_suppressed++;
} else {
- // add in how interesting the expression is. Use the STRONG and form.
- expr->interestingStrongANDExpressionEval();
- interesting += expr->getInterestingExpressionEval();
- interesting += getExpressionRelevancy(expr);
+ // Add in how interesting the expression is. Use the STRONG and form.
+ expr->InterestingStrongANDExpressionEval();
+ interesting += expr->GetInterestingExpressionEval();
+ interesting += GetExpressionRelevancy(expr);
- // determine if they are related
- related = expr->getUsesRelatedClasses();
- e.setInterestingProperty(interesting);
- e.setUsesRelatedClasses(related);
+ // determine if they Are related
+ related = expr->GetUsesRelatedClasses();
+ e.SetInterestingProperty(interesting);
+ e.SetUsesRelatedClasses(related);
if (left) {
// std::cout << "LEFT" << std::endl;
// the left expression is the stronger form of this expression...
- val = (*mdeiterleft)->getEvaluationInformation();
- e.setSuppressed(true);
+ val = (*mdeiterleft)->GetEvaluationInformation();
+ e.SetSuppressed(true);
m_suppressed++;
} else if (right) {
// std::cout << "RIGHT" << std::endl;
// the left expression is the stronger form of this expression...
- val = (*mdeiterright)->getEvaluationInformation();
- e.setSuppressed(true);
+ val = (*mdeiterright)->GetEvaluationInformation();
+ e.SetSuppressed(true);
m_suppressed++;
} else {
- e.evaluate();
- val = e.getEvaluationInformation();
- e.setSuppressed(false);
+ e.Evaluate();
+ val = e.GetEvaluationInformation();
+ e.SetSuppressed(false);
}
mdeprops.insert(new cMDEExistenceProperty(e));
// std::cout << "val: " << val << std::endl;
@@ -168,14 +168,14 @@
} else {
m_property_failure++;
m_existence_property_failure++;
- e.setInterestingProperty(0);
+ e.SetInterestingProperty(0);
}
}
if ((m_related_class_mode == 2) && (related == 1)) { val += .5; }
if ((m_related_class_mode == 3) && (related == 0)) {
val =0;
- e.setSuppressed(true);
+ e.SetSuppressed(true);
m_suppressed++;
}
@@ -184,7 +184,7 @@
-float cMDEPropertyGenerator::addAbsenceProperty(cMDEExpression* expr)
+float cMDEPropertyGenerator::AddAbsenceProperty(cMDEExpression* expr)
{
// a pointer to the absence property
float val = 0;
@@ -194,27 +194,27 @@
bool right = false;
- // get the string representation of the expression.
- cMDEAbsenceProperty e(expr->getExpr());
+ // Get the string representation of the expression.
+ cMDEAbsenceProperty e(expr->GetExpr());
// exit if expression is null. (Should never be the case)
- if (expr->getExpr() == "<null>") return val;
+ if (expr->GetExpr() == "<null>") return val;
std::set<cMDEProperty*, ltcMDEProperty>::iterator mdeiterleft, mdeiterright;
// if an AND compound, compute the left & right pieces of the OR.
- if (expr->getCompound()) {
- if (expr->getOp() == "&&") {
- cMDEExistenceProperty e_left(expr->getLeft()->getExpr());
- cMDEExistenceProperty e_right(expr->getRight()->getExpr());
+ if (expr->GetCompound()) {
+ if (expr->GetOp() == "&&") {
+ cMDEExistenceProperty e_left(expr->GetLeft()->GetExpr());
+ cMDEExistenceProperty e_right(expr->GetRight()->GetExpr());
mdeiterleft = mdeprops.find(&e_left);
mdeiterright = mdeprops.find(&e_right);
if (mdeiterleft != mdeprops.end()) {
- left = ((*mdeiterleft)->getEvaluationInformation());
+ left = ((*mdeiterleft)->GetEvaluationInformation());
}
if (mdeiterright != mdeprops.end()) {
- right = ((*mdeiterright)->getEvaluationInformation());
+ right = ((*mdeiterright)->GetEvaluationInformation());
}
}
@@ -223,38 +223,38 @@
// first, try to find the property & check for redundancy....
std::set<cMDEProperty*, ltcMDEProperty>::iterator mdepropiter = mdeprops.find(&e);
if (mdepropiter != mdeprops.end()) {
- val = (*mdepropiter)->getEvaluationInformation();
- val += (*mdepropiter)->getInteresting();
+ val = (*mdepropiter)->GetEvaluationInformation();
+ val += (*mdepropiter)->GetInteresting();
m_suppressed++;
} else {
- // add in how interesting the expression is. Use the WEAK and form.
- expr->interestingWeakANDExpressionEval();
- interesting += expr->getInterestingExpressionEval();
+ // Add in how interesting the expression is. Use the WEAK and form.
+ expr->InterestingWeakANDExpressionEval();
+ interesting += expr->GetInterestingExpressionEval();
- interesting += getExpressionRelevancy(expr);
+ interesting += GetExpressionRelevancy(expr);
- // determine if they are related
- related = expr->getUsesRelatedClasses();
+ // determine if they Are related
+ related = expr->GetUsesRelatedClasses();
- e.setInterestingProperty(interesting);
+ e.SetInterestingProperty(interesting);
if (left) {
std::cout << "LEFT" << std::endl;
// the left expression is the stronger form of this expression...
- val = (*mdeiterleft)->getEvaluationInformation();
- e.setSuppressed(true);
+ val = (*mdeiterleft)->GetEvaluationInformation();
+ e.SetSuppressed(true);
m_suppressed++;
} else if (right) {
// std::cout << "RIGHT" << std::endl;
// the left expression is the stronger form of this expression...
- val = (*mdeiterright)->getEvaluationInformation();
- e.setSuppressed(true);
+ val = (*mdeiterright)->GetEvaluationInformation();
+ e.SetSuppressed(true);
m_suppressed++;
} else {
- e.evaluate();
- val = e.getEvaluationInformation();
- e.setSuppressed(false);
+ e.Evaluate();
+ val = e.GetEvaluationInformation();
+ e.SetSuppressed(false);
}
mdeprops.insert (new cMDEAbsenceProperty(e));
@@ -262,7 +262,7 @@
m_property_success++;
m_absence_property_success++;
} else {
- e.setInterestingProperty(0);
+ e.SetInterestingProperty(0);
m_property_failure++;
m_absence_property_failure++;
}
@@ -272,7 +272,7 @@
if ((m_related_class_mode == 2) && (related == 1)) { val += .5; }
if ((m_related_class_mode == 3) && (related == 0)) {
val =0;
- e.setSuppressed(true);
+ e.SetSuppressed(true);
m_suppressed++;
}
@@ -280,7 +280,7 @@
}
-float cMDEPropertyGenerator::addUniversalProperty(cMDEExpression* expr)
+float cMDEPropertyGenerator::AddUniversalProperty(cMDEExpression* expr)
{
// a pointer to the universal property
float val = 0;
@@ -289,25 +289,25 @@
bool left = false;
bool right = false;
- cMDEUniversalProperty e(expr->getExpr());
+ cMDEUniversalProperty e(expr->GetExpr());
// exit if expression is null. (Should never be the case)
- if (expr->getExpr() == "<null>") return val;
+ if (expr->GetExpr() == "<null>") return val;
std::set<cMDEProperty*, ltcMDEProperty>::iterator mdeiterleft, mdeiterright;
// if an OR compound, compute the left & right pieces of the OR.
- if (expr->getCompound()) {
- if (expr->getOp() == "||") {
- cMDEExistenceProperty e_left(expr->getLeft()->getExpr());
- cMDEExistenceProperty e_right(expr->getRight()->getExpr());
+ if (expr->GetCompound()) {
+ if (expr->GetOp() == "||") {
+ cMDEExistenceProperty e_left(expr->GetLeft()->GetExpr());
+ cMDEExistenceProperty e_right(expr->GetRight()->GetExpr());
mdeiterleft = mdeprops.find(&e_left);
mdeiterright = mdeprops.find(&e_right);
if (mdeiterleft != mdeprops.end()) {
- left = ((*mdeiterleft)->getEvaluationInformation());
+ left = ((*mdeiterleft)->GetEvaluationInformation());
}
if (mdeiterright != mdeprops.end()) {
- right = ((*mdeiterright)->getEvaluationInformation());
+ right = ((*mdeiterright)->GetEvaluationInformation());
}
}
}
@@ -315,36 +315,36 @@
std::set<cMDEProperty*, ltcMDEProperty>::iterator mdepropiter = mdeprops.find(&e);
if (mdepropiter != mdeprops.end()) {
- val = (*mdepropiter)->getEvaluationInformation();
- val += (*mdepropiter)->getInteresting();
+ val = (*mdepropiter)->GetEvaluationInformation();
+ val += (*mdepropiter)->GetInteresting();
m_suppressed++;
} else {
- // add in how interesting the expression is. Use the STRONG and form.
- expr->interestingStrongANDExpressionEval();
- interesting += expr->getInterestingExpressionEval();
- e.setInterestingProperty(interesting);
- interesting += getExpressionRelevancy(expr);
+ // Add in how interesting the expression is. Use the STRONG and form.
+ expr->InterestingStrongANDExpressionEval();
+ interesting += expr->GetInterestingExpressionEval();
+ e.SetInterestingProperty(interesting);
+ interesting += GetExpressionRelevancy(expr);
- // determine if they are related
- related = expr->getUsesRelatedClasses();
+ // determine if they Are related
+ related = expr->GetUsesRelatedClasses();
if (left) {
std::cout << "LEFT" << std::endl;
// the left expression is the stronger form of this expression...
- val = (*mdeiterleft)->getEvaluationInformation();
- e.setSuppressed(true);
+ val = (*mdeiterleft)->GetEvaluationInformation();
+ e.SetSuppressed(true);
m_suppressed++;
} else if (right) {
std::cout << "RIGHT" << std::endl;
// the left expression is the stronger form of this expression...
- val = (*mdeiterright)->getEvaluationInformation();
- e.setSuppressed(true);
+ val = (*mdeiterright)->GetEvaluationInformation();
+ e.SetSuppressed(true);
m_suppressed++;
} else {
e.evaluate();
- val = e.getEvaluationInformation();
- e.setSuppressed(false);
+ val = e.GetEvaluationInformation();
+ e.SetSuppressed(false);
}
mdeprops.insert (new cMDEUniversalProperty(e));
@@ -354,14 +354,14 @@
} else {
m_property_failure++;
m_universal_property_failure++;
- e.setInterestingProperty(0);
+ e.SetInterestingProperty(0);
}
}
if ((m_related_class_mode == 2) && (related == 1)) { val += .5; }
if ((m_related_class_mode == 3) && (related == 0)) {
val =0;
- e.setSuppressed(true);
+ e.SetSuppressed(true);
m_suppressed++;
}
@@ -370,7 +370,7 @@
}
-float cMDEPropertyGenerator::addResponseProperty(cMDEExpression* e1, cMDEExpression* e2)
+float cMDEPropertyGenerator::AddResponseProperty(cMDEExpression* e1, cMDEExpression* e2)
{
// a pointer to the universal property
float val = 0;
@@ -378,9 +378,9 @@
bool related;
- cMDEResponseProperty e(e1->getExpr(), e2->getExpr());
- bool dependent = areExpressionsAtsOpsDependent(e1, e2);
- // exit if the expressions are dependent.
+ cMDEResponseProperty e(e1->GetExpr(), e2->GetExpr());
+ bool dependent = AreExpressionsAtsOpsDependent(e1, e2);
+ // exit if the expressions Are dependent.
if (dependent) {
m_suppressed++;
return val;
@@ -388,23 +388,23 @@
std::set<cMDEProperty*, ltcMDEProperty>::iterator mdepropiter = mdeprops.find(&e);
if (mdepropiter != mdeprops.end()) {
- val = (*mdepropiter)->getEvaluationInformation();
- val += (*mdepropiter)->getInteresting();
+ val = (*mdepropiter)->GetEvaluationInformation();
+ val += (*mdepropiter)->GetInteresting();
m_suppressed++;
} else {
- e1->interestingStrongANDExpressionEval();
- e2->interestingStrongANDExpressionEval();
- interesting += e1->getInterestingExpressionEval() + e1->getInterestingExpressionEval();
- interesting += getExpressionRelevancy(e1) + getExpressionRelevancy(e2);
+ e1->InterestingStrongANDExpressionEval();
+ e2->InterestingStrongANDExpressionEval();
+ interesting += e1->GetInterestingExpressionEval() + e1->GetInterestingExpressionEval();
+ interesting += GetExpressionRelevancy(e1) + GetExpressionRelevancy(e2);
- related = areExpressionsRelated(e1, e2);
+ related = AreExpressionsRelated(e1, e2);
- e.setSuppressed(false);
- e.setInterestingProperty(interesting);
- e.evaluate();
- val = e.getEvaluationInformation();
+ e.SetSuppressed(false);
+ e.SetInterestingProperty(interesting);
+ e.Evaluate();
+ val = e.GetEvaluationInformation();
mdeprops.insert (new cMDEResponseProperty(e));
if (val >0) {
m_property_success++;
@@ -412,15 +412,15 @@
} else {
m_property_failure++;
m_response_property_failure++;
- e.setInterestingProperty(0);
+ e.SetInterestingProperty(0);
}
}
if ((m_related_class_mode == 2) && (related == 1)) { val += .5; }
if ((m_related_class_mode == 3) && (related == 0)) {
val =0;
- if (e.getSuppressed() == false) {
- e.setSuppressed(true);
+ if (e.GetSuppressed() == false) {
+ e.SetSuppressed(true);
m_suppressed++;
}
}
@@ -428,7 +428,7 @@
return val;
}
-float cMDEPropertyGenerator::addPrecedenceProperty(cMDEExpression* e1, cMDEExpression* e2)
+float cMDEPropertyGenerator::AddPrecedenceProperty(cMDEExpression* e1, cMDEExpression* e2)
{
// a pointer to the universal property
float val = 0;
@@ -436,32 +436,32 @@
bool related;
- bool dependent = areExpressionsAtsOpsDependent(e1, e2);
- // exit if the expressions are dependent.
+ bool dependent = AreExpressionsAtsOpsDependent(e1, e2);
+ // exit if the expressions Are dependent.
if (dependent) {
m_suppressed++;
return val;
}
- cMDEPrecedenceProperty e(e1->getExpr(), e2->getExpr());
+ cMDEPrecedenceProperty e(e1->GetExpr(), e2->GetExpr());
std::set<cMDEProperty*, ltcMDEProperty>::iterator mdepropiter = mdeprops.find(&e);
if (mdepropiter != mdeprops.end()) {
- val = (*mdepropiter)->getEvaluationInformation();
- val += (*mdepropiter)->getInteresting();
+ val = (*mdepropiter)->GetEvaluationInformation();
+ val += (*mdepropiter)->GetInteresting();
m_suppressed++;
} else {
- e.setSuppressed(false);
- e1->interestingStrongANDExpressionEval();
- e2->interestingStrongANDExpressionEval();
- interesting += e1->getInterestingExpressionEval() + e1->getInterestingExpressionEval();
- interesting += getExpressionRelevancy(e1) + getExpressionRelevancy(e2);
- related = areExpressionsRelated(e1, e2);
+ e.SetSuppressed(false);
+ e1->InterestingStrongANDExpressionEval();
+ e2->InterestingStrongANDExpressionEval();
+ interesting += e1->GetInterestingExpressionEval() + e1->GetInterestingExpressionEval();
+ interesting += GetExpressionRelevancy(e1) + GetExpressionRelevancy(e2);
+ related = AreExpressionsRelated(e1, e2);
- e.setInterestingProperty(interesting);
- e.evaluate();
- val = e.getEvaluationInformation();
+ e.SetInterestingProperty(interesting);
+ e.Evaluate();
+ val = e.GetEvaluationInformation();
mdeprops.insert (new cMDEPrecedenceProperty(e));
if (val >0) {
@@ -470,7 +470,7 @@
} else {
m_property_failure++;
m_precedence_property_failure++;
- e.setInterestingProperty(0);
+ e.SetInterestingProperty(0);
}
}
@@ -478,8 +478,8 @@
if ((m_related_class_mode == 2) && (related == 1)) { val += .5; }
if ((m_related_class_mode == 3) && (related == 0)) {
val = 0;
- if (e.getSuppressed() == false) {
- e.setSuppressed(true);
+ if (e.GetSuppressed() == false) {
+ e.SetSuppressed(true);
m_suppressed++;
}
}
@@ -489,18 +489,18 @@
}
-bool cMDEPropertyGenerator::addSimpleOperationExpression(std::string n,
+bool cMDEPropertyGenerator::AddSimpleOperationExpression(std::string n,
std::string c,
std::set<std::string> rcs)
{
bool val = false;
cMDESimpleOperationExpression* e = new cMDESimpleOperationExpression(n, c);
- // set related class names
- e->setRelatedClassNames(rcs);
- e->addUsedClassName(c);
- e->addRelatedClassName(c);
- e->addAttOpName(c + "." + n);
- e->setUsesRelatedClasses(true);
+ // Set related class names
+ e->SetRelatedClassNames(rcs);
+ e->AddUsedClassName(c);
+ e->AddRelatedClassName(c);
+ e->AddAttOpName(c + "." + n);
+ e->SetUsesRelatedClasses(true);
std::vector<cMDEExpression*>::iterator exprit;
exprit = find(expressions.begin(), expressions.end(), e);
@@ -514,20 +514,20 @@
}
-bool cMDEPropertyGenerator::addSimpleAttAttExpression(cMDEExpressionAttribute* a1,
+bool cMDEPropertyGenerator::AddSimpleAttAttExpression(cMDEExpressionAttribute* a1,
cMDEExpressionAttribute* a2,
std::string op ,
std::set<std::string> rcs)
{
bool val = false;
cMDESimpleAttAttExpression* e = new cMDESimpleAttAttExpression(a1, a2, op);
- // set related class names
- e->setRelatedClassNames(rcs);
- e->addUsedClassName(a1->getClassName());
- e->addRelatedClassName(a1->getClassName());
- e->addAttOpName(a1->getClassName() + "." + a1->getAttName());
- e->addAttOpName(a1->getClassName() + "." + a2->getAttName());
- e->setUsesRelatedClasses(true);
+ // Set related class names
+ e->SetRelatedClassNames(rcs);
+ e->AddUsedClassName(a1->GetClassName());
+ e->AddRelatedClassName(a1->GetClassName());
+ e->AddAttOpName(a1->GetClassName() + "." + a1->GetAttName());
+ e->AddAttOpName(a1->GetClassName() + "." + a2->GetAttName());
+ e->SetUsesRelatedClasses(true);
std::vector<cMDEExpression*>::iterator exprit;
exprit = find(expressions.begin(), expressions.end(), e);
@@ -540,19 +540,19 @@
return val;
}
-bool cMDEPropertyGenerator::addSimpleAttValExpression(cMDEExpressionAttribute* a1,
+bool cMDEPropertyGenerator::AddSimpleAttValExpression(cMDEExpressionAttribute* a1,
std::string value,
std::string op,
std::set<std::string> rcs)
{
bool val = false;
cMDESimpleAttValExpression* e = new cMDESimpleAttValExpression(a1, value, op);
- // set related class names
- e->setRelatedClassNames(rcs);
- e->addUsedClassName(a1->getClassName());
- e->addRelatedClassName(a1->getClassName());
- e->addAttOpName(a1->getClassName() + "." + a1->getAttName());
- e->setUsesRelatedClasses(true);
+ // Set related class names
+ e->SetRelatedClassNames(rcs);
+ e->AddUsedClassName(a1->GetClassName());
+ e->AddRelatedClassName(a1->GetClassName());
+ e->AddAttOpName(a1->GetClassName() + "." + a1->GetAttName());
+ e->SetUsesRelatedClasses(true);
std::vector<cMDEExpression*>::iterator exprit;
exprit = find(expressions.begin(), expressions.end(), e);
@@ -566,39 +566,39 @@
}
-bool cMDEPropertyGenerator::addCompoundExpression(cMDEExpression* e1,
+bool cMDEPropertyGenerator::AddCompoundExpression(cMDEExpression* e1,
cMDEExpression* e2,
std::string op)
{
bool val = false;
cMDECompoundExpression* e = new cMDECompoundExpression(e1, e2, op);
- // If ats/ops are dependent, then don't create the expression
- if (areExpressionsAtsOpsDependent(e1, e2)) return false;
+ // If ats/ops Are dependent, then don't create the expression
+ if (AreExpressionsAtsOpsDependent(e1, e2)) return false;
// determine if it uses related classes
- e->setUsesRelatedClasses(areExpressionsRelated(e1, e2));
+ e->SetUsesRelatedClasses(AreExpressionsRelated(e1, e2));
- // set at op names.
- e->setAttOpNames(e1->getAtOpNames());
- std::set<std::string> rcns = e2->getAtOpNames();
+ // Set at op names.
+ e->SetAttOpNames(e1->GetAtOpNames());
+ std::set<std::string> rcns = e2->GetAtOpNames();
for (std::set<std::string>::iterator it = rcns.begin(); it!=rcns.end(); it++) {
- e->addAttOpName(*it);
+ e->AddAttOpName(*it);
}
- // set related class names
- e->setRelatedClassNames(e1->getRelatedClassNames());
- rcns = e2->getRelatedClassNames();
+ // Set related class names
+ e->SetRelatedClassNames(e1->GetRelatedClassNames());
+ rcns = e2->GetRelatedClassNames();
for (std::set<std::string>::iterator it = rcns.begin(); it!=rcns.end(); it++) {
- e->addRelatedClassName(*it);
+ e->AddRelatedClassName(*it);
}
- // set used class names
- e->setUsedClassNames(e1->getUsedClassNames());
- std::set<std::string> ucns = e2->getUsedClassNames();
+ // Set used class names
+ e->SetUsedClassNames(e1->GetUsedClassNames());
+ std::set<std::string> ucns = e2->GetUsedClassNames();
for (std::set<std::string>::iterator it = ucns.begin(); it!=ucns.end(); it++) {
- e->addUsedClassName(*it);
+ e->AddUsedClassName(*it);
}
std::vector<cMDEExpression*>::iterator exprit;
@@ -624,7 +624,7 @@
bool val = false;
if (expression_p != expression_q){
- val = addCompoundExpression(getP(), getQ(), "&&");
+ val = AddCompoundExpression(GetP(), GetQ(), "&&");
}
return (val);
}
@@ -638,7 +638,7 @@
bool val = false;
if (expression_p != expression_q){
- val = addCompoundExpression(getP(), getQ(), "||");
+ val = AddCompoundExpression(GetP(), GetQ(), "||");
}
return (val);
}
@@ -646,7 +646,7 @@
-void cMDEPropertyGenerator::printExpressions()
+void cMDEPropertyGenerator::PrintExpressions()
{
std::vector<cMDEExpression*>::iterator exprit;
std::set<std::string> used_class_names;
@@ -655,10 +655,10 @@
int count =0;
for (exprit = expressions.begin(); exprit < expressions.end(); exprit++){
- used_class_names = (*exprit)->getUsedClassNames();
- related_class_names = (*exprit)->getRelatedClassNames();
- std::cout << count << " " << (*exprit)->getExpr() << std::endl;
- std::cout << " uses related classes: " << (*exprit)->getUsesRelatedClasses() << std::endl;
+ used_class_names = (*exprit)->GetUsedClassNames();
+ related_class_names = (*exprit)->GetRelatedClassNames();
+ std::cout << count << " " << (*exprit)->GetExpr() << std::endl;
+ std::cout << " uses related classes: " << (*exprit)->GetUsesRelatedClasses() << std::endl;
std::cout << " used class names: " << std::endl;
for (it = used_class_names.begin(); it!=used_class_names.end(); it++) {
std::cout << " " << (*it) << std::endl;
@@ -674,12 +674,12 @@
}
-bool cMDEPropertyGenerator::areExpressionsRelated(cMDEExpression* e1, cMDEExpression* e2)
+bool cMDEPropertyGenerator::AreExpressionsRelated(cMDEExpression* e1, cMDEExpression* e2)
{
// Get the related class names of expression 1
// Get the used class names of expression 2
- std::set<std::string> rcns = e1->getRelatedClassNames();
- std::set<std::string> ucns = e2->getUsedClassNames();
+ std::set<std::string> rcns = e1->GetRelatedClassNames();
+ std::set<std::string> ucns = e2->GetUsedClassNames();
// determine if it uses related classes
bool test = includes(rcns.begin(), rcns.end(), ucns.begin(), ucns.end());
@@ -687,37 +687,37 @@
return test;
}
-// try a set intersection and check that it is null.
-bool cMDEPropertyGenerator::areExpressionsAtsOpsDependent(cMDEExpression* e1, cMDEExpression* e2)
+// try a Set intersection and check that it is null.
+bool cMDEPropertyGenerator::AreExpressionsAtsOpsDependent(cMDEExpression* e1, cMDEExpression* e2)
{
// Get the at op names of expression 1
// Get the at op names of expression 2
- std::set<std::string> atop1 = e1->getAtOpNames();
- std::set<std::string> atop2 = e2->getAtOpNames();
+ std::set<std::string> atop1 = e1->GetAtOpNames();
+ std::set<std::string> atop2 = e2->GetAtOpNames();
std::set<std::string> results;
insert_iterator<std::set<std::string> > it1(results, results.begin());
// determine if it uses related classes
set_intersection(atop1.begin(), atop1.end(), atop2.begin(), atop2.end(), it1);
- // If the set is empty then the expressions are independent.
+ // If the Set is empty then the expressions Are independent.
if (results.size() == 0) return false;
return true;
}
-float cMDEPropertyGenerator::getExpressionRelevancy(cMDEExpression* e)
+float cMDEPropertyGenerator::GetExpressionRelevancy(cMDEExpression* e)
{
float total =0;
// check if the expression uses the relevant attributes or operations
for (unsigned int i=0; i<relevant_attributes.size(); i++) {
- total += e->usesAttribute(relevant_attributes[i]);
+ total += e->UsesAttribute(relevant_attributes[i]);
// std::cout << "relevant at " << relevant_attributes[i] << " " << total << std::endl;
}
for (unsigned int i=0; i<relevant_operations.size(); i++) {
- total += e->usesOperation(relevant_operations[i]);
+ total += e->UsesOperation(relevant_operations[i]);
// std::cout << "relevant op " << relevant_operations[i] << " " << total << std::endl;
}
Modified: branches/uml-merge/source/orchid/cMDEPropertyGenerator.h
===================================================================
--- branches/uml-merge/source/orchid/cMDEPropertyGenerator.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEPropertyGenerator.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -30,71 +30,71 @@
~cMDEPropertyGenerator();
// Get info about the properties satisfied by the model.
- int numSuccess() { return m_property_success; }
- int numFailure() { return m_property_failure; }
- int numTotalProperty() { return m_property_success + m_property_failure; }
- int numAbsencePropertySuccess() { return m_absence_property_success; }
- int numAbsencePropertyFailure() { return m_absence_property_failure; }
- int numAbsencePropertyTotal() { return m_absence_property_success + m_absence_property_failure; }
- int numExistencePropertySuccess() { return m_existence_property_success; }
- int numExistencePropertyFailure() { return m_existence_property_failure; }
- int numExistencePropertyTotal() {
+ int NumSuccess() { return m_property_success; }
+ int NumFailure() { return m_property_failure; }
+ int NumTotalProperty() { return m_property_success + m_property_failure; }
+ int NumAbsencePropertySuccess() { return m_absence_property_success; }
+ int NumAbsencePropertyFailure() { return m_absence_property_failure; }
+ int NumAbsencePropertyTotal() { return m_absence_property_success + m_absence_property_failure; }
+ int NumExistencePropertySuccess() { return m_existence_property_success; }
+ int NumExistencePropertyFailure() { return m_existence_property_failure; }
+ int NumExistencePropertyTotal() {
return m_existence_property_success + m_existence_property_failure; }
- int numUniversalPropertySuccess() { return m_universal_property_success; }
- int numUniversalPropertyFailure() { return m_universal_property_failure; }
- int numUniversalPropertyTotal() {
+ int NumUniversalPropertySuccess() { return m_universal_property_success; }
+ int NumUniversalPropertyFailure() { return m_universal_property_failure; }
+ int NumUniversalPropertyTotal() {
return m_universal_property_success + m_universal_property_failure; }
- int numPrecedencePropertySuccess() { return m_precedence_property_success; }
- int numPrecedencePropertyFailure() { return m_precedence_property_failure; }
- int numPrecedencePropertyTotal() {
+ int NumPrecedencePropertySuccess() { return m_precedence_property_success; }
+ int NumPrecedencePropertyFailure() { return m_precedence_property_failure; }
+ int NumPrecedencePropertyTotal() {
return m_precedence_property_success + m_precedence_property_failure; }
- int numResponsePropertySuccess() { return m_response_property_success; }
- int numResponsePropertyFailure() { return m_response_property_failure; }
- int numResponsePropertyTotal() { return m_response_property_success + m_response_property_failure; }
- int numSuppressed() { return m_suppressed; }
+ int NumResponsePropertySuccess() { return m_response_property_success; }
+ int NumResponsePropertyFailure() { return m_response_property_failure; }
+ int NumResponsePropertyTotal() { return m_response_property_success + m_response_property_failure; }
+ int NumSuppressed() { return m_suppressed; }
- int propertySize() { return mdeprops.size(); }
+ int PropertySize() { return mdeprops.size(); }
- void resetPropertyReward() { m_property_reward = 0; }
- void addPropertyReward(float x) { m_property_reward += x; }
- float getPropertyReward() { return m_property_reward; }
+ void ResetPropertyReward() { m_property_reward = 0; }
+ void AddPropertyReward(float x) { m_property_reward += x; }
+ float GetPropertyReward() { return m_property_reward; }
- void setRelatedClassMode(int rcm) { m_related_class_mode = rcm; }
+ void SetRelatedClassMode(int rcm) { m_related_class_mode = rcm; }
- bool addSimpleOperationExpression(std::string, std::string, std::set<std::string>);
- bool addSimpleAttAttExpression(cMDEExpressionAttribute*, cMDEExpressionAttribute*, std::string, std::set<std::string>);
- bool addSimpleAttValExpression(cMDEExpressionAttribute*, std::string, std::string, std::set<std::string>);
- bool addCompoundExpression(cMDEExpression*, cMDEExpression*, std::string);
+ bool AddSimpleOperationExpression(std::string, std::string, std::set<std::string>);
+ bool AddSimpleAttAttExpression(cMDEExpressionAttribute*, cMDEExpressionAttribute*, std::string, std::set<std::string>);
+ bool AddSimpleAttValExpression(cMDEExpressionAttribute*, std::string, std::string, std::set<std::string>);
+ bool AddCompoundExpression(cMDEExpression*, cMDEExpression*, std::string);
- void printExpressions();
+ void PrintExpressions();
// Properties
// float addExistenceProperty(std::string, float, bool);
- float addKnownExistenceProperty(std::string);
- float addExistenceProperty(cMDEExpression*);
+ float AddKnownExistenceProperty(std::string);
+ float AddExistenceProperty(cMDEExpression*);
// float addAbsenceProperty(std::string, float, bool);
- float addKnownAbsenceProperty(std::string);
- float addAbsenceProperty(cMDEExpression*);
+ float AddKnownAbsenceProperty(std::string);
+ float AddAbsenceProperty(cMDEExpression*);
// float addUniversalProperty(std::string, float, bool);
- float addKnownUniversalProperty(std::string);
- float addUniversalProperty(cMDEExpression*);
+ float AddKnownUniversalProperty(std::string);
+ float AddUniversalProperty(cMDEExpression*);
// float addResponseProperty(std::string, std::string, float, bool);
- float addKnownResponseProperty(std::string, std::string);
- float addResponseProperty(cMDEExpression*, cMDEExpression*);
+ float AddKnownResponseProperty(std::string, std::string);
+ float AddResponseProperty(cMDEExpression*, cMDEExpression*);
// float addPrecedenceProperty(std::string, std::string, float, bool);
- float addKnownPrecedenceProperty(std::string, std::string);
- float addPrecedenceProperty(cMDEExpression*, cMDEExpression*);
+ float AddKnownPrecedenceProperty(std::string, std::string);
+ float AddPrecedenceProperty(cMDEExpression*, cMDEExpression*);
// bool addExpression(std::string, std::set<std::string>);
// bool relatedExpressions(cMDEExpression*, cMDEExpression*);
- cMDEExpression* getP() { return expressions[expression_p]; }
- cMDEExpression* getQ() { return (expressions[expression_q]); }
- cMDEExpression* getR() { return (expressions[expression_r]); }
- std::string getPstring() { return (expressions[expression_p])->getExpr(); }
- std::string getQstring() { return (expressions[expression_q])->getExpr(); }
- std::string getRstring() { return (expressions[expression_r])->getExpr(); }
+ cMDEExpression* GetP() { return expressions[expression_p]; }
+ cMDEExpression* GetQ() { return (expressions[expression_q]); }
+ cMDEExpression* GetR() { return (expressions[expression_r]); }
+ std::string GetPstring() { return (expressions[expression_p])->GetExpr(); }
+ std::string GetQstring() { return (expressions[expression_q])->GetExpr(); }
+ std::string GetRstring() { return (expressions[expression_r])->GetExpr(); }
/* float getPInterest() {
(expressions[expression_p])->interestingExpressionEval();
@@ -106,27 +106,27 @@
(expressions[expression_r])->interestingExpressionEval();
return (expressions[expression_r])->getInterestingExpressionEval() ; }*/
- bool relativeMoveExpressionP(int x) { return relativeMoveIndex(expressions, expression_p, x); }
- bool absoluteMoveExpressionP(int x) { return absoluteMoveIndex(expressions, expression_p, x); }
- bool relativeMoveExpressionQ(int x) { return relativeMoveIndex(expressions, expression_q, x); }
- bool absoluteMoveExpressionQ(int x) { return absoluteMoveIndex(expressions, expression_q, x); }
- bool relativeMoveExpressionR(int x) { return relativeMoveIndex(expressions, expression_r, x); }
- bool absoluteMoveExpressionR(int x) { return absoluteMoveIndex(expressions, expression_r, x); }
- bool areExpressionsRelated(cMDEExpression*, cMDEExpression*);
- bool areExpressionsAtsOpsDependent(cMDEExpression*, cMDEExpression*);
+ bool RelativeMoveExpressionP(int x) { return RelativeMoveIndex(expressions, expression_p, x); }
+ bool AbsoluteMoveExpressionP(int x) { return AbsoluteMoveIndex(expressions, expression_p, x); }
+ bool RelativeMoveExpressionQ(int x) { return RelativeMoveIndex(expressions, expression_q, x); }
+ bool AbsoluteMoveExpressionQ(int x) { return AbsoluteMoveIndex(expressions, expression_q, x); }
+ bool RelativeMoveExpressionR(int x) { return RelativeMoveIndex(expressions, expression_r, x); }
+ bool AbsoluteMoveExpressionR(int x) { return AbsoluteMoveIndex(expressions, expression_r, x); }
+ bool AreExpressionsRelated(cMDEExpression*, cMDEExpression*);
+ bool AreExpressionsAtsOpsDependent(cMDEExpression*, cMDEExpression*);
bool ANDExpressions();
bool ORExpressions();
- void addRelevantAttribute(std::string s) { relevant_attributes.push_back(s); }
- void addRelevantOperation(std::string s) { relevant_operations.push_back(s); }
+ void AddRelevantAttribute(std::string s) { relevant_attributes.push_back(s); }
+ void AddRelevantOperation(std::string s) { relevant_operations.push_back(s); }
- float getExpressionRelevancy(cMDEExpression*);
+ float GetExpressionRelevancy(cMDEExpression*);
template <typename T>
- bool absoluteMoveIndex (T x, int &y, int z)
+ bool AbsoluteMoveIndex (T x, int &y, int z)
{
int x_size = (int) x.size();
@@ -135,11 +135,11 @@
}
y = 0;
- return relativeMoveIndex(x, y, z);
+ return RelativeMoveIndex(x, y, z);
}
template <typename T>
- bool relativeMoveIndex (T x, int &y, int z)
+ bool RelativeMoveIndex (T x, int &y, int z)
{
int x_size = (int) x.size();
Modified: branches/uml-merge/source/orchid/cMDEResponseProperty.cc
===================================================================
--- branches/uml-merge/source/orchid/cMDEResponseProperty.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEResponseProperty.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -9,7 +9,7 @@
#include "cMDEResponseProperty.h"
-void cMDEResponseProperty::print() {
+void cMDEResponseProperty::Print() {
// Create the file...
std::string cmd = "cp " + _promela + " " + _property_file_name;
@@ -38,7 +38,7 @@
}
-void cMDEResponseProperty::printWitness() {
+void cMDEResponseProperty::PrintWitness() {
// Create the file
std::string cmd = "cp " + _promela + " " + _witness_file_name;
@@ -72,7 +72,7 @@
}
-void cMDEResponseProperty::printInEnglish() {
+void cMDEResponseProperty::PrintInEnglish() {
std::ofstream outfile;
outfile.open (_properties.c_str(), std::ios_base::app);
Modified: branches/uml-merge/source/orchid/cMDEResponseProperty.h
===================================================================
--- branches/uml-merge/source/orchid/cMDEResponseProperty.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEResponseProperty.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -34,11 +34,11 @@
virtual ~cMDEResponseProperty() {}
- void print();
- void printWitness();
- void printInEnglish();
- std::string getPropertyType() { return "Response"; }
- std::string getPropertyParameters() { return (_expr_p + " " + _expr_q); }
+ void Print();
+ void PrintWitness();
+ void PrintInEnglish();
+ std::string GetPropertyType() { return "Response"; }
+ std::string GetPropertyParameters() { return (_expr_p + " " + _expr_q); }
Modified: branches/uml-merge/source/orchid/cMDESimpleAttAttExpression.h
===================================================================
--- branches/uml-merge/source/orchid/cMDESimpleAttAttExpression.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDESimpleAttAttExpression.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -28,19 +28,19 @@
_att_2 = a2;
_att_operator = op;
_compound = false;
- _expr = getInPromela();
+ _expr = GetInPromela();
}
~cMDESimpleAttAttExpression() {}
- // get functions
- std::string getInEnglish() {
- return (_att_1->getInEnglish() + " " + _att_operator + " " + _att_2->getInEnglish()); }
- std::string getInPromela() {
- return (_att_1->getInPromela() + " " + _att_operator + " " + _att_2->getInPromela()); }
+ // Get functions
+ std::string GetInEnglish() {
+ return (_att_1->GetInEnglish() + " " + _att_operator + " " + _att_2->GetInEnglish()); }
+ std::string GetInPromela() {
+ return (_att_1->GetInPromela() + " " + _att_operator + " " + _att_2->GetInPromela()); }
// Check to see if the Expression uses a specific attribute.
- bool usesAttribute(std::string s) {
- if ((s == _att_1->getAttName()) || (s==_att_2->getAttName())) return true;
+ bool UsesAttribute(std::string s) {
+ if ((s == _att_1->GetAttName()) || (s==_att_2->GetAttName())) return true;
return false;
}
@@ -48,7 +48,7 @@
- //std::set<std::string> getRelatedClasses() { return _related_classes; }
+ //std::set<std::string> GetRelatedClasses() { return _related_classes; }
protected:
Modified: branches/uml-merge/source/orchid/cMDESimpleAttValExpression.h
===================================================================
--- branches/uml-merge/source/orchid/cMDESimpleAttValExpression.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDESimpleAttValExpression.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -26,23 +26,23 @@
_att_operator = op;
_compound = false;
_expr =
- getInPromela();
+ GetInPromela();
}
~cMDESimpleAttValExpression() {}
- // get functions
- std::string getInEnglish() {
- return (_att_1->getInEnglish() + " " + _att_operator + " " + _att_val); }
- std::string getInPromela() {
- return (_att_1->getInPromela() + " " + _att_operator + " " + _att_val); }
+ // Get functions
+ std::string GetInEnglish() {
+ return (_att_1->GetInEnglish() + " " + _att_operator + " " + _att_val); }
+ std::string GetInPromela() {
+ return (_att_1->GetInPromela() + " " + _att_operator + " " + _att_val); }
// Check to see if the Expression uses a specific attribute.
- bool usesAttribute(std::string s) {
- if (s == _att_1->getAttName()) return true;
+ bool UsesAttribute(std::string s) {
+ if (s == _att_1->GetAttName()) return true;
return false;
}
- //std::set<std::string> getRelatedClasses() { return _related_classes; }
+ //std::set<std::string> GetRelatedClasses() { return _related_classes; }
protected:
Modified: branches/uml-merge/source/orchid/cMDESimpleExpression.h
===================================================================
--- branches/uml-merge/source/orchid/cMDESimpleExpression.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDESimpleExpression.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -23,12 +23,12 @@
~cMDEExpressionAttribute() {}
// get functions
- std::string getInEnglish() { return (_att_class + "." + _att_name); }
- std::string getInPromela() { return (_att_class + "_V." + _att_name); }
- std::set<std::string> getRelatedClasses() { return _related_classes; }
+ std::string GetInEnglish() { return (_att_class + "." + _att_name); }
+ std::string GetInPromela() { return (_att_class + "_V." + _att_name); }
+ std::set<std::string> GetRelatedClasses() { return _related_classes; }
// set functions
- void setRelatedClasses(std::set<std::string> s) { _related_classes = s; }
+ void SetRelatedClasses(std::set<std::string> s) { _related_classes = s; }
protected:
Modified: branches/uml-merge/source/orchid/cMDESimpleOperationExpression.h
===================================================================
--- branches/uml-merge/source/orchid/cMDESimpleOperationExpression.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDESimpleOperationExpression.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -9,7 +9,7 @@
#include <string>
#include <iostream>
#include <cassert>
-#include <set>
+#include <Set>
#include <cMDEExpression.h>
@@ -18,20 +18,20 @@
public:
cMDESimpleOperationExpression (std::string n, std::string c) {
- _op_name =n; _op_class=c; _expr = getInPromela();}
+ _op_name =n; _op_class=c; _expr = GetInPromela();}
~cMDESimpleOperationExpression() {}
- // get functions
- std::string getInEnglish() { return (_op_class + "." + _op_name + "()"); }
- std::string getInPromela() { return (_op_class + "_q??[" + _op_name + "]"); }
- std::set<std::string> getRelatedClasses() { return _related_classes; }
- std::string getOpName() { return _op_name; }
+ // Get functions
+ std::string GetInEnglish() { return (_op_class + "." + _op_name + "()"); }
+ std::string GetInPromela() { return (_op_class + "_q??[" + _op_name + "]"); }
+ std::set<std::string> GetRelatedClasses() { return _related_classes; }
+ std::string GetOpName() { return _op_name; }
- // set functions
- void setRelatedClasses(std::set<std::string> s) { _related_classes = s; }
+ // Set functions
+ void SetRelatedClasses(std::set<std::string> s) { _related_classes = s; }
// This function is used to see if an expression uses a given operation
- bool usesOperation(std::string s) {
+ bool UsesOperation(std::string s) {
if (s==_op_name) return true;
return false;
}
Modified: branches/uml-merge/source/orchid/cMDEUniversalProperty.cc
===================================================================
--- branches/uml-merge/source/orchid/cMDEUniversalProperty.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEUniversalProperty.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -9,7 +9,7 @@
#include "cMDEUniversalProperty.h"
-void cMDEUniversalProperty::print() {
+void cMDEUniversalProperty::Print() {
// Create the file...
std::string cmd = "cp " + _promela + " " + _property_file_name;
@@ -36,7 +36,7 @@
}
-void cMDEUniversalProperty::printWitness() {
+void cMDEUniversalProperty::PrintWitness() {
// Create the file
std::string cmd = "cp " + _promela + " " + _witness_file_name;
@@ -67,15 +67,15 @@
{
float verify_reward = 0;
- // print the property
- print();
- verify_reward = verify();
+ // Print the property
+ Print();
+ verify_reward = Verify();
// std::string cmd;
// std::string work_prop = "properties_that_passed";
// if this property passed, then save it to a file
if (verify_reward) {
- printInEnglish();
+ PrintInEnglish();
// cmd = "cat " + _name + " >> " + work_prop;
// cmd = "cat english-property >> " + work_prop;
// system(cmd.c_str());
@@ -86,7 +86,7 @@
-void cMDEUniversalProperty::printInEnglish() {
+void cMDEUniversalProperty::PrintInEnglish() {
std::ofstream outfile;
outfile.open (_properties.c_str(), std::ios_base::app);
Modified: branches/uml-merge/source/orchid/cMDEUniversalProperty.h
===================================================================
--- branches/uml-merge/source/orchid/cMDEUniversalProperty.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cMDEUniversalProperty.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -29,12 +29,12 @@
_promela = "tmp.pr";
}
virtual ~cMDEUniversalProperty() {}
- void print(); // { std::cout << _scope << " " << _expr_p << std::endl; }
- void printWitness(); // { std::cout << _scope << " " << _expr_p << std::endl; }
- void printInEnglish();
+ void Print(); // { std::cout << _scope << " " << _expr_p << std::endl; }
+ void PrintWitness(); // { std::cout << _scope << " " << _expr_p << std::endl; }
+ void PrintInEnglish();
void evaluate();
- std::string getPropertyType() { return "Universal"; }
- std::string getPropertyParameters() { return _expr_p; }
+ std::string GetPropertyType() { return "Universal"; }
+ std::string GetPropertyParameters() { return _expr_p; }
private:
Modified: branches/uml-merge/source/orchid/cUMLClass.cc
===================================================================
--- branches/uml-merge/source/orchid/cUMLClass.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cUMLClass.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -9,14 +9,14 @@
#include "cUMLClass.h"
-void cUMLClass::addOperation(std::string n, std::string c) {
+void cUMLClass::AddOperation(std::string n, std::string c) {
operation o;
o.op_name = n;
o.op_code = c;
operations.push_back(o);
}
-void cUMLClass::addAttribute(std::string n, std::string t, std::vector<std::string> vals) {
+void cUMLClass::AddAttribute(std::string n, std::string t, std::vector<std::string> vals) {
class_attribute c;
c.attribute_name = n;
c.attribute_type = t;
Modified: branches/uml-merge/source/orchid/cUMLClass.h
===================================================================
--- branches/uml-merge/source/orchid/cUMLClass.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cUMLClass.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -35,17 +35,17 @@
class cUMLClass{
public:
- void addOperation(std::string, std::string);
- void addAssociatedClass(std::string s) { associated_class_names.insert(s); }
- void addAttribute(std::string, std::string, std::vector<std::string>);
- void addClassName(std::string s) { name = s; }
+ void AddOperation(std::string, std::string);
+ void AddAssociatedClass(std::string s) { associated_class_names.insert(s); }
+ void AddAttribute(std::string, std::string, std::vector<std::string>);
+ void AddClassName(std::string s) { name = s; }
- std::string getClassName() { return name; }
- int numAttributes() { return attributes.size(); }
- int numOperations() { return operations.size(); }
- class_attribute getAttribute(int i) { return attributes[i]; }
- operation getOperation(int i) { return operations[i]; }
- std::set<std::string> getAssociatedClasses() { return associated_class_names; }
+ std::string GetClassName() { return name; }
+ int NumAttributes() { return attributes.size(); }
+ int NumOperations() { return operations.size(); }
+ class_attribute GetAttribute(int i) { return attributes[i]; }
+ operation GetOperation(int i) { return operations[i]; }
+ std::set<std::string> GetAssociatedClasses() { return associated_class_names; }
protected:
Modified: branches/uml-merge/source/orchid/cUMLModel.cc
===================================================================
--- branches/uml-merge/source/orchid/cUMLModel.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cUMLModel.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -75,7 +75,7 @@
cMDEPropertyGenerator& pg) {
std::string data, line;
int cur_class = -1;
- int num_classes;
+ int Num_classes;
std::ifstream infile;
infile.open(seed_model);
assert(infile.is_open());
@@ -94,19 +94,19 @@
{
if (line == "==MODEL==") {
line.erase();
- infile >> temp1 >> num_classes;
+ infile >> temp1 >> Num_classes;
infile >> temp1 >> hydra_mode;
infile >> temp1 >> witness_mode;
infile >> temp1 >> gen_mode;
infile >> temp1 >> related_class_mode;
- // resize state diagrams & classes to correspond to the number of classes.
- classes.resize(num_classes);
+ // resize state diagrams & classes to correspond to the Number of classes.
+ classes.resize(Num_classes);
state_diagrams.resize(classes.size());
} else if (line == "==CLASS==") {
line.erase();
infile >> temp1 >> class_name;
cur_class++;
- classes[cur_class].addClassName(class_name);
+ classes[cur_class].AddClassName(class_name);
} else if (line == "==ATTRIBUTES==") {
line.erase();
infile >> att_name;
@@ -118,7 +118,7 @@
infile >> att_val;
}
- classes[cur_class].addAttribute(att_name, att_type, att_vals);
+ classes[cur_class].AddAttribute(att_name, att_type, att_vals);
infile >> att_name;
}
} else if (line == "==OPERATIONS==") {
@@ -126,14 +126,14 @@
infile >> op_name;
while (op_name != "==END==") {
infile >> op_code;
- classes[cur_class].addOperation(op_name, op_code);
+ classes[cur_class].AddOperation(op_name, op_code);
infile >> op_name;
}
} else if (line == "==ASSOCIATIONS==") {
line.erase();
infile >> class_name;
while (class_name != "==END==") {
- classes[cur_class].addAssociatedClass(class_name);
+ classes[cur_class].AddAssociatedClass(class_name);
infile >> class_name;
}
} else if (line == "==SCENARIO==") {
@@ -141,7 +141,7 @@
s.path.clear();
s.stateDiagramID = cur_class;
infile >> s.shouldLoop >> s.startState;
- infile >> s.alt_set_name;
+ infile >> s.alt_Set_name;
infile >> temp;
// loop for utility
@@ -170,7 +170,7 @@
while (temp != "==END==") {
infile >> orig_i >> dest_i >> trig_i >> guard_i >> act_i;
if (temp != "0") {
- state_diagrams[cur_class].addTransitionTotal(orig_i, dest_i, trig_i, guard_i, act_i);
+ state_diagrams[cur_class].AddTransitionTotal(orig_i, dest_i, trig_i, guard_i, act_i);
}
infile >> temp;
}
@@ -180,40 +180,40 @@
while (temp != "==END==") {
infile >> trig_i >> guard_i >> act_i;
if (temp!="0") {
- state_diagrams[cur_class].addTransitionLabel(trig_i, guard_i, act_i);
+ state_diagrams[cur_class].AddTransitionLabel(trig_i, guard_i, act_i);
}
infile >> temp;
}
} else if (line == "==TRIGGERS==") {
line.erase();
infile >> temp;
- state_diagrams[cur_class].addTrigger("<null>", "<null>");
+ state_diagrams[cur_class].AddTrigger("<null>", "<null>");
while (temp != "==END==") {
infile >> temp1 >> temp2;
if (temp!="0") {
- state_diagrams[cur_class].addTrigger(temp1, temp2);
+ state_diagrams[cur_class].AddTrigger(temp1, temp2);
}
infile >> temp;
}
} else if (line == "==GUARDS==") {
line.erase();
infile >> temp;
- state_diagrams[cur_class].addGuard("<null>");
+ state_diagrams[cur_class].AddGuard("<null>");
while (temp != "==END==") {
infile >> temp2;
if (temp!="0") {
- state_diagrams[cur_class].addGuard(temp2);
+ state_diagrams[cur_class].AddGuard(temp2);
}
infile >> temp;
}
} else if (line == "==ACTIONS==") {
line.erase();
infile >> temp;
- state_diagrams[cur_class].addAction("<null>");
+ state_diagrams[cur_class].AddAction("<null>");
while (temp != "==END==") {
infile >> temp2;
if (temp!="01") {
- state_diagrams[cur_class].addAction(temp2);
+ state_diagrams[cur_class].AddAction(temp2);
}
infile >> temp;
}
@@ -223,7 +223,7 @@
getline (infile, temp);
while (temp!= "==END==") {
// infile >> temp2;
- pg.addKnownExistenceProperty(temp);
+ pg.AddKnownExistenceProperty(temp);
getline (infile, temp);
}
} else if (line == "==KNOWN=ABSENCE==") {
@@ -232,7 +232,7 @@
getline (infile, temp);
while (temp!= "==END==") {
// infile >> temp2;
- pg.addKnownAbsenceProperty(temp);
+ pg.AddKnownAbsenceProperty(temp);
// infile >> temp;
getline (infile, temp);
}
@@ -242,7 +242,7 @@
getline (infile, temp);
while (temp!= "==END==") {
// infile >> temp2;
- pg.addKnownUniversalProperty(temp2);
+ pg.AddKnownUniversalProperty(temp2);
// infile >> temp;
getline (infile, temp);
}
@@ -253,7 +253,7 @@
while (temp!= "==END==") {
// infile >> temp1 >> temp2;
getline (infile, temp2);
- pg.addKnownPrecedenceProperty(temp, temp2);
+ pg.AddKnownPrecedenceProperty(temp, temp2);
// infile >> temp;
getline (infile, temp);
}
@@ -264,7 +264,7 @@
while (temp!= "==END==") {
// infile >> temp1 >> temp2;
getline (infile, temp2);
- pg.addKnownResponseProperty(temp, temp2);
+ pg.AddKnownResponseProperty(temp, temp2);
// infile >> temp;
getline (infile, temp);
}
@@ -273,7 +273,7 @@
infile >> temp;
while (temp!= "==END==") {
infile >> temp2;
- pg.addRelevantAttribute(temp2);
+ pg.AddRelevantAttribute(temp2);
// std::cout << "relevant at " << temp2 << std::endl;
infile >> temp;
}
@@ -282,7 +282,7 @@
infile >> temp;
while (temp!= "==END==") {
infile >> temp2;
- pg.addRelevantOperation(temp2);
+ pg.AddRelevantOperation(temp2);
// std::cout << "relevant op " << temp2 << std::endl;
infile >> temp;
}
@@ -306,47 +306,47 @@
for (unsigned int i=0; i<classes.size(); i++) {
c = classes[i];
- temp_size = c.numAttributes();
+ temp_size = c.NumAttributes();
- // add nulls.
-// state_diagrams[i].addGuard("<null>");
-// state_diagrams[i].addTrigger("<null>", "<null>");
-// state_diagrams[i].addAction("<null>");
+ // Add nulls.
+// state_diagrams[i].AddGuard("<null>");
+// state_diagrams[i].AddTrigger("<null>", "<null>");
+// state_diagrams[i].AddAction("<null>");
// For each attribute...
for (int j=0; j<temp_size; j++) {
- a = c.getAttribute(j);
+ a = c.GetAttribute(j);
for (unsigned int k=0; k<a.attribute_values.size(); k++){
- // create both an equality and an inequality expression
+ // Create both an equality and an inequality expression
temp2 = a.attribute_values[k];
temp3 = a.attribute_name + "=" + temp2;
- state_diagrams[i].addGuard(temp3);
+ state_diagrams[i].AddGuard(temp3);
temp3 = a.attribute_name + "!=" + temp2;
- state_diagrams[i].addGuard(temp3);
+ state_diagrams[i].AddGuard(temp3);
}
}
// For each method
- temp_size = c.numOperations();
+ temp_size = c.NumOperations();
for (int m=0; m<temp_size; m++) {
- o = c.getOperation(m);
- state_diagrams[i].addTrigger(o.op_name, o.op_code);
+ o = c.GetOperation(m);
+ state_diagrams[i].AddTrigger(o.op_name, o.op_code);
}
- // For each of the related classes, add an action for each of
+ // For each of the related classes, Add an action for each of
// its methods... (yucky...)
rc.clear();
- rc = classes[i].getAssociatedClasses();
+ rc = classes[i].GetAssociatedClasses();
for (rcit=rc.begin(); rcit!=rc.end(); rcit++) {
// Find the related class in the list of classes...
for (unsigned int k=0; k<classes.size(); k++){
- if (classes[k].getClassName() == (*rcit)){
- // For each of its operations, add an action...
- temp_size = classes[k].numOperations();
+ if (classes[k].GetClassName() == (*rcit)){
+ // For each of its operations, Add an action...
+ temp_size = classes[k].NumOperations();
for (int m=0; m<temp_size; m++) {
- o = classes[k].getOperation(m);
- temp2 = "^" + classes[k].getClassName() + "." + o.op_name + "()";
- state_diagrams[i].addAction(temp2);
+ o = classes[k].GetOperation(m);
+ temp2 = "^" + classes[k].GetClassName() + "." + o.op_name + "()";
+ state_diagrams[i].AddAction(temp2);
}
}
}
@@ -386,12 +386,12 @@
genMode = _cfg_gen_mode;
relatedClassMode = _cfg_related_class_mode;
gen = new cMDEPropertyGenerator(_cfg_gen);
- gen->setRelatedClassMode(_cfg_related_class_mode);
+ gen->SetRelatedClassMode(_cfg_related_class_mode);
percent_scenario_complete = 0;
// Initialize the property generator.
// gen = new cMDEPropertyGenerator(_cfg_related_class_mode);
- createExpressionsFromClasses();
+ CreateExpressionsFromClasses();
}
@@ -400,7 +400,7 @@
delete gen;
}
-float cUMLModel::getBonusInfo (std::string s)
+float cUMLModel::GetBonusInfo (std::string s)
{
float val;
std::map<std::string, float>::iterator bonus_info_pointer;
@@ -416,14 +416,14 @@
}
-cUMLStateDiagram* cUMLModel::getStateDiagram (unsigned int x)
+cUMLStateDiagram* cUMLModel::GetStateDiagram (unsigned int x)
{
assert(x<classes.size());
return (&state_diagrams[x]);
}
-void cUMLModel::printXMI()
+void cUMLModel::PrintXMI()
{
xmi = "";
xmi = xi.xmi_begin;
@@ -433,69 +433,69 @@
for (unsigned int i=0; i<xi.classes_info.size(); i++) {
xmi += xi.classes_info[i];
- xmi += (getStateDiagram(i))->getXMI("sd" + i);
+ xmi += (GetStateDiagram(i))->GetXMI("sd" + i);
}
xmi += xi.xmi_end;
}
-std::string cUMLModel::getXMI()
+std::string cUMLModel::GetXMI()
{
return xmi;
}
-int cUMLModel::numStates()
+int cUMLModel::NumStates()
{
int temp_states = 0;
- for (int i=0; i<numSDs(); i++) {
- temp_states += getStateDiagram(i)->numStates();
+ for (int i=0; i<NumSDs(); i++) {
+ temp_states += GetStateDiagram(i)->NumStates();
}
return temp_states;
}
-int cUMLModel::numTrans()
+int cUMLModel::NumTrans()
{
int temp_trans = 0;
- for (int i=0; i<numSDs(); i++) {
- temp_trans += getStateDiagram(i)->numTrans();
+ for (int i=0; i<NumSDs(); i++) {
+ temp_trans += GetStateDiagram(i)->NumTrans();
}
return temp_trans;
}
-int cUMLModel::numTriggers()
+int cUMLModel::NumTriggers()
{
int temp_trigger = 0;
- for (int i=0; i<numSDs(); i++) {
- temp_trigger += getStateDiagram(i)->numTriggers();
+ for (int i=0; i<NumSDs(); i++) {
+ temp_trigger += GetStateDiagram(i)->NumTriggers();
}
return temp_trigger;
}
-int cUMLModel::numGuards()
+int cUMLModel::NumGuards()
{
int temp = 0;
- for (int i=0; i<numSDs(); i++) {
- temp += getStateDiagram(i)->numGuards();
+ for (int i=0; i<NumSDs(); i++) {
+ temp += GetStateDiagram(i)->NumGuards();
}
return temp;
}
-int cUMLModel::numActions()
+int cUMLModel::NumActions()
{
int temp = 0;
- for (int i=0; i<numSDs(); i++) {
- temp += getStateDiagram(i)->numActions();
+ for (int i=0; i<NumSDs(); i++) {
+ temp += GetStateDiagram(i)->NumActions();
}
return temp;
}
-int cUMLModel::numSDs()
+int cUMLModel::NumSDs()
{
return state_diagrams.size();
}
-int cUMLModel::numSCs()
+int cUMLModel::NumSCs()
{
return scenarios.size();
}
@@ -512,17 +512,17 @@
// Accrue results.
// Save bonus info.
scenario_completion.resize(scenarios.size());
- std::string current_alt_set = scenarios[0].alt_set_name;
+ std::string current_alt_Set = scenarios[0].alt_Set_name;
percent_scenario_complete = 0.0;
- double current_alt_set_percent_complete = 0.0;
- double current_alt_set_max_bonus = 0;
- int max_alt_set_id = 0;
- int num_sets = 1;
+ double current_alt_Set_percent_complete = 0.0;
+ double current_alt_Set_max_bonus = 0;
+ int max_alt_Set_id = 0;
+ int Num_Sets = 1;
// double accrued_ = 0.0;
for (unsigned int i=0; i< scenarios.size(); i++) {
s = scenarios[i];
- temp_bonus = getStateDiagram(s.stateDiagramID)->findPath(s.path, s.shouldLoop, s.startState);
+ temp_bonus = GetStateDiagram(s.stateDiagramID)->FindPath(s.path, s.shouldLoop, s.startState);
complete_bonus = s.path.size() + s.shouldLoop;
@@ -532,42 +532,42 @@
scenarios[i].utilityMap["Used"] = 0;
- if (s.alt_set_name != current_alt_set) {
+ if (s.alt_Set_name != current_alt_Set) {
// these update the running totals.
- percent_scenario_complete += current_alt_set_percent_complete;
- total_bonus += current_alt_set_max_bonus;
- scenarios[max_alt_set_id].utilityMap["Used"] = 1;
+ percent_scenario_complete += current_alt_Set_percent_complete;
+ total_bonus += current_alt_Set_max_bonus;
+ scenarios[max_alt_Set_id].utilityMap["Used"] = 1;
- // these prepare for the next set
- max_alt_set_id = i;
- current_alt_set_max_bonus = temp_bonus;
- current_alt_set = s.alt_set_name;
- current_alt_set_percent_complete = scenario_completion[i];
- num_sets++;
+ // these prepare for the next Set
+ max_alt_Set_id = i;
+ current_alt_Set_max_bonus = temp_bonus;
+ current_alt_Set = s.alt_Set_name;
+ current_alt_Set_percent_complete = scenario_completion[i];
+ Num_Sets++;
} else {
- if(current_alt_set_percent_complete < scenario_completion[i]) {
- current_alt_set_percent_complete = scenario_completion[i];
- current_alt_set_max_bonus = temp_bonus;
- max_alt_set_id = i;
+ if(current_alt_Set_percent_complete < scenario_completion[i]) {
+ current_alt_Set_percent_complete = scenario_completion[i];
+ current_alt_Set_max_bonus = temp_bonus;
+ max_alt_Set_id = i;
}
}
}
- // finish out by storing the values of the last set:
- percent_scenario_complete += current_alt_set_percent_complete;
- total_bonus += current_alt_set_max_bonus;
- scenarios[max_alt_set_id].utilityMap["Used"] = 1;
+ // finish out by storing the values of the last Set:
+ percent_scenario_complete += current_alt_Set_percent_complete;
+ total_bonus += current_alt_Set_max_bonus;
+ scenarios[max_alt_Set_id].utilityMap["Used"] = 1;
- percent_scenario_complete = percent_scenario_complete/num_sets;
+ percent_scenario_complete = percent_scenario_complete/Num_Sets;
- //printScenarioUtility("test");
+ //PrintScenarioUtility("test");
return total_bonus;
}
-void cUMLModel::printScenarioUtility(std::string s)
+void cUMLModel::PrintScenarioUtility(std::string s)
{
std::ofstream outfile;
outfile.open ("scenario-utility.csv", std::ios_base::app);
@@ -598,7 +598,7 @@
}
-bool cUMLModel::readyForHydra()
+bool cUMLModel::ReadyForHydra()
{
// options: (0) ALL_COMPLETE, (1) ONE_COMPLETE, (2) ONE_NON_EMPTY, (3) ALL_NON_EMPTY
// (4) ALL COMPLETE && DETERMINISTIC, (5) NONE, (6) PERCENTAGE COMPLETE
@@ -633,7 +633,7 @@
break;
case 4:
ret_val = 1;
- if (!(getBonusInfo("isDeterministic"))) { ret_val=0; break; }
+ if (!(GetBonusInfo("isDeterministic"))) { ret_val=0; break; }
for (unsigned int i=0; i< scenario_completion.size(); i++) {
if (scenario_completion[i] != 1) ret_val &= 0;
}
@@ -655,7 +655,7 @@
return ret_val;
}
-void cUMLModel::printUMLModelToFile(std::string file_name)
+void cUMLModel::PrintUMLModelToFile(std::string file_name)
{
// open outfile.
std::ofstream outfile;
@@ -675,7 +675,7 @@
/*float cUMLModel::checkProperties()
{
// for all properties:
- std::set<cMDEProperty*>::iterator prop_ptr;
+ std::Set<cMDEProperty*>::iterator prop_ptr;
float total = 0;
float temp_val = 0;
m_property_success = 0;
@@ -684,10 +684,10 @@
for (prop_ptr=mdeprops.begin(); prop_ptr!=mdeprops.end(); prop_ptr++)
{
- temp_val = (*prop_ptr)->getEvaluationInformation();
+ temp_val = (*prop_ptr)->GetEvaluationInformation();
if (temp_val == -1) {
(*prop_ptr)->evaluate();
- temp_val = (*prop_ptr)->getEvaluationInformation();
+ temp_val = (*prop_ptr)->GetEvaluationInformation();
// increment the temp_val by 1 more, since this is a new property
if (temp_val >0) {
temp_val += 1;
@@ -713,7 +713,7 @@
// Equality of an attribute and each of its values
// Inequality of an attribute and each of its values
// Methods
-void cUMLModel::createExpressionsFromClasses()
+void cUMLModel::CreateExpressionsFromClasses()
{
std::string class_name;
class_attribute a;
@@ -724,16 +724,16 @@
std::string at_type;
cMDEExpressionAttribute* a1, a2;
- // For each class, create its set of expressions.
+ // For each class, Create its Set of expressions.
for (unsigned int i=0; i<classes.size(); i++) {
c = classes[i];
- class_name = c.getClassName();
- temp_size = c.numAttributes();
+ class_name = c.GetClassName();
+ temp_size = c.NumAttributes();
// For each attribute...
for (int j=0; j<temp_size; j++) {
- a = c.getAttribute(j);
+ a = c.GetAttribute(j);
at_type = a.attribute_type;
a1 = new cMDEExpressionAttribute(a.attribute_name, at_type, class_name);
@@ -743,59 +743,59 @@
// For each attribute value
for (unsigned int k=0; k<a.attribute_values.size(); k++){
- // create both an equality and an inequality expression
+ // Create both an equality and an inequality expression
temp2 = a.attribute_values[k];
// Can't be less than the first value.
if (k==0) {
- gen->addSimpleAttValExpression(a1, temp2, "==", c.getAssociatedClasses());
- gen->addSimpleAttValExpression(a1, temp2, "!=", c.getAssociatedClasses());
- gen->addSimpleAttValExpression(a1, temp2, ">", c.getAssociatedClasses());
-// gen->addSimpleAttValExpression(a1, temp2, ">=", c.getAssociatedClasses());
+ gen->AddSimpleAttValExpression(a1, temp2, "==", c.GetAssociatedClasses());
+ gen->AddSimpleAttValExpression(a1, temp2, "!=", c.GetAssociatedClasses());
+ gen->AddSimpleAttValExpression(a1, temp2, ">", c.GetAssociatedClasses());
+// gen->AddSimpleAttValExpression(a1, temp2, ">=", c.GetAssociatedClasses());
} else if (k==(a.attribute_values.size() -1)) {
- gen->addSimpleAttValExpression(a1, temp2, "==", c.getAssociatedClasses());
- gen->addSimpleAttValExpression(a1, temp2, "!=", c.getAssociatedClasses());
-// gen->addSimpleAttValExpression(a1, temp2, "<=", c.getAssociatedClasses());
- gen->addSimpleAttValExpression(a1, temp2, "<", c.getAssociatedClasses());
+ gen->AddSimpleAttValExpression(a1, temp2, "==", c.GetAssociatedClasses());
+ gen->AddSimpleAttValExpression(a1, temp2, "!=", c.GetAssociatedClasses());
+// gen->AddSimpleAttValExpression(a1, temp2, "<=", c.GetAssociatedClasses());
+ gen->AddSimpleAttValExpression(a1, temp2, "<", c.GetAssociatedClasses());
} else {
- gen->addSimpleAttValExpression(a1, temp2, "==", c.getAssociatedClasses());
- gen->addSimpleAttValExpression(a1, temp2, "!=", c.getAssociatedClasses());
-// gen->addSimpleAttValExpression(a1, temp2, "<=", c.getAssociatedClasses());
- gen->addSimpleAttValExpression(a1, temp2, "<", c.getAssociatedClasses());
- gen->addSimpleAttValExpression(a1, temp2, ">", c.getAssociatedClasses());
-// gen->addSimpleAttValExpression(a1, temp2, ">=", c.getAssociatedClasses());
+ gen->AddSimpleAttValExpression(a1, temp2, "==", c.GetAssociatedClasses());
+ gen->AddSimpleAttValExpression(a1, temp2, "!=", c.GetAssociatedClasses());
+// gen->AddSimpleAttValExpression(a1, temp2, "<=", c.GetAssociatedClasses());
+ gen->AddSimpleAttValExpression(a1, temp2, "<", c.GetAssociatedClasses());
+ gen->AddSimpleAttValExpression(a1, temp2, ">", c.GetAssociatedClasses());
+// gen->AddSimpleAttValExpression(a1, temp2, ">=", c.GetAssociatedClasses());
}
}
} else if ((at_type == "bool")||(at_type == "boolean")) {
for (unsigned int k=0; k<a.attribute_values.size(); k++){
- // create both an equality and an inequality expression
+ // Create both an equality and an inequality expression
temp2 = a.attribute_values[k];
- gen->addSimpleAttValExpression(a1, temp2, "==", c.getAssociatedClasses());
-// gen->addSimpleAttValExpression(a1, temp2, "!=", c.getAssociatedClasses());
+ gen->AddSimpleAttValExpression(a1, temp2, "==", c.GetAssociatedClasses());
+// gen->AddSimpleAttValExpression(a1, temp2, "!=", c.GetAssociatedClasses());
}
}
}
// For each method
- temp_size = c.numOperations();
+ temp_size = c.NumOperations();
for (int m=0; m<temp_size; m++) {
- o = c.getOperation(m);
- gen->addSimpleOperationExpression(o.op_name, class_name, c.getAssociatedClasses());
+ o = c.GetOperation(m);
+ gen->AddSimpleOperationExpression(o.op_name, class_name, c.GetAssociatedClasses());
}
}
}
-int cUMLModel::getUMLValue()
+int cUMLModel::GetUMLValue()
{
float temp = 0;
int val;
- float w1 = getBonusInfo("spinw1");
- float w2 = getBonusInfo("spinw2");
- float n1 = getBonusInfo("spinn1");
- float n2 = getBonusInfo("spinn2");
+ float w1 = GetBonusInfo("spinw1");
+ float w2 = GetBonusInfo("spinw2");
+ float n1 = GetBonusInfo("spinn1");
+ float n2 = GetBonusInfo("spinn2");
for (unsigned int i=0; i< scenario_completion.size(); i++) {
temp += scenario_completion[i];
}
@@ -805,8 +805,8 @@
if (n1 || n2) val = 13;
if (n1 && n2) val = 14;
- // (organism->getUMLModel()->getBonusInfo("spinw1") == 0) &&
- // (organism->getUMLModel()->getBonusInfo("spinw2")
+ // (organism->GetUMLModel()->GetBonusInfo("spinw1") == 0) &&
+ // (organism->GetUMLModel()->GetBonusInfo("spinw2")
return val;
}
Modified: branches/uml-merge/source/orchid/cUMLModel.h
===================================================================
--- branches/uml-merge/source/orchid/cUMLModel.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cUMLModel.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -11,7 +11,7 @@
#include <map>
#include <utility>
#include <algorithm>
-#include <set>
+#include <Set>
#include <vector>
#include <fstream>
@@ -22,7 +22,7 @@
bool shouldLoop;
int startState;
std::map<std::string, float> utilityMap;
- std::string alt_set_name;
+ std::string alt_Set_name;
};
struct xmi_info {
@@ -41,40 +41,40 @@
double checkForScenarios();
// Used to generate and access the XMI version of the model.
- std::string getXMI(); // get the XMI version of the model.
- void printXMI(); // create the XMI version of the model.
- void printUMLModelToFile(std::string); // print the UML model to a file.
- int getUMLValue(); // print movie info
+ std::string GetXMI(); // Get the XMI version of the model.
+ void PrintXMI(); // Create the XMI version of the model.
+ void PrintUMLModelToFile(std::string); // Print the UML model to a file.
+ int GetUMLValue(); // Print movie info
- // Used to update and get the max number of trans.
- int getMaxTrans() { return max_trans; }
- void setMaxTrans( int m ) { max_trans = m; }
+ // Used to update and Get the max Number of trans.
+ int GetMaxTrans() { return max_trans; }
+ void SetMaxTrans( int m ) { max_trans = m; }
// Access the size of the state diagrams and also a specific state diagram
- unsigned int getStateDiagramSize() { return state_diagrams.size(); }
- cUMLStateDiagram* getStateDiagram (unsigned int);
+ unsigned int GetStateDiagramSize() { return state_diagrams.size(); }
+ cUMLStateDiagram* GetStateDiagram (unsigned int);
// Set and access the bonus info for a model. Should be used by the tasks
- void setBonusInfo (std::string s, float f) { bonus_info[s] = f; }
- float getBonusInfo (std::string);
- std::vector<double> getScenarioCompletion() { return scenario_completion; }
- void setScenarioCompletion(std::vector<double> s) { scenario_completion = s; }
- void printScenarioUtility(std::string);
+ void SetBonusInfo (std::string s, float f) { bonus_info[s] = f; }
+ float GetBonusInfo (std::string);
+ std::vector<double> GetScenarioCompletion() { return scenario_completion; }
+ void SetScenarioCompletion(std::vector<double> s) { scenario_completion = s; }
+ void PrintScenarioUtility(std::string);
- // Get the number of, well, everything
- int numStates();
- int numTrans();
- int numTriggers();
- int numGuards();
- int numActions();
- int numSDs();
- int numSCs();
- cMDEPropertyGenerator* getPropertyGenerator() { return gen; }
- void createExpressionsFromClasses();
+ // Get the Number of, well, everything
+ int NumStates();
+ int NumTrans();
+ int NumTriggers();
+ int NumGuards();
+ int NumActions();
+ int NumSDs();
+ int NumSCs();
+ cMDEPropertyGenerator* GetPropertyGenerator() { return gen; }
+ void CreateExpressionsFromClasses();
template <typename T>
- bool absoluteMoveIndex (T x, int &y, int z)
+ bool AbsoluteMoveIndex (T x, int &y, int z)
{
int x_size = (int) x.size();
@@ -83,11 +83,11 @@
}
y = 0;
- return relativeMoveIndex(x, y, z);
+ return RelativeMoveIndex(x, y, z);
}
template <typename T>
- bool relativeMoveIndex (T x, int &y, int z)
+ bool RelativeMoveIndex (T x, int &y, int z)
{
int x_size = (int) x.size();
@@ -108,11 +108,11 @@
return true;
}
- // check if the model is ready for hydra
- bool readyForHydra();
- bool getWitnessMode() {return witnessMode; }
- int getGenMode() { return genMode; }
- int getRelatedClassMode() { return relatedClassMode; }
+ // check if the model is Ready for hydra
+ bool ReadyForHydra();
+ bool GetWitnessMode() {return witnessMode; }
+ int GetGenMode() { return genMode; }
+ int GetRelatedClassMode() { return relatedClassMode; }
// float checkProperties();
@@ -129,14 +129,14 @@
bool witnessMode;
// Mode 0 = model generation; mode 1 = property generation
int genMode;
- // Mode 0 = print
- // Mode 1 = contribute to interest + print
- // Mode 2 = forbid unrelated + print
+ // Mode 0 = Print
+ // Mode 1 = contribute to interest + Print
+ // Mode 2 = forbid unrelated + Print
int relatedClassMode;
double percent_scenario_complete;
- // The following are set once per Avida experiment, when the first cUMLModel is constructed:
- static bool _cfgLoaded; //!< Whether or not we've already loaded seed-model.cfg.
+ // The following are Set once per Avida experiment, when the first cUMLModel is constructed:
+ static bool _cfgLoaded; //!< Whether or not we've alReady loaded seed-model.cfg.
static std::vector<cUMLStateDiagram> _cfg_state_diagrams; //!< State diagrams as read from seed-model.cfg.
static std::vector<cUMLClass> _cfg_classes; // !< Classes read from seed model config
@@ -145,7 +145,7 @@
static bool _cfg_witness_mode; //!< Execution mode for hydra, as read from seed-model.cfg.
static int _cfg_gen_mode; //!< Generation mode, as read from seed-model.cfg.
static int _cfg_related_class_mode; //!< Related class mode, as read from seed-model.cfg
- // where 0 = print, 1 = interest + print, 2 = forbid + print
+ // where 0 = Print, 1 = interest + Print, 2 = forbid + Print
static cMDEPropertyGenerator _cfg_gen;
cMDEPropertyGenerator* gen;
Modified: branches/uml-merge/source/orchid/cUMLStateDiagram.cc
===================================================================
--- branches/uml-merge/source/orchid/cUMLStateDiagram.cc 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cUMLStateDiagram.cc 2008-06-23 18:33:37 UTC (rev 2677)
@@ -27,7 +27,7 @@
// Technically, this does not actually return the number of non-deterministic states, but rather
// returns >0 if it is non-deterministic and 0 if it is deterministic.
-unsigned int cUMLStateDiagram::getNumberOfNonDeterministicStates() {
+unsigned int cUMLStateDiagram::GetNumberOfNonDeterministicStates() {
std::string tt, tg, ta, ts;
unsigned int numNonD=0;
boost::graph_traits<state_diagram>::out_edge_iterator ei, ei_end;
@@ -49,7 +49,7 @@
// See if it's already in the set:
if(tnames.find(ts) == tnames.end()) {
- // no; add it.
+ // no; Add it.
tnames.insert(ts);
} else {
// yes; increment the count of non-deterministic states.
@@ -76,7 +76,7 @@
// of the longest path segment that the diagram satisfies.
// The function is complicated by the fact that the longest path segment could start at the
// beginning, middle, or end of the path itself.
-int cUMLStateDiagram::findPath(std::deque<std::string> p, bool should_loop, int start_state) {
+int cUMLStateDiagram::FindPath(std::deque<std::string> p, bool should_loop, int start_state) {
unsigned int path_dist = 0; // the current path distance satisfied is 0.
// int path_longest_length = 0;
unsigned int len = 0;
@@ -87,7 +87,7 @@
while (!p.empty()) {
for (int i = 0; i<num_vert; i++) {
- len = checkForPathStep(p, vertex(i, sd0), 0);
+ len = CheckForPathStep(p, vertex(i, sd0), 0);
// check to see if this path is longer than other paths....
if (len > path_dist) {
actual_path_start = i;
@@ -106,7 +106,7 @@
}
}
if (should_loop == 1 && (path_dist == p_temp.size())) {
- getEndState(p_temp, actual_path_start);
+ GetEndState(p_temp, actual_path_start);
if (actual_end_state == actual_path_start) bonus +=1;
}
@@ -114,7 +114,7 @@
}
-int cUMLStateDiagram::checkForPathStep(std::deque<std::string> path,
+int cUMLStateDiagram::CheckForPathStep(std::deque<std::string> path,
boost::graph_traits<state_diagram>::vertex_descriptor v,
int curr_dist) {
@@ -150,7 +150,7 @@
if (ts == path.front()) {
- temp = checkForPathStep(std::deque<std::string>(++path.begin(), path.end()), target(ed,sd0), curr_dist+1);
+ temp = CheckForPathStep(std::deque<std::string>(++path.begin(), path.end()), target(ed,sd0), curr_dist+1);
if (temp > longest_dist) {
longest_dist = temp;
@@ -163,7 +163,7 @@
}
// Given a path and a start state, check if the end state is the same as the start state.
-int cUMLStateDiagram::getEndState(std::deque<std::string> path,
+int cUMLStateDiagram::GetEndState(std::deque<std::string> path,
boost::graph_traits<state_diagram>::vertex_descriptor v) {
boost::graph_traits<state_diagram>::out_edge_iterator out_edge_start, out_edge_end;
@@ -194,7 +194,7 @@
ts = tt + "[" + tg + "]" + "/" + ta;
if (ts == path.front()) {
- temp = getEndState(std::deque<std::string>(++path.begin(), path.end()), target(ed,sd0));
+ temp = GetEndState(std::deque<std::string>(++path.begin(), path.end()), target(ed,sd0));
}
}
@@ -205,7 +205,7 @@
-bool cUMLStateDiagram::findTrans(int origin, int destination, int trig, int gu, int act)
+bool cUMLStateDiagram::FindTrans(int origin, int destination, int trig, int gu, int act)
{
bool result = false;
@@ -284,7 +284,7 @@
template <typename T>
-bool cUMLStateDiagram::absoluteMoveIndex (T x, int &index, int amount )
+bool cUMLStateDiagram::AbsoluteMoveIndex (T x, int &index, int amount )
{
int x_size = (int) x.size();
@@ -293,11 +293,11 @@
}
index = 0;
- return relativeMoveIndex(x, index, amount);
+ return RelativeMoveIndex(x, index, amount);
}
template <typename T>
-bool cUMLStateDiagram::relativeMoveIndex (T x, int &index, int amount )
+bool cUMLStateDiagram::RelativeMoveIndex (T x, int &index, int amount )
{
int x_size = (int) x.size();
@@ -321,27 +321,27 @@
-bool cUMLStateDiagram::absoluteJumpTrigger(int jump_amount)
+bool cUMLStateDiagram::AbsoluteJumpTrigger(int jump_amount)
{
- return absoluteMoveIndex(triggers, trigger_index, jump_amount);
+ return AbsoluteMoveIndex(triggers, trigger_index, jump_amount);
}
-bool cUMLStateDiagram::absoluteJumpGuard(int jump_amount)
+bool cUMLStateDiagram::AbsoluteJumpGuard(int jump_amount)
{
- return absoluteMoveIndex(guards, guard_index, jump_amount);
+ return AbsoluteMoveIndex(guards, guard_index, jump_amount);
}
-bool cUMLStateDiagram::absoluteJumpAction(int jump_amount)
+bool cUMLStateDiagram::AbsoluteJumpAction(int jump_amount)
{
- return absoluteMoveIndex(actions, action_index, jump_amount);
+ return AbsoluteMoveIndex(actions, action_index, jump_amount);
}
-bool cUMLStateDiagram::absoluteJumpTransitionLabel(int jump_amount)
+bool cUMLStateDiagram::AbsoluteJumpTransitionLabel(int jump_amount)
{
- return absoluteMoveIndex(transition_labels, trans_label_index, jump_amount);
+ return AbsoluteMoveIndex(transition_labels, trans_label_index, jump_amount);
}
-bool cUMLStateDiagram::absoluteJumpOriginState(int jump_amount)
+bool cUMLStateDiagram::AbsoluteJumpOriginState(int jump_amount)
{
bool result = false;
int num_vert = (int) num_vertices(sd0);
@@ -353,7 +353,7 @@
return result;
}
-bool cUMLStateDiagram::absoluteJumpDestinationState(int jump_amount)
+bool cUMLStateDiagram::AbsoluteJumpDestinationState(int jump_amount)
{
bool result = false;
int num_vert = (int) num_vertices(sd0);
@@ -366,28 +366,28 @@
}
-bool cUMLStateDiagram::relativeJumpTrigger(int jump_amount)
+bool cUMLStateDiagram::RelativeJumpTrigger(int jump_amount)
{
- return relativeMoveIndex(triggers, trigger_index, jump_amount);
+ return RelativeMoveIndex(triggers, trigger_index, jump_amount);
}
-bool cUMLStateDiagram::relativeJumpGuard(int jump_amount)
+bool cUMLStateDiagram::RelativeJumpGuard(int jump_amount)
{
- return relativeMoveIndex(guards, guard_index, jump_amount);
+ return RelativeMoveIndex(guards, guard_index, jump_amount);
}
-bool cUMLStateDiagram::relativeJumpAction(int jump_amount)
+bool cUMLStateDiagram::RelativeJumpAction(int jump_amount)
{
- return relativeMoveIndex(actions, action_index, jump_amount);
+ return RelativeMoveIndex(actions, action_index, jump_amount);
}
-bool cUMLStateDiagram::relativeJumpTransitionLabel(int jump_amount)
+bool cUMLStateDiagram::RelativeJumpTransitionLabel(int jump_amount)
{
int size = transition_labels.size();
- return relativeMoveIndex(transition_labels, trans_label_index, jump_amount);
+ return RelativeMoveIndex(transition_labels, trans_label_index, jump_amount);
}
-bool cUMLStateDiagram::relativeJumpOriginState(int jump_amount)
+bool cUMLStateDiagram::RelativeJumpOriginState(int jump_amount)
{
bool result = true;
unsigned int num_vert = (int) num_vertices(sd0);
@@ -405,7 +405,7 @@
return result;
}
-bool cUMLStateDiagram::relativeJumpDestinationState(int jump_amount)
+bool cUMLStateDiagram::RelativeJumpDestinationState(int jump_amount)
{
bool result = true;
unsigned int num_vert = (int) num_vertices(sd0);
@@ -421,7 +421,7 @@
return result;
}
-bool cUMLStateDiagram::addTrigger(std::string op_id, std::string lab)
+bool cUMLStateDiagram::AddTrigger(std::string op_id, std::string lab)
{
trigger_info t;
t.operation_id = op_id;
@@ -432,19 +432,19 @@
return true;
}
-bool cUMLStateDiagram::addGuard(std::string gu)
+bool cUMLStateDiagram::AddGuard(std::string gu)
{
guards.push_back(gu);
return true;
}
-bool cUMLStateDiagram::addAction(std::string act)
+bool cUMLStateDiagram::AddAction(std::string act)
{
actions.push_back(act);
return true;
}
-bool cUMLStateDiagram::addTransitionLabel(int t, int g, int a) {
+bool cUMLStateDiagram::AddTransitionLabel(int t, int g, int a) {
transition_properties tp = transition_properties(t, g, a);
transition_labels.push_back(tp);
@@ -452,17 +452,17 @@
}
-bool cUMLStateDiagram::addTransitionTotal(int o, int d, int t, int g, int a) {
- absoluteJumpGuard(g);
- absoluteJumpAction(a);
- absoluteJumpTrigger(t);
- absoluteJumpOriginState(o);
- absoluteJumpDestinationState(d);
- return addTransitionTotal();
+bool cUMLStateDiagram::AddTransitionTotal(int o, int d, int t, int g, int a) {
+ AbsoluteJumpGuard(g);
+ AbsoluteJumpAction(a);
+ AbsoluteJumpTrigger(t);
+ AbsoluteJumpOriginState(o);
+ AbsoluteJumpDestinationState(d);
+ return AddTransitionTotal();
}
-bool cUMLStateDiagram::addTransitionFromLabel() {
+bool cUMLStateDiagram::AddTransitionFromLabel() {
bool val = true;
@@ -471,19 +471,19 @@
loop_trans_labels.push_back(trans_label_index);
} else{
- // get the properties of the transition label.
+ // Get the properties of the transition label.
transition_properties tp = transition_labels[trans_label_index];
- absoluteJumpTrigger(tp._tr);
- absoluteJumpGuard(tp._gu);
- absoluteJumpAction(tp._act);
+ AbsoluteJumpTrigger(tp._tr);
+ AbsoluteJumpGuard(tp._gu);
+ AbsoluteJumpAction(tp._act);
- val = addTransitionTotal();
+ val = AddTransitionTotal();
}
return val;
}
-bool cUMLStateDiagram::addTransitionTotal()
+bool cUMLStateDiagram::AddTransitionTotal()
{
// Check that there are two vertices
if (num_vertices(sd0) == 0) {
@@ -495,7 +495,7 @@
if (orig == dest) return false;
// Check that there is not a duplicate transition
- if (findTrans(orig, dest, trigger_index, guard_index, action_index)) {
+ if (FindTrans(orig, dest, trigger_index, guard_index, action_index)) {
return false;
}
@@ -517,17 +517,17 @@
}
-int cUMLStateDiagram::numStates()
+int cUMLStateDiagram::NumStates()
{
return num_vertices(sd0);
}
-int cUMLStateDiagram::numTrans()
+int cUMLStateDiagram::NumTrans()
{
return num_edges(sd0);
}
-// print the label. Change - signs to _
+// Print the label. Change - signs to _
std::string cUMLStateDiagram::StringifyAnInt(int x) {
std::ostringstream o;
@@ -541,13 +541,13 @@
return o.str();
}
-std::string cUMLStateDiagram::getXMI(std::string name)
+std::string cUMLStateDiagram::GetXMI(std::string name)
{
- printXMI(name);
+ PrintXMI(name);
return (xmi);
}
-void cUMLStateDiagram::printXMI(std::string name)
+void cUMLStateDiagram::PrintXMI(std::string name)
{
std::string temp, temp1, temp2, temp3;
std::string trig_label, trig_op_name;
@@ -561,15 +561,15 @@
int t_count = 0;
xmi = "";
- // This state is the initial state; thus it should be printed regardless of whether it has an incoming
+ // This state is the initial state; thus it should be Printed regardless of whether it has an incoming
// edge or not.
- if (numStates() > 0) {
+ if (NumStates() > 0) {
temp = "_1";
xmi += "<UML:Pseudostate xmi.id=\"" + sd + "s" + temp + "\" kind=\"initial\" outgoing=\"\" name=\"s";
xmi += temp + "\" isSpecification=\"false\"/>\n";
}
- for (; s_count < numStates(); ++s_count) {
+ for (; s_count < NumStates(); ++s_count) {
temp = sd + "s" + StringifyAnInt(s_count);
xmi+="<UML:CompositeState xmi.id=\"";
xmi+=temp;
@@ -600,7 +600,7 @@
xmi+= "<UML:Transition xmi.id=\"" + temp3 + "\"";
xmi+= " source=\"" + temp1 + "\"";
- xmi += " target=\"" + temp2 + "\" name=\"\" isSpecification=\"false\">\n";
+ xmi += " tarGet=\"" + temp2 + "\" name=\"\" isSpecification=\"false\">\n";
// Get guard, trigger, and action
temp1 = guards[(sd0[ed]._gu)];
@@ -608,7 +608,7 @@
trig_label = triggers[(sd0[ed]._tr)].label;
trig_op_name = triggers[(sd0[ed]._tr)].operation_id;
- // print trigger, if any
+ // Print trigger, if any
if (trig_label != "<null>") {
xmi+= "<UML:Transition.trigger> <UML:Event> <UML:ModelElement.namespace> <UML:Namespace> ";
xmi+= "<UML:Namespace.ownedElement> <UML:CallEvent xmi.id=\"" + temp3;
@@ -618,7 +618,7 @@
xmi+= "</UML:Event> </UML:Transition.trigger> ";
}
- // print guard, if any
+ // Print guard, if any
// Note: for guard to work, '<' => '<'
if (temp1 != "<null>"){
xmi+= "<UML:Transition.guard> <UML:Guard> <UML:Guard.expression> ";
@@ -626,7 +626,7 @@
xmi+= "</UML:Guard.expression> </UML:Guard> </UML:Transition.guard> ";
}
- // print action, if any
+ // Print action, if any
if (temp2 != "<null>") {
xmi+= "<UML:Transition.effect> <UML:UninterpretedAction xmi.id=\"" + temp3 + "ui\" ";
xmi+= "isAsynchronous=\"false\" name=\"\" isSpecification=\"false\"> ";
@@ -646,7 +646,7 @@
xmi+= "<UML:Transition xmi.id=\"" + temp3 + "\"";
xmi+= " source=\"" + temp1 + "\"";
- xmi += " target=\"" + temp2 + "\" name=\"\" isSpecification=\"false\">\n";
+ xmi += " tarGet=\"" + temp2 + "\" name=\"\" isSpecification=\"false\">\n";
xmi += "</UML:Transition>\n";
xmi += "</UML:StateMachine.transitions> </UML:StateMachine> </UML:Namespace.ownedElement> ";
xmi += " </UML:Class>";
@@ -655,7 +655,7 @@
}
-void cUMLStateDiagram::printStateDiagram()
+void cUMLStateDiagram::PrintStateDiagram()
{
std::string temp, temp1, temp2, temp3;
std::string trig_label, trig_op_name;
@@ -665,11 +665,11 @@
boost::graph_traits<state_diagram>::edge_descriptor ed;
int s_count = 0;
- // This state is the initial state; thus it should be printed regardless of whether it has an incoming
+ // This state is the initial state; thus it should be Printed regardless of whether it has an incoming
// edge or not.
std::cout << "States: \n\n";
- for (; s_count < numStates(); ++s_count) {
+ for (; s_count < NumStates(); ++s_count) {
temp = "s" + StringifyAnInt(s_count);
std::cout << "State: ";
std::cout << temp << std::endl;
@@ -708,12 +708,12 @@
}
-// hjg: error in here. Last element not adding correctly?
-void cUMLStateDiagram::endLooping() {
+// hjg: error in here. Last element not Adding correctly?
+void cUMLStateDiagram::EndLooping() {
looping = false;
// set up the origin
- absoluteJumpOriginState(loop_state);
+ AbsoluteJumpOriginState(loop_state);
// for each element of the loop...
@@ -721,18 +721,18 @@
// set up the destination
if(loop_trans_labels.size() == 1) {
// last transition loop to start
- absoluteJumpDestinationState(loop_state);
+ AbsoluteJumpDestinationState(loop_state);
} else {
- relativeJumpDestinationState(1);
+ RelativeJumpDestinationState(1);
}
// set up the label
- absoluteJumpTransitionLabel(loop_trans_labels.front());
+ AbsoluteJumpTransitionLabel(loop_trans_labels.front());
int loop_int = loop_trans_labels.front();
- addTransitionFromLabel();
+ AddTransitionFromLabel();
// std::cout << "deque front " << loop_trans_labels.front() << " " << orig << " " << dest << std::endl;
loop_trans_labels.pop_front();
- relativeJumpOriginState(1);
+ RelativeJumpOriginState(1);
}
Modified: branches/uml-merge/source/orchid/cUMLStateDiagram.h
===================================================================
--- branches/uml-merge/source/orchid/cUMLStateDiagram.h 2008-06-23 17:38:11 UTC (rev 2676)
+++ branches/uml-merge/source/orchid/cUMLStateDiagram.h 2008-06-23 18:33:37 UTC (rev 2677)
@@ -58,80 +58,80 @@
cUMLStateDiagram();
~cUMLStateDiagram();
- void printXMI(std::string); // print the XMI version of the model
- std::string getXMI (std::string); // get the xmi string (including beginning & end read from file.)
+ void PrintXMI(std::string); // Print the XMI version of the model
+ std::string GetXMI (std::string); // get the xmi string (including beginning & end read from file.)
std::string StringifyAnInt(int);
- int numStates();
- int numTrans();
- int numTriggers() { return triggers.size(); }
- int numGuards() { return guards.size(); }
- int numActions() { return actions.size(); }
- void addName(std::string s) { sd_name = s; }
+ int NumStates();
+ int NumTrans();
+ int NumTriggers() { return triggers.size(); }
+ int NumGuards() { return guards.size(); }
+ int NumActions() { return actions.size(); }
+ void AddName(std::string s) { sd_name = s; }
- unsigned int getNumberOfNonDeterministicStates();
+ unsigned int GetNumberOfNonDeterministicStates();
- bool findTrans(int, int, int, int, int);
+ bool FindTrans(int, int, int, int, int);
// Boost graph type for a state diagram.
typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS,
int, transition_properties> state_diagram;
template <typename T>
- bool absoluteMoveIndex (T x, int &y, int z);
+ bool AbsoluteMoveIndex (T x, int &y, int z);
template <typename T>
- bool relativeMoveIndex (T x, int &y, int z);
+ bool RelativeMoveIndex (T x, int &y, int z);
// The jump functions jump the index of the various vectors either forward (+ int) or backwards (- int)
- bool absoluteJumpGuard(int);
- bool absoluteJumpAction(int);
- bool absoluteJumpTrigger(int);
- bool absoluteJumpTransitionLabel(int);
- bool absoluteJumpOriginState(int);
- bool absoluteJumpDestinationState(int);
+ bool AbsoluteJumpGuard(int);
+ bool AbsoluteJumpAction(int);
+ bool AbsoluteJumpTrigger(int);
+ bool AbsoluteJumpTransitionLabel(int);
+ bool AbsoluteJumpOriginState(int);
+ bool AbsoluteJumpDestinationState(int);
- bool relativeJumpGuard(int);
- bool relativeJumpAction(int);
- bool relativeJumpTrigger(int);
- bool relativeJumpTransitionLabel(int);
- bool relativeJumpOriginState(int);
- bool relativeJumpDestinationState(int);
+ bool RelativeJumpGuard(int);
+ bool RelativeJumpAction(int);
+ bool RelativeJumpTrigger(int);
+ bool RelativeJumpTransitionLabel(int);
+ bool RelativeJumpOriginState(int);
+ bool RelativeJumpDestinationState(int);
// Implement a scenario check.
- int findPath(std::deque<std::string>, bool, int);
- int checkForPathStep(std::deque<std::string>,
+ int FindPath(std::deque<std::string>, bool, int);
+ int CheckForPathStep(std::deque<std::string>,
boost::graph_traits<state_diagram>::vertex_descriptor, int);
- int getEndState (std::deque<std::string>, boost::graph_traits<state_diagram>::vertex_descriptor);
+ int GetEndState (std::deque<std::string>, boost::graph_traits<state_diagram>::vertex_descriptor);
// The get functions get the value of the index of various vectors
- int getTriggerIndex() { return trigger_index; }
- int getGuardIndex() { return guard_index; }
- int getActionIndex() { return action_index; }
- int getTransitionLabelIndex() { return trans_label_index; }
- std::string getGuard() { return guards[getGuardIndex()]; }
- std::string getName() { return sd_name; }
+ int GetTriggerIndex() { return trigger_index; }
+ int GetGuardIndex() { return guard_index; }
+ int GetActionIndex() { return action_index; }
+ int GetTransitionLabelIndex() { return trans_label_index; }
+ std::string GetGuard() { return guards[GetGuardIndex()]; }
+ std::string GetName() { return sd_name; }
// Add functions
- bool addTransitionTotal();
- bool addTransitionFromLabel();
- bool addTransitionTotal(int, int, int, int, int);
- bool addTrigger(std::string, std::string);
- bool addGuard(std::string);
- bool addAction(std::string);
- bool addTransitionLabel(int, int, int);
+ bool AddTransitionTotal();
+ bool AddTransitionFromLabel();
+ bool AddTransitionTotal(int, int, int, int, int);
+ bool AddTrigger(std::string, std::string);
+ bool AddGuard(std::string);
+ bool AddAction(std::string);
+ bool AddTransitionLabel(int, int, int);
- // print
- void printStateDiagram();
+ // Print
+ void PrintStateDiagram();
// loop functions
- void startLooping () { looping = true; loop_state = orig; }
- void endLooping();
+ void StartLooping () { looping = true; loop_state = orig; }
+ void EndLooping();
More information about the Avida-cvs
mailing list