Class TPTPGenerationManager

java.lang.Object
com.articulate.sigma.trans.TPTPGenerationManager

public class TPTPGenerationManager extends Object
Coordinates background generation of TPTP translation files. Provides synchronization for inference requests that arrive before background generation completes.
  • Constructor Details

    • TPTPGenerationManager

      public TPTPGenerationManager()
  • Method Details

    • startBackgroundGeneration

      public static void startBackgroundGeneration()
      Start background generation of all TPTP formats for all KBs. This should be called after KBmanager initialization is complete. FOF and TFF run SEQUENTIALLY on the same thread to avoid race conditions with the static SUMOKBtoTPTPKB.lang and SUMOformulaToTPTPformula.lang fields. THF generation can run in parallel (uses different code path).
    • generateProperFile

      public static void generateProperFile(KB kb, String lang)
    • generateFOF

      public static void generateFOF(KB kb)
      Generate FOF (First-Order Form) TPTP file for a KB.
    • waitForFOF

      public static boolean waitForFOF(int timeoutSec)
      Wait for FOF generation to complete.
      Parameters:
      timeoutSec - Maximum time to wait in seconds
      Returns:
      true if generation completed successfully, false if timed out
    • waitForTFF

      public static boolean waitForTFF(int timeoutSec)
      Wait for TFF generation to complete.
      Parameters:
      timeoutSec - Maximum time to wait in seconds
      Returns:
      true if generation completed successfully, false if timed out
    • waitForTHFModal

      public static boolean waitForTHFModal(int timeoutSec)
      Wait for THF Modal generation to complete.
      Parameters:
      timeoutSec - Maximum time to wait in seconds
      Returns:
      true if generation completed successfully, false if timed out
    • waitForTHFPlain

      public static boolean waitForTHFPlain(int timeoutSec)
      Wait for THF Plain generation to complete.
      Parameters:
      timeoutSec - Maximum time to wait in seconds
      Returns:
      true if generation completed successfully, false if timed out
    • isFOFReady

      public static boolean isFOFReady()
      Check if FOF generation is ready.
    • isTFFReady

      public static boolean isTFFReady()
      Check if TFF generation is ready.
    • isTHFModalReady

      public static boolean isTHFModalReady()
      Check if THF Modal generation is ready.
    • isTHFPlainReady

      public static boolean isTHFPlainReady()
      Check if THF Plain generation is ready.
    • isFOFGenerating

      public static boolean isFOFGenerating()
      Check if FOF generation is currently in progress.
    • isTFFGenerating

      public static boolean isTFFGenerating()
      Check if TFF generation is currently in progress.
    • isTHFModalGenerating

      public static boolean isTHFModalGenerating()
      Check if THF Modal generation is currently in progress.
    • isTHFPlainGenerating

      public static boolean isTHFPlainGenerating()
      Check if THF Plain generation is currently in progress.
    • isBackgroundGenerating

      public static boolean isBackgroundGenerating()
      Check if any background generation is currently in progress. Used to prevent concurrent serialization during background generation.
    • shutdown

      public static void shutdown()
      Shutdown the executor service gracefully.