@@ -0,0 +1,1660 @@
+package net.ssehub.kernel_haven.util.logic;%0A%0Aimport static net.ssehub.kernel_haven.util.null_checks.NullHelpers.notNull;%0A%0Aimport java.util.function.Function;%0A%0Aimport net.ssehub.kernel_haven.util.null_checks.NonNull;%0A%0A/**%0A * Static utility method for simplifying %7B@link Formula%7Ds. By default, this does nothing. However, a simplifier can be%0A * registered via %7B@link #setSimplifier(Function)%7D.%0A *%0A * @author Adam%0A */%0Apublic class FormulaSimplifier %7B%0A%0A    private static @NonNull Function%3C@NonNull Formula, @NonNull Formula%3E simplifier = f -%3E f;%0A    %0A    private static boolean deafultSimplifier = true;%0A    %0A    /**%0A     * Changes the simplifier to be used. Overrides the previous one.%0A     * %0A     * @param simplifier The new simplifier to use.%0A     */%0A    public static void setSimplifier(@NonNull Function%3C@NonNull Formula, @NonNull Formula%3E simplifier) %7B%0A        FormulaSimplifier.simplifier = simplifier;%0A        deafultSimplifier = false;%0A    %7D%0A    %0A    /**%0A     * Whether we still have the default simplifier that does nothing.%0A     * %0A     * @return %3Ccode%3Etrue%3C/code%3E if we still have the default simplifier; %3Ccode%3Efalse%3C/code%3E if%0A     *      %7B@link #setSimplifier(Function)%7D has been called.%0A     */%0A    public static boolean hasDefaultSimplifier() %7B%0A        return deafultSimplifier;%0A    %7D%0A    %0A    /**%0A     * Simplifies the given formula. Uses the previously set simplifier (see %7B@link #setSimplifier(Function)%7D).%0A     * %0A     * @param formula The formla to simplify.%0A     * @return The simplified formula.%0A     */%0A    public static @NonNull Formula simplify(@NonNull Formula formula) %7B%0A        return notNull(simplifier.apply(formula));%0A    %7D%0A    %0A%7D%0A

Add FormulaSimplifier as a registry for simplifiers