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

            Container = container;
            StackIndex = stackIndex;

            _instructionStream = null;
            _variables = null;
            _clause = null;
        }
Example #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);

            m_stackFrames = new PrologStackFrameList(this);
            m_arguments = new PrologVariableList(this);
            m_temporaryVariables = new PrologVariableList(this);

            Synchronize();

            m_queryResults = null;
        }