package ilog.language.design.types;

/**
 * @version     Last modified on Tue Jun 11 10:46:42 2002 by hak
 * @author      <a href="mailto:hak@ilog.fr">Hassan A&iuml;t-Kaci</a>
 * @copyright   &copy; 2000-2002 <a href="http://www.ilog.fr/">ILOG, S.A.</a>
 */

/**
 * This is the interface of bindable objects. A bindable object is an
 * instance of a <a href="Valuable.html"><tt>Valuable</tt></a> that may
 * itself have another <tt>Valuable</tt> as value.
 */

public interface Bindable extends Valuable
{
  /**
   * Returns <tt>true</tt> iff this bindable is bound.
   */
  public boolean isBound ();
  /**
   * Returns <tt>true</tt> iff this bindable is unbound.
   */
  public boolean isUnbound ();
  /**
   * Binds this bindable to the given valuable.
   */
  public boolean bind (Valuable value);
  /**
   * Binds this bindable to the given valuable in the context of the
   * given goal prover. This binding is appropriately trailed in the
   * contextual prover for undoing purposes.
   */
  public boolean bind (Valuable value, GoalProver prover);
  /**
   * Unbinds this bindable.
   */
  public void unbind ();
}
