예제 #1
0
        internal PrologStackFrame(PrologStackFrameList container, int stackIndex)
        {
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }
            if (stackIndex < 0)
            {
                throw new ArgumentOutOfRangeException("stackIndex");
            }

            m_container  = container;
            m_stackIndex = stackIndex;

            m_instructionStream = null;
            m_variables         = null;
            m_clause            = null;
        }
예제 #2
0
        private PrologMachine(Program program, Query query)
        {
            if (program == null)
            {
                throw new ArgumentNullException("program");
            }
            if (query == null)
            {
                throw new ArgumentNullException("query");
            }

            m_wamMachine = WamMachine.Create(program, query);

            StackFrames        = new PrologStackFrameList(this);
            Arguments          = new PrologVariableList(this);
            TemporaryVariables = new PrologVariableList(this);

            Synchronize();

            QueryResults = null;
        }