#pragma once #include #include #include #include "dvm.h" #include "../Utils/errors.h" #include "../ParallelizationRegions/ParRegions.h" #include "../ParallelizationRegions/ParRegions_func.h" #include "../Utils/CommonBlock.h" struct Function { std::string name; std::string file; int line; SgStatement* point = NULL; int parametersCount; int type; // 0 - module, 1 - global, 2 - internal, 3 - internal in module std::string parentName; std::string globalName; std::map resolved; }; bool EquivalenceChecker(SgFile *file, const std::string &fileName, const std::vector ®ions, std::map> &currM); bool CommonBlockChecker(SgFile *file, const std::string &fileName, const std::map &commonBlocks, std::map> &messages); bool EndDoLoopChecker(SgFile *file, std::vector &currM); bool IncludeChecker(SgFile *file, const std::string &fileName, std::vector &currM); void VarDeclCorrecter(SgFile *file); bool DvmDirectiveChecker(SgFile *file, std::map> &errors, const int, const int); bool FunctionsChecker(SgFile *file, std::map> &funcNames, std::map> &currMessages); bool OperatorChecker(SgFile* file, std::map>& currMessages); void fillFunctionInfo(SgFile* file, std::map>& funcInfo); void resolveFunctionCalls(SgFile* file, const std::set& toResolve, const std::map>& funcInfo); bool checkAndMoveFormatOperators(SgFile* file, std::vector &currMessage, bool withError = true); int VerifyFile(SgFile *file); void correctModuleProcNames(SgFile *file, const std::set& globalF); void correctModuleSymbols(SgFile *file); void replaceStructuresToSimpleTypes(SgFile* file); void restoreCorrectedModuleProcNames(SgFile *file); bool checkArgumentsDeclaration(SgProject *project, const std::map> &allFuncInfo, const std::vector ®ions, std::map> &SPF_messages); void replaceDerivedAssigns(SgFile *file, SgStatement *stToCopy, SgStatement *insertB, const std::map &derivedTypesDecl); bool isDerivedAssign(SgStatement *st); std::map createDerivedTypeDeclMap(SgStatement *forS); void removeExecutableFromModuleDeclaration(SgFile* current, const std::set& filesInProj, std::vector& hiddenData); bool needToReplaceInterfaceName(SgStatement* interf); std::string getOrigName(const std::string& file, const std::string& s);