public WamEnvironment(WamEnvironment predecessor, WamInstructionPointer returnInstructionPointer, WamChoicePoint cutChoicePoint) { m_id = s_nextId++; m_predecessor = predecessor; m_returnInstructionPointer = returnInstructionPointer; m_cutChoicePoint = cutChoicePoint; m_permanentRegisters = new WamReferenceTargetList(); }
public WamEnvironment(WamEnvironment predecessor, WamInstructionPointer returnInstructionPointer, WamChoicePoint cutChoicePoint) { Id = _nextId++; Predecessor = predecessor; ReturnInstructionPointer = returnInstructionPointer; CutChoicePoint = cutChoicePoint; PermanentRegisters = new WamReferenceTargetList(); }
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>(); }
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>(); }
private bool IsBreakpoint(WamInstructionPointer wamInstructionPointer) { //HACK: Implement return false; }
public void PushContext(WamInstructionStream instructionStream) { if (instructionStream == null) { throw new ArgumentNullException("instructionStream"); } WamContext context = new WamContext(); m_contextStack.Push(context); m_currentContext = context; State = WamMachineStates.Run; InstructionPointer = new WamInstructionPointer(instructionStream); ReturnInstructionPointer = WamInstructionPointer.Undefined; StackIndex = 0; Environment = null; ChoicePoint = null; ArgumentRegisters.Clear(); TemporaryRegisters.Clear(); CurrentStructure = null; CurrentStructureIndex = -1; }
public void SetInstructionStream(WamInstructionStream instructionStream) { if (instructionStream == null) { throw new ArgumentNullException("instructionStream"); } ReturnInstructionPointer = InstructionPointer.GetNext(); CutChoicePoint = ChoicePoint; TemporaryRegisters.Clear(); StackIndex += 1; InstructionPointer = new WamInstructionPointer(instructionStream); }