Logo Search packages:      
Sourcecode: maude version File versions  Download package

Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes

ImportModule Class Reference

Inheritance diagram for ImportModule:
Inheritance graph
Collaboration diagram for ImportModule:
Collaboration graph

List of all members.

Public Types

typedef map< int, Sort * > AliasMap
enum  GatherSymbols { GATHER_e = -1, GATHER_E = 0, GATHER_AMP = 1 }
enum  ItemType { MEMB_AX = 0x10000000, EQUATION = 0x20000000, RULE = 0x30000000 }
enum  Origin {
enum  Precedence {
  MIN_PREC = 0, MAX_PREC = 127, ANY = 127, PREFIX_PREC = 0,
enum  Status {

Public Member Functions

int addBubbleSpec (Symbol *topSymbol, int lowerBound, int upperBound, int leftParenToken, int rightParenToken, const Vector< int > &excludedTokens)
void addIdentityToPolymorph (int polymorphIndex, Term *identity)
void addIdHookToPolymorph (int polymorphIndex, int purpose, const Vector< int > &data)
void addImport (ImportModule *importedModule, ImportMode mode, LineNumber lineNumber)
SymboladdOpDeclaration (Token prefixName, const Vector< Sort * > &domainAndRange, SymbolType symbolType, const Vector< int > &strategy, const NatSet &frozen, int prec, const Vector< int > &gather, const Vector< int > &format, int metadata, bool &firstDecl)
void addOpHookToPolymorph (int polymorphIndex, int purpose, Symbol *symbol)
void addParameter (const Token parameterName, ImportModule *parameterTheory)
int addPolymorph (Token prefixName, const Vector< Sort * > &domainAndRange, SymbolType symbolType, const Vector< int > &strategy, const NatSet &frozen, int prec, const Vector< int > &gather, const Vector< int > &format, int metadata)
SortaddSort (int name)
void addTermHookToPolymorph (int polymorphIndex, int purpose, Term *term)
void addUser (User *user)
void addVariableAlias (Token name, Sort *sort)
bool allSet (int activeFlags) const
void bufferPrint (Vector< int > &buffer, Term *term, int printFlags)
void clearFlags (int activeFlags)
void clearMemo ()
void clearProfile ()
virtual void closeFixUps ()
void closeSignature ()
void closeSortSet ()
virtual void closeTheory ()
void copyBubbleSpec (Symbol *originalSymbol, Symbol *newSymbol)
void copyFixUpBubbleSpec (Symbol *originalSymbol, SymbolMap *map)
void copyFixUpPolymorph (int polymorphIndex, const MixfixModule *originalModule, int originalPolymorphIndex, SymbolMap *map)
void deepSelfDestruct ()
void economize ()
FloatSymbolfindFloatSymbol (const ConnectedComponent *component) const
int findParameterIndex (int name) const
int findPolymorphIndex (int polymorphName, const Vector< Sort * > &domainAndRange) const
QuotedIdentifierSymbolfindQuotedIdentifierSymbol (const ConnectedComponent *component) const
SortfindSort (int name) const
StringSymbolfindStringSymbol (const ConnectedComponent *component) const
SymbolfindSymbol (int name, const Vector< ConnectedComponent * > &domainComponents, ConnectedComponent *rangeComponent)
void fixUpBubbleSpec (int bubbleSpecIndex, Symbol *qidSymbol, Symbol *nilQidListSymbol, Symbol *qidListSymbol)
void fixUpImportedOps ()
const Vector
< ConnectedComponent * > & 
getConnectedComponents () const
void getDataAttachments (Symbol *symbol, const Vector< Sort * > &opDeclaration, Vector< const char * > &purposes, Vector< Vector< const char * > > &data) const
EnvironmentgetEnvironment ()
const Vector< Equation * > & getEquations () const
bool getFlag (int flag) const
const Vector< int > & getFormat (Symbol *symbol) const
void getGather (Symbol *symbol, Vector< int > &gather) const
const set< int > & getLabels () const
int getLineNumber () const
MemoMapgetMemoMap ()
int getMetadata (ItemType itemType, const ModuleItem *item) const
int getMetadata (ModuleItem *symbol, int opDeclIndex) const
int getMinimumSubstitutionSize () const
ModuleType getModuleType () const
int getNrImportedDeclarations (int symbolIndex) const
int getNrImportedPolymorphs () const
int getNrImportedSorts () const
int getNrImportedSubsorts (int sortIndex) const
int getNrImportedSymbols () const
int getNrOriginalEquations () const
int getNrOriginalMembershipAxioms () const
int getNrOriginalRules () const
int getNrParameters () const
int getNrPolymorphs () const
int getNrUserDeclarations (int symbolIndex) const
int getNrUsers () const
int getNrUserSorts () const
int getNrUserSymbols () const
Origin getOrigin () const
int getParameterName (int index) const
ImportModulegetParameterTheory (int index) const
void getParserStats (int &nrNonterminals, int &nrTerminals, int &nrProductions)
bool getPolymorphDataAttachment (int index, int nr, int &purpose, Vector< int > &items) const
const Vector< Sort * > & getPolymorphDomainAndRange (int index) const
const Vector< int > & getPolymorphFormat (int index) const
const NatSetgetPolymorphFrozen (int index) const
void getPolymorphGather (int index, Vector< int > &gather) const
TermgetPolymorphIdentity (int index) const
int getPolymorphMetadata (int index) const
Token getPolymorphName (int index) const
int getPolymorphPrec (int index) const
const Vector< int > & getPolymorphStrategy (int index) const
bool getPolymorphSymbolAttachment (int index, int nr, int &purpose, Symbol *&op) const
bool getPolymorphTermAttachment (int index, int nr, int &purpose, Term *&term) const
SymbolType getPolymorphType (int index) const
int getPrec (Symbol *symbol) const
const PrintAttributegetPrintAttribute (ItemType itemType, const ModuleItem *item) const
const Vector< Rule * > & getRules () const
const SortBddsgetSortBdds ()
const Vector< SortConstraint * > & getSortConstraints () const
const Vector< Sort * > & getSorts () const
Status getStatus () const
void getSymbolAttachments (Symbol *symbol, Vector< const char * > &purposes, Vector< Symbol * > &symbols) const
const Vector< Symbol * > & getSymbols () const
SymbolType getSymbolType (Symbol *symbol) const
void getTermAttachments (Symbol *symbol, Vector< const char * > &purposes, Vector< Term * > &terms) const
const AliasMap & getVariableAliases () const
int id () const
 ImportModule (int name, ModuleType moduleType, Origin origin, Entity::User *parent)
void importOps ()
void importSorts ()
void importStatements ()
void informUsers ()
void insertEquation (Equation *equation)
void insertLateSymbol (Symbol *s)
void insertMetadata (ModuleItem *symbol, int opDeclIndex, int metadata)
void insertMetadata (ItemType itemType, const ModuleItem *item, int metadata)
void insertPotentialLabels (const set< int > &l)
void insertPrintAttribute (ItemType itemType, const PreEquation *statement, const Vector< int > &names, const Vector< Sort * > &sorts)
void insertRule (Rule *rule)
void insertSort (Sort *sort)
void insertSortConstraint (SortConstraint *sortConstraint)
void insertSymbol (Symbol *symbol)
SymbolinstantiatePolymorph (int polymorphIndex, int kindIndex)
SymbolinstantiateSortTest (Sort *sort, bool eager)
SymbolinstantiateVariable (Sort *sort)
bool isBad () const
bool isTheory () const
void localStatementsComplete ()
TermmakeBubble (int bubbleSpecIndex, const Vector< Token > &tokens, int first, int last)
ImportModulemakeInstantiation (int moduleName, const Vector< View * > &arguments, const Vector< int > &parameterArgs, ModuleCache *moduleCache)
ImportModulemakeParameterCopy (int moduleName, int parameterName, ModuleCache *moduleCache)
ImportModulemakeRenamedCopy (int name, Renaming *canonical, ModuleCache *moduleCache)
TermmakeTrueTerm ()
void markAsBad ()
bool moduleDeclared (Symbol *symbol) const
bool moduleDeclared (Sort *sort) const
bool moduleDeclaredPolymorph (int index) const
void notifySubstitutionSize (int minimumSize)
bool oneOrMoreSet (int activeFlags) const
bool parameterDeclared (Sort *sort) const
bool parameterDeclared (Symbol *symbol) const
bool parameterDeclaredPolymorph (int index) const
bool parametersBound () const
bool parseMatchCommand (const Vector< Token > &bubble, Term *&pattern, Term *&subject, Vector< ConditionFragment * > &condition)
bool parseSearchCommand (const Vector< Token > &bubble, Term *&initial, int &searchType, Term *&target, Vector< ConditionFragment * > &condition)
void parseStatement (const Vector< Token > &bubble)
bool parseStrategyCommand (const Vector< Token > &bubble, Term *&subject, StrategyExpression *&strategy)
TermparseTerm (const Vector< Token > &bubble, ConnectedComponent *component=0, int begin=0, int end=DEFAULT)
int parseTerm2 (const Vector< Token > &bubble, ConnectedComponent *component, Term *&parse1, Term *&parse2, int &firstBad)
bool parseUnifyCommand (const Vector< Token > &bubble, Vector< Term * > &lhs, Vector< Term * > &rhs)
void printAttributes (ostream &s, const PreEquation *pe, ItemType itemType)
void profileEqConditionStart (const Equation *eq)
void profileEqRewrite (DagNode *redex, const Equation *eq, int type)
void profileFragment (const PreEquation *preEquation, int fragmentIndex, bool success)
void profileMbConditionStart (const SortConstraint *mb)
void profileMbRewrite (DagNode *redex, const SortConstraint *mb)
void profileRlConditionStart (const Rule *rl)
void profileRlRewrite (DagNode *redex, const Rule *rl)
void protect ()
void removeUser (User *user)
virtual void reset ()
void resetImports ()
void resetRules ()
void restoreHiddenState ()
void saveHiddenState ()
void setFlags (int activeFlags)
void setLineNumber (int lineNr)
void showProfile (ostream &s) const
bool unprotect ()

Static Public Member Functions

static bool canHaveAsParameter (ModuleType t1, ModuleType t2)
static bool canImport (ModuleType t1, ModuleType t2)
static SortdisambiguatorSort (const Term *term)
static SorthookSort (Sort *sort)
static bool isTheory (ModuleType t)
static ModuleType join (ModuleType t1, ModuleType t2)
static const char * moduleEndString (ModuleType type)
static const char * moduleTypeString (ModuleType type)
static void printCondition (ostream &s, const Vector< ConditionFragment * > &condition)
static void printCondition (ostream &s, const PreEquation *pe)

Static Protected Member Functions

static int findMatchingParen (const Vector< Token > &tokens, int pos)

Private Types

typedef map< int, int > ParameterMap
typedef set< int > ParameterSet
enum  Phase {

Private Member Functions

void addOpMappingsFromView (Renaming *canonical, const ImportModule *parameterCopyOfTheory, const View *view) const
void copyMetadata (ImportModule *importer, ImportTranslation &importTranslation, ItemType itemType, PreEquation *original, PreEquation *copy)
void donateOps (ImportModule *importer)
void donateOps2 (ImportModule *copy, Renaming *renaming=0)
void donateSorts (ImportModule *importer)
void donateSorts2 (ImportModule *copy, Renaming *renaming=0)
void donateStatements (ImportModule *importer)
void donateStatements2 (ImportModule *importer, ImportTranslation &importTranslation)
void finishCopy (ImportModule *copy, Renaming *canonical)
void fixUpDonatedOps (ImportModule *importer)
void fixUpDonatedOps2 (ImportModule *copy, Renaming *renaming=0)
void handleInstantiationByModuleView (ImportModule *copy, Renaming *canonical, ParameterMap &parameterMap, const Vector< View * > &arguments) const
void handleInstantiationByParameter (ImportModule *copy, Renaming *canonical, ParameterMap &parameterMap, const Vector< View * > &arguments, const Vector< int > &parameterArgs, ModuleCache *moduleCache) const
void handleInstantiationByTheoryView (ImportModule *copy, Renaming *canonical, ParameterMap &parameterMap, ParameterSet &extraParameterSet, const Vector< View * > &arguments, ModuleCache *moduleCache) const
void handleParameterizedSorts (Renaming *canonical, const ParameterMap &parameterMap, const ParameterSet &extraParameterSet) const
void handleRegularImports (ImportModule *copy, const Vector< View * > &arguments, const Vector< int > &parameterArgs, ModuleCache *moduleCache) const
ImportModuleinstantiateBoundParameters (const Vector< View * > &arguments, const Vector< int > &parameterArgs, ModuleCache *moduleCache)
 NO_COPYING (ImportModule)
void regretToInform (Entity *doomedEntity)
void resetImportPhase ()
ConnectedComponenttranslateComponent (const Renaming *renaming, const ConnectedComponent *component) const

Static Private Member Functions

static void deepCopyCondition (ImportTranslation *importTranslation, const Vector< ConditionFragment * > &original, Vector< ConditionFragment * > &copy)
static RenaminginstantiateRenaming (const Renaming *original, const ParameterMap &parameterMap, const ParameterSet &extraParameterSet)
static int instantiateSortName (int sortId, const ParameterMap &parameterMap, const ParameterSet &extraParameterSet)
static SortlocalSort (ImportModule *copy, Renaming *renaming, const Sort *sort)
static SortlocalSort2 (ImportModule *copy, Renaming *renaming, const Sort *sort)

Private Attributes

Vector< ImportModule * > importedModules
Phase importPhase
set< int > labels
Vector< int > nrImportedDecls
int nrImportedPolymorphs
int nrImportedSorts
Vector< int > nrImportedSubsorts
int nrImportedSymbols
int nrOriginalEquations
int nrOriginalMembershipAxioms
int nrOriginalRules
int nrPolymorphsFromParameters
int nrSortsFromParameters
int nrSymbolsFromParameters
Vector< int > nrUserDecls
int nrUserSorts
int nrUserSymbols
NatSet opDeclaredInModule
const Origin origin
Vector< int > paramArgs
Vector< int > parameterNames
NatSet polymorphDeclaredInModule
int protectCount
NatSet sortDeclaredInModule
Vector< View * > viewArgs

Detailed Description

Definition at line 34 of file importModule.hh.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index