001 package aima.logic.fol.inference.otter; 002 003 import java.util.Set; 004 005 import aima.logic.fol.kb.data.Clause; 006 007 /** 008 * @author Ciaran O'Reilly 009 * 010 */ 011 012 // Heuristic for selecting lightest clause from SOS. 013 // To avoid recalculating the lightest clause 014 // on every call, the interface supports defining 015 // the initial sos and updates to that set so 016 // that it can maintain its own internal data 017 // structures to allow for incremental re-calculation 018 // of the lightest clause. 019 public interface LightestClauseHeuristic { 020 021 // Get the lightest clause from the SOS 022 Clause getLightestClause(); 023 024 // SOS life-cycle methods allowing implementations 025 // of this interface to incrementally update 026 // the calculation of the lightest clause as opposed 027 // to having to recalculate each time. 028 void initialSOS(Set<Clause> clauses); 029 030 void addedClauseToSOS(Clause clause); 031 032 void removedClauseFromSOS(Clause clause); 033 }