de.fosd.typechef.typesystem

CTypeEnv

trait CTypeEnv extends CTypes with CTypeSystemInterface with CEnv with CDeclTyping

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CTypeEnv
  2. CDeclTyping
  3. CDeclUseInterface
  4. CTypeSystemInterface
  5. CEnv
  6. CTypes
  7. COptionProvider
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type EnumEnv = Map[String, (FeatureExpr, Id)]

    Enum Environment: Just a set of names that are valid enums.

    Enum Environment: Just a set of names that are valid enums. No need to remember fields etc, because they are integers anyway and no further checking is done in C

    Definition Classes
    CEnv
  2. class Env extends AnyRef

    Attributes
    protected
    Definition Classes
    CEnv
  3. type LabelEnv = Map[String, FeatureExpr]

    label environment: stores which labels are reachable from a goto.

    label environment: stores which labels are reachable from a goto.

    the environment is filled upon function entry for the entire function and just stores under which condition a label is defined

    Definition Classes
    CEnv
  4. type PtrEnv = Set[String]

    Definition Classes
    CTypes
  5. class StructEnv extends AnyRef

    Definition Classes
    CEnv
  6. case class StructTag(isComplete: Boolean, fields: ConditionalTypeMap, scope: Int, id: Option[Id] = scala.None) extends Product with Serializable

    for struct and union ConditionalTypeMap represents for the fields of the struct

  7. type VarTypingContext = ConditionalVarEnv

    *** Variable-Typing context (collects all top-level and local declarations) variables with local scope overwrite variables with global scope

    *** Variable-Typing context (collects all top-level and local declarations) variables with local scope overwrite variables with global scope

    Definition Classes
    CEnv

Abstract Value Members

  1. abstract def checkEnumInitializer(initializer: Expr, fexpr: FeatureExpr, env: Env): Unit

    Attributes
    protected
    Definition Classes
    CDeclTyping
  2. abstract def getExprType(expr: Expr, featureExpr: FeatureExpr, env: Env): Conditional[CType]

    Definition Classes
    CDeclTyping

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object EmptyEnv extends Env

    Definition Classes
    CEnv
  7. def addAnonStructUse(id: Id, fields: ConditionalTypeMap): Unit

    Definition Classes
    CDeclUseInterface
  8. def addDecl(current: Any, featureExpr: FeatureExpr, env: Env, isDefinition: Boolean = true): Unit

    Definition Classes
    CDeclUseInterface
  9. def addDefinition(definition: AST, env: Env, feature: FeatureExpr = FeatureExprFactory.True, isFunctionDeclarator: Boolean = false): Unit

    Definition Classes
    CDeclUseInterface
  10. def addEnumDeclarationToEnv(specifiers: List[Opt[Specifier]], featureExpr: FeatureExpr, env: Env, isHeadless: Boolean): EnumEnv

  11. def addEnumUse(entry: AST, env: Env, feature: FeatureExpr): Unit

    Definition Classes
    CDeclUseInterface
  12. def addEnv(ast: AST, env: Env): Unit

    invoked before every external decl, statement and expression with the environment of that node

    invoked before every external decl, statement and expression with the environment of that node

    for example to debug the environment

    mixed in from CEnvCache

    Attributes
    protected
    Definition Classes
    CTypeSystemInterface
  13. def addJumpStatements(compoundStatement: CompoundStatement): Unit

    Definition Classes
    CDeclUseInterface
  14. def addOldStyleParameters(oldStyleParameters: List[Opt[OldParameterDeclaration]], declarator: Declarator, expr: FeatureExpr, env: Env): Unit

    Definition Classes
    CDeclUseInterface
  15. def addStructDeclUse(entry: Id, env: Env, isUnion: Boolean, feature: FeatureExpr): Unit

    Definition Classes
    CDeclUseInterface
  16. def addStructDeclarationToEnv(specifier: Specifier, featureExpr: FeatureExpr, initEnv: Env, declareIncompleteTypes: Boolean): Env

  17. def addStructDeclarationToEnv(specifiers: List[Opt[Specifier]], featureExpr: FeatureExpr, initEnv: Env, declareIncompleteTypes: Boolean): Env

  18. def addStructDeclarationToEnv(e: StructDeclaration, featureExpr: FeatureExpr, env: Env): Env

    Definition Classes
    CTypeEnvCDeclTyping
  19. def addStructDeclarationToEnv(e: Declaration, featureExpr: FeatureExpr, env: Env): Env

    * Structs

  20. def addStructDefinition(definition: AST, env: Env, feature: FeatureExpr): Unit

    Definition Classes
    CDeclUseInterface
  21. def addStructRedeclaration(env: Env, declaration: Id, feature: FeatureExpr, isUnion: Boolean): Unit

    Definition Classes
    CDeclUseInterface
  22. def addStructUse(entry: AST, featureExpr: FeatureExpr, env: Env, structName: String, isUnion: Boolean): Unit

    Definition Classes
    CDeclUseInterface
  23. def addTypeUse(entry: AST, env: Env, feature: FeatureExpr): Unit

    Definition Classes
    CDeclUseInterface
  24. def addUse(entry: AST, feature: FeatureExpr, env: Env): Unit

    Definition Classes
    CDeclUseInterface
  25. def arrayType(t: CType): Boolean

    Definition Classes
    CTypes
  26. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  27. def assertTypeSystemConstraint(condition: Boolean, featureExpr: FeatureExpr, msg: String, where: AST): Boolean

    Attributes
    protected
    Definition Classes
    CTypeSystemInterface
  28. def checkStructCompleteness(ctype: CType, expr: FeatureExpr, env: Env, where: AST, checkedStructs: List[String] = Nil): Unit

    ensure that the type is complete in the given environment

    ensure that the type is complete in the given environment

    used for example when declaring or dereferencing a variable

    Attributes
    protected
    Definition Classes
    CDeclTyping
  29. def checkStructCompletenessC(ctype: Conditional[CType], expr: FeatureExpr, env: Env, where: AST, checkedStructs: List[String] = Nil): Unit

    Attributes
    protected
    Definition Classes
    CDeclTyping
  30. def checkStructRedeclaration(name: String, isUnion: Boolean, featureExpr: FeatureExpr, scope: Int, env: Env, where: AST): Unit

  31. def checkingExternal(externalDef: ExternalDef): Unit

    invoked before checking an external declaration (for example used for progress reports)

    invoked before checking an external declaration (for example used for progress reports)

    Attributes
    protected
    Definition Classes
    CTypeSystemInterface
  32. def clearDeclUseMap(): Unit

    Definition Classes
    CDeclUseInterface
  33. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def coerce(expectedType: CType, foundType: CType): Boolean

    determines whether types are compatible in assignements etc

    determines whether types are compatible in assignements etc

    for "a=b;" with a:type1 and b:type2

    Definition Classes
    CTypes
  35. def constructType(specifiers: List[Opt[Specifier]], featureExpr: FeatureExpr, env: Env, locationForErrorMsg: AST): Conditional[CType]

    Definition Classes
    CDeclTyping
  36. def converse(a: CType, b: CType): CType

    ansi c conversion rules of two arithmetic types (if called on other types, it just returns the first type; hence the pattern if cocerce(x,y) return converse(x,y) should yield the default behavior )

    ansi c conversion rules of two arithmetic types (if called on other types, it just returns the first type; hence the pattern if cocerce(x,y) return converse(x,y) should yield the default behavior )

    default is int. if either operand has a higher priority, it is preferred over int

    according to specification: http://techpubs.sgi.com/library/manuals/0000/007-0701-150/pdf/007-0701-150.pdf

    Definition Classes
    CTypes
  37. def declType(specs: List[Opt[Specifier]], decl: Declarator, attributes: List[Opt[AttributeSpecifier]], featureExpr: FeatureExpr, env: Env, oldStyleParameterTypes: ConditionalTypeMap = null): Conditional[CType]

    oldStyleParameterTypes

    only used when resolving a function

    Definition Classes
    CDeclTyping
  38. def enumDeclarations(specs: List[Opt[Specifier]], featureExpr: FeatureExpr, d: AST, env: Env): List[(String, FeatureExpr, AST, Conditional[CType], DeclarationKind, Conditional[Linkage])]

    define all fields from enum type specifiers as int values

    define all fields from enum type specifiers as int values

    enum is always interpreted as definition, not declaration. it conflicts with other definitions and other declarations.

    important: this recurses into structures!

    Attributes
    protected
    Definition Classes
    CDeclTyping
  39. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  40. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  41. def filterDeadSpecifiers[T](l: List[Opt[T]], ctx: FeatureExpr): List[Opt[T]]

    filtering is a workaround for a parsing problem (see open test) that can produce False AST-subtrees in some combinations.

    filtering is a workaround for a parsing problem (see open test) that can produce False AST-subtrees in some combinations.

    remove when problem is fixed

    Attributes
    protected
    Definition Classes
    CDeclTyping
  42. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  43. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  44. def getDeclarationType(specifiers: List[Opt[Specifier]], decl: Declarator, featureExpr: FeatureExpr, env: Env): Conditional[CType]

    Attributes
    protected
    Definition Classes
    CDeclTyping
  45. def getDeclaratorType(decl: Declarator, returnType: Conditional[CType], featureExpr: FeatureExpr, env: Env, oldStyleParameterTypes: ConditionalTypeMap = null): Conditional[CType]

    Attributes
    protected
    Definition Classes
    CDeclTyping
  46. def getDeclaredVariables(decl: Declaration, featureExpr: FeatureExpr, env: Env, checkInitializer: (Expr, Conditional[CType], FeatureExpr, Env) ⇒ Unit = noInitCheck): (Env, List[(String, FeatureExpr, AST, Conditional[CType], DeclarationKind, Conditional[Linkage])])

    get a list of all declared variables from a declaration.

    get a list of all declared variables from a declaration. also checks that declarations are wellformed (e.g., structs are complete)

    Definition Classes
    CDeclTyping
  47. def getExternCondition(specifiers: List[Opt[Specifier]]): FeatureExpr

    Attributes
    protected
    Definition Classes
    CDeclTyping
  48. def getFunctionType(specifiers: List[Opt[Specifier]], declarator: Declarator, oldStyleParameters: ConditionalTypeMap, featureExpr: FeatureExpr, env: Env): Conditional[CType]

    Definition Classes
    CDeclTyping
  49. def getIsExtern(list: List[Opt[Specifier]]): FeatureExpr

    under which condition is modifier extern defined?

    under which condition is modifier extern defined?

    Definition Classes
    CDeclTyping
  50. def getLinkage(symbol: String, isFunctionDef: Boolean, specifiers: List[Opt[Specifier]], fexpr: FeatureExpr, env: Env, where: AST): Conditional[Linkage]

    linkage depends on previous identifiers in scope, on the scope (file level or not) and the specifiers

    linkage depends on previous identifiers in scope, on the scope (file level or not) and the specifiers

    see http://publications.gbdirect.co.uk/c_book/chapter8/declarations_and_definitions.html

    Attributes
    protected
    Definition Classes
    CDeclTyping
  51. def getOldStyleParameters(oldStyleParameters: List[Opt[OldParameterDeclaration]], featureExpr: FeatureExpr, env: Env): ConditionalTypeMap

    Attributes
    protected
    Definition Classes
    CDeclTyping
  52. def getSpecifierCondition(specifiers: List[Opt[Specifier]], specifier: Specifier): FeatureExpr

    Attributes
    protected
    Definition Classes
    CDeclTyping
  53. def getStaticCondition(specifiers: List[Opt[Specifier]]): FeatureExpr

    Attributes
    protected
    Definition Classes
    CDeclTyping
  54. def getTypenameType(typename: TypeName, featureExpr: FeatureExpr, env: Env): Conditional[CType]

    Definition Classes
    CDeclTyping
  55. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  56. def init(): Unit

    Definition Classes
    CDeclUseInterface
  57. def isArithmetic(t: CType): Boolean

    Definition Classes
    CTypes
  58. def isArray(t: CType): Boolean

    Definition Classes
    CTypes
  59. def isCharSignCoercion(a: AType, b: AType): Boolean

    are both types char but with different signage?

    are both types char but with different signage?

    Attributes
    protected
    Definition Classes
    CTypes
  60. def isCompound(t: CType): Boolean

    Definition Classes
    CTypes
  61. def isForcedCoercion(expectedType: AType, foundType: AType): Boolean

    we can report as a warning if both types are number, but they are not the same width or signed

    we can report as a warning if both types are number, but they are not the same width or signed

    Definition Classes
    CTypes
  62. def isFunction(t: CType): Boolean

    Definition Classes
    CTypes
  63. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  64. def isIntegral(t: CType): Boolean

    Definition Classes
    CTypes
  65. def isPointer(t: CType): Boolean

    Definition Classes
    CTypes
  66. def isScalar(t: CType): Boolean

    Definition Classes
    CTypes
  67. def isStruct(t: CType): Boolean

    Definition Classes
    CTypes
  68. def isTypedef(specs: List[Opt[Specifier]]): Boolean

    Definition Classes
    CDeclTyping
  69. def isZero(t: CType): Boolean

    Definition Classes
    CTypes
  70. def issueTypeError(severity: Severity, condition: FeatureExpr, msg: String, where: AST, severityExtra: String = ""): Unit

    error reporting for type errors

    error reporting for type errors

    Attributes
    protected
    Definition Classes
    CTypeSystemInterface
  71. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  72. def normalize(t: AType): AType

    Attributes
    protected
    Definition Classes
    CTypes
  73. def normalize(t: CType): CType

    normalize types for internal comparison in coerce (do not return this to the outside)

    normalize types for internal comparison in coerce (do not return this to the outside)

    * function -> pointer to function

    * pointer to pointer to function -> pointer to function

    * remove any CObj within the type

    * regard arrays as pointers

    * pointer to ignore equals ignore

    * CVoid in function parameters is removed

    Attributes
    protected
    Definition Classes
    CTypes
  74. final def notify(): Unit

    Definition Classes
    AnyRef
  75. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  76. def opts: ICTypeSysOptions

    Attributes
    protected
    Definition Classes
    COptionProvider
  77. final def parameterTypes(decl: Declarator, featureExpr: FeatureExpr, env: Env, oldStyleParam: ConditionalTypeMap): List[(String, FeatureExpr, AST, Conditional[CType])]

    get the parameters from the innermost declarator.

    get the parameters from the innermost declarator. all outer (nested) declarators describe only arrays or parameters of the return type, if the function returns a function

    Attributes
    protected
  78. def parseStructMembers(members: List[Opt[StructDeclaration]], featureExpr: FeatureExpr, initialEnv: Env): ConditionalTypeMap

    Definition Classes
    CDeclTyping
  79. def promote(x: CType): CType

    promotion is what happens internally during conversion

    promotion is what happens internally during conversion

    Definition Classes
    CTypes
  80. def recognizeTypedefs(decl: Declaration, featureExpr: FeatureExpr, env: Env): Seq[(String, FeatureExpr, (AST, Conditional[CType]))]

    Attributes
    protected
    Definition Classes
    CDeclTyping
  81. final def reportTypeError(featureExpr: FeatureExpr, txt: String, where: AST, severity: Severity = Severity.OtherError, severityExtra: String = ""): CUnknown

    Attributes
    protected
    Definition Classes
    CTypeSystemInterface
  82. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  83. implicit def toCType(x: CLong): AType

    Definition Classes
    CTypes
  84. implicit def toCType(x: CShort): AType

    Definition Classes
    CTypes
  85. implicit def toCType(x: CChar): AType

    Definition Classes
    CTypes
  86. implicit def toCType(x: CInt): AType

    Definition Classes
    CTypes
  87. def toString(): String

    Definition Classes
    AnyRef → Any
  88. def typedExpr(expr: Expr, ctype: Conditional[CType], featureExpr: FeatureExpr, env: Env): Unit

    invoked after typing an expression

    invoked after typing an expression

    refined by CTypeCache if desired

    Attributes
    protected
    Definition Classes
    CTypeSystemInterface
  89. def typedFunction(fun: FunctionDef, ctype: Conditional[CType], featureExpr: FeatureExpr): Unit

    invoked after typing a function definition (top level declaration, not nested function)

    invoked after typing a function definition (top level declaration, not nested function)

    Attributes
    protected
    Definition Classes
    CTypeSystemInterface
  90. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  91. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  92. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  93. def wellformed(structEnv: StructEnv, ptrEnv: PtrEnv, atype: AType): Boolean

  94. def wellformed(structEnv: StructEnv, ptrEnv: PtrEnv, atype: Conditional[AType]): Boolean

  95. def wellformedC(structEnv: StructEnv, ptrEnv: PtrEnv, ctype: Conditional[CType]): Boolean

Inherited from CDeclTyping

Inherited from CDeclUseInterface

Inherited from CTypeSystemInterface

Inherited from CEnv

Inherited from CTypes

Inherited from COptionProvider

Inherited from AnyRef

Inherited from Any

Ungrouped