ROSE  0.11.145.0
sageInterfaceAda.h
1 
2 
3 #ifndef _SAGEINTERFACE_ADA_H
4 #define _SAGEINTERFACE_ADA_H 1
5 
6 #include "sage3basic.hhh"
7 #include "sageInterface.h"
8 
9 #include <tuple>
10 
11 namespace SageInterface
12 {
13 
15 namespace Ada
16 {
17 
18 namespace
19 {
20  template <class SageRefExp>
21  auto symOf(const SageRefExp& n) -> decltype( *n.get_symbol() )
22  {
23  auto* symp = n.get_symbol();
24  ASSERT_not_null(symp);
25 
26  return *symp;
27  }
28 
29  template <class SageSymbol>
30  auto declOf(const SageSymbol& n) -> decltype( *n.get_declaration() )
31  {
32  auto* dclp = n.get_declaration();
33  ASSERT_not_null(dclp);
34 
35  return *dclp;
36  }
37 
38  inline
39  SgFunctionDeclaration& declOf(const SgFunctionRefExp& n)
40  {
41  return declOf(symOf(n));
42  }
43 
44  inline
45  SgInitializedName& declOf(const SgVarRefExp& n)
46  {
47  return declOf(symOf(n));
48  }
49 
50 
51  // \todo normalize Sage nodes that use this function
52  // and make them go through symbols, like any other
53  // ref exp.
54  template <class SageAdaRefExp>
55  auto declOfRef(const SageAdaRefExp& n) -> decltype( *n.get_decl() )
56  {
57  auto* dclp = n.get_decl();
58  ASSERT_not_null(dclp);
59 
60  return *dclp;
61  }
62 
63  inline
64  SgAdaRenamingDecl& declOf(const SgAdaRenamingRefExp& n)
65  {
66  return declOfRef(n);
67  }
68 
69  inline
70  SgDeclarationStatement& declOf(const SgAdaUnitRefExp& n)
71  {
72  return declOfRef(n);
73  }
74 
75  inline
76  SgAdaTaskSpecDecl& declOf(const SgAdaTaskRefExp& n)
77  {
78  return declOfRef(n);
79  }
80 
81  inline
83  {
84  return declOfRef(n);
85  }
86 
87  inline
88  SgLabelStatement& declOf(const SgLabelRefExp& n)
89  {
90  return declOf(symOf(n));
91  }
92 
93 
94 /*
95  inline
96  SgVariableDeclaration& declOf(const SgVariableSymbol& n)
97  {
98  SgNode* varnode = SG_DEREF(n.get_declaration()).get_parent();
99 
100  return SG_DEREF(isSgVariableDeclaration(varnode));
101  }
102 
103  inline
104  SgVariableDeclaration& declOf(const SgVarRefExp& n)
105  {
106  return declOf(symOf(n));
107  }
108 */
109 
110  inline
111  SgName nameOf(const SgSymbol& sy)
112  {
113  return sy.get_name();
114  }
115 
116 
117  template <class SageRefExp>
118  inline
119  auto nameOf(const SageRefExp& n) -> decltype( nameOf(symOf(n)) )
120  {
121  return nameOf(symOf(n));
122  }
123 
124  template <class SageRefExp>
125  inline
126  auto nameOf(const SageRefExp& n) -> decltype( n.get_decl()->get_name() )
127  {
128  return declOf(n).get_name();
129  }
130 
131 
132  inline
133  SgName nameOf(const SgEnumVal& n)
134  {
135  return n.get_name();
136  }
137 
138  inline
139  SgName nameOf(const SgAdaUnitRefExp& n)
140  {
141  return SageInterface::get_name(n.get_decl());
142  }
143 
144 
145 /*
146  inline
147  SgName
148  nameOf(const SgAdaRenamingDecl& n)
149  {
150  return n.get_name();
151  }
152 */
153 
154 
155 /*
156  inline
157  SgName nameOf(const SgImportStatement& import)
158  {
159  const SgExpressionPtrList& lst = import.get_import_list();
160  ROSE_ASSERT(lst.size() == 1);
161 
162  return nameOf(SG_DEREF(isSgVarRefExp(lst.back())));
163  }
164 */
165 
166 } // anononymous namespace for convenience functions
167 
168 
169  extern const std::string roseOperatorPrefix;
170  extern const std::string packageStandardName;
171  extern const std::string durationTypeName;
172  extern const std::string exceptionName;
173 
182 
186  bool unconstrained(const SgArrayType* ty);
187  bool unconstrained(const SgArrayType& ty);
189 
190  using StatementRange = std::pair<SgDeclarationStatementPtrList::iterator, SgDeclarationStatementPtrList::iterator>;
191 
201  StatementRange
202  declsInPackage(SgGlobal& globalScope, const std::string& mainFile);
203 
204  StatementRange
205  declsInPackage(SgGlobal& globalScope, const SgSourceFile& mainFile);
207 
208 
216 
218  struct FlatArrayType : std::tuple<SgArrayType*, std::vector<SgExpression*> >
219  {
220  using base = std::tuple<SgArrayType*, std::vector<SgExpression*> >;
221  using base::base;
222 
223  SgArrayType* type() const { return std::get<0>(*this); }
224  std::vector<SgExpression*> const& dims() const { return std::get<1>(*this); }
225  std::vector<SgExpression*>& dims() { return std::get<1>(*this); }
226  };
227 
240 
241  struct RecordField : std::tuple<const SgSymbol*>
242  {
243  using base = std::tuple<const SgSymbol*>;
244  using base::base;
245 
246  const SgSymbol& symbol() const;
247  const SgSymbol& originalSymbol() const;
248  const SgClassDefinition& record() const;
249  bool inherited() const { return isSgAliasSymbol(&symbol()); }
250  bool discriminant() const;
251  };
252 
253 
259  std::vector<RecordField>
261 
262  std::vector<RecordField>
265 
266 
268  template <class SageLocatedNode>
269  struct IfInfo : std::tuple<SgExpression*, SageLocatedNode*>
270  {
271  using base = std::tuple<SgExpression*, SageLocatedNode*>;
272  using base::base;
273 
274  SgExpression* condition() const { return std::get<0>(*this); }
275  SageLocatedNode* trueBranch() const { return std::get<1>(*this); }
276  bool isElse() const { return condition() == nullptr; }
277  };
278 
283 
285  std::vector<IfExpressionInfo>
287 
289  std::vector<IfStatementInfo>
291 
295  long long int
297 
298 
300  SgExpression*
301  underlyingExpr(const SgStatement* s);
302 
310  SgRangeExp* range(const SgAdaAttributeExp* rangeAttribute);
311  SgRangeExp* range(const SgAdaAttributeExp& rangeAttribute);
313 
319 
325 
331 
338 
349 
353  SgStatementPtrList::iterator declarationLimit(SgStatementPtrList& list);
354  SgStatementPtrList::iterator declarationLimit(SgBasicBlock& block);
355  SgStatementPtrList::iterator declarationLimit(SgBasicBlock* block);
356  SgStatementPtrList::const_iterator declarationLimit(const SgStatementPtrList& list);
357  SgStatementPtrList::const_iterator declarationLimit(const SgBasicBlock& block);
358  SgStatementPtrList::const_iterator declarationLimit(const SgBasicBlock* block);
360 
366  bool tryFollowsDeclarativeBlock(const SgTryStmt& n);
367  bool tryFollowsDeclarativeBlock(const SgTryStmt* n);
369 
370 
376  bool isPackageTryBlock(const SgTryStmt& n);
377  bool isPackageTryBlock(const SgTryStmt* n);
379 
380 
386 
387 
390  bool isModularType(const SgType& ty);
391  bool isModularType(const SgType* ty);
392  bool isIntegerType(const SgType& ty);
393  bool isIntegerType(const SgType* ty);
394  bool isFloatingPointType(const SgType& ty);
395  bool isFloatingPointType(const SgType* ty);
396  bool isDiscreteType(const SgType* ty);
397  bool isDiscreteType(const SgType& ty);
398  bool isBooleanType(const SgType* ty);
399  bool isBooleanType(const SgType& ty);
401 
406  bool isFixedType(const SgType* ty);
407  bool isFixedType(const SgType& ty);
409 
412  bool isScalarType(const SgType* ty);
413  bool isScalarType(const SgType& ty);
415 
418  bool isDiscreteArrayType(const SgType& ty);
419  bool isDiscreteArrayType(const SgType* ty);
421 
426  bool resolvesToFixedType(const SgType* ty);
427  bool resolvesToFixedType(const SgType& ty);
429 
434  bool isDecimalFixedType(const SgType* ty);
435  bool isDecimalFixedType(const SgType& ty);
437 
450 
457 
465 
466 
473 
476  bool hasSeparatedBody(const SgDeclarationStatement& dcl);
477  bool hasSeparatedBody(const SgDeclarationStatement* dcl);
479 
485 
491 
492  struct TypeDescription : std::tuple<SgType*, bool>
493  {
494  using base = std::tuple<SgType*, bool>;
495  using base::base;
496 
497  SgType* typerep() const { return std::get<0>(*this); }
498  SgType& typerep_ref() const;
499  bool polymorphic() const { return std::get<1>(*this); }
500  };
501 
508 
516 
517  struct DominantArgInfo : std::tuple<const SgType*, std::size_t>
518  {
519  using base = std::tuple<const SgType*, std::size_t>;
520  using base::base;
521 
522  const SgType* type() const { return std::get<0>(*this); }
523  std::size_t pos() const { return std::get<1>(*this); }
524  };
525 
527  operatorArgumentWithNamedRootIfAvail(const SgTypePtrList& argtypes);
528 
529  struct OperatorScopeInfo : std::tuple<SgScopeStatement*, std::size_t>
530  {
531  using base = std::tuple<SgScopeStatement*, std::size_t>;
532  using base::base;
533 
534  // the scope associated with the dominant parameter
535  SgScopeStatement* scope() const { return std::get<0>(*this); }
536 
537  // the position of the dominant parameter in the parameter list
538  std::size_t argpos() const { return std::get<1>(*this); }
539  };
540 
548  operatorScope(const std::string& opname, const SgTypePtrList& argtypes);
549 
550 
560  operatorScope(const std::string& opname, const SgType& ty);
561 
563  operatorScope(const std::string& opname, const SgType* ty);
565 
566 
574 
576  struct ImportedUnitResult : std::tuple<std::string, const SgDeclarationStatement*, const SgAdaRenamingDecl*>
577  {
578  using base = std::tuple<std::string, const SgDeclarationStatement*, const SgAdaRenamingDecl*>;
579  using base::base;
580 
581  const std::string& name() const { return std::get<0>(*this); }
582 
583  const SgDeclarationStatement& decl() const
584  {
585  ASSERT_not_null(std::get<1>(*this));
586  return *(std::get<1>(*this));
587  }
588 
589  const SgAdaRenamingDecl* renamingDecl() const { return std::get<2>(*this); }
590  };
591 
594  importedUnit(const SgImportStatement& impdcl);
595 
597  const SgExpression&
599 
600 
603 
607  std::string convertRoseOperatorNameToAdaName(const std::string& nameInRose);
608 
612  std::string convertRoseOperatorNameToAdaOperator(const std::string& nameInRose);
613 
615  struct AggregateInfo : std::tuple< SgAdaAncestorInitializer*,
616  SgExpressionPtrList::const_iterator,
617  SgExpressionPtrList::const_iterator
618  >
619  {
620  using base = std::tuple< SgAdaAncestorInitializer*,
621  SgExpressionPtrList::const_iterator,
622  SgExpressionPtrList::const_iterator
623  >;
624  using base::base;
625 
627  SgAdaAncestorInitializer* ancestor() const { return std::get<0>(*this); }
628 
630  SgExpressionPtrList::const_iterator begin() const { return std::get<1>(*this); }
631 
633  SgExpressionPtrList::const_iterator end() const { return std::get<2>(*this); }
634 
636  bool nullRecord() const { return begin() == end(); }
637  };
638 
642  AggregateInfo splitAggregate(const SgExprListExp& exp);
643  AggregateInfo splitAggregate(const SgExprListExp* exp);
645 
646 
653 
654 
657  bool isFunction(const SgFunctionType& ty);
658  bool isFunction(const SgFunctionType* ty);
659  bool isFunction(const SgAdaSubroutineType& ty);
660  bool isFunction(const SgAdaSubroutineType* ty);
662 
667  const SgFunctionType* functionType(const SgFunctionSymbol* fnsy);
668  const SgFunctionType& functionType(const SgFunctionSymbol& fnsy);
670 
671 
674  bool isObjectRenaming(const SgAdaRenamingDecl* dcl);
675  bool isObjectRenaming(const SgAdaRenamingDecl& dcl);
677 
680  bool isExceptionRenaming(const SgAdaRenamingDecl* dcl);
681  bool isExceptionRenaming(const SgAdaRenamingDecl& dcl);
683 
684  struct PrimitiveParameterDesc : std::tuple<size_t, const SgInitializedName*>
685  {
686  using base = std::tuple<size_t, const SgInitializedName*>;
687  using base::base;
688 
690  size_t
691  pos() const { return std::get<0>(*this); }
692 
694  const SgInitializedName*
695  name() const { return std::get<1>(*this); }
696  };
697 
700  std::vector<PrimitiveParameterDesc>
702 
703  std::vector<PrimitiveParameterDesc>
706 
713  SgExpressionPtrList
716 
724  std::size_t
726 
727 
740  std::tuple<const SgScopeStatement*, const SgSymbol*>
741  findSymbolInContext(std::string id, const SgScopeStatement& scope, const SgScopeStatement* limit = nullptr);
743 
744 
745 
755  overridingScope(const SgExprListExp& args, const std::vector<PrimitiveParameterDesc>& primitiveArgs);
756 
758  overridingScope(const SgExprListExp* args, const std::vector<PrimitiveParameterDesc>& primitiveArgs);
760 
765  const SgScopeStatement* canonicalScope(const SgScopeStatement* scope);
766  const SgScopeStatement& canonicalScope(const SgScopeStatement& scope);
767 
769  bool sameCanonicalScope(const SgScopeStatement* lhs, const SgScopeStatement* rhs);
770 
780 
784 
785 
789 
800 
813  SgType*
814  baseType(const SgType& ty);
815 
816  SgType*
817  baseType(const SgType* ty);
819 
820 
831 
835 
837  bool explicitNullProcedure(const SgFunctionDefinition& fndef);
838 
840  bool explicitNullRecord(const SgClassDefinition& recdef);
841 
851  size_t
852  positionalArgumentLimit(const SgExpressionPtrList& arglst);
853 
854  size_t
856 
857  size_t
860 
863  long long int convertIntegerLiteral(const char* img);
864 
865  std::string convertStringLiteral(const char* img);
866 
867  long double convertRealLiteral(const char* img);
868 
869  char convertCharLiteral(const char* img);
871 
872 
874  // \todo mv into Ada to C++ converter
875  void convertAdaToCxxComments(SgNode* root, bool cxxLineComments = true);
876 
878  // \todo mv into Ada to C++ converter
880 
889  // \todo mv into Ada to C++ converter
890  void convertToOperatorRepresentation(SgNode* root, bool convertCallSyntax = false, bool convertNamedArguments = false);
891 } // Ada
892 } // SageInterface
893 
894 #endif /* _SAGEINTERFACE_ADA_H */
bool isSeparatedDefinition(const SgFunctionDeclaration &n)
returns true iff n is a separated function definition is separated
describes properties of imported units
This class represents the concept of a scope in C++ (e.g. global scope, fuction scope, etc.).
const SgScopeStatement * canonicalScope(const SgScopeStatement *scope)
returns the canonical scope of some Ada scope scope.
OperatorScopeInfo operatorScope(const std::string &opname, const SgTypePtrList &argtypes)
returns the scope where an operator with name opname and argument types in argtypes shall be declared...
bool unitRefDenotesGenericInstance(const SgAdaUnitRefExp &n)
returns true iff n refers to a generic declaration from inside said declaration false otherwise (e...
SgScopeStatement * logicalParentScope(const SgScopeStatement &s)
returns the logical parent scope of a scope s.
std::size_t normalizedArgumentPosition(const SgFunctionCallExp &call, const SgExpression &arg)
returns the parameter position of arg in the callee, after the parameters have been normalized...
StatementRange declsInPackage(SgGlobal &globalScope, const std::string &mainFile)
returns all statements/declarations in the global scope that were defined in the source file...
std::string convertStringLiteral(const char *img)
converts text to constant values
This class represents the base class for all types.
bool tryFollowsDeclarativeBlock(const SgTryStmt &n)
returns true iff n is a try block following a declarative region
int firstLastDimension(SgExprListExp &args)
returns an integer value for args[0] as used by type attributes first and last
This class represents the concept of an enum declaration.
SgAdaPackageSpecDecl & getSpecificationDeclaration(const SgAdaPackageBodyDecl &bodyDecl)
returns the declaration node for the package specification
This class represents the notion of a declared variable.
bool explicitNullProcedure(const SgFunctionDefinition &fndef)
returns true, iff fndef is the body of an explicit null procedure
void convertToCaseSensitiveSymbolTables(SgNode *root)
converts all symbol tables from case insensitive to case sensitive
bool isFixedType(const SgType *ty)
returns if the type ty is a fixed point type
This class represents the concept of a function declaration statement.
This class represents the concept of a scope in C++ (e.g. global scope, fuction scope, etc.).
TypeDescription typeRoot(SgType &)
returns the most fundamental type after skipping subtypes, typedefs, etc.
This class represents the concept of a C and C++ expression list.
SgStatementPtrList::iterator declarationLimit(SgStatementPtrList &list)
returns the iterator to one past the last declaration (the limit) in the statement sequence...
Details of expression aggregates.
std::string get_name(const SgNode *node)
Generate a useful name to describe the SgNode.
SgExpression * underlyingExpr(const SgStatement *s)
returns the expression of an expression statement, or nullptr if s is some other node ...
SgAdaGenericDecl & getGenericDecl(const SgAdaGenericInstanceDecl &n)
Returns SgAdaGenericDecl for a given SgAdaGenericInstanceDecl.
SgRangeExp * range(const SgAdaAttributeExp *rangeAttribute)
returns a range for the range attribute rangeAttribute.
size_t pos() const
the position within the parameter list
bool hasUnknownDiscriminants(const SgAdaDiscriminatedTypeDecl &n)
returns true iff n has an unknown discriminant part
This class represents the concept of a C trinary conditional expression (e.g. "test ...
SgAdaGenericDecl * isGenericDecl(const SgDeclarationStatement &n)
Returns the SgAdaGenericDecl node that makes a declaration (either function/procedure or package) gen...
bool isModularType(const SgType &ty)
return if the type ty is the corresponding universal type representation in ROSE
This class represents the notion of an expression. Expressions are derived from SgLocatedNodes, since similar to statement, expressions have a concrete location within the user's source code.
std::string convertRoseOperatorNameToAdaName(const std::string &nameInRose)
takes a function name as used in ROSE and converts it to a name in Ada (i.e., '"' + operator_text + '...
bool explicitNullRecord(const SgClassDefinition &recdef)
returns true, iff recdef is the body of an explicit null record
defines the result type for getArrayTypeInfo
SgEnumDeclaration * baseEnumDeclaration(SgType *ty)
finds the underlying enum declaration of a type ty
This class represents the concept of a name within the compiler.
bool resolvesToFixedType(const SgType *ty)
returns if the type ty resolves to a fixed point type
SgScopeStatement * pkgStandardScope()
do not use, this is temporary
const SgInitializedName * name() const
the parameter's name in form of an SgInitializedName
This class represents the concept of a class definition in C++.
This class represents strings within the IR nodes.
SgAdaPackageSpecDecl * renamedPackage(const SgAdaRenamingDecl &n)
returns a package spec decl if the declaration n renames a package returns nullptr otherwise ...
ImportedUnitResult importedUnit(const SgImportStatement &impdcl)
queries properties of an imported unit
bool isDecimalFixedType(const SgType *ty)
returns if the type ty is a decimal fixed point type
Functions that are useful when operating on the AST.
Definition: sageBuilder.h:25
bool isExceptionRenaming(const SgAdaRenamingDecl *dcl)
returns true iff ty refers to an exception renaming
bool withPrivateDefinition(const SgDeclarationStatement *dcl)
tests if the declaration dcl defines a public type that is completed in a private section...
bool isBooleanType(const SgType *ty)
return if the type ty is the corresponding universal type representation in ROSE
represents a branch in an if elsif else context (either statement or expression). ...
SgExpressionPtrList normalizedCallArguments(const SgFunctionCallExp &n)
returns a list of arguments with named arguments placed at the correct position
std::vector< IfStatementInfo > flattenIfStatements(SgIfStmt &n)
returns a flat representation of if-elsif-else statements
This class represents the base class for all IR nodes within Sage III.
Definition: Cxx_Grammar.h:9846
long double convertRealLiteral(const char *img)
converts text to constant values
bool isPackageTryBlock(const SgTryStmt &n)
returns true iff n is an Ada package try block
SgType * baseType(const SgType &ty)
returns the base type of a type ty
This class represents the concept of a block (not a basic block from control flow analysis)...
This class represents the notion of a statement.
This class represents the concept of a namespace definition.
long long int staticIntegralValue(SgExpression *n)
integer constant folding
const SgExpression & importedElement(const SgImportStatement &n)
returns the imported element (i.e., the first entry in n's import_list
TypeDescription typeOfExpr(SgExpression &)
returns the type of an expression corrects for some peculiarities in the AST
bool isScalarType(const SgType *ty)
returns true if ty refers to a scalar type
bool unconstrained(const SgArrayType *ty)
tests if ty is an unconstrained array
bool isDiscreteType(const SgType *ty)
return if the type ty is the corresponding universal type representation in ROSE
This class represents a type for all functions.
const SgFunctionType * functionType(const SgFunctionSymbol *fnsy)
returns the static type of the function symbol fnsy
SgDeclarationStatement * associatedDeclaration(const SgSymbol &n)
returns the associated declaration for symbol n or nullptr if there is none.
This class represents the concept of an "if" construct.
bool isFloatingPointType(const SgType &ty)
return if the type ty is the corresponding universal type representation in ROSE
size_t positionalArgumentLimit(const SgExpressionPtrList &arglst)
finds the one past the last positional argument (aka the first named argument position).
std::vector< IfExpressionInfo > flattenIfExpressions(SgConditionalExp &n)
returns a flat representation of if expressions
void convertToOperatorRepresentation(SgNode *root, bool convertCallSyntax=false, bool convertNamedArguments=false)
converts AST from a function call representation to operator form for fundamental operator declaratio...
This class represents the variable refernece in expressions.
std::tuple< const SgScopeStatement *, const SgSymbol * > findSymbolInContext(std::string id, const SgScopeStatement &scope, const SgScopeStatement *limit=nullptr)
finds the symbol with Naming tips in the context of scope or its logical parents in the range [scope...
std::string convertRoseOperatorNameToAdaOperator(const std::string &nameInRose)
takes a function name as used in ROSE and converts it to an operator in Ada (i.e., operator_text).
SgExpressionPtrList::const_iterator end() const
returns the underlying's list end iterator
SgExpressionPtrList::const_iterator begin() const
returns the remaining range-begin without the ancestor initializer (if it existed) ...
bool isFunction(const SgFunctionType &ty)
returns true iff ty refers to a function type (as opposed to procedure)
AggregateInfo splitAggregate(const SgExprListExp &exp)
returns the ancestor initializer, if exp refers to an extension aggregate null otherwise ...
const SgScopeStatement * correspondingBody(const SgScopeStatement *scope)
returns the body scope (aka definition) of a task, package, or protected object.
This class represents the function being called and must be assembled in the SgFunctionCall with the ...
This class represents the concept of try statement within the try-catch support for exception handlin...
std::vector< RecordField > getAllRecordFields(const SgClassDefinition &rec)
returns all fields (defined and inherited) of a record.
SgAdaPackageBodyDecl & getPackageBodyDeclaration(const SgAdaPackageSpecDecl &specDecl)
returns the declaration node for the package body, if available
bool hasSeparatedBody(const SgDeclarationStatement &dcl)
tests if the declaration decl corresponds to a stub (aka separated unit)
char convertCharLiteral(const char *img)
converts text to constant values
SgScopeStatement * declarationScope(const SgType *ty)
returns the scope where type ty has been declared
bool isObjectRenaming(const SgAdaRenamingDecl *dcl)
returns true iff ty refers to an object renaming
SgAdaDiscriminatedTypeDecl * getAdaDiscriminatedTypeDecl(const SgDeclarationStatement &n)
returns the SgAdaDiscriminatedTypeDecl iff n is discriminated null otherwise
bool nullRecord() const
returns if the remaining range (w/o the ancestor initializer) indicates a null record.
std::vector< PrimitiveParameterDesc > primitiveParameterPositions(const SgFunctionDeclaration &)
returns the descriptions for parameters that make an operation primitive
bool sameCanonicalScope(const SgScopeStatement *lhs, const SgScopeStatement *rhs)
tests if lhs and have the same canonical scope.
SgScopeStatement * overridingScope(const SgExprListExp &args, const std::vector< PrimitiveParameterDesc > &primitiveArgs)
returns the overriding scope of a primitive function based on the associated arguments as defined by ...
bool isSeparatedBody(const SgDeclarationStatement &n)
returns true iff n is a unit definition that has been separated
This class represents the concept of a C or C++ label statement.
long long int convertIntegerLiteral(const char *img)
converts text to constant values
This class represents the concept of a C++ function call (which is an expression).
bool isDiscreteArrayType(const SgType &ty)
returns true if ty refers to a discrete array type
SgAdaAncestorInitializer * ancestor() const
returns the ancestor initializer iff it exists, otherwise null
This class represents the concept of a declaration statement.
virtual SgName get_name() const =0
Access function for getting name from declarations or types internally.
void convertAdaToCxxComments(SgNode *root, bool cxxLineComments=true)
converts all Ada style comments to C++ comments
FlatArrayType getArrayTypeInfo(SgType *atype)
returns a flattened representation of Ada array types.
bool isIntegerType(const SgType &ty)
return if the type ty is the corresponding universal type representation in ROSE