Class CActionDescription
- java.lang.Object
-
- net.sf.tweety.commons.BeliefSet<T,ActionSignature>
-
- net.sf.tweety.action.description.syntax.ActionDescription<CLaw>
-
- net.sf.tweety.action.description.syntax.CActionDescription
-
- All Implemented Interfaces:
Iterable<CLaw>,Collection<CLaw>,net.sf.tweety.commons.BeliefBase
public class CActionDescription extends ActionDescription<CLaw>
This class represents an action description for the action language C as a set of causal rules, and provides some basic functionality such as grounding.- Author:
- Sebastian Homann
-
-
Constructor Summary
Constructors Constructor Description CActionDescription()Creates a new empty action description.CActionDescription(Collection<? extends CausalLaw> c)Creates a new belief set with the given collection of formulae.
-
Method Summary
Modifier and Type Method Description Set<DynamicLaw>getDynamicLaws()Returns a set of all dynamic laws contained in this action description.net.sf.tweety.commons.SignaturegetMinimalSignature()Set<StaticLaw>getStaticLaws()Returns a set of all static laws contained in this action description.CActionDescriptionground()Calculates a new action description containing all ground instances of each law in this action description.booleanisDefinite()Checks whether this action description contains any non-definite laws.booleanisGround()Checks whether this action description contains any non-ground laws.CActionDescriptiontoDefinite()Calculates a new action description which descibes the same transition system and contains only definite causal laws.StringtoOutputString()Returns a string representation of this action description in human readable form, which may be written to a file or printed on screen.-
Methods inherited from class net.sf.tweety.action.description.syntax.ActionDescription
instantiateSignature
-
Methods inherited from class net.sf.tweety.commons.BeliefSet
add, addAll, clear, contains, containsAll, equals, getSignature, hashCode, instantiateSet, isEmpty, iterator, remove, removeAll, retainAll, setSignature, size, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Constructor Detail
-
CActionDescription
public CActionDescription()
Creates a new empty action description.
-
CActionDescription
public CActionDescription(Collection<? extends CausalLaw> c)
Creates a new belief set with the given collection of formulae.- Parameters:
c- a collection of formulae.
-
-
Method Detail
-
ground
public CActionDescription ground()
Calculates a new action description containing all ground instances of each law in this action description.- Returns:
- a new action description containing only ground laws.
-
toDefinite
public CActionDescription toDefinite() throws IllegalStateException
Calculates a new action description which descibes the same transition system and contains only definite causal laws.- Returns:
- a new definite action description.
- Throws:
IllegalStateException- when there is no equivalent definite action description
-
isGround
public boolean isGround()
Checks whether this action description contains any non-ground laws.- Returns:
- true iff each law in this action description is grounded.
-
isDefinite
public boolean isDefinite()
Checks whether this action description contains any non-definite laws.- Returns:
- ture iff each law in this action description is definite.
-
getStaticLaws
public Set<StaticLaw> getStaticLaws()
Returns a set of all static laws contained in this action description.- Returns:
- a set of all static laws contained in this action description.
-
getDynamicLaws
public Set<DynamicLaw> getDynamicLaws()
Returns a set of all dynamic laws contained in this action description.- Returns:
- a set of all dynamic laws contained in this action description.
-
toOutputString
public String toOutputString()
Returns a string representation of this action description in human readable form, which may be written to a file or printed on screen.- Returns:
- a string representation of this action description.
-
getMinimalSignature
public net.sf.tweety.commons.Signature getMinimalSignature()
-
-