Beispiel #1
0
        public void LoadArgs(IProgramKnowledgeBase pkb, IDeclarationList declarations)
        {
            if (LeftRef is PqlInteger || LeftRef is PqlString)
            {
                LeftArgs = LoadSingleLeftArg(pkb);
            }
            else if (LeftRef is PqlEmptyArg)
            {
                LeftArgs = LoadLeftArgs(pkb);
            }
            else
            {
                PqlDeclaration declaration = declarations.GetDeclarationBySynonym((LeftRef as PqlSynonym).Name);
                LeftArgs          = declaration.EntityList;
                LeftArgs.ListName = (LeftRef as PqlSynonym).Name;
            }

            if (RightRef is PqlInteger || RightRef is PqlString)
            {
                RightArgs = LoadSingleRightArg(pkb);
            }
            else if (RightRef is PqlEmptyArg)
            {
                RightArgs = LoadRightArgs(pkb);
            }
            else
            {
                PqlDeclaration declaration = declarations.GetDeclarationBySynonym((RightRef as PqlSynonym).Name);
                RightArgs          = declaration.EntityList;
                RightArgs.ListName = (RightRef as PqlSynonym).Name;
            }
        }
Beispiel #2
0
        public void LoadArgs(IProgramKnowledgeBase pkb, IDeclarationList declarations)
        {
            PqlDeclaration declaration = declarations.GetDeclarationBySynonym(Synonym.Name);

            Args          = declaration.EntityList;
            Args.ListName = Synonym.Name;
            Type          = declaration.DesignEntity.Type;
        }
Beispiel #3
0
        public void LoadArgs(IProgramKnowledgeBase pkb, IDeclarationList declarations)
        {
            PqlDeclaration declaration = declarations.GetDeclarationBySynonym(LeftRef.SynonymName);

            LeftArgs          = declaration.EntityList;
            LeftArgs.ListName = LeftRef.SynonymName;
            LeftType          = declaration.DesignEntity.Type;

            if (RightRef is PqlInteger || RightRef is PqlString)
            {
                RightArgs = LoadSingleRightArg(pkb);
            }
            else
            {
                string synonym = RightRef is PqlAttrRef ? (RightRef as PqlAttrRef).SynonymName : (RightRef as PqlSynonym).Name;
                declaration        = declarations.GetDeclarationBySynonym(synonym);
                RightArgs          = declaration.EntityList;
                RightArgs.ListName = synonym;
                RightType          = declaration.DesignEntity.Type;
            }
        }