Class GenPropFormulas

java.lang.Object
com.articulate.sigma.tp.GenPropFormulas

public class GenPropFormulas extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • init

      public void init()
      convert to a string
    • toString

      public String toString()
      convert to a string
      Overrides:
      toString in class Object
    • simplifyCNF

      public static String simplifyCNF(String cnf)
      Simplify clauses from a multiset of literals to sets of literals
    • formatCNF

      public static String formatCNF(List<String> l)
      convert to a string
    • storeGeneratedFormulas

      public static void storeGeneratedFormulas(String html, int numvars, int depth)
      Store generated formulas HTML into a per-(numvars,depth) file. Each entry is delimited with a marker for indexing later.
    • getGeneratedFormula

      public String getGeneratedFormula(int numvars, int depth, int index)
      Retrieve a specific entry given numvars, depth, and index. Index starts at 0 (first entry).
    • getRandomGeneratedFormula

      public static String getRandomGeneratedFormula(int numvars, int depth)
      Retrieve a random entry given numvars and depth. Returns the HTML of a randomly selected formula entry.
    • populateCachedFormulas

      public static void populateCachedFormulas()
      Generate cached formulas for all combinations of numvars and depth between 1 and 7 (inclusive). This will sequentially create or append entries into the cache files with the same styling as the JSP.
    • encodeTT

      public static String encodeTT(String s)
      Encode formula for the automated truth table generator https://www.emathhelp.net/calculators/discrete-mathematics/truth-table-calculator/?f= requires invalid input: '<'-> and ->
    • encodeTab

      public static String encodeTab(String s)
      Encode formula for the automated tableau generator https://mathlogic.lv/tableau.html?f=%28%28q%E2%88%A8%C2%ACr%29%E2%88%A7%28r%E2%88%A8%C2%ACp%29%29%E2%88%A7%28p%E2%88%A8%C2%ACq%29
    • printResults

      public void printResults()
    • generateCNFandLinks

      public void generateCNFandLinks(String form, String filename) throws Exception
      Throws:
      Exception
    • generateFormulas

      public void generateFormulas(int targetCount, int numvars, int depth) throws Exception
      Throws:
      Exception
    • printHelp

      public static void printHelp()
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception