24 package org.lightjason.agentspeak.language.execution.action.unify;
36 import javax.annotation.Nonnull;
37 import java.text.MessageFormat;
38 import java.util.List;
40 import java.util.stream.Stream;
72 m_parallel = p_parallel;
76 if ( l_frequency.isEmpty() )
79 if ( l_frequency.entrySet().stream().filter( i -> !i.getKey().any() ).anyMatch( i -> i.getValue() > 1 ) )
83 m_variablenumber = l_frequency.size();
89 return MessageFormat.format(
"{0}>>{1}", m_parallel ?
"@" :
"",
m_value );
95 @Nonnull
final List<ITerm> p_argument, @Nonnull
final List<ITerm> p_return
98 return p_context.agent().unifier().unify(
IExpression EMPTY
empty expression, is always true
final long m_variablenumber
number of variables
illegal argument exception
common structure for execution definition
final boolean m_parallel
parallel unification
static< T > String languagestring(final T p_source, final String p_label, final Object... p_parameter)
returns the language depend string on any object
static final long serialVersionUID
serial id
static Stream< ITerm > flattenrecursive( @Nonnull final Stream< ITerm > p_input)
recursive stream of term values
Stream< IVariable<?> > variables()
returns a stream with all used variables
execution context with local data
static Map< IVariable<?>, Integer > variablefrequency( @Nonnull final ILiteral p_literal)
consts the variables within a literal
default< T extends ITerm > T term()
casts the object to a term-type
CDefaultUnify(final boolean p_parallel, @Nonnull final ILiteral p_literal)
ctor
result for an immutable fuzzy value
IFuzzyValue< Boolean > execute(final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
defines a plan-body operation
class for any helper calls