/** * Builds a list of <code>TheoremEntry</code>s representing all available theorems for Theories * currently in scope of the "target file". * * <p>TODO : Currently this will not include theorems included in theories referenced from * included theories. That is, if the target file lists Set_Theory in its "uses" clause, and * Set_Theory lists Boolean_Theory in its "uses" clause, only the theorems from Set_Theory will be * included. * * @return The list of Theorems. */ private void buildTheories() { myTheorems.clear(); myPExpTheorems.clear(); File targetFileName = myInstanceEnvironment.getTargetFile(); ModuleID targetFileID = myInstanceEnvironment.getModuleID(targetFileName); List<ModuleID> availableTheories = myInstanceEnvironment.getTheories(targetFileID); Exp curTheorem; // Add local axioms to the library ModuleDec targetDec = myInstanceEnvironment.getModuleDec(targetFileID); addLocalAxioms(targetDec); // Add any kind of mathematical assertions from any included library SymbolTable curSymbolTable; ModuleScope bindingsInScope; List<Symbol> symbolsInScope; for (ModuleID curModule : availableTheories) { curSymbolTable = myInstanceEnvironment.getSymbolTable(curModule); bindingsInScope = curSymbolTable.getModuleScope(); symbolsInScope = bindingsInScope.getLocalTheoremNames(); for (Symbol s : symbolsInScope) { curTheorem = bindingsInScope.getLocalTheorem(s).getValue(); addTheoremToLibrary(s.getName(), curTheorem); } } }