Package net.sf.tweety.arg.adf.transform
Interface SimpleTransform<R>
-
- Type Parameters:
R
- the result of the transform operation
- All Superinterfaces:
Transform<R,R>
- All Known Implementing Classes:
FixPartialTransform
,OmegaReductTransform
,PlFormulaTransform
public interface SimpleTransform<R> extends Transform<R,R>
A convenience interface for simple transformation operations on the recursive structure of the acceptance conditions.- Author:
- Mathias Hofer
-
-
Method Summary
Modifier and Type Method Description default R
transformArgument(java.util.function.Consumer<R> consumer, Argument argument, int polarity)
R
transformArgument(Argument argument)
R
transformConjunction(java.util.Collection<R> subconditions)
default R
transformConjunction(java.util.function.Consumer<R> consumer, java.util.Collection<R> subconditions, int polarity)
This method is visited by theConjunctionAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.R
transformContradiction()
default R
transformContradiction(java.util.function.Consumer<R> consumer, int polarity)
This method is visited by theContradictionAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.R
transformDisjunction(java.util.Collection<R> subconditions)
default R
transformDisjunction(java.util.function.Consumer<R> consumer, java.util.Collection<R> subconditions, int polarity)
This method is visited by theDisjunctionAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.default R
transformEquivalence(java.util.function.Consumer<R> consumer, R left, R right, int polarity)
This method is visited by theEquivalenceAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.R
transformEquivalence(R left, R right)
default R
transformExclusiveDisjunction(java.util.function.Consumer<R> consumer, R left, R right, int polarity)
This method is visited by theExclusiveDisjunctionAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.R
transformExclusiveDisjunction(R left, R right)
default R
transformImplication(java.util.function.Consumer<R> consumer, R left, R right, int polarity)
This method is visited by theImplicationAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.R
transformImplication(R left, R right)
default R
transformNegation(java.util.function.Consumer<R> consumer, R sub, int polarity)
This method is visited by theNegationAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.R
transformNegation(R sub)
R
transformTautology()
default R
transformTautology(java.util.function.Consumer<R> consumer, int polarity)
This method is visited by theTautologyAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.
-
-
-
Method Detail
-
transformDisjunction
default R transformDisjunction(java.util.function.Consumer<R> consumer, java.util.Collection<R> subconditions, int polarity)
Description copied from interface:Transform
This method is visited by theDisjunctionAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.- Specified by:
transformDisjunction
in interfaceTransform<R,R>
- Parameters:
consumer
- the consumer of the computed return valuessubconditions
- the subconditions of this disjunction, e.g. {a, b} if this = or(a,b)polarity
- polarity < 0: negative global position of this disjunction, e.g. this -> a
polarity = 0: neutral global position of this disjunction, e.g. this <-> a
polarity > 0: positive global position of this disjunction, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this disjunction
-
transformConjunction
default R transformConjunction(java.util.function.Consumer<R> consumer, java.util.Collection<R> subconditions, int polarity)
Description copied from interface:Transform
This method is visited by theConjunctionAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.- Specified by:
transformConjunction
in interfaceTransform<R,R>
- Parameters:
consumer
- the consumer of the computed return valuessubconditions
- the subconditions of this conjunction, e.g. {a, b} if this = and(a,b)polarity
- polarity < 0: negative global position of this conjunction, e.g. this -> a
polarity = 0: neutral global position of this conjunction, e.g. this <-> a
polarity > 0: positive global position of this conjunction, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this conjunction
-
transformImplication
default R transformImplication(java.util.function.Consumer<R> consumer, R left, R right, int polarity)
Description copied from interface:Transform
This method is visited by theImplicationAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.- Specified by:
transformImplication
in interfaceTransform<R,R>
- Parameters:
consumer
- the consumer of the computed return valuesleft
- the left part of the implicationright
- the right part of the implicationpolarity
- polarity < 0: negative global position of this implication, e.g. this -> a
polarity = 0: neutral global position of this implication, e.g. this <-> a
polarity > 0: positive global position of this implication, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this implication
-
transformEquivalence
default R transformEquivalence(java.util.function.Consumer<R> consumer, R left, R right, int polarity)
Description copied from interface:Transform
This method is visited by theEquivalenceAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.- Specified by:
transformEquivalence
in interfaceTransform<R,R>
- Parameters:
consumer
- the consumer of the computed return valuesleft
- the left part of the equivalenceright
- the right part of the equivalencepolarity
- polarity < 0: negative global position of this equivalence, e.g. this -> a
polarity = 0: neutral global position of this equivalence, e.g. this <-> a
polarity > 0: positive global position of this equivalence, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this equivalence
-
transformExclusiveDisjunction
default R transformExclusiveDisjunction(java.util.function.Consumer<R> consumer, R left, R right, int polarity)
Description copied from interface:Transform
This method is visited by theExclusiveDisjunctionAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.- Specified by:
transformExclusiveDisjunction
in interfaceTransform<R,R>
- Parameters:
consumer
- the consumer of the computed return valuesleft
- the left part of the xorright
- the right part of the xorpolarity
- polarity < 0: negative global position of this xor, e.g. this -> a
polarity = 0: neutral global position of this xor, e.g. this <-> a
polarity > 0: positive global position of this xor, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this xor
-
transformNegation
default R transformNegation(java.util.function.Consumer<R> consumer, R sub, int polarity)
Description copied from interface:Transform
This method is visited by theNegationAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.- Specified by:
transformNegation
in interfaceTransform<R,R>
- Parameters:
consumer
- the consumer of the computed return valuessub
- the subformula of this negation, i.e. this = neg(sub)polarity
- polarity < 0: negative global position of this negation, e.g. this -> a
polarity = 0: neutral global position of this negation, e.g. this <-> a
polarity > 0: positive global position of this negation, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this negation
-
transformArgument
default R transformArgument(java.util.function.Consumer<R> consumer, Argument argument, int polarity)
Description copied from interface:Transform
This method is visited by theArguments
of the acceptance condition on which we apply thisTransform
.- Specified by:
transformArgument
in interfaceTransform<R,R>
- Parameters:
consumer
- the consumer of the computed return valuesargument
- the argument which calls this methodpolarity
- polarity < 0: negative global position of this argument, e.g. this -> a
polarity = 0: neutral global position of this argument, e.g. this <-> a
polarity > 0: positive global position of this argument, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this argument
-
transformContradiction
default R transformContradiction(java.util.function.Consumer<R> consumer, int polarity)
Description copied from interface:Transform
This method is visited by theContradictionAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.- Specified by:
transformContradiction
in interfaceTransform<R,R>
- Parameters:
consumer
- the consumer of the computed return valuespolarity
- polarity < 0: negative global position of this contradiction, e.g. this -> a
polarity = 0: neutral global position of this contradiction, e.g. this <-> a
polarity > 0: positive global position of this contradiction, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this contradiction
-
transformTautology
default R transformTautology(java.util.function.Consumer<R> consumer, int polarity)
Description copied from interface:Transform
This method is visited by theTautologyAcceptanceConditions
of the acceptance condition on which we apply thisTransform
.- Specified by:
transformTautology
in interfaceTransform<R,R>
- Parameters:
consumer
- the consumer of the computed return valuespolarity
- polarity < 0: negative global position of this tautology, e.g. this -> a
polarity = 0: neutral global position of this tautology, e.g. this <-> a
polarity > 0: positive global position of this tautology, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this tautology
-
transformContradiction
R transformContradiction()
-
transformTautology
R transformTautology()
-
-