Class BooleanAbstraction

java.lang.Object
org.variantsync.diffdetective.feature.BooleanAbstraction

public class BooleanAbstraction extends Object
Boolean abstraction for conditions in preprocessor macros. Boolean abstraction heuristically reduces expressions in higher-order logic (e.g., including arithmetics of function calls) to a propositional formula. Non-boolean expressions are replaced by respectively named variables.
Author:
Paul Bittner
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static final record 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Abstraction value for additions +.
    static final String
    Abstraction value for bitwise and &.
    static final String
    Abstraction value for 'and' assign operator &=.
    static final String
    Abstraction value for assign operator =.
    static final String
    Abstraction value for opening brackets (.
    static final String
    Abstraction value for closing brackets ).
    static final String
    Abstraction value for backslash \.
    static final String
    Abstraction value for the alternative of the ternary operator :, or just colons.
    static final String
    Abstraction value for defined operator defined.
    static final String
    Abstraction value for divisions /.
    static final String
    Abstraction value for div assign operator /=.
    static final String
    Abstraction value for dots in paths ..
    static final String
    Abstraction value for equality checks ==.
    static final String
    Abstraction value for greater-equals checks >=.
    static final String
    Abstraction value for greater checks >.
    static final String
    Abstraction value for has_attribute operator __has_attribute(ATTRIBUTE).
    static final String
    Abstraction value for has_builtin operator __has_builtin(BUILTIN).
    static final String
    Abstraction value for has_c_attribute operator __has_c_attribute(ATTRIBUTE).
    static final String
    Abstraction value for has_cpp_attribute operator __has_cpp_attribute(ATTRIBUTE).
    static final String
    Abstraction value for has_include operator __has_include(INCLUDE).
    static final String
    Abstraction value for logical and &&.
    static final String
    Abstraction value for logical or ||.
    static final String
    Abstraction value for left shift assign operator <<=.
    static final String
    Abstraction value for smaller-equals checks <=.
    static final String
    Abstraction value for bitwise left shift <<.
    static final String
    Abstraction value for smaller checks <.
    static final String
    Abstraction value for minus assign operator -=.
    static final String
    Abstraction value for modulo %.
    static final String
    Abstraction value for mod assign operator %=.
    static final String
    Abstraction value for multiplications *.
    static final String
    Abstraction value for inequality checks !=.
    static final String
    Abstraction value for bitwise not ~.
    static final String
    Abstraction value for bitwise or |.
    static final String
    Abstraction value for 'or' assign operator |=.
    static final String
    Abstraction value for plus assign operator +=.
    static final String
    Abstraction value for quotation marks in paths ".
    private static final List<BooleanAbstraction.Replacement>
     
    static final String
    Abstraction value for right shift assign operator >>=.
    static final String
    Abstraction value for bitwise right shift >>.
    static final String
    Abstraction value for single quotation marks '.
    static final String
    Abstraction value for star assign operator *=.
    static final String
    Abstraction value for subtractions -.
    static final String
    Abstraction value for the condition of the ternary operator ?.
    static final String
    Abstraction value for unary 'and' &.
    static final String
    Abstraction value for unary minus -.
    static final String
    Abstraction value for unary not !.
    static final String
    Abstraction value for unary plus +.
    static final String
    Abstraction value for unary star *.
    static final String
    Abstraction value for unary tilde ~.
    static final String
    Abstraction value for whitespace .
    static final String
    Abstraction value for bitwise xor ^.
    static final String
    Abstraction value for xor assign operator ^=.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Apply all possible abstraction replacements for substrings of the given formula.
    static String
    Search for the first replacement that matches the entire text and apply it.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait