001 package aima.logic.fol.inference.proof; 002 003 import java.util.ArrayList; 004 import java.util.Collections; 005 import java.util.List; 006 007 import aima.logic.fol.kb.data.Clause; 008 import aima.logic.fol.parsing.ast.Sentence; 009 010 /** 011 * @author Ciaran O'Reilly 012 * 013 */ 014 public class ProofStepClauseClausifySentence extends AbstractProofStep { 015 private List<ProofStep> predecessors = new ArrayList<ProofStep>(); 016 private Clause clausified = null; 017 018 public ProofStepClauseClausifySentence(Clause clausified, 019 Sentence origSentence) { 020 this.clausified = clausified; 021 this.predecessors.add(new ProofStepPremise(origSentence)); 022 } 023 024 // 025 // START-ProofStep 026 public List<ProofStep> getPredecessorSteps() { 027 return Collections.unmodifiableList(predecessors); 028 } 029 030 public String getProof() { 031 return clausified.toString(); 032 } 033 034 public String getJustification() { 035 return "Clausified " + predecessors.get(0).getStepNumber(); 036 } 037 // END-ProofStep 038 // 039 }