Class CActionDescription
java.lang.Object
org.tweetyproject.commons.BeliefSet<CLaw,ActionSignature>
org.tweetyproject.action.description.syntax.ActionDescription<CLaw>
org.tweetyproject.action.description.syntax.CActionDescription
- All Implemented Interfaces:
Iterable<CLaw>
,Collection<CLaw>
,BeliefBase
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
-
Field Summary
Fields inherited from class org.tweetyproject.commons.BeliefSet
EQUALS_USES_SIGNATURE
-
Constructor Summary
ConstructorDescriptionCreates 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 TypeMethodDescriptionRetrieves a set of all dynamic laws contained in this action description.Returns the signature of the language of this knowledge base.Retrieves a set of all static laws contained in this action description.ground()
Calculates a new action description containing all ground instances of each law in this action description.boolean
Checks whether this action description contains any non-definite laws.boolean
isGround()
Checks whether this action description contains any non-ground laws.Calculates a new action description which describes the same transition system and contains only definite causal laws.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 org.tweetyproject.commons.BeliefSet
add, add, addAll, clear, contains, containsAll, equals, getSignature, hashCode, isEmpty, iterator, remove, removeAll, retainAll, setSignature, size, toArray, toArray, toString, toString
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
CActionDescription
public CActionDescription()Creates a new empty action description. -
CActionDescription
Creates a new belief set with the given collection of formulae.- Parameters:
c
- a collection of formulae.
-
-
Method Details
-
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
Calculates a new action description which describes 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:
- true iff each law in this action description is definite.
-
getStaticLaws
-
getDynamicLaws
Retrieves a set of all dynamic laws contained in this action description.- Returns:
- a `Set` of `DynamicLaw` objects representing all dynamic laws in this action description.
-
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
Description copied from interface:BeliefBase
Returns the signature of the language of this knowledge base.- Returns:
- the signature of the language of this knowledge base.
-