internal void Copy(WamReferenceTargetList referenceTargets)
        {
            Clear();

            for (int index = 0; index < referenceTargets.Count; ++index)
            {
                this[index] = referenceTargets[index];
            }
        }
Beispiel #2
0
        public WamChoicePoint(WamChoicePoint predecessor, WamEnvironment environment, int stackIndex, WamInstructionPointer returnInstructionPointer, IEnumerable <WamReferenceTarget> argumentRegisters, WamChoicePoint cutChoicePoint)
        {
            Generation = NextGeneration++;

            Predecessor = predecessor;
            Environment = environment;
            StackIndex  = stackIndex;
            ReturnInstructionPointer = returnInstructionPointer;
            ArgumentRegisters        = new WamReferenceTargetList(argumentRegisters);
            CutChoicePoint           = cutChoicePoint;

            BacktrackInstructionPointer = WamInstructionPointer.Undefined;
            PredicateEnumerator         = null;

            Trail = new List <WamVariable>();
        }
        public WamChoicePoint(WamChoicePoint predecessor, WamEnvironment environment, int stackIndex, WamInstructionPointer returnInstructionPointer, IEnumerable <WamReferenceTarget> argumentRegisters, WamChoicePoint cutChoicePoint)
        {
            m_generation = s_nextGeneration++;

            m_predecessor = predecessor;
            m_environment = environment;
            m_stackIndex  = stackIndex;
            m_returnInstructionPointer = returnInstructionPointer;
            m_argumentRegisters        = new WamReferenceTargetList(argumentRegisters);
            m_cutChoicePoint           = cutChoicePoint;

            m_backtrackInstructionPointer = WamInstructionPointer.Undefined;
            m_predicateEnumerator         = null;

            m_trail = new List <WamVariable>();
        }
Beispiel #4
0
 public WamContext()
 {
     ArgumentRegisters  = new WamReferenceTargetList();
     TemporaryRegisters = new WamReferenceTargetList();
 }