src/main/java/logic/is/power/tptp_parser/SimpleTptpParserOutput.java
/** Implements the corresponding spec in TptpParserOutput.
      For this implementation the list of variables is expected to be reversed */
Implements the corresponding spec in TptpParserOutput.
For this implementation the list of variables is expected to be reversed
Implements the corresponding spec in TptpParserOutput . For this implementation the list of variables is expected to be reversed
public 
  TptpParserOutput.FofFormula
  createQuantifiedFormula(TptpParserOutput.Quantifier quantifier,
                          Iterable<String> variableList,
                          TptpParserOutput.FofFormula formula) 
  {
    assert variableList != null && variableList.iterator().hasNext();
    TptpParserOutput.FofFormula key = formula;
    for (String var : variableList) {
      key = 
      (TptpParserOutput.FofFormula)(new Formula.Quantified(quantifier,
                                                           sharedCopyOf(var),
                                                           key));
    };
    Formula res = _formulaTable.get((Formula)key);
    if (res == null) {
      _formulaTable.put((Formula)key,(Formula)key);
      return key;
    }
    else
      return res;
  }
public TptpParserOutput . FofFormula createQuantifiedFormula ( TptpParserOutput . Quantifier quantifier , Iterable < String > variableList , TptpParserOutput . FofFormula formula ) { assert variableList != null && variableList . iterator ( ) . hasNext ( ) ; TptpParserOutput . FofFormula key = formula ; for ( String var : variableList ) { key = ( TptpParserOutput . FofFormula ) ( new Formula . Quantified ( quantifier , sharedCopyOf ( var ) , key ) ) ; } ; Formula res = _formulaTable . get ( ( Formula ) key ) ; if ( res == null ) { _formulaTable . put ( ( Formula ) key , ( Formula ) key ) ; return key ; } else return res ; }
Implements the corresponding spec in TptpParserOutput.
Implements the corresponding spec in TptpParserOutput .
// Here the key is fully formed