jason.stdlib
Class ground
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.ground
- All Implemented Interfaces:
- InternalAction, java.io.Serializable
public class ground
- extends DefaultInternalAction
Internal action: .ground
.
Description: checks whether the argument is ground, i.e., it has no free
variables. Numbers, Strings, and Atoms are always ground.
Parameters:
- + argument (any term): the term to be checked.
Examples:
-
.ground(b(10))
: true.
-
.ground(10)
: true.
-
.ground(X)
: false if X is free or bound to a term with free variables.
-
.ground(a(X))
: false if X is free or bound to a term with free variables.
-
.ground([a,b,c])
: true.
-
.ground([a,b,c(X)])
: false if X is free or bound to a term with free variables.
- See Also:
atom
,
list
,
literal
,
number
,
string
,
structure
,
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ground
public ground()
create
public static InternalAction create()
getMinArgs
public int getMinArgs()
- Overrides:
getMinArgs
in class DefaultInternalAction
getMaxArgs
public int getMaxArgs()
- Overrides:
getMaxArgs
in class DefaultInternalAction
execute
public java.lang.Object execute(TransitionSystem ts,
Unifier un,
Term[] args)
throws java.lang.Exception
- Description copied from interface:
InternalAction
- Executes the internal action. It should return a Boolean or
an Iterator. A true boolean return means that the IA was
successfully executed. An Iterator result means that there is
more than one answer for this IA (e.g. see member internal action).
- Specified by:
execute
in interface InternalAction
- Overrides:
execute
in class DefaultInternalAction
- Throws:
java.lang.Exception