public class literal extends DefaultInternalAction
Internal action: .literal
.
Description: checks whether the argument is a literal, e.g.: "p", "p(1)", "p(1)[a,b]", "~p(1)[a,b]".
Parameter:
Examples:
.literal(b(10))
: true.
.literal(b)
: true.
.literal(10)
: false.
.literal("Jason")
: false.
.literal(X)
: false if X is free, true if X is bound to a literal.
.literal(a(X))
: true.
.literal([a,b,c])
: false.
.literal([a,b,c(X)])
: false.
Constructor and Description |
---|
literal() |
Modifier and Type | Method and Description |
---|---|
static InternalAction |
create() |
java.lang.Object |
execute(TransitionSystem ts,
Unifier un,
Term[] args)
Executes the internal action.
|
int |
getMaxArgs() |
int |
getMinArgs() |
canBeUsedInContext, checkArguments, destroy, prepareArguments, suspendIntention
public static InternalAction create()
public int getMinArgs()
getMinArgs
in class DefaultInternalAction
public int getMaxArgs()
getMaxArgs
in class DefaultInternalAction
public java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args) throws java.lang.Exception
InternalAction
execute
in interface InternalAction
execute
in class DefaultInternalAction
java.lang.Exception