Exemplo n.º 1
0
 //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
 //ORIGINAL LINE: base(p);
 public SemanticPredicate(string type, string owner, string partner, Predicate p)
     : base(p)
 {
     this.type = type;
     this.owner = owner;
     this.partner = partner;
 }
Exemplo n.º 2
0
 public MutualBelief(string type, string owner, List<string> partner, Predicate p)
     : base(type, owner, p)
 {
     this.partners = partner;
 }
Exemplo n.º 3
0
        public List<UpdateRule> interprete(DialogueAct da, InformationState infoState)
        {
            List<UpdateRule> updateRules = new List<UpdateRule>();

            Console.Write(" step 3 : Dialogue act interpretation : ");
            Console.Write("\n");
            if (da.getID() == "Greet-open")
            {
                List<object> args = new List<object>();
                args.Add(da.getSender());
                string addressee = "Self";
                //args.push_back(da->getAddressee());
                args.Add(addressee);
                //predicate greet(user, system)
                Predicate userGreet = new Predicate("Greet-open", args);

                List<object> args1 = new List<object>();

                //	args1.push_back(da->getAddressee());

                args1.Add(addressee);
                //	args1.push_back(addressee);

                args1.Add(da.getSender());
                //predicate greet( system, user)
                 Predicate systemGreet = new Predicate("reply-Greet-open", args1);

                //  boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", userGreet));
                Update pushAgenda = new Update("pushAgenda",systemGreet);
                Update addInIntegraedMoves = new Update("addInIntegraedMoves", userGreet);
                string grt = "Greet-open";
                //	boost::any anygrt = grt;
                Update socialContext = new Update("commPressure", grt);

                UpdateRule rule = new UpdateRule();
                //rule->addPrecondition(condition);
                rule.addEffect(pushAgenda);
                rule.addEffect(addInIntegraedMoves);

                updateRules.Add(rule);

            }

            if (da.getID() == "SOM-Presented-by_other")
            {
                List<object> args = new List<object>();
                args.Add(da.getSender());
                string addressee = "Self";
                //args.push_back(da->getAddressee());
                args.Add(addressee);
                //predicate greet(user, system)
                Predicate userGreet = new Predicate("Greet-open", args);

                List<object> args1 = new List<object>();

                //	args1.push_back(da->getAddressee());

                args1.Add(addressee);
                //	args1.push_back(addressee);

                args1.Add(da.getSender());
                Predicate systemGreet = new Predicate("reply-Greet-open", args1);

                Update pushAgenda = new Update("pushAgenda", systemGreet);
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  userGreet);
                string grt = "Greet-open";
                //	boost::any anygrt = grt;
                Update socialContext = new Update("commPressure", grt);

                UpdateRule rule = new UpdateRule();
                //rule->addPrecondition(condition);
                rule.addEffect(pushAgenda);
                rule.addEffect(addInIntegraedMoves);

                updateRules.Add(rule);

            }

            if (da.getID() == "Greet-close")
            {
                List<object> args = new List<object>();
                args.Add(da.getSender());
                args.Add(da.getAddressee());
                //predicate greet(user, system)
                Predicate userGreet = new Predicate("Greet-close", args);

                List<object> args1 = new List<object>();

                //	args1.push_back(da->getAddressee());
                //	args1.push_back(da->getSender());
                //predicate greet( system, user)
                Predicate systemGreet = new Predicate("Greet-close", args1);

                //  boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", userGreet));

                Update pushAgenda = new Update("pushAgenda",  systemGreet);
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  userGreet);
                string grt = "Greet-close";
                //	boost::any anygrt = grt;
                Update socialContext = new Update("commPressure", grt);

                UpdateRule rule = new UpdateRule();
                //rule->addPrecondition(condition);
                rule.addEffect(pushAgenda);
                rule.addEffect(addInIntegraedMoves);

                updateRules.Add(rule);

            }

             //user ask what-concept to system
            if (da.getID() == "WHQ-WHAT-Concept")
            {
                string conceptName = (string)(da.logicalForm.Arguments[0]);

                if (Services.isClass(conceptName))
                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatConcept = new Predicate("ans-WHQ-WHAT-Concept", args);
                    Update pushAgenda = new Update("pushAgenda",  ansWhatConcept);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //	boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //	//boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                else
                {
                    List<object> args = new List<object>();
                    //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);
                    Update pushAgenda = new Update("pushAgenda",  ansConceptNotKnown);
                    UpdateRule rule = new UpdateRule();
                    rule.addEffect(pushAgenda);
                    updateRules.Add(rule);
                }
            } //whq-what-concept

            //user asks what are the features of a car?
            if (da.getID() == "WHQ-WHAT-All-Operations")
            {
                string conceptName = (string)(da.logicalForm.Arguments[0]);

                if (Services.isClass(conceptName))
                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatConcept = new Predicate("ans-WHQ-WHAT-All-Operations", args);

                   Update pushAgenda = new Update("pushAgenda",  ansWhatConcept);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                else
                {
                    List<object> args = new List<object>();
                    //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);

                    Update pushAgenda = new Update("pushAgenda",  ansConceptNotKnown);
                    UpdateRule rule = new UpdateRule();
                    rule.addEffect(pushAgenda);
                    updateRules.Add(rule);
                }

            } //WHQ-WHAT-All-Operations
              //.............................................................................................

            //user asks what are the features of a car?
            if (da.getID() == "WHQ-WHAT-Entity-State")
            {
                string instanceName = (string)(da.logicalForm.Arguments[1]);
                //TODO verify whether object is a valid instance or not
                //	if (isInstance(instanceName) )
                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansEntityState = new Predicate("ans-WHQ-WHAT-Entity-State", args);
                    Update pushAgenda = new Update("pushAgenda",  ansEntityState);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                /*	else
                    {
                        std::vector<boost::any> args;
                    //	args.push_back(conceptName);
                        Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                        boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                        boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                        rule->addEffect(pushAgenda);
                        updateRules.push_back(rule);
                    }
                    */
            } //WHQ-WHAT-instance state

            //.............................................................................................
            //user asks what are the attributes of a car?
            if (da.getID() == "WHQ-WHAT-All-Attributes")
            {
                string conceptName = (string)(da.logicalForm.Arguments[0]);

                if (Services.isClass(conceptName))
                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatConcept = new Predicate("ans-WHQ-WHAT-All-Attributes", args);
                    Update pushAgenda = new Update("pushAgenda",  ansWhatConcept);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);

                }
                else
                {

                    List<object> args = new List<object>();
                    //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);

                    Update pushAgenda = new Update("pushAgenda",  ansConceptNotKnown);
                    UpdateRule rule = new UpdateRule();
                    rule.addEffect(pushAgenda);
                    updateRules.Add(rule);
                }

            } //WHQ-WHAT-All-Operations

            //user asks  for the speed of a car?
            if (da.getID() == "WHQ-WHAT-Concept-Attribute-Value")
            {

                string conceptName = (string)(da.logicalForm.Arguments[0]);
                string attributeName = (string)(da.logicalForm.Arguments[1]);
                if (Services.isClass(conceptName) && Services.isClassAttribute(conceptName, attributeName))
                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatConceptAttribute = new Predicate("ans-WHQ-WHAT-Concept-Attribute-Value", args);

                    Update pushAgenda = new Update("pushAgenda",  ansWhatConceptAttribute);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                else
                {
                    List<object> args = new List<object>();
                    //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);

                    Update pushAgenda = new Update("pushAgenda",  ansConceptNotKnown);
                    UpdateRule rule = new UpdateRule();
                    rule.addEffect(pushAgenda);
                    updateRules.Add(rule);
                }

            } //WHQ-WHAT-concept-attribute

            //user asks  for the description of the operation of the concept?
            if (da.getID() == "WHQ-WHAT-Concept-Feature")
            {

                string conceptName = (string)(da.logicalForm.Arguments[0]);
                string operationName = (string)(da.logicalForm.Arguments[1]);
                if (Services.isClass(conceptName) && Services.isClassOperation(conceptName, operationName))
                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatConceptFeature = new Predicate("ans-WHQ-WHAT-Concept-Feature", args);

                    Update pushAgenda = new Update("pushAgenda",  ansWhatConceptFeature);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                else
                {
                    List<object> args = new List<object>();
                    //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);

                    Update pushAgenda = new Update("pushAgenda",  ansConceptNotKnown);
                    UpdateRule rule = new UpdateRule();
                    rule.addEffect(pushAgenda);
                    updateRules.Add(rule);
                }

            } //WHQ-WHAT-concept-feature

            //user asks  for the description of the current action of the agent
            if (da.getID() == "WHQ-WHAT-Current-Action")
            {

                string agentName = (string)(da.logicalForm.Arguments[0]);

                if (Services.isAgent(agentName))
                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatCurrent = new Predicate("ans-WHQ-WHAT-Current-Action", args);

                    Update pushAgenda = new Update("pushAgenda",  ansWhatCurrent);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                else
                {
                    List<object> args = new List<object>();
                    //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);

                    Update pushAgenda = new Update("pushAgenda",  ansConceptNotKnown);
                    UpdateRule rule = new UpdateRule();
                    rule.addEffect(pushAgenda);
                    updateRules.Add(rule);
                }

            } //WHQ-WHAT-All-Operations

            //user asks  for the description of the action decision of the agent
            if (da.getID() == "WHQ-WHAT-Action-Decision")
            {

                string agentName = (string)(da.logicalForm.Arguments[0]);

                if (Services.isAgent(agentName))
                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansActionDecision = new Predicate("ans-WHQ-WHAT-Action-Decision", args);

                    Update pushAgenda = new Update("pushAgenda",  ansActionDecision);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                else
                {
                    List<object> args = new List<object>();
                    //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);
                    Update pushAgenda = new Update("pushAgenda",  ansConceptNotKnown);
                    UpdateRule rule = new UpdateRule();
                    rule.addEffect(pushAgenda);
                    updateRules.Add(rule);
                }

            } //WHQ-WHAT-action-decision

            //user asks  for the description of the last action of the agent
            if (da.getID() == "WHQ-WHAT-Last-Action")
            {

                string agentName = (string)(da.logicalForm.Arguments[0]);

                if (Services.isAgent(agentName))
                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatLastAction = new Predicate("ans-WHQ-WHAT-Last-Action", args);
                    Update pushAgenda = new Update("pushAgenda",  ansWhatLastAction);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                else
                {
                    List<object> args = new List<object>();
                    //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);

                    Update pushAgenda = new Update("pushAgenda",  ansConceptNotKnown);
                    UpdateRule rule = new UpdateRule();
                    rule.addEffect(pushAgenda);
                    updateRules.Add(rule);
                }

            } //WHQ-WHAT-All-Operations

            //user asks  for the description of the next action of the agent
            if (da.getID() == "WHQ-WHAT-Next-Action")
            {

                string agentName = (string)(da.logicalForm.Arguments[0]);

                if (Services.isAgent(agentName))
                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatConceptFeature = new Predicate("ans-WHQ-WHAT-Next-Action", args);

                    Update pushAgenda = new Update("pushAgenda",  ansWhatConceptFeature);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                else
                {
                    List<object> args = new List<object>();
                    //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);

                    Update pushAgenda = new Update("pushAgenda",  ansConceptNotKnown);
                    UpdateRule rule = new UpdateRule();
                    rule.addEffect(pushAgenda);
                    updateRules.Add(rule);
                }

            } //WHQ-WHAT-next action

            //user asks  for the description of the next action of the agent
            if (da.getID() == "WHQ-WHAT-Current-Activity")
            {

                string agentName = (string)(da.logicalForm.Arguments[0]);

                if (Services.isAgent(agentName))
                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatAgentActivity = new Predicate("ans-WHQ-WHAT-Current-Activity", args);

                    Update pushAgenda = new Update("pushAgenda",  ansWhatAgentActivity);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));
                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                else
                {
                    List<object> args = new List<object>();
                    //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);

                    Update pushAgenda = new Update("pushAgenda",  ansConceptNotKnown);
                    UpdateRule rule = new UpdateRule();
                    rule.addEffect(pushAgenda);
                    updateRules.Add(rule);
                }

            } //WHQ-WHAT-next action

            //user asks  for the description of the role of the agent
            if (da.getID() == "WHQ-WHAT-Agent-Role")
            {

                string agentName = (string)(da.logicalForm.Arguments[0]);

                if (Services.isAgent(agentName))
                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatAgentRole = new Predicate("ans-WHQ-WHAT-Agent-Role", args);

                    Update pushAgenda = new Update("pushAgenda",  ansWhatAgentRole);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                else
                {
                    List<object> args = new List<object>();
                    //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);

                    Update pushAgenda = new Update("pushAgenda",  ansConceptNotKnown);
                    UpdateRule rule = new UpdateRule();
                    rule.addEffect(pushAgenda);
                    updateRules.Add(rule);
                }

            } //WHQ-WHAT-AgentT-Role

            //........................................................................................................

            //user asks  for the description of the next action of the role
            if (da.getID() == "WHQ-WHAT-Role-Next-Action")
            {
                string roleName = (string)(da.logicalForm.Arguments[0]);
                {
                    //if (isRole(roleName))
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatRoleNext = new Predicate("ans-WHQ-WHAT-Role-Next-Action", args);

                    Update pushAgenda = new Update("pushAgenda",  ansWhatRoleNext);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));
                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                //else
                /*	{
                        std::vector<boost::any> args;
                    //	args.push_back(conceptName);
                        Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                        boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                        boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                        rule->addEffect(pushAgenda);
                        updateRules.push_back(rule);
                    }
            */
            } //WHQ-WHAT-Role-Next-Action
              //........................................................................................................

            //........................................................................................................

            //user asks  for the description of the next action of the team
            if (da.getID() == "WHQ-WHAT-Team-Next-Action")
            {

                {
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatTeamNext = new Predicate("ans-WHQ-WHAT-Team-Next-Action", args);

                    Update pushAgenda = new Update("pushAgenda",  ansWhatTeamNext);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                //else
                /*	{
                        std::vector<boost::any> args;
                    //	args.push_back(conceptName);
                        Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                        boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                        boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                        rule->addEffect(pushAgenda);
                        updateRules.push_back(rule);
                    }
            */
            } //WHQ-WHAT-Role-Next-Action
              //........................................................................................................
              //........................................................................................................

            //user asks  for the description of the current action of the role
            if (da.getID() == "WHQ-WHAT-Role-Current-Action")
            {

                string roleName = (string)(da.logicalForm.Arguments[0]);

                {
                    //if (isRole(roleName))
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatRoleCurrentAction = new Predicate("ans-WHQ-WHAT-Role-Current-Action", args);

                    Update pushAgenda = new Update("pushAgenda",  ansWhatRoleCurrentAction);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                //else
                /*	{
                        std::vector<boost::any> args;
                    //	args.push_back(conceptName);
                        Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                        boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                        boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                        rule->addEffect(pushAgenda);
                        updateRules.push_back(rule);
                    }
            */
            } //WHQ-WHAT-Role-Next-Action
              //.............................................................................................
              //........................................................................................................

            //user asks  for the description of the means of action performed by performer
            if (da.getID() == "WHQ-WHAT-Action-Resource")
            {

                {
                    //if (isRole(roleName))
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhatMeanResource = new Predicate("ans-WHQ-WHAT-Action-Resource", args);

                    Update pushAgenda = new Update("pushAgenda",  ansWhatMeanResource);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                //else
                /*	{
                        std::vector<boost::any> args;
                    //	args.push_back(conceptName);
                        Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                        boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                        boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                        rule->addEffect(pushAgenda);
                        updateRules.push_back(rule);
                    }
            */
            } //"WHQ-WHAT-Action-Resource"
              //.............................................................................................

            //********************************************************************************
            //					WHQ-WHO   (present , past , future ) action
            //********************************************************************************

            /*  "WHQ-WHO-Will-Do-Action" @actionName
            */

            //user asks  for the role name who will do action in  future
            if (da.getID() == "WHQ-WHO-Will-Do-Action")
            {

                string actionName = (string)(da.logicalForm.Arguments[0]);

                {
                    //if (isAction(actionName))
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansWhoWillDo = new Predicate("ans-WHQ-WHO-Will-Do-Action", args);
                    Update pushAgenda = new Update("pushAgenda",  ansWhoWillDo);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));
                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                //else
                /*	{
                    std::vector<boost::any> args;
                //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                    boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                    boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                    rule->addEffect(pushAgenda);
                    updateRules.push_back(rule);
                }
            */
            } //WHQ-Who-Will-Do

            //********************************************************************************

            /*  "WHQ-WHO-Will-Do-Action" @actionName
            */

            //user asks  for the role name who will do action in  future
            if (da.getID() == "WHQ-WHO")
            {

                //std::string actionName = boost::any_cast<std::string>(da->logicalForm.Arguments.front());

                {
                    //if (isAction(actionName))
                    //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                    List<object> args = new List<object>();
                    Predicate ansDo = new Predicate("ans-WHQ-WHO", args);

                    Update pushAgenda = new Update("pushAgenda",  ansDo);
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                    //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                    //std::string comGround = "mutual-belief";
                    //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                    UpdateRule rule = new UpdateRule();

                    //rule->addPrecondition(condition);
                    rule.addEffect(pushAgenda);
                    //rule->addEffect(pushQUD);
                    rule.addEffect(addInIntegraedMoves);

                    updateRules.Add(rule);
                }
                //else
                /*	{
                    std::vector<boost::any> args;
                //	args.push_back(conceptName);
                    Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                    boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                    boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                    rule->addEffect(pushAgenda);
                    updateRules.push_back(rule);
                }
            */
            } //WHQ-Who-Will-Do

            //********************************************************************************

            //********************************************************************************
            //				end of 	WHQ-WHO   (present , past , future ) action
            //********************************************************************************

            //Yes-No-Questions

            if (da.getID() == "YES-NO-Question")
            {
                string funtor = (string)(da.logicalForm.Arguments[0]);

                //preprocessing of yes no questions

                if (funtor == "Agent-Role")
                {
                    //verify whether isAgent()  && isRole()
                    string agentName = (string)(da.logicalForm.Arguments[1]);
                    if (Services.isAgent(agentName))
                    {
                        //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                        List<object> args = new List<object>();
                        Predicate ansYesNoQtn = new Predicate("ans-YES-NO-Question", args);
                        Update pushAgenda = new Update("pushAgenda",  ansYesNoQtn);
                        Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                        //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                        //std::string comGround = "mutual-belief";
                        //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                        UpdateRule rule = new UpdateRule();

                        //rule->addPrecondition(condition);
                        rule.addEffect(pushAgenda);
                        //rule->addEffect(pushQUD);
                        rule.addEffect(addInIntegraedMoves);

                        updateRules.Add(rule);
                    }
                    else
                    {
                        List<object> args = new List<object>();
                        //	args.push_back(conceptName);
                        //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                        //ORIGINAL LINE: Predicate ansConceptNotKnown("respond-Unknown-concept", args);
                        Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);

                        //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                        //ORIGINAL LINE: Update *pushAgenda = new Update("pushAgenda",ansConceptNotKnown);
                        Update pushAgenda = new Update("pushAgenda",  ansConceptNotKnown);
                        UpdateRule rule = new UpdateRule();
                        rule.addEffect(pushAgenda);
                        updateRules.Add(rule);

                    }
                } //funcot == agent role

            } //WHQ-WHAT-All-Operations

            //********************************************************************************
            //					Check-Question
            //********************************************************************************
            if (da.getID() == "Check-Question")
            {
                string funtor = (string)(da.logicalForm.Arguments[0]);

                //preprocessing of yes no questions

                if (funtor == "Action-Execution-By-Role")
                {
                    //verify whether isRole() && sufficient parameters are available
                    string roleName = (string)(da.logicalForm.Arguments[1]);
                    //	if (isRole(roleName))
                    {
                        //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                        List<object> args = new List<object>();
                        Predicate ansCheckQtn = new Predicate("ans-Check-Question", args);

                        Update pushAgenda = new Update("pushAgenda",  ansCheckQtn);
                        Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                        //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                        //std::string comGround = "mutual-belief";
                        //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                        UpdateRule rule = new UpdateRule();

                        //rule->addPrecondition(condition);
                        rule.addEffect(pushAgenda);
                        //rule->addEffect(pushQUD);
                        rule.addEffect(addInIntegraedMoves);

                        updateRules.Add(rule);
                    }
                    /*	//else
                        {
                            std::vector<boost::any> args;
                        //	args.push_back(conceptName);
                            Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                            boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                            boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                            rule->addEffect(pushAgenda);
                            updateRules.push_back(rule);

                        }
                        */
                } //funcot == Action-Execution-By-Role

                //..............................................................................
                if (funtor == "Entity-Perceived-by-Agent")
                {

                    string agent = (string)(da.logicalForm.Arguments[1]);
                    string entity = (string)(da.logicalForm.Arguments[2]);
                    //verify whether isEntity(entity)
                    //	if (isEntity(entity))
                    {
                        //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                        List<object> args = new List<object>();
                        Predicate ansCheckQtn = new Predicate("ans-Check-Question", args);
                         Update pushAgenda = new Update("pushAgenda",  ansCheckQtn);
                        Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                        //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                        //std::string comGround = "mutual-belief";
                        //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                        UpdateRule rule = new UpdateRule();

                        //rule->addPrecondition(condition);
                        rule.addEffect(pushAgenda);
                        //rule->addEffect(pushQUD);
                        rule.addEffect(addInIntegraedMoves);

                        updateRules.Add(rule);
                    }
                    /*	//else
                        {
                            std::vector<boost::any> args;
                        //	args.push_back(conceptName);
                            Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                            boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                            boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                            rule->addEffect(pushAgenda);
                            updateRules.push_back(rule);

                        }
                        */
                } //funcot == Action-Execution-By-Role

                //..............................................................................
                //frame:		Action-Execution-Perceived-By-Agent $agent $performer $action
                //..............................................................................
                if (funtor == "Action-Execution-Perceived-By-Agent")
                {

                    string agent = (string)(da.logicalForm.Arguments[1]);
                    string performer = (string)(da.logicalForm.Arguments[2]);
                    //verify whether isAgent(performer)
                    //	if (isAgent(performer))
                    {
                        //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                        List<object> args = new List<object>();
                        Predicate ansCheckQtn = new Predicate("ans-Check-Question", args);
                        Update pushAgenda = new Update("pushAgenda",  ansCheckQtn);
                        Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                        //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                        //std::string comGround = "mutual-belief";
                        //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                        UpdateRule rule = new UpdateRule();

                        //rule->addPrecondition(condition);
                        rule.addEffect(pushAgenda);
                        //rule->addEffect(pushQUD);
                        rule.addEffect(addInIntegraedMoves);

                        updateRules.Add(rule);
                    }
                    /*	//else
                        {
                            std::vector<boost::any> args;
                        //	args.push_back(conceptName);
                            Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                            boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                            boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                            rule->addEffect(pushAgenda);
                            updateRules.push_back(rule);

                        }
                        */
                } //funcot == Action-Execution-By-Role

                //..............................................................................

                //..............................................................................
                //frame:		Action-Execution-By-Team  $action $tense
                //..............................................................................
                if (funtor == "Action-Execution-By-Team")
                {

                    string action = (string)(da.logicalForm.Arguments[1]);

                    //verify whether isAction(action)
                    //	if (isAction(action))
                    {
                        //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                        List<object> args = new List<object>();
                        Predicate ansCheckQtn = new Predicate("ans-Check-Question", args);

                        Update pushAgenda = new Update("pushAgenda",  ansCheckQtn);
                        Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                        //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                        //std::string comGround = "mutual-belief";
                        //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                        UpdateRule rule = new UpdateRule();

                        //rule->addPrecondition(condition);
                        rule.addEffect(pushAgenda);
                        //rule->addEffect(pushQUD);
                        rule.addEffect(addInIntegraedMoves);

                        updateRules.Add(rule);
                    }
                    /*	//else
                        {
                            std::vector<boost::any> args;
                        //	args.push_back(conceptName);
                            Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                            boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                            boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                            rule->addEffect(pushAgenda);
                            updateRules.push_back(rule);

                        }
                        */
                } //funcot == Action-Execution-By-Team
                  //...............................................................................................

            }

            //********************************************************************************
            //				end of	Check-Question
            //********************************************************************************

            //********************************************************************************
            //					WHQ-WHY
            //********************************************************************************
            if (da.getID() == "WHQ-WHY")
            {
                string funtor = (string)(da.logicalForm.Arguments[0]);

                //preprocessing of yes no questions

                if (funtor == "Action-Execution-By-Role")
                {
                    //verify whether isRole() && sufficient parameters are available
                    string roleName = (string)(da.logicalForm.Arguments[1]);
                    //	if (isRole(roleName))
                    {
                        //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                        List<object> args = new List<object>();
                        Predicate ansCheckQtn = new Predicate("ans-WHQ-WHY", args);

                        Update pushAgenda = new Update("pushAgenda",  ansCheckQtn);
                        Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                        //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                        //std::string comGround = "mutual-belief";
                        //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                        UpdateRule rule = new UpdateRule();

                        //rule->addPrecondition(condition);
                        rule.addEffect(pushAgenda);
                        //rule->addEffect(pushQUD);
                        rule.addEffect(addInIntegraedMoves);

                        updateRules.Add(rule);
                    }
                    /*	//else
                        {
                            std::vector<boost::any> args;
                        //	args.push_back(conceptName);
                            Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                            boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                            boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                            rule->addEffect(pushAgenda);
                            updateRules.push_back(rule);

                        }
                        */
                } //funcot == Action-Execution-By-Role
            }

            //********************************************************************************
            //				end of	WHQ-WHY
            //********************************************************************************

            //********************************************************************************
            //					Unknown-concept
            //********************************************************************************
            if (da.getID() == "Unknown-concept")
            {
                string funtor = (string)(da.logicalForm.Arguments[0]);

                //preprocessing of yes no questions

                {
                    //if(funtor == "Action-Execution-By-Role")
                    //verify whether isRole() && sufficient parameters are available
                    //	std::string roleName = boost::any_cast<std::string>(da->logicalForm.Arguments[1]);
                    //	if (isRole(roleName))
                    {
                        //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                        List<object> args = new List<object>();
                        //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                        //ORIGINAL LINE: Predicate ansNotUnderstood("respond-Unknown-concept", args);
                        Predicate ansNotUnderstood = new Predicate("respond-Unknown-concept", args);

                        Update pushAgenda = new Update("pushAgenda",  ansNotUnderstood);
                        Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                        //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                        //std::string comGround = "mutual-belief";
                        //boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                        UpdateRule rule = new UpdateRule();

                        //rule->addPrecondition(condition);
                        rule.addEffect(pushAgenda);
                        //rule->addEffect(pushQUD);
                        rule.addEffect(addInIntegraedMoves);

                        updateRules.Add(rule);
                    }
                    /*	//else
                        {
                            std::vector<boost::any> args;
                        //	args.push_back(conceptName);
                            Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                            boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                            boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                            rule->addEffect(pushAgenda);
                            updateRules.push_back(rule);

                        }
                        */
                } //funcot == Action-Execution-By-Role
            }

            //********************************************************************************
            //				ansNotUnderstood
            //********************************************************************************

            //********************************************************************************
            //					not-understood
            //********************************************************************************
            if (da.getID() == "Not-Understood")
            {

                //preprocessing of yes no questions

                {
                    //if(funtor == "Action-Execution-By-Role")
                    //verify whether isRole() && sufficient parameters are available
                    //	std::string roleName = boost::any_cast<std::string>(da->logicalForm.Arguments[1]);
                    //	if (isRole(roleName))
                    {
                        //	boost::shared_ptr<Condition>  condition = boost::shared_ptr<Condition>(new Condition("isNotIntegratedMove", da->logicalForm));

                        List<object> args = new List<object>();
                        Predicate ansNotUnderstood = new Predicate("respond-Not-Understood", args);

                        Update pushAgenda = new Update("pushAgenda",  ansNotUnderstood);
                        Update addInIntegraedMoves = new Update("addInIntegraedMoves",  da.logicalForm);
                        //boost::shared_ptr<Update> pushQUD =  boost::shared_ptr<Update>(new Update("pushQUD",da->logicalForm));

                        //	//std::string comGround = "mutual-belief";
                        //	//boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("addCommonGround",comGround));

                        UpdateRule rule = new UpdateRule();

                        //rule->addPrecondition(condition);
                        rule.addEffect(pushAgenda);
                        //rule->addEffect(pushQUD);
                        rule.addEffect(addInIntegraedMoves);

                        updateRules.Add(rule);
                    }
                    /*	//else
                        {
                            std::vector<boost::any> args;
                        //	args.push_back(conceptName);
                            Predicate ansConceptNotKnown("respond-Unknown-concept", args);

                            boost::shared_ptr<Update> pushAgenda =  boost::shared_ptr<Update>(new Update("pushAgenda",ansConceptNotKnown));
                            boost::shared_ptr<UpdateRule> rule =boost::shared_ptr<UpdateRule> (new UpdateRule()) ;
                            rule->addEffect(pushAgenda);
                            updateRules.push_back(rule);

                        }
                        */
                } //funcot == Action-Execution-By-Role
            }

            //********************************************************************************

            return updateRules;
        }
Exemplo n.º 4
0
        public override bool isValid(InformationState IS)
        {
            if (stringValue1 == "firstOnAgenda")
            {
                Predicate move = (Predicate)(value2);
                FirstOnAgenda condition = new FirstOnAgenda(move);
                return condition.isValid(IS);
            }

            else if (stringValue1 == "IsNotIntegratedMove")
            {
                Predicate move = (Predicate)(value2);
              IsNotIntegratedMove condition = new IsNotIntegratedMove(move);
                return condition.isValid(IS);
            }
            else if (stringValue1 == "isBelief")
            {
                try
                {
                    SemanticPredicate belief = (SemanticPredicate)(value2);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: isBelief *condition = new isBelief(belief);
                    IsBelief condition = new IsBelief(belief);
                    return condition.isValid(IS);
                }
                catch (InvalidCastException)
                {
                }

                try
                {
                    Predicate belief = (Predicate)(value2);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: isBelief *condition = new isBelief(belief);
                    IsBelief condition = new IsBelief(belief);
                    return condition.isValid(IS);
                }
                catch (InvalidCastException)
                {
                }
            }
            else if (stringValue1 == "isNotABelief")
            {
                /*	try
                    {
                        SemanticPredicate belief = boost::any_cast<SemanticPredicate>( value2);
                        boost::shared_ptr<isNotABelief> condition = boost::shared_ptr<isNotABelief>(new isNotABelief(belief));
                        return condition->isValid(is);
                    }
                    catch(boost::exception const&  ex)
                    {
                    }
                    */
                try
                {
                    Predicate belief = (Predicate)(value2);
                    Predicate p = new Predicate(belief.Functor, belief.Arguments);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: isNotABelief *condition = new isNotABelief(p);
                    IsNotABelief condition = new IsNotABelief(p);
                    return condition.isValid(IS);
                }
                catch (InvalidCastException)
                {
                }
            }

            else if (stringValue1 == "isMutualBelief")
            {
                try
                {
                    MutualBelief belief =(MutualBelief)(value2);
                     IsMutualBelief condition = new IsMutualBelief(belief);
                    return condition.isValid(IS);

                }
                catch (InvalidCastException)
                {
                }
            }
            else if (stringValue1 == "isNotMutualBelief")
            {
                try
                {
                    MutualBelief belief = (MutualBelief)(value2);
                     IsNotMutualBelief condition = new IsNotMutualBelief(belief);
                    return condition.isValid(IS);

                }
                catch (InvalidCastException)
                {
                }
            }

            else if (stringValue1 == "isExpected")
            {
                try
                {
                    Predicate belief = (Predicate)(value2);
                    Predicate p = new Predicate(belief.Functor, belief.Arguments);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: isExpected expected(p);
                    IsExpected expected = new IsExpected(p);
                    return expected.isValid(IS);

                }
                catch (InvalidCastException)
                {
                }
            }

            else if (stringValue1 == "isTopOfAgendaEmpty")
            {
                IsTopOfAgendaEmpty condition = new IsTopOfAgendaEmpty();
                return condition.isValid(IS);
            }
            else if (stringValue1 == "hasNoExpectation")
            {
                HasNoExpectation condition = new HasNoExpectation();
                return condition.isValid(IS);
            }
            else
            {

                if (!string.IsNullOrEmpty(stringValue1))
                {
                    this.value1 = IS.getValueOfPath(stringValue1);
                }
                if (!string.IsNullOrEmpty(stringValue2))
                {
                    this.value2 = IS.getValueOfPath(stringValue2);
                }
                if (value1 != null   && value2 != null)
                {
                    Equals condition = new Equals(value1, value2);
                    return condition.isValid(IS);
                }

            }
            return true;
        }
        public List<UpdateRule> createRules(DialogueAct da, InformationState IS)
        {
            List<UpdateRule> factoryRules = new List<UpdateRule>();

            try
            {
                //preconditions
                Precondition firstOnAgenda = new Precondition("firstOnAgenda", da.logicalForm);
                //effects
                Update addNextMove = new Update("addNextMove", da.logicalForm);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves", da.logicalForm);
                //update rule
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);
                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                if (da.getID() == "Self-Introduction")
                {
                    List<object> args2 = new List<object>();
                    string addressee = da.getAddressee();
                    args2.Add(addressee);
                   Predicate exp = new Predicate("Self-Introduction", args2);
                    Update expected = new Update("addExpected", exp);
                    rule.addEffect(expected);
                }
                if (da.getID() == "Commissive-Offer")
                {
                    List<object> args2 = new List<object>();
                    string addressee = da.getAddressee();
                    args2.Add(addressee);
                    Predicate exp = new Predicate("YES-NO-Answer", args2);
                   Update expected = new Update("addExpected", exp);
                    rule.addEffect(expected);
                }
                else if (da.getID() == "Information-Seeking-Function")
                {
                    Update expected = null;
                    string predicateName;
                    if (da.logicalForm.Functor== "WHQ-WHICH-Resource-Choice")
                    {
                        List<object> args2 = new List<object>();
                        string addressee = da.getAddressee();
                        args2.Add(addressee);
                        predicateName = "Resource-Choice";
                        Predicate exp = new Predicate(predicateName, args2);
                        expected = new Update("addExpected", exp);
                    }
                    else if (da.getCommunicativeFunction() == "Request-Action-Choice")
                    {
                        List<object> args = new List<object>();
                        predicateName = "Collective-Obligation";
                        Predicate exp = new Predicate(predicateName, args);
                        expected = new Update("addExpected", exp);
                    }

                    // adding the effect if it is not null
                    if(expected!= null)
                    {
                        rule.addEffect(expected);
                    }

                }

                else if (da.getID() == "Ask")
                {
                    List<object> args2 = new List<object>();
                    Predicate exp = new Predicate("Inform", args2);
                    Update expected = new Update("addExpected", exp);
                    rule.addEffect(expected);
                }

                else if (da.getID() == "Initial-Greet")
                {
                    List<object> args = new List<object>();
                    args.Add(da.getAddressee());
                    string self = "Self";
                    args.Add(self);
                    List<object> args2 = new List<object>();
                    Predicate exp = new Predicate("Greet-open", args);
                    Update expected = new Update("addExpected", exp);
                    rule.addEffect(expected);
                }

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            return factoryRules;
        }
        public List<UpdateRule> createRules(InformationState IS)
        {
            List<UpdateRule> factoryRules = new List<UpdateRule>();
            Property p;
            p = IS.getPropertyValueOfPath(DefineConstants.agentDialogueActs);

            List<object> systemDialogueActs = p.DataVector;
            //	cerr << " ADARF : number of sda " << systemDialogueActs->size()<< std::endl;
            foreach (object sda in systemDialogueActs)
            {
                DialogueAct da = (DialogueAct)(sda);
                //rule to accomodate system greet in response to user greet
                /*		try
                       {
                           std::vector<boost::any> args;
                           args.push_back((da->getSender()) );
                           args.push_back(da->getAddressee());

                       //predicate greet( system, user)
                           Predicate systemGreet("Greet-open", args);
                      //preconditions
                           //boost::shared_ptr<Precondition>  notGreeted = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", systemGreet));
                           boost::shared_ptr<Precondition>  firstOnAgenda = boost::shared_ptr<Precondition>(new Precondition("firstOnAgenda", systemGreet));

                       //effects
                           boost::shared_ptr<Update> addNextMove =  boost::shared_ptr<Update>(new Update("addNextMove", systemGreet));

                           //  downdate agenda
                           boost::shared_ptr<Update> popAgenda =  boost::shared_ptr<Update>(new Update("popAgenda"));

                           boost::shared_ptr<Update> addInIntegraedMoves =  boost::shared_ptr<Update>(new Update("addInIntegraedMoves",systemGreet));

                           std::string grt = "Greet-open";
                           boost::shared_ptr<Update> socialContext =  boost::shared_ptr<Update>(new Update("commPressure",grt));

                           boost::shared_ptr<UpdateRule> rule  = boost::shared_ptr<UpdateRule>(new UpdateRule() );

                       //	rule->addPrecondition(notGreeted);
                           rule->addPrecondition(firstOnAgenda);

                           rule->addEffect(addNextMove);
                           rule->addEffect(popAgenda);
                           rule->addEffect(addInIntegraedMoves);
                           rule->addEffect(socialContext);

                           factoryRules.push_back(rule);

                               std::vector<boost::any> args2;
                               Predicate exp("Greet-open",args2);
                               boost::shared_ptr<Update> expected =  boost::shared_ptr<Update>(new Update("addExpected",exp));
                               rule->addEffect(expected);

                       }
                       catch(boost::exception &e)
                       {
                       }

                */

                try
                {
                    //preconditions
                    Precondition firstOnAgenda = new Precondition("firstOnAgenda", da.logicalForm);
                    //effects
                    Update addNextMove = new Update("addNextMove", da.logicalForm);
                    Update popAgenda = new Update("popAgenda");
                    Update addInIntegraedMoves = new Update("addInIntegraedMoves", da.logicalForm);
                    //update rule
                    UpdateRule rule = new UpdateRule();

                    //	rule->addPrecondition(notAsked);
                    rule.addPrecondition(firstOnAgenda);
                    rule.addEffect(addNextMove);
                    rule.addEffect(popAgenda);
                    rule.addEffect(addInIntegraedMoves);

                    if (da.getID() == "Self-Introduction")
                    {
                        List<object> args2 = new List<object>();
                        string addressee = da.getAddressee();
                        args2.Add(addressee);
                        Predicate exp = new Predicate("Self-Introduction", args2);
                        Update expected = new Update("addExpected", exp);
                        rule.addEffect(expected);
                    }
                    if (da.getID() == "Commissive-Offer")
                    {
                        List<object> args2 = new List<object>();
                        string addressee = da.getAddressee();
                        args2.Add(addressee);
                        Predicate exp = new Predicate("YES-NO-Answer", args2);
                        Update expected = new Update("addExpected",   exp);
                        rule.addEffect(expected);
                    }
                    else if (da.getID() == "Information-Seeking-Function")
                    {
                        List<object> args2 = new List<object>();
                        string addressee = da.getAddressee();
                        args2.Add(addressee);
                        string predicateName = null;
                        if (da.logicalForm.Functor == "WHQ-WHICH-Resource-Choice")
                        {
                            predicateName = "Resource-Choice";
                            object resourceClass = da.logicalForm.Arguments[1];
                            //	args2.push_back(resourceClass);
                        }

                        if(predicateName != null)
                        {
                            Predicate exp = new Predicate(predicateName, args2);
                            Update expected = new Update("addExpected", exp);
                            rule.addEffect(expected);
                        }

                    }
                    else if (da.getID() == "Request-Action-Choice")
                    {
                        List<object> args = new List<object>();
                        string predicateName = "Collective-Obligation";

                         Predicate exp = new Predicate(predicateName, args);
                        Update expected = new Update("addExpected",   exp);
                        //rule->addEffect(expected);
                    }

                    else if (da.getID() == "Ask")
                    {
                        List<object> args2 = new List<object>();
                        Predicate exp = new Predicate("Inform", args2);
                        Update expected = new Update("addExpected",   exp);
                        rule.addEffect(expected);
                    }

                    else if (da.getID() == "Initial-Greet")
                    {
                        List<object> args = new List<object>();
                        args.Add(da.getAddressee());
                        string self = "Self";
                        args.Add(self);
                        List<object> args2 = new List<object>();
                        Predicate exp = new Predicate("Greet-open", args);
                        Update expected = new Update("addExpected", exp);
                        rule.addEffect(expected);
                    }

                    factoryRules.Add(rule);
                }
                catch (Exception)
                {
                }

            }

            return factoryRules;
        }
Exemplo n.º 7
0
 public void setLogicalForm(Predicate p)
 {
     //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
     //ORIGINAL LINE: logicalForm = p;
        // logicalForm.CopyFrom(p);
     logicalForm = (p);
 }
Exemplo n.º 8
0
 public FirstOnAgenda(Predicate p)
 {
     move = p;
 }
Exemplo n.º 9
0
        public bool contains(object predicate)
        {
            if (attType == "vector" || attType == "list")
            {
               foreach (object data in  dataVector)
                {
                    try
                    {
                        Predicate p = (Predicate)(data);
                        if (Unify.matchTerms(p, predicate))
                        {
                            return true;
                        }
                    }
                    catch (InvalidCastException)
                    {
                    }
                    try
                    {
                        //TODO : handle for Semantic predicata
                    /*   SemanticPredicate p = (SemanticPredicate)(data);
                        if (Unify.matchTerms(p, predicate))
                        {
                            return true;
                        }
                        */
                    }
                    catch (Exception )
                    {
                    }
                }

            }
            else if (attType == "stack")
            {
                try
                {
                    Predicate p = new Predicate();
                    if (dataStack.Count == 0)
                    {
                        return false;
                    }
                    else
                    {
                        p = (Predicate)(dataStack.Peek());
                        if (Unify.matchTerms(p, predicate))
                        {
                            return true;
                        }
                    }
                }
                catch (InvalidCastException)
                {
                }
            }
            return false;
        }
Exemplo n.º 10
0
        public void push(object value)
        {
            if (attType.CompareTo("vector") == 0 || attType.CompareTo("list") == 0)
            {
                object result = null;
                try
                { //if property vector already contains  value then do nothing
                    if (contains(value))
                    {
                        return;
                    }
                    //else
                    //      evaluate property and if it is not null then delete old entry
                    //      push new value
                    else
                    {
                        int i = 0;
                        foreach (object data in dataVector)
                        {
                            try
                            {
                                Predicate p = (Predicate)(data);
                                Predicate pValue = (Predicate)(value);
                                Predicate partialPrediate = new Predicate();

                                List<object> args = pValue.Arguments;
                                List<object> partialArgs = new List<object>();
                                foreach (object arg in args)
                                {
                                    partialArgs.Add(arg);
                                }
                                string var = "$";
                                partialArgs.Add(var);
                                partialPrediate.Functor = pValue.Functor;
                                partialPrediate.Arguments = partialArgs;

                                result = Unify.unify(partialPrediate, p);
                                if (result != null)
                                {
                                    break;
                                }
                                i++;
                            }
                            catch (InvalidCastException)
                            {
                            }
                        }
                        if (result != null)
                        {
                            dataVector.RemoveAt(i);

                        }
                        dataVector.Add(value);
                    }
                }
                catch (Exception )
                {
                    Console.WriteLine( "property :cought an exception while push operation" );
                }
            }

            else if (attType.CompareTo("queue") == 0)
            {
                //TODO ::  handle push for other data types
                try
                {
                    dataQueue.Enqueue(value);
                }
                catch (Exception )
                {
                    Console.WriteLine("property :cought an exception while push operation queue");
                }
            }
             else if (attType.CompareTo("stack") == 0)
            {
                try
                {
                    dataStack.Push(value);
                }
                catch (Exception )
                {
                    Console.WriteLine("property :cought an exception while push operation queue");
                }
            }
        }
Exemplo n.º 11
0
        /*
         std::vector<boost::shared_ptr<UpdateRule> > RuleFactory::getFactoryRules()
        {
           return factoryRules;
        }
        */
        public List<UpdateRule> createRules(DialogueAct da, InformationState IS)
        {
            List<UpdateRule> factoryRules = new List<UpdateRule>();
            //rule to accomodate system greet in response to user greet
            try
            {
                List<object> args = new List<object>();
                string addressee = "Self";
                //			args.push_back(da->getAddressee());
                args.Add(addressee);
                args.Add(da.getSender());
                Predicate systemGreet = new Predicate("Greet-open", args);
                //preconditions
                Precondition notGreeted = new Precondition("isNotIntegratedMove",  systemGreet);
                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  systemGreet);
                //effects
                Update addNextMove = new Update("addNextMove",  systemGreet);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  systemGreet);
                Update clearSocialContext = new Update("clearSocialContext");
                //SemanticPredicate mutualBel("MutualBelief","","",systemGreet);
                Update belief = new Update("addBelief",  systemGreet);
                UpdateRule rule = new UpdateRule();
                rule.addPrecondition(notGreeted);
                rule.addPrecondition(firstOnAgenda);
                //	rule->addEffect(belief);
                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);
                rule.addEffect(clearSocialContext);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            try
            {
                List<object> args = new List<object>();
                //			args.push_back(da->getAddressee());
                //			args.push_back(da->getSender());

                //predicate greet( system, user)
                Predicate systemGreet = new Predicate("Greet-close", args);
                //preconditions
                //boost::shared_ptr<Precondition>  notGreeted = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", systemGreet));
                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  systemGreet);

                //effects
                Update addNextMove = new Update("addNextMove",  systemGreet);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  systemGreet);
                Update clearSocialContext = new Update("clearSocialContext");

                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notGreeted);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);
                rule.addEffect(clearSocialContext);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatConcept = new Predicate("ans-WHQ-WHAT-Concept", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatConcept);

                //effects
                Predicate awc = new Predicate("ans-WHQ-WHAT-Concept", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  awc);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  awc);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }
            //accomodate system response to the user what-concept  question
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
               Predicate ansActionChoice = new Predicate("Reply-Action-Choice", args);
                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansActionChoice);

                //effects
                Update addNextMove = new Update("addNextMove",  ansActionChoice);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansActionChoice);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);
                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //accomodate system response to the user what-instance-state  question
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansEntityState = new Predicate("ans-WHQ-WHAT-Entity-State", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansEntityState);

                //effects
                Predicate ansInstanceState = new Predicate("ans-WHQ-WHAT-Entity-State", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansInstanceState);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansInstanceState);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }
            //........................................................................................
            //accomodate system response to the user what-concept-feature  question
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatAllOperations = new Predicate("ans-WHQ-WHAT-All-Operations", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatAllOperations);

                //effects
                Predicate ansAllOperations = new Predicate("ans-WHQ-WHAT-All-Operations", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansAllOperations);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansAllOperations);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }
            //accomodate system response to the user what-all-attribute  question
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatAllAttributes = new Predicate("ans-WHQ-WHAT-All-Attributes", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatAllAttributes);

                //effects
                Predicate ansAllOperations = new Predicate("ans-WHQ-WHAT-All-Attributes", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansAllOperations);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansAllOperations);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }
            //accomodate system response to the user what-concept-attribute  question
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatConceptAttributes = new Predicate("ans-WHQ-WHAT-Concept-Attribute-Value", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatConceptAttributes);

                //effects
                Predicate ansConceptAttribute = new Predicate("ans-WHQ-WHAT-Concept-Attribute-Value", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansConceptAttribute);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansConceptAttribute);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //accomodate system response to the user what-concept-feature  question
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatConceptFeature = new Predicate("ans-WHQ-WHAT-Concept-Feature", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatConceptFeature);

                //effects
                Predicate ansConceptFeature = new Predicate("ans-ans-WHQ-WHAT-Concept-Feature", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansConceptFeature);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansConceptFeature);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //accomodate system response to the user what-next action
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatAgentNextAction = new Predicate("ans-WHQ-WHAT-Next-Action", args);
                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatAgentNextAction);

                //effects
                Predicate ansNextAction = new Predicate("ans-WHQ-WHAT-Next-Action", da.logicalForm.Arguments);
               Update addNextMove = new Update("addNextMove",  ansNextAction);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansNextAction);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }
            //accomodate system response to the user what-action decision
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatActionDecision = new Predicate("ans-WHQ-WHAT-Action-Decision", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatActionDecision);

                //effects
                Predicate ansActionDecision = new Predicate("ans-WHQ-WHAT-Action-Decision", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansActionDecision);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansActionDecision);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }
            //accomodate system response to the user what-next action
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatAgentCurrentAction = new Predicate("ans-WHQ-WHAT-Current-Action", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatAgentCurrentAction);

                //effects
                Predicate ansCurrentAction = new Predicate("ans-WHQ-WHAT-Current-Action", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansCurrentAction);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansCurrentAction);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //accomodate system response to the user what-last action
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatAgentLastAction = new Predicate("ans-WHQ-WHAT-Last-Action", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatAgentLastAction);

                //effects
                Predicate ansLastAction = new Predicate("ans-WHQ-WHAT-Last-Action", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansLastAction);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansLastAction);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }
            //accomodate system response to the user what-last action
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatActionRes = new Predicate("ans-WHQ-WHAT-Action-Resource", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatActionRes);

                //effects
                Predicate ansActionMeanRes = new Predicate("ans-WHQ-WHAT-Action-Resource", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansActionMeanRes);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansActionMeanRes);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }
            //accomodate system response to the user what-current activity
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatAgentActivity = new Predicate("ans-WHQ-WHAT-Current-Activity", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatAgentActivity);

                //effects
                Predicate ansAgentActivity = new Predicate("ans-WHQ-WHAT-Current-Activity", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansAgentActivity);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansAgentActivity);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //accomodate system response to the user what-agent role
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatAgentRole = new Predicate("ans-WHQ-WHAT-Agent-Role", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatAgentRole);

                //effects
                Predicate ansAgentRole = new Predicate("ans-WHQ-WHAT-Agent-Role", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansAgentRole);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansAgentRole);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }
            //...........................................................
            //accomodate system response to the user what is role next action
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatRoleNextAction = new Predicate("ans-WHQ-WHAT-Role-Next-Action", args);
                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatRoleNextAction);

                //effects
                Predicate ansRoleNextAction = new Predicate("ans-WHQ-WHAT-Role-Next-Action", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansRoleNextAction);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansRoleNextAction);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //...................................................................................................................
            //accomodate system response to the user: what is team next action
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatTeamNextAction = new Predicate("ans-WHQ-WHAT-Team-Next-Action", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatTeamNextAction);

                //effects
                Predicate ansTeamNextAction = new Predicate("ans-WHQ-WHAT-Team-Next-Action", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansTeamNextAction);
                Update popAgenda = new Update("popAgenda");
               Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansTeamNextAction);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //...................................................................................................................
            //accomodate system response to the user what is role current action
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhatRoleCurrentAction = new Predicate("ans-WHQ-WHAT-Role-current-Action", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhatRoleCurrentAction);

                //effects
                Predicate ansRoleCurrentAction = new Predicate("ans-WHQ-WHAT-Role-Current-Action", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansRoleCurrentAction);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansRoleCurrentAction);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //================================================================================

            //********************************************************************************
            //					WHQ-WHO   (present , past , future ) action
            //********************************************************************************
            //================================================================================
            //accomodate system response to the user who will do  action
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhoWillDoAction = new Predicate("ans-WHQ-WHO-Will-Do-Action", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhoWillDoAction);

                //effects
                Predicate ansWhoWillAction = new Predicate("ans-WHQ-WHO-Will-Do-Action", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansWhoWillAction);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansWhoWillAction);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }
            //================================================================================

            //********************************************************************************
            //accomodate system response to the ans-WHQ-WHO question
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansWhoQuestion = new Predicate("ans-WHQ-WHO", args);
                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhoQuestion);

                //effects
                Predicate ansWhoQtn = new Predicate("ans-WHQ-WHO", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansWhoQtn);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansWhoQtn);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //********************************************************************************

            //********************************************************************************
            //			end of 		WHQ-WHO   (present , past , future ) action
            //********************************************************************************

            //yes no question
            //accomodate system response to the user yes no question
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansYesNoQtn = new Predicate("ans-YES-NO-Question", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansYesNoQtn);

                //effects
                Predicate ansYesNo = new Predicate("ans-YES-NO-Question", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansYesNo);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansYesNo);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //********************************************************************************
            //			Check Questions
            //********************************************************************************
            //accomodate system response to the check question
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate ansCheckQuestion = new Predicate("ans-Check-Question", args);
                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansCheckQuestion);

                //effects
                Predicate ansYesNo = new Predicate("ans-Check-Question", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansYesNo);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansYesNo);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //********************************************************************************
            //			end of 		Check Questions
            //********************************************************************************

            //********************************************************************************
            //			WHQ-WHY Questions
            //********************************************************************************
            //accomodate system response to the whq-why question
            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
               Predicate ansWhyQuestion = new Predicate("ans-WHQ-WHY", args);
                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansWhyQuestion);

                //effects
                Predicate ansWHYQtn = new Predicate("ans-WHQ-WHY", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansWHYQtn);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  ansWHYQtn);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //********************************************************************************
            //			end of 		WHQ-WHY Questions
            //********************************************************************************

            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate inform = new Predicate("Inform", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  inform);

                //effects
                Predicate pre = new Predicate("Inform", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  pre);
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  pre);
                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            /*
                   try {
                  //preconditions
               //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                       std::vector<boost::any> args;
                       Predicate ask("Ask", args);

                       boost::shared_ptr<Precondition>  firstOnAgenda = boost::shared_ptr<Precondition>(new Precondition("firstOnAgenda", ask));

                   //effects
                       Predicate pre("Ask", da->logicalForm.Arguments);
                       boost::shared_ptr<Update> addNextMove =  boost::shared_ptr<Update>(new Update("addNextMove",pre));
                       boost::shared_ptr<Update> popAgenda =  boost::shared_ptr<Update>(new Update("popAgenda"));
                       boost::shared_ptr<Update> addInIntegraedMoves =  boost::shared_ptr<Update>(new Update("addInIntegraedMoves",pre));
                       std::vector<boost::any> args2;
                       Predicate exp("Inform",args2);
                       boost::shared_ptr<Update> expected =  boost::shared_ptr<Update>(new Update("addExpected",exp));
                   //effects
                       boost::shared_ptr<UpdateRule> rule  = boost::shared_ptr<UpdateRule>(new UpdateRule() );

                   //	rule->addPrecondition(notAsked);
                       rule->addPrecondition(firstOnAgenda);
                       rule->addEffect(addNextMove);
                       rule->addEffect(expected);
                       rule->addEffect(popAgenda);
                       rule->addEffect(addInIntegraedMoves);

                       factoryRules.push_back(rule);
                   }
                   catch(boost::exception & e)
                   {

                   }

               try{
                       std::vector<boost::any> args;
                       args.push_back(da->logicalForm.Arguments[0]);
                   //predicate greet( system, user)
                       Predicate iGreet("Initial-Greet", args);
                  //preconditions
                       //boost::shared_ptr<Precondition>  notGreeted = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", systemGreet));
                       boost::shared_ptr<Precondition>  firstOnAgenda = boost::shared_ptr<Precondition>(new Precondition("firstOnAgenda", iGreet));
                   //effects
                       boost::shared_ptr<Update> addNextMove =  boost::shared_ptr<Update>(new Update("addNextMove", iGreet));
                       boost::shared_ptr<Update> popAgenda =  boost::shared_ptr<Update>(new Update("popAgenda"));
                       boost::shared_ptr<Update> addInIntegraedMoves =  boost::shared_ptr<Update>(new Update("addInIntegraedMoves",iGreet));
                       boost::shared_ptr<Update> clearSocialContext =  boost::shared_ptr<Update>(new Update("clearSocialContext"));

                       SemanticPredicate bel("Bel","Self",iGreet);
                       boost::shared_ptr<Update> belief =  boost::shared_ptr<Update>(new Update("addBelief", bel));
                       boost::shared_ptr<UpdateRule> rule  = boost::shared_ptr<UpdateRule>(new UpdateRule() );

                   //	rule->addPrecondition(notGreeted);
                       rule->addPrecondition(firstOnAgenda);

                       rule->addEffect(belief);
                       rule->addEffect(addNextMove);
                       rule->addEffect(popAgenda);
                       rule->addEffect(addInIntegraedMoves);
                       rule->addEffect(clearSocialContext);
                       factoryRules.push_back(rule);
                   }
               catch(boost::exception &e)
                   {
                   }
            */
            try
            {
                List<object> args = new List<object>();
                string addressee = "Self";
                //args.push_back(da->getAddressee());
                args.Add(addressee);
                args.Add(da.getSender());
                Predicate greet = new Predicate("Greet-open", args);
                //predicate greet( system, user)
                Predicate systemGreet = new Predicate("reply-Greet-open", args);
                //preconditions
                Precondition notGreeted = new Precondition("isNotIntegratedMove",  greet);
                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  systemGreet);
                //effects
                Update popAgenda = new Update("popAgenda");
                Update addInIntegraedMoves = new Update("addInIntegraedMoves",  greet);
                Update clearSocialContext = new Update("clearSocialContext");
                //	SemanticPredicate mutualBel("MutualBelief","","",systemGreet);
                //			boost::shared_ptr<Update> belief =  boost::shared_ptr<Update>(new Update("addBelief", systemGreet));

                UpdateRule rule = new UpdateRule();
                rule.addPrecondition(notGreeted);
                rule.addPrecondition(firstOnAgenda);
                //		rule->addEffect(belief);
                rule.addEffect(popAgenda);
                rule.addEffect(addInIntegraedMoves);
                rule.addEffect(clearSocialContext);

                Update addNextMove = new Update("addNextMove",  systemGreet);
                rule.addEffect(addNextMove);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            try
            {
                //preconditions
                //		boost::shared_ptr<Precondition>  notAsked = boost::shared_ptr<Precondition>(new Precondition("isNotIntegratedMove", da->logicalForm));
                List<object> args = new List<object>();
                Predicate init_intro = new Predicate("Initial-Introduction", args);

                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  init_intro);

                //effects
                Predicate pre = new Predicate("Initial-Introduction", da.logicalForm.Arguments);
                Update popAgenda = new Update("popAgenda");
                //boost::shared_ptr<Update> addInIntegraedMoves =  boost::shared_ptr<Update>(new Update("addInIntegraedMoves",pre));

                List<object> args2 = new List<object>();

                //std::string addressee = "Self";
                //args2.push_back(addressee);
                args.Add(da.getAddressee());
                args2.Add(da.getSender());
                //predicate greet( system, user)
                Predicate initIntro = new Predicate("Initial-Introduction", args);
                Update belief = new Update("addBelief",  initIntro);
                Update addNextMove = new Update("addNextMove",  initIntro);
                Update addInInteg = new Update("addInIntegraedMoves",  initIntro);

                //effects
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);
                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                rule.addEffect(belief);
                rule.addEffect(addInInteg);

                factoryRules.Add(rule);
            }
            catch (Exception)
            {
            }

            //===========================================================
            //accomodate system reply for concept not known
            try
            {
                List<object> args = new List<object>();
                //	args.push_back(conceptName);
                Predicate ansConceptNotKnown = new Predicate("respond-Unknown-concept", args);
                //preconditions
               Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansConceptNotKnown);

                //effects
                Predicate ansCNKnown = new Predicate("respond-Unknown-concept", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansCNKnown);
                Update popAgenda = new Update("popAgenda");

                //make rule
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                //add rule to rule factory
                factoryRules.Add(rule);
            }
            catch (Exception)
            {

            }

            //===========================================================
            //accomodate system reply for utterance not understood
            try
            {
                List<object> args = new List<object>();
                //	args.push_back(conceptName);
                Predicate ansNotUnderstood = new Predicate("respond-Not-Understood", args);
                //preconditions
                Precondition firstOnAgenda = new Precondition("firstOnAgenda",  ansNotUnderstood);

                //effects
                Predicate ansNotUnderstanding = new Predicate("respond-Not-Understood", da.logicalForm.Arguments);
                Update addNextMove = new Update("addNextMove",  ansNotUnderstanding);
                Update popAgenda = new Update("popAgenda");

                //make rule
                UpdateRule rule = new UpdateRule();

                //	rule->addPrecondition(notAsked);
                rule.addPrecondition(firstOnAgenda);

                rule.addEffect(addNextMove);
                rule.addEffect(popAgenda);
                //add rule to rule factory
                factoryRules.Add(rule);
            }
            catch (Exception)
            {

            }

            //factoryRules.push_back(rule);

            return factoryRules;
        }
Exemplo n.º 12
0
 public IsNotABelief(Predicate bel)
 {
     predicate = bel;
 }
Exemplo n.º 13
0
 public IsNotIntegratedMove(Predicate p)
 {
     move = p ;
 }
Exemplo n.º 14
0
 public Predicate(Predicate p)
 {
     this.functor = p.Functor;
     this.arguments = p.Arguments;
 }
Exemplo n.º 15
0
        public static string getAgentName(string host, string tartgetAgent)
        {
            string agentName = null;
            Agent agt = getAgentByName(host);
            VirtualHuman vh = (VirtualHuman)agt;
            if (vh!= null)
            {
                List<object> args2 = new List<object>();
                string name = tartgetAgent;
                string var = "$";
                args2.Add(tartgetAgent);
                args2.Add(var);
                string functor = "Agent-Name";
                Predicate exp = new Predicate(functor, args2);
                DM.Property beliefs = vh.DialogueManager.IS.getPropertyValueOfPath( DefineConstants.semanticBeliefs);
                object result = beliefs.evaluate(exp);
                if (result!= null)
                {
                    try {
                        agentName = (string)(result);
                    }
                    catch (InvalidCastException) { }

                }
            }
            return agentName;
        }
Exemplo n.º 16
0
        //    boost::shared_ptr<DialogueAct> constructDialogueAct();
        public DialogueAct constructDialogueAct(UtteranceMessage utterance)
        {
            DialogueAct da = new DialogueAct();

            //std::string utternaceFrame = "WHQ-WHAT-Concept car";
            string utternaceFrame = utterance.UtteranceSemanticForm;
            //	boost::algorithm::to_lower(utternaceFrame);

              //  List<string> vectorString = new List<string>();
            // converting string into lowercase
            string[] vectorString = utternaceFrame.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
              //  boost.algorithm.split_regex(vectorString, utternaceFrame, boost.regex("[ ]+"));
            //	copy( vectorString.begin(), vectorString.end(),  std::ostream_iterator<std::string>( std::cout, "\n" ) ) ;

            /*
            WHQuestion-WHAT
            */
            //	std::cout << " \n***********WHQ-QUESTION-WHAT*****************************\n"<< std::endl;
            string cueWord = "WHAT";
            if (vectorString[0].Contains(cueWord) && utternaceFrame.IndexOf(cueWord) != utternaceFrame.Length)
            {
                Console.Write("input is a WHQ-what ");
                Console.Write("\n");

                /*
                *   WHQ-What-Concept
                *   what is a  car?
                */
                if (vectorString[0] == "WHQ-WHAT-Concept" && vectorString.Length == 2)
                {
                    Console.Write(" asking about description of concept :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Concept");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //concept name
                    string conceptName = vectorString[1];
                    args.Add(conceptName);
                   Predicate p = new Predicate(da.id,args);
                   da.logicalForm  =p;
                }

                /*
                *   WHQ-What-Value
                *   what is the (description of) speed of car?
                * or what does calculateMilage of car do?
                * "WHQ-WHAT-Concept-Feature"  Bateau aller
                */
               else if (vectorString[0] == "WHQ-WHAT-Concept-Feature" && vectorString.Length == 3)
                {
                    Console.Write(" asking about description of the feature (attribute/operation) of concept :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Concept-Feature");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //concept name
                    string conceptName = vectorString[1];
                    args.Add(conceptName);

                    //feature name
                    string featureName = vectorString[2];
                    args.Add(featureName);
                     Predicate p = new Predicate(da.getID(), args);

                    da.logicalForm = p;
                }

                /* value of the attribute of a concept/instance
                     simplest case:  when instance/object/class name and attribute name is given
                */
                else if (vectorString[0] == "WHQ-WHAT-Concept-Attribute-Value" && vectorString.Length == 3)
                {
                    Console.Write(" asking about the value  an attribute of concept :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Concept-Attribute-Value");
                    da.communicativeFunction = "WHQ-What";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //concept name
                    string conceptName = vectorString[1];
                    args.Add(conceptName);
                    //attribute name
                    string attributeName = vectorString[2];
                    args.Add(attributeName);

                    Predicate p = new Predicate(da.id, args);
                    da.logicalForm = p;
                }

                /*
                TODO :: treatement for the reference of 1st, second and third person pronoun  for : WHQ-WHAT-Value
                    eg. what is my age?  (1st person)
                    eg. what is your age?  (2nd person)
                    eg. what is the speed of it?  ( object in focus)  (third person / object)
                    eg. what is the speed of that/this car? ( referenced instance of the type car)(third person / object).

                */

                /*   WHQ-What-All-Attributes
                *   what are the attributes of a  car?
                */
                else if (vectorString[0] == "WHQ-WHAT-All-Attributes" && vectorString.Length == 2)
                {
                    Console.Write(" asking about all attributes of concept :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-All-Attributes");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //concept name
                    string conceptName = vectorString[1];
                    args.Add(conceptName);
                    Predicate p = new Predicate(da.getID(), args);
                    da.logicalForm = p;
                }

                /*  "WHQ-WHAT-All-Operations"
                *   what are the operations of a  car?
                */
                else if (vectorString[0] == "WHQ-WHAT-All-Operations" && vectorString.Length == 2)
                {
                    Console.Write(" asking about all attributes of concept :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-All-Operations");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //concept name
                    string conceptName = vectorString[1];
                    args.Add(conceptName);

                    Predicate p = new Predicate(da.getID(), args);
                    da.logicalForm = p;
                }

                //....................................................................................
                /*  "WHQ-WHAT-Instance-state"
                *   what are the state of door?
                */
                else if (vectorString[0] == "WHQ-WHAT-Entity-State" && vectorString.Length == 3)
                {
                    Console.Write(" asking about the state of an instance :");
                    Console.Write(vectorString[2]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Entity-State");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //agent name
                    string agentName = vectorString[1];
                    args.Add(agentName);
                    //concept name
                    string instanceName = vectorString[2];
                    args.Add(instanceName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }
                //...................................................................

                /*  "WHQ-WHAT-Role"
                *   what is/are the role of an  agent?
                * An agent can have more than one roles in different activities
                */
                else if (vectorString[0] == "WHQ-WHAT-Agent-Role" && vectorString.Length == 2)
                {
                    Console.Write(" asking about role  of an agetn :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Agent-Role");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //concept name
                    string conceptName = vectorString[1];
                    args.Add(conceptName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*  "WHQ-WHAT-Role"
                *   what is/are the role of an  agent in the given actity?
                * An agent can have more than one roles in different activities
                */
                else if (vectorString[0] == "WHQ-WHAT-Agent-Role" && vectorString.Length == 3)
                {
                    Console.Write(" asking about role  of an agetn :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Role");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //agent name
                    string agentName = vectorString[1];
                    args.Add(agentName);
                    //activity name
                    string activityName = vectorString[2];
                    args.Add(activityName);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*
                TODO :: treatement for the reference of 1st, second and third person pronoun  for : WHQ-WHAT-Role
                */

                /*
                TODO :: treatement for the reference of 1st, second and third person pronoun  for : WHQ-WHAT-Role  in a current activity
                */

                /*  "WHQ-WHAT-Current-Action"
                *   what is the current action of an  agent?
                * (by default in a current ongoing activity )
                */
                else if (vectorString[0] == "WHQ-WHAT-Current-Action" && vectorString.Length == 2)
                {
                    Console.Write(" asking about current action of an agetn :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Current-Action");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //concept name
                    string agentName = vectorString[1];
                    args.Add(agentName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }
                /*  "WHQ-WHAT-Current-Action hostAgent $performer"
                *   what is the current action of a performer perceived by $hostAgent?
                *   current action in a given activity )
                */
                else if (vectorString[0] == "WHQ-WHAT-Current-Action" && vectorString.Length == 3)
                {
                    Console.Write(" asking about current action of an agetn :");
                    Console.Write(vectorString[1]);
                    Console.Write("  in a given activity ");
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Current-Action");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //concept name
                    string agentName = vectorString[1];
                    args.Add(agentName);
                    //performer name
                    string performerName = vectorString[2];
                    args.Add(performerName);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*  "WHQ-WHAT-Current-Action"
                *   what is the current action of an  agent in the activity1?
                *   current action in a given activity )
                */
                else if (vectorString[0] == "WHQ-WHAT-Current-Action" && vectorString.Length == 4)
                {
                    Console.Write(" asking about current action of an performer agent :");
                    Console.Write(vectorString[2]);
                    Console.Write("  in a given activity ");
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Current-Action");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //concept name
                    string agentName = vectorString[1];
                    args.Add(agentName);
                    string performerName = vectorString[2];
                    args.Add(performerName);
                    //activity name
                    string activityName = vectorString[3];
                    args.Add(activityName);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*
                TODO :: treatement for the reference of 1st, second and third person pronoun  for : WHQ-WHAT-Current-action
                */

                /*  "WHQ-WHAT-Last-Action"
                *   what is the Last action of an  agent?
                * (by default in a current ongoing activity )
                */
                else if (vectorString[0] == "WHQ-WHAT-Last-Action" && vectorString.Length == 3)
                {
                    Console.Write(" asking about Last action of an agent :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Last-Action");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //agent name
                    string agentName = vectorString[1];
                    args.Add(agentName);
                    //performer name
                    string performer = vectorString[2];
                    args.Add(performer);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*  "WHQ-WHAT-Last-Action"
                *   what is the Last action of an  agent in the activity1?
                *   current action in a given activity )
                */
                else if (vectorString[0] == "WHQ-WHAT-Last-Action" && vectorString.Length == 4)
                {
                    Console.Write(" asking about Last action of an agetn :");
                    Console.Write(vectorString[1]);
                    Console.Write("  in a given activity ");
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Last-Action");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //concept name
                    string agentName = vectorString[1];
                    args.Add(agentName);
                    //activity name
                    string activityName = vectorString[2];
                    args.Add(activityName);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*
                TODO :: treatement for the reference of 1st, second and third person pronoun  for : WHQ-WHAT-Last-action
                */

                /*  "WHQ-WHAT-Next-Action"
                *   what is the Next action of an  agent?
                * (by default in a current ongoing activity )
                */
                else if (vectorString[0] == "WHQ-WHAT-Next-Action" && vectorString.Length == 2)
                {
                    Console.Write(" asking about Next action of an agent :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Next-Action");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //agent name
                    string agentName = vectorString[1];
                    args.Add(agentName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*  "WHQ-WHAT-Next-Action"
                *   what is the Next action of an  agent in the activity1?
                *   current action in a given activity )
                */
                else if (vectorString[0] == "WHQ-WHAT-Next-Action" && vectorString.Length == 3)
                {
                    Console.Write(" asking about Next action of an agent :");
                    Console.Write(vectorString[1]);
                    Console.Write("  in a given activity ");
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Next-Action");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //concept name
                    string agentName = vectorString[1];
                    args.Add(agentName);
                    //activity name
                    string activityName = vectorString[2];
                    args.Add(activityName);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*
                TODO :: treatement for the reference of 1st, second and third person pronoun  for : WHQ-WHAT-Next-action
                */

                /*  "WHQ-WHAT-Role-Next-Action"
                *   what is the Next action of the role in the activity1?
                )
                */
                else if (vectorString[0] == "WHQ-WHAT-Role-Next-Action" && vectorString.Length == 2)
                {
                    Console.Write(" asking about Next action of the Role :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Role-Next-Action");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //agent name
                    string roleName = vectorString[1];
                    args.Add(roleName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }
                //...................................................................................................
                /*  "WHQ-WHAT-Team-Next-Action"
                *   what is the Next action of the team in the activity1?
                )
                */
                else if (vectorString[0] == "WHQ-WHAT-Team-Next-Action" && vectorString.Length == 1)
                {
                    Console.Write(" asking about Next action of the Team :");
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Team-Next-Action");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //agent name

                    Predicate p = new Predicate(da.getID());
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                //...................................................................................................

                /*  "WHQ-WHAT-Role-current-Action"
                *   what is the current action of the role in the activity1?
                )
                */
                else if (vectorString[0] == "WHQ-WHAT-Role-Current-Action" && vectorString.Length == 2)
                {
                    Console.Write(" asking about curent action of the Role :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Role-Current-Action");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //agent name
                    string roleName = vectorString[1];
                    args.Add(roleName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }
                //...........................................................................

                /*  "WHQ-WHAT-Action-Decision"
                *   what is the Next decision of an  agent in the activity1?
                *   current action in a given activity )
                */
                else if (vectorString[0] == "WHQ-WHAT-Action-Decision" && vectorString.Length == 2)
                {
                    Console.Write(" asking about Next action of an agetn :");
                    Console.Write(vectorString[1]);
                    Console.Write("  in a given activity ");
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Action-Decision");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //concept name
                    string agentName = vectorString[1];
                    args.Add(agentName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*  "WHQ-WHAT-Said"
                  eg.  what did he/she/you/$agent say?
                *  request for the repeatition of the last utterance ( hearer didnt understand tha last utterance)
                */
                else if (vectorString[0] == "WHQ-WHAT-Said" && vectorString.Length == 2)
                {
                    Console.Write(" asking about repetation of the last utterance  of an agent :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Said");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //agent name
                    string agentName = vectorString[1];
                    args.Add(agentName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }
                /*
                TODO :: treatement for the reference of 1st, second and third person pronoun  for : WHQ-WHAT-said
                */

                /*  "WHQ-WHAT-Current-Activity"
                  eg.  what is your current activity
                *
                */
                else if (vectorString[0] == "WHQ-WHAT-Current-Activity" && vectorString.Length == 3)
                {
                    Console.Write(" asking about Current-Activity of an agetn :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Current-Activity");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //agent name
                    string agentName = vectorString[1];
                    args.Add(agentName);
                    //activity name
                    string activityName = vectorString[2];
                    args.Add(activityName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*
                TODO :: treatement for the reference of 1st, second and third person pronoun  for : WHQ-WHAT-said
                */
                /*  "WHQ-WHAT-Previous-Activity"
                  eg.  what was your Previous activity
                *
                */
                else if (vectorString[0] == "WHQ-WHAT-Previous-Activity" && vectorString.Length == 3)
                {
                    Console.Write(" asking about Previous-Activity of an agetn :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Previous-Activity");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //agent name
                    string agentName = vectorString[1];
                    args.Add(agentName);
                    //activity name
                    string activityName = vectorString[2];
                    args.Add(activityName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*
                TODO :: treatement for the reference of 1st, second and third person pronoun  for : WHQ-WHAT-Previous
                */

                /*  "WHQ-WHAT-Next-Activity"
                  eg.  what is Next current activity
                *
                */
                else if (vectorString[0] == "WHQ-WHAT-Next-Activity" && vectorString.Length == 3)
                {
                    Console.Write(" asking about Next-Activity of an agetn :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Next-Activity");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //agent name
                    string agentName = vectorString[1];
                    args.Add(agentName);
                    //activity name
                    string activityName = vectorString[2];
                    args.Add(activityName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*
                TODO :: treatement for the reference of 1st, second and third person pronoun  for : WHQ-WHAT-Next
                */
                //........................................................

                /*  "WHQ-WHAT-Role-Commitment"

                *
                */
                else if (vectorString[0] == "WHQ-WHAT-Role-Commitment" && vectorString.Length == 2)
                {
                    Console.Write(" asking about Role-Commitment of an agent :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHAT-Role-Commitment");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    //agent name
                    string agentName = vectorString[1];
                    args.Add(agentName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

                /*
                TODO :: treatement for the reference of 1st, second and third person pronoun  for : WHQ-WHAT-Role-Commitment
                */

                //...................................................................................................

                /*  "WHQ-WHAT-Action-Resource <?hostAgent> <?performer> <?action> <?resourceUsage> <?tense>"
                *	resourceUsage can be one of the {object, mean, humanBodyPart, target}
                )
                */
                else if (vectorString[0] == "WHQ-WHAT-Action-Resource" && vectorString.Length == 6)
                {
                    da.setID("WHQ-WHAT-Action-Resource");
                    da.communicativeFunction = "WHQ-WHAT";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    for (int i = 1; i < vectorString.Length; i++)
                    {
                        args.Add(vectorString[i]);
                    }

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }
                //...........................................................................

            } //end of if (cuWord ==  what)

            //********************************************************************************
            //					WHQ-WHO   (present , past , future ) action
            //********************************************************************************

            else if (vectorString[0].Contains("WHO") && utternaceFrame.IndexOf(cueWord) != utternaceFrame.Length)
            {
                cueWord = "WHO";
                Console.Write("input is a WHQ-WHO ");
                Console.Write("\n");

                //==========================================================================================
                /*  "WHQ-WHO-Will-Do-Action" @actionName
                *   Qui vas guider le moule?
                */

                //********************************************************************************
                //********************************************************************************
                //********************************************************************************
                //					WHQ-WHO   (present , past , future ) action
                //********************************************************************************

                //==========================================================================================
                /*  "WHQ-WHO-Will-Do-Action" @actionName
                *   Qui vas guider le moule?
                */

                //	std::cout << "v1  : " << vectorString[0]<<  " v2 "<< "WHQ-WHO-Will-Do-Action" << vectorString.size()<< std::endl;
                if (vectorString[0] == "WHQ-WHO-Will-Do-Action" && vectorString.Length == 2)
                {
                    Console.Write(" asking about who will do action :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHO-Will-Do-Action");
                    da.communicativeFunction = "WHQ-WHO";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    for (int i = 1; i < vectorString.Length; i++)
                    {
                        args.Add(vectorString[i]);
                    }

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.id, args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }
                //==========================================================================================
                //==========================================================================================
                /*  "WHQ-WHO-Do-Action" @actionName
                *   Qui vas guider le moule?
                */

                //	std::cout << "v1  : " << vectorString[0]<<  " v2 "<< "WHQ-WHO-Will-Do-Action" << vectorString.size()<< std::endl;
                else if (vectorString[0] == "WHQ-WHO" && vectorString.Length == 5)
                {
                    Console.Write(" asking about who has done (is doing) action :");
                    Console.Write(vectorString[1]);
                    Console.Write("\n");
                    da.setID("WHQ-WHO");
                    da.communicativeFunction = "WHQ-WHO";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    for (int i = 1; i < vectorString.Length; i++)
                    {
                        args.Add(vectorString[i]);
                    }

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }
                //********************************************************************************

            } //end of who

            //********************************************************************************

            //********************************************************************************
            //					WHQ-WHY   (Action-Execution-by-Role , $role , $action , $tense
            //********************************************************************************

               else if (vectorString[0].Contains("WHY") && utternaceFrame.IndexOf(cueWord) != utternaceFrame.Length)
            {
                cueWord = "WHY";
                Console.Write("input is a WHQ-WHY ");
                Console.Write("\n");

                //==========================================================================================
                /*  "WHQ-WHy Action-Execution-By-Agent" $hostAgent $role $agent $tense
                *   Pourquoi <agentRole> va guider le moule?
                */

                //	std::cout << "v1  : " << vectorString[0]<<  " v2 "<< "WHQ-WHO-Will-Do-Action" << vectorString.size()<< std::endl;
                if (vectorString[1] == "Action-Execution-By-Role" && vectorString.Length == 6)
                {
                    Console.Write(" asking about reason  why for action :");
                    Console.Write(vectorString[3]);
                    Console.Write("\n");
                    da.setID("WHQ-WHY");
                    da.communicativeFunction = "WHQ-WHY";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();
                    for (int i = 1; i < vectorString.Length; i++)
                    {
                        args.Add(vectorString[i]);
                    }

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }
                //==========================================================================================

            } //end of who

            //********************************************************************************

            // end of  WHQuestion-WHAT
            //********************************************************************************
            //********************************************************************************

            else if (vectorString[0].Contains("Greet-open") && utternaceFrame.IndexOf(cueWord) != utternaceFrame.Length)
            {
                cueWord = "Greet-open";

                Console.Write(" input is a greet-open dialogue act ");
                Console.Write("\n");
                Console.Write("  agent greet system :");
                Console.Write("\n");
                da.setID("Greet-open");
                da.communicativeFunction = "Greet-open";
                da.dimension = Dimensions.socialObligation;
                da.sender = utterance.Sender;
                da.addressee = utterance.Receiver;
                da.utterance = utterance.Content;
                List<object> args = new List<object>();
                //agent name
                //std::string agentName = vectorString[1] ;
                args.Add(da.sender);
                args.Add(da.addressee);
                //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                //ORIGINAL LINE: Predicate p(da.id,args);
                Predicate p = new Predicate(da.getID(), args);
                //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                //ORIGINAL LINE: da->logicalForm = p;
                da.logicalForm = p;

            }

            else if (vectorString[0].Contains("SOM-Presented-by-other") && utternaceFrame.IndexOf(cueWord) != utternaceFrame.Length)
            {
                cueWord = "SOM-Presented-by-other";
                Console.Write(" input is a SOM dialogue act ");
                Console.Write("\n");
                da.setID("SOM-Presented-by-other");
                da.communicativeFunction = "SOM-Presented-by-other";
                da.dimension = Dimensions.socialObligation;
                da.sender = utterance.Sender;
                da.addressee = utterance.Receiver;
                da.utterance = utterance.Content;
                List<object> args = new List<object>();
                //agent name
                //std::string agentName = vectorString[1] ;
                args.Add(da.sender);
                args.Add(da.addressee);
                //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                //ORIGINAL LINE: Predicate p(da.id,args);
                Predicate p = new Predicate(da.getID(), args);
                //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                //ORIGINAL LINE: da->logicalForm = p;
                da.logicalForm = p;

            }
            //********************************************************************************

            //********************************************************************************
            //********************************************************************************

            else if (vectorString[0].Contains("Greet-close") && utternaceFrame.IndexOf(cueWord) != utternaceFrame.Length)
            {
                cueWord = "Greet-close";
                Console.Write(" input is a greet-close dialogue act ");
                Console.Write("\n");
                Console.Write("  agent greet close to system :");
                Console.Write("\n");
                da.setID("Greet-close");
                da.communicativeFunction = "Greet-close";
                da.dimension = Dimensions.socialObligation;
                da.sender = utterance.Sender;
                da.addressee = utterance.Receiver;
                da.utterance = utterance.Content;
                List<object> args = new List<object>();
                //agent name
                //std::string agentName = vectorString[1] ;
                args.Add(da.sender);
                args.Add(da.addressee);
                //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                //ORIGINAL LINE: Predicate p(da.id,args);
                Predicate p = new Predicate(da.getID(), args);
                //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                //ORIGINAL LINE: da->logicalForm = p;
                da.logicalForm = p;

            }

            //********************************************************************************

            //********************************************************************************
            // YES-NO-Question

            //	std::cout << " \n***********YES-NO-Question*****************************\n"<< std::endl;

            else if (vectorString[0].Contains("YES-NO-Question") && utternaceFrame.IndexOf(cueWord) != utternaceFrame.Length)
            {
                cueWord = "YES-NO-Question";
                Console.Write("input is a YES-NO-Question ");
                Console.Write("\n");
                //YES-NO-Question PropositionType Arguments//
                if (vectorString[1] == "Agent-Role" && vectorString.Length == 4)
                {
                    Console.Write("asking abou whether agent plays the role :");
                    Console.Write(vectorString[3]);
                    Console.Write("\n");
                    da.setID("YES-NO-Question");
                    da.communicativeFunction = "YES-NO-Question";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();

                    //predicate name Agent-Role
                    string functor = vectorString[1];
                    args.Add(functor);
                    //agent name
                    string agentName = vectorString[2];
                    args.Add(agentName);
                    //role name
                    string roleName = vectorString[3];
                    args.Add(roleName);

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }

            } //end of YES-NO-Question
              //...............................................................................
              //	std::cout << " \n***********Check-Question*****************************\n"<< std::endl;
              //frame structure :  Check-Question QuestionType @parameters

            if (vectorString[0].Contains("Check-Question") &&  utternaceFrame.IndexOf(cueWord) != utternaceFrame.Length)
            {
                cueWord = "Check-Question";
                // "case 1 :  Check-Question Action-Execution-By-Role roleName actionName Tense @parameters

                Console.Write("input is a Propositional Check-Question ");
                Console.Write("\n");
                //.........................................................................................

                {
                    //	if(vectorString[1] == "Action-Execution-By-Role" && vectorString.size()==5)
                    //		std::cout<< "asking whether role executes the  action "<< vectorString[4] << " in :" << vectorString[4]<< std::endl;
                    da.setID("Check-Question");
                    da.communicativeFunction = "Check-Question";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();

                    for (int i = 1; i < vectorString.Length; i++)
                    {
                        args.Add(vectorString[i]);
                    }

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }
                //.........................................................................................
            } //end of Check-Question
              //...............................................................................

            //********************************************************************************
            //********************************************************************************

            //...............................................................................
            //	std::cout << " \n***********Unknown-concept*****************************\n"<< std::endl;
            //frame structure :

            else if (vectorString[0].Contains("Unknown-concep") &&  utternaceFrame.IndexOf(cueWord) != utternaceFrame.Length)
            {
                cueWord = "Unknown-concept";
                // "case 1 :  Check-Question Action-Execution-By-Role roleName actionName Tense @parameters

                Console.Write("input is a Unknown-concept ");
                Console.Write("\n");
                //.........................................................................................

                {
                    //	if(vectorString[1] == "Action-Execution-By-Role" && vectorString.size()==5)
                    //		std::cout<< "asking whether role executes the  action "<< vectorString[4] << " in :" << vectorString[4]<< std::endl;
                    da.setID("Unknown-concept");
                    da.communicativeFunction = "Unknown-concept";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();

                    for (int i = 1; i < vectorString.Length; i++)
                    {
                        args.Add(vectorString[i]);
                    }

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }
                //.........................................................................................
            } //end of Check-Question
              //...............................................................................

            //********************************************************************************

            //********************************************************************************

            //...............................................................................
            //	std::cout << " \n***********not-understood*****************************\n"<< std::endl;
            //frame structure :

            //agent doesn't understand what the interlocutor has said

            else if (vectorString[0].Contains("Not-Understood") &&  utternaceFrame.IndexOf(cueWord) != utternaceFrame.Length)
            {
                cueWord = "Not-Understood";
                Console.Write("input is a not-understood by agent ");
                Console.Write("\n");
                //.........................................................................................

                {
                    //	if(vectorString[1] == "Action-Execution-By-Role" && vectorString.size()==5)
                    //		std::cout<< "asking whether role executes the  action "<< vectorString[4] << " in :" << vectorString[4]<< std::endl;
                    da.setID("Not-Understood");
                    da.communicativeFunction = "Not-Understood";
                    da.dimension = Dimensions.task; //"task";
                    da.sender = utterance.Sender;
                    da.addressee = utterance.Receiver;
                    da.utterance = utterance.Content;
                    List<object> args = new List<object>();

                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy constructor call - this should be verified and a copy constructor should be created if it does not yet exist:
                    //ORIGINAL LINE: Predicate p(da.id,args);
                    Predicate p = new Predicate(da.getID(), args);
                    //C++ TO C# CONVERTER WARNING: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created if it does not yet exist:
                    //ORIGINAL LINE: da->logicalForm = p;
                    da.logicalForm = p;
                }
                //.........................................................................................
            } //end of Check-Question
              //

            return da;
        }
Exemplo n.º 17
0
 public IsExpected(Predicate bel)
 {
     belief  = bel;
 }