Skip to content

Name Mangling #88

@The-Ray-Man

Description

@The-Ray-Man

This issue is used to track the changes to the naming system.

  • FunctionTypeName, function types get their own name. It consists of the type of the arguments and the return type. Before the FunctionTypeEmbeddings name was just a list with the argument type names
  • Change field mangledType of SymbolicName to nameType: NameType. Created NameType to collect all the possible name types and their string representation in one place.
  • Created NamedEntity as an interface, it contains everything that has something to do with names. This includes: NameScope, NameType, and SymbolicName.
  • Create FreshName interface, to group the created fresh names (e.g. Label Names) together.
  • Create NameOfType interface, to group names together that describe a type.
  • During name registration to the name resolver, names declared in forall + exists are also registered. This is necessary, because in invariants we are not allowed to shadow local variables. Also we need to know the variables used during let expressions. Hence we need to traverse the full program.
  • Added the class ViperKeyword as a NamedEntity. All the keywords are collected in ViperKeywords
  • Introduce ShortNameResolver which when names are registered builds a dependency graph and focus on human readable names.
  • Renamed the axioms (now using camelCase instead of underscores). Was done, such that the same style is used throughout the typeDomain.
  • Changed SpecialName to a more fitting name: SpecialFieldName
  • Added RelatedDomainFuncName. This is a symbolic name that should be used for names of functions that are closely related to a domain but are not actually inside the domain.
  • Changed HavocKotlinName and PredicateKotlinName interface from KotlinName to SymbolicName. Since they could be scoped, changed the name parameter in ScopedKotlinName to SymbolicName
  • Updated ScopedKotlinName to be just ScopedName.

Named Entity Hierarchy

  • NamedEntity
    • NameScope
      • BadScope
      • ClassScope
      • FakeScope
      • LocalScope
      • PackageScope
      • ParamterScope
      • PrivateScope
      • PublicScope
    • NameType
      • Property
      • BackingField
      • Getter
      • Setter
      • EtensionSetter
      • EtensionGetter
      • NameType
        • Class
      • Constructor
      • Function
      • Predicate
      • Havoc
      • Label
        • Return
        • Break
        • Continue
        • Catch
        • TryEit
      • Variables
      • Domain
      • DomainFunction
      • Special
    • SymbolicName
      • FreshName
        • AnonymousBuiltinName
        • AnonymousName
        • DispatchREceiverName
        • DomainFuncParameterName
        • EtensionREceiverName
        • FunctionResultVariableName
        • NumberedLabelName
          • all the labels...
        • PlaceholderArgumentName
        • ReturnVariableName
        • SpecialName
        • SsaVariableName
      • KotlinName
        • ClassKotlinName
        • ConstructorKotlinName
        • SimpleKotlinName
        • TypedKotlinName (abstract)
        • TypedKotlinNameWithType
        • HavocName
      • PredicateName
      • ScopedName
      • DomainName
      • NamedDomainAiomLabel
      • QualifiedDomainFuncName
      • UnqualifiedDomainFuncName
      • NameOfType
        • FunctionTypeName
        • ListOfNames
        • PretypeName
        • TypeName
    • ViperKeyword

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions