Interface Atom

All Superinterfaces:
Comparable<Formula>, Formula, Literal, Proposition
All Known Implementing Classes:
AtomicProposition, Predication

public interface Atom extends Literal
An atom is the smallest indivisible unit of a logical language that has a truth value.
Author:
Stephen G. Ware
  • Field Summary

    Fields inherited from interface edu.uky.ai.logic.Proposition

    FALSE, TRUE
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    isTrue(State state)
    Tests whether this proposition is true in the given state.
    default void
    Modifies the given state object to make this proposition true.
    default Literal
    Returns a proposition whose truth values are opposite of this proposition (i.e.
    default Atom
    Returns an equivalent proposition which may be simpler.
    substitute(Substitution substitution)
    Returns a version of this formula such that any elements that appear in the given substitution are replaced.

    Methods inherited from interface edu.uky.ai.logic.Formula

    compareTo, equals, isGround, unify

    Methods inherited from interface edu.uky.ai.logic.Literal

    toCNF, toDNF
  • Method Details

    • substitute

      Atom substitute(Substitution substitution)
      Description copied from interface: Formula
      Returns a version of this formula such that any elements that appear in the given substitution are replaced.
      Specified by:
      substitute in interface Formula
      Specified by:
      substitute in interface Literal
      Specified by:
      substitute in interface Proposition
      Parameters:
      substitution - the substitution
      Returns:
      a formula with replacements from the substitution
    • isTrue

      default boolean isTrue(State state)
      Description copied from interface: Proposition
      Tests whether this proposition is true in the given state.
      Specified by:
      isTrue in interface Proposition
      Parameters:
      state - the state in which to test this proposition
      Returns:
      true if the proposition is true, false otherwise
    • makeTrue

      default void makeTrue(MutableState state)
      Description copied from interface: Proposition
      Modifies the given state object to make this proposition true. Note that some propositions (such as Disjunctions) are non-deterministic, meaning there are multiple ways to make them true, and thus the state that would result from this operation is not clearly defined.
      Specified by:
      makeTrue in interface Proposition
      Parameters:
      state - the state to modify
    • simplify

      default Atom simplify()
      Description copied from interface: Proposition
      Returns an equivalent proposition which may be simpler.
      Specified by:
      simplify in interface Proposition
      Returns:
      the simplified proposition
    • negate

      default Literal negate()
      Description copied from interface: Proposition
      Returns a proposition whose truth values are opposite of this proposition (i.e. true when this one is false, false when this one is true).
      Specified by:
      negate in interface Literal
      Specified by:
      negate in interface Proposition
      Returns:
      a proposition with opposite truth values