Class BddFormatter

java.lang.Object
software.amazon.smithy.rulesengine.logic.bdd.BddFormatter

public final class BddFormatter extends Object
Formats BDD node structures to a writer.
  • Constructor Details

    • BddFormatter

      public BddFormatter(Bdd bdd, Writer writer, String indent)
      Creates a BDD formatter.
      Parameters:
      bdd - the BDD to format
      writer - the writer to format to
      indent - the indentation string
  • Method Details

    • format

      public static String format(Bdd bdd)
      Formats a BDD to a string.
      Parameters:
      bdd - the BDD to format
      Returns:
      a formatted string representation
    • format

      public static String format(Bdd bdd, String indent)
      Formats a BDD to a string with custom indent.
      Parameters:
      bdd - the BDD to format
      indent - the indentation string
      Returns:
      a formatted string representation
    • format

      public void format() throws IOException
      Formats the BDD structure.
      Throws:
      IOException - if writing fails
    • formatReference

      public static String formatReference(int ref)
      Formats a BDD reference (node pointer) to a human-readable string.
      Parameters:
      ref - the reference to format
      Returns:
      the formatted reference string