JTP API Documentation

jtp.fol
Interface Literal

All Superinterfaces:
Clause, CNFSentence, Substitutable
All Known Implementing Classes:
DefaultLiteral

public interface Literal
extends Clause

This interface represents a first-order logic literal, that is, a simple relation-based sentence of the form (<rel> <arg1> <arg2> …) or (not (<rel> <arg1> <arg2> …)).


Method Summary
 List getArgs()
          Returns the arguments in this Literal.
 Symbol getRelation()
          Returns the relation of this Literal.
 boolean isPositive()
          Returns false if the Literal is negated; true otherwise.
 
Methods inherited from interface jtp.fol.Clause
literals
 
Methods inherited from interface jtp.fol.CNFSentence
clauses
 
Methods inherited from interface jtp.Substitutable
substitute
 

Method Detail

isPositive

public boolean isPositive()
Returns false if the Literal is negated; true otherwise.

Returns:
true if the Literal positive; false if negative

getRelation

public Symbol getRelation()
Returns the relation of this Literal. Because this is a first-order logic represenatation, relations must always be constant Symbols.

Returns:
relation of this Literal

getArgs

public List getArgs()
Returns the arguments in this Literal.

Returns:
List of arguments

JTP API Documentation