package prolog.model;

/**
 * <p>This class encapsulates a atom, the smallest entity,
 * one item of a relation. This can e.g. a static value or a variable.
 * Because all names in the coder's program are replaced by integers,
 * the internal representation of a atom is a integer value. This
 * integer value can be decoded using the symboltable generated
 * by the parser. A atom can be compared with a cell value in a
 * database table</p>
 * <p>prolog: myFact(dan,X).</p>
 * <p>in this example, a atom would be "dan"(as value) and "X"(as variable)</p>
 */
public interface IAtom
{
	/**
	 * returns a string representation of the atom. because all names
	 * of the programmer's programm are replaced by integers, this
	 * function requires the additional stringtable to decode the
	 * integers into strings again.
	 */
	public String toString( ISymbolTable table );

	/**
	 * the key in symboltable of the name
	 */
	public int getName();
}
