public CuLeTransaction(string i_transactionName, CuLeQuantifierList i_Parameters, List <CuLeSet> i_Changing, List <CuLeRuleGroup> i_Precondition, List <CuLeRule> i_InputResriction, List <CuLeRuleGroup> i_Result) { m_Parameters = i_Parameters; m_Changing = i_Changing; m_Precondition = i_Precondition; m_Result = i_Result; m_transactionName = i_transactionName; m_InputRestriction = i_InputResriction; }
public CuLeRule CreateCuLeRule(CuLeRuleDef i_CuLeRuleDef, CuLeQuantifierList i_CuLeQuantifierList, string i_State) { if (i_CuLeRuleDef is SetOperatorCuLeRuleDef) { SetOperatorCuLeRuleDef l_SetOperatorCuLeRuleDef = (SetOperatorCuLeRuleDef)i_CuLeRuleDef; CuLeSetFactory l_CuLeSetFactory = new CuLeSetFactory(m_Tables, m_Relations, this.m_States); CuLeSet SetA = l_CuLeSetFactory.CreateCuLeSet(l_SetOperatorCuLeRuleDef.SetDefA(), i_CuLeQuantifierList, i_State); CuLeSet SetB = l_CuLeSetFactory.CreateCuLeSet(l_SetOperatorCuLeRuleDef.SetDefB(), i_CuLeQuantifierList, i_State); if (l_CuLeSetFactory.m_errorMessages != null) { if (l_CuLeSetFactory.m_errorMessages.Count != 0) { this.m_errorMessages = l_CuLeSetFactory.m_errorMessages; } } if (SetA != null && SetB != null) { return(CreateSetOperatorCuLeRule(SetA, SetB, l_SetOperatorCuLeRuleDef.SetOperator, l_SetOperatorCuLeRuleDef.SourceLocation, i_State)); } if (this.m_errorMessages != null) { return(null); } return(null); } if (i_CuLeRuleDef is NegationCuLeRuleDef) { NegationCuLeRuleDef l_NegationCuLeRuleDef = (NegationCuLeRuleDef)i_CuLeRuleDef; CuLeRule l_CuLeRule_A = this.CreateCuLeRule(l_NegationCuLeRuleDef.CuLeRuleDef_A(), i_CuLeQuantifierList, i_State); return(new NegationCuLeRule(l_CuLeRule_A)); // CuLeRule l_CuLeRule = this.CreateCuLeRule(l_NegationCuLeRuleDef.CuLeRuleDef_A, i_Tables, i_Relations, i_CuLeQuantifierList) } if (i_CuLeRuleDef is RuleOperatorCuLeRuleDef) { RuleOperatorCuLeRuleDef l_RuleOperatorCuLeRuleDef = (RuleOperatorCuLeRuleDef)i_CuLeRuleDef; CuLeRule l_CuLeRule_A = this.CreateCuLeRule(l_RuleOperatorCuLeRuleDef.CuLeRuleDef_A(), i_CuLeQuantifierList, i_State); CuLeRule l_CuLeRule_B = this.CreateCuLeRule(l_RuleOperatorCuLeRuleDef.CuLeRuleDef_B(), i_CuLeQuantifierList, i_State); return(new RuleOperatorCuLeRule(l_CuLeRule_A, l_CuLeRule_B, l_RuleOperatorCuLeRuleDef.RuleOperator)); } if (i_CuLeRuleDef is ConditionalCuLeRuleDef) { if (i_CuLeRuleDef is ImplicationCuLeRuleDef) { if (i_CuLeRuleDef is IF_ImplicationCuLeRuleDef) { IF_ImplicationCuLeRuleDef l_IF_ImplicationCuLeRuleDef = (IF_ImplicationCuLeRuleDef)i_CuLeRuleDef; CuLeRule l_CuLeRule_IF = this.CreateCuLeRule(l_IF_ImplicationCuLeRuleDef.CuLeRuleDef_IF(), i_CuLeQuantifierList, i_State); CuLeRule l_CuLeRule_THEN = this.CreateCuLeRule(l_IF_ImplicationCuLeRuleDef.CuLeRuleDef_THEN(), i_CuLeQuantifierList, i_State); return(new IF_ImplicationCuLeRule(l_CuLeRule_IF, l_CuLeRule_THEN)); } if (i_CuLeRuleDef is IF_ELSE_ImplicationCuLeRuleDef) { IF_ELSE_ImplicationCuLeRuleDef l_IF_ELSE_ImplicationCuLeRuleDef = (IF_ELSE_ImplicationCuLeRuleDef)i_CuLeRuleDef; CuLeRule l_CuLeRule_IF = this.CreateCuLeRule(l_IF_ELSE_ImplicationCuLeRuleDef.CuLeRuleDef_IF(), i_CuLeQuantifierList, i_State); CuLeRule l_CuLeRule_THEN = this.CreateCuLeRule(l_IF_ELSE_ImplicationCuLeRuleDef.CuLeRuleDef_THEN(), i_CuLeQuantifierList, i_State); CuLeRule l_CuLeRule_ELSE = this.CreateCuLeRule(l_IF_ELSE_ImplicationCuLeRuleDef.CuLeRuleDef_ELSE(), i_CuLeQuantifierList, i_State); return(new IF_ELSE_ImplicationCuLeRule(l_CuLeRule_IF, l_CuLeRule_THEN, l_CuLeRule_ELSE)); } } if (i_CuLeRuleDef is EquivalenceCuLeRuleDef) { EquivalenceCuLeRuleDef l_EquivalenceCuLeRuleDef = (EquivalenceCuLeRuleDef)i_CuLeRuleDef; CuLeRule l_CuLeRule_A = this.CreateCuLeRule(l_EquivalenceCuLeRuleDef.CuLeRuleDef_A(), i_CuLeQuantifierList, i_State); CuLeRule l_CuLeRule_B = this.CreateCuLeRule(l_EquivalenceCuLeRuleDef.CuLeRuleDef_B(), i_CuLeQuantifierList, i_State); return(new EquivalenceCuLeRule(l_CuLeRule_A, l_CuLeRule_B)); } } throw new ArgumentException("Rule Definition Error"); }// End of Create CuLeRule