public ProofStep getProofStep() { if (null == proofStep) { // Assume was a premise proofStep = new ProofStepPremise(this); } return(proofStep); }
public ProofStep getProofStep() { if (null == proofStep) { // Assume was a premise proofStep = new ProofStepPremise(this); } return proofStep; }
public ProofStepFoChAssertFact(Clause implication, Literal fact, Dictionary<Variable, Term> bindings, ProofStep predecessor) { this.implication = implication; this.fact = fact; this.bindings = bindings; if (null != predecessor) { predecessors.Add(predecessor); } }
public ProofStepFoChAssertFact(Clause implication, Literal fact, Dictionary <Variable, Term> bindings, ProofStep predecessor) { this.implication = implication; this.fact = fact; this.bindings = bindings; if (null != predecessor) { predecessors.Add(predecessor); } }
private void addToProofSteps(ProofStep step) { if (!proofSteps.Contains(step)) { proofSteps.Insert(0, step); } else { proofSteps.Remove(step); proofSteps.Insert(0, step); } ICollection <ProofStep> predecessors = step.getPredecessorSteps(); for (int i = predecessors.Size() - 1; i >= 0; i--) { addToProofSteps(predecessors.Get(i)); } }
private void addToProofSteps(ProofStep step) { if (!proofSteps.Contains(step)) { proofSteps.Insert(0, step); } else { proofSteps.Remove(step); proofSteps.Insert(0, step); } List <ProofStep> predecessors = step.getPredecessorSteps(); for (int i = predecessors.Count - 1; i >= 0; i--) { addToProofSteps(predecessors[i]); } }
private void calcualteProofSteps() { proofSteps = CollectionFactory.CreateQueue <ProofStep>(); addToProofSteps(finalStep); // Move all premises to the front of the // list of steps int to = 0; for (int i = 0; i < proofSteps.Size(); ++i) { if (proofSteps.Get(i) is ProofStepPremise) { ProofStep m = proofSteps.Get(i); proofSteps.Remove(m); proofSteps.Insert(to, m); to++; } } // Move the Goals after the premises for (int i = 0; i < proofSteps.Size(); ++i) { if (proofSteps.Get(i) is ProofStepGoal) { ProofStep m = proofSteps.Get(i); proofSteps.Remove(m); proofSteps.Insert(to, m); to++; } } // Assign the step #s now that all the proof // steps have been unwound for (int i = 0; i < proofSteps.Size(); ++i) { proofSteps.Get(i).setStepNumber(i + 1); } }
// PRIVATE METHODS private void calculateProofSteps() { proofSteps = new List <ProofStep>(); addToProofSteps(finalStep); // Move all premises to the front of the // list of steps int to = 0; for (int i = 0; i < proofSteps.Count; i++) { if (proofSteps[i] is ProofStepPremise) { ProofStep m = proofSteps[i]; proofSteps.RemoveAt(i); proofSteps.Insert(to, m); to++; } } // Move the Goals after the premises for (int i = 0; i < proofSteps.Count; i++) { if (proofSteps[i] is ProofStepGoal) { ProofStep m = proofSteps[i]; proofSteps.RemoveAt(i); proofSteps.Insert(to, m); to++; } } // Assign the step #s now that all the proof // steps have been unwound for (int i = 0; i < proofSteps.Count; i++) { proofSteps[i].setStepNumber(i + 1); } }
public void setProofStep(ProofStep proofStep) { this.proofStep = proofStep; }
public ProofFinal(ProofStep finalStep, Dictionary <Variable, Term> answerBindings) { this.finalStep = finalStep; this.answerBindings = answerBindings; }
public void addProofStep(ProofStep step) { stepFinal = step; }
public ProofStepRenaming(Object proof, ProofStep predecessor) { this.proof = proof; this.predecessors.Add(predecessor); }
public void setPredecessor(ProofStep predecessor) { predecessors.Clear(); predecessors.Add(predecessor); }
// END-InferenceResult public void addProofStep(Clause implication, Literal fact, Dictionary <Variable, Term> bindings) { stepFinal = new ProofStepFoChAssertFact(implication, fact, bindings, stepFinal); }
private void addToProofSteps(ProofStep step) { if (!proofSteps.Contains(step)) { proofSteps.Insert(0, step); } else { proofSteps.Remove(step); proofSteps.Insert(0, step); } List<ProofStep> predecessors = step.getPredecessorSteps(); for (int i = predecessors.Count - 1; i >= 0; i--) { addToProofSteps(predecessors[i]); } }
public ProofFinal(ProofStep finalStep, Dictionary<Variable, Term> answerBindings) { this.finalStep = finalStep; this.answerBindings = answerBindings; }
public ProofFinal(ProofStep finalStep, IMap <Variable, Term> answerBindings) { this.finalStep = finalStep; this.answerBindings.PutAll(answerBindings); }
public ProofStepRenaming(Object proof, ProofStep predecessor) { this.proof = proof; predecessors.Add(predecessor); }
// END-InferenceResult // public void addProofStep(Clause implication, Literal fact, Dictionary<Variable, Term> bindings) { stepFinal = new ProofStepFoChAssertFact(implication, fact, bindings, stepFinal); }