lp.unit
Interface LogicProgram

All Superinterfaces:
Collection<LpRule>, Iterable<LpRule>, Set<LpRule>
All Known Implementing Classes:
EmptyProgram, GeneralizedLogicProgram, TransformedDlp, TransformedEvolp

public interface LogicProgram
extends Set<LpRule>

Represents an ordinary logic program, i.e. a set of logic program rules represented by LpRule instances.

Version:
1.0.0
Author:
Martin Slota
See Also:
LpRule

Method Summary
 LpRule get(int index)
          Returns the i-th rule in this logic program.
 boolean isGround()
          Returns true iff this logic programs contains only ground rules, i.e. rules that contain no variables.
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

get

LpRule get(int index)
Returns the i-th rule in this logic program. Rules are required to be in the order they were added to the program (just like in a list) . But this order is not important when determining if two logic programs are equal. Multiple appearance of one rule is also not important in this respect.


isGround

boolean isGround()
Returns true iff this logic programs contains only ground rules, i.e. rules that contain no variables.

Returns:
as specified above
See Also:
LpGroundDecider.isGround(LpStructureUnit)