LightJason - AgentSpeak(L++)
IUnifier.java
Go to the documentation of this file.
1
/*
2
* @cond LICENSE
3
* ######################################################################################
4
* # LGPL License #
5
* # #
6
* # This file is part of the LightJason AgentSpeak(L++) #
7
* # Copyright (c) 2015-19, LightJason (info@lightjason.org) #
8
* # This program is free software: you can redistribute it and/or modify #
9
* # it under the terms of the GNU Lesser General Public License as #
10
* # published by the Free Software Foundation, either version 3 of the #
11
* # License, or (at your option) any later version. #
12
* # #
13
* # This program is distributed in the hope that it will be useful, #
14
* # but WITHOUT ANY WARRANTY; without even the implied warranty of #
15
* # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
16
* # GNU Lesser General Public License for more details. #
17
* # #
18
* # You should have received a copy of the GNU Lesser General Public License #
19
* # along with this program. If not, see http://www.gnu.org/licenses/ #
20
* ######################################################################################
21
* @endcond
22
*/
23
24
package
org.lightjason.agentspeak.language.unify;
25
26
import
org
.
lightjason
.
agentspeak
.
language
.
ILiteral
;
27
import
org
.
lightjason
.
agentspeak
.
language
.
ITerm
;
28
import
org
.
lightjason
.
agentspeak
.
language
.
execution
.
IContext
;
29
import
org
.
lightjason
.
agentspeak
.
language
.
execution
.
expression
.
IExpression
;
30
import
org
.
lightjason
.
agentspeak
.
language
.
fuzzy
.
CFuzzyValue
;
31
import
org
.
lightjason
.
agentspeak
.
language
.
fuzzy
.
IFuzzyValue
;
32
import
org
.
lightjason
.
agentspeak
.
language
.
variable
.
IVariable
;
33
34
import
javax.annotation.Nonnull;
35
import
java.util.Collections;
36
import
java.util.Set;
37
import
java.util.stream.Stream;
38
39
43
public
interface
IUnifier
44
{
48
IUnifier
EMPTY
=
new
IUnifier
()
49
{
50
@Nonnull
51
@Override
52
public
final
Set<IVariable<?>>
unify
( @Nonnull
final
ILiteral
p_source, @Nonnull
final
ILiteral
p_target )
53
{
54
return
Collections.emptySet();
55
}
56
57
@Nonnull
58
@Override
59
public
final
IFuzzyValue<Boolean>
unify
( @Nonnull
final
IContext
p_context, @Nonnull
final
ILiteral
p_literal,
final
long
p_variables,
60
@Nonnull
final
IExpression
p_expression,
final
boolean
p_parallel )
61
{
62
return
CFuzzyValue
.
from
(
false
);
63
}
64
};
65
66
76
@Nonnull
77
Set<IVariable<?>>
unify
( @Nonnull
final
ILiteral
p_source, @Nonnull
final
ILiteral
p_target );
78
89
@Nonnull
90
IFuzzyValue<Boolean>
unify
( @Nonnull
final
IContext
p_context, @Nonnull
final
ILiteral
p_literal,
final
long
p_variables,
91
@Nonnull
final
IExpression
p_expression,
final
boolean
p_parallel );
92
93
97
interface
IAlgorithm
98
{
99
110
<T extends
ITerm
>
boolean
unify
(
final
Set<
IVariable<?>
> p_variables,
final
Stream<T> p_source,
final
Stream<T> p_target );
111
112
}
113
114
}
org.lightjason.agentspeak.language.unify.IUnifier.unify
Set< IVariable<?> > unify( @Nonnull final ILiteral p_source, @Nonnull final ILiteral p_target)
unifies a literal
org.lightjason.agentspeak.language.unify.IUnifier.IAlgorithm.unify
< T extends ITerm > boolean unify(final Set< IVariable<?>> p_variables, final Stream< T > p_source, final Stream< T > p_target)
unify algorithm
org.lightjason.agentspeak
org.lightjason.agentspeak.language.unify.IUnifier.EMPTY
IUnifier EMPTY
empty unifier
Definition:
IUnifier.java:48
org.lightjason.agentspeak.language.ILiteral
literal interface
Definition:
ILiteral.java:39
org.lightjason.agentspeak.language.fuzzy
Definition:
CFuzzyValue.java:24
org.lightjason.agentspeak.language.fuzzy.CFuzzyValue.from
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
Definition:
CFuzzyValue.java:129
org.lightjason.agentspeak.language.variable.IVariable
variable defintion
Definition:
IVariable.java:39
org.lightjason.agentspeak.language.unify.IUnifier
interface of an unification algorithm
Definition:
IUnifier.java:43
org.lightjason.agentspeak.language.execution
org.lightjason
org.lightjason.agentspeak.language
Definition:
language/CCommon.java:24
org.lightjason.agentspeak.language.execution.IContext
execution context with local data
Definition:
IContext.java:42
org
org.lightjason.agentspeak.language.fuzzy.IFuzzyValue
result for an immutable fuzzy value
Definition:
IFuzzyValue.java:37
org.lightjason.agentspeak.language.unify.IUnifier.IAlgorithm
unify algorithm
Definition:
IUnifier.java:97
org.lightjason.agentspeak.language.fuzzy.CFuzzyValue
immutable fuzzy value
Definition:
CFuzzyValue.java:39
org.lightjason.agentspeak.language.ITerm
term interface
Definition:
ITerm.java:36
org.lightjason.agentspeak.language.execution.expression.IExpression
expression interface
Definition:
IExpression.java:42
org.lightjason.agentspeak.language.execution.expression
Definition:
CAtom.java:24
org.lightjason.agentspeak.language.variable
Definition:
CConstant.java:24
src
main
java
org
lightjason
agentspeak
language
unify
IUnifier.java
Generated by
1.8.13