Class TseitinTransformer
java.lang.Object
org.tweetyproject.arg.adf.transform.TseitinTransformer
- All Implemented Interfaces:
Collector<Literal,
,Clause> Transformer<Pair<Literal,
Collection<Clause>>>
public final class TseitinTransformer
extends Object
implements Collector<Literal,Clause>, Transformer<Pair<Literal,Collection<Clause>>>
TseitinTransformer class
-
Method Summary
Modifier and TypeMethodDescriptioncollect
(AcceptanceCondition acc, Consumer<Clause> clauses) Traverses through the givenAcceptanceCondition
and calls the provided consumer on all the collected data.static TseitinTransformer
ofNegativePolarity
(boolean optimize) Creates a newTseitinTransformer
instance with negative root polarity and default argument-to-literal mapping.static TseitinTransformer
ofNegativePolarity
(Function<Argument, Literal> mapping, boolean optimize) Creates a newTseitinTransformer
instance with negative root polarity and a custom argument-to-literal mapping.static TseitinTransformer
ofPositivePolarity
(boolean optimize) Creates a newTseitinTransformer
instance with positive root polarity and default argument-to-literal mapping.static TseitinTransformer
ofPositivePolarity
(Function<Argument, Literal> mapping, boolean optimize) Creates a newTseitinTransformer
instance with positive root polarity and a custom argument-to-literal mapping.Transforms the given acceptance condition into another structure.
-
Method Details
-
ofPositivePolarity
Creates a newTseitinTransformer
instance with positive root polarity and default argument-to-literal mapping.- Parameters:
optimize
- A boolean indicating whether optimizations should be applied.- Returns:
- A new
TseitinTransformer
instance with positive polarity.
-
ofNegativePolarity
Creates a newTseitinTransformer
instance with negative root polarity and default argument-to-literal mapping.- Parameters:
optimize
- A boolean indicating whether optimizations should be applied.- Returns:
- A new
TseitinTransformer
instance with negative polarity.
-
ofPositivePolarity
public static TseitinTransformer ofPositivePolarity(Function<Argument, Literal> mapping, boolean optimize) Creates a newTseitinTransformer
instance with positive root polarity and a custom argument-to-literal mapping.- Parameters:
mapping
- AFunction<Argument, Literal>
that maps arguments to literals.optimize
- A boolean indicating whether optimizations should be applied.- Returns:
- A new
TseitinTransformer
instance with positive polarity.
-
ofNegativePolarity
public static TseitinTransformer ofNegativePolarity(Function<Argument, Literal> mapping, boolean optimize) Creates a newTseitinTransformer
instance with negative root polarity and a custom argument-to-literal mapping.- Parameters:
mapping
- AFunction<Argument, Literal>
that maps arguments to literals.optimize
- A boolean indicating whether optimizations should be applied.- Returns:
- A new
TseitinTransformer
instance with negative polarity.
-
collect
Description copied from interface:Collector
Traverses through the givenAcceptanceCondition
and calls the provided consumer on all the collected data. -
transform
Description copied from interface:Transformer
Transforms the given acceptance condition into another structure.- Specified by:
transform
in interfaceTransformer<Pair<Literal,
Collection<Clause>>> - Parameters:
acc
- the acceptance condition- Returns:
- the transformed result
-