O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

Programming Languages - Chapter 5

M KB Inglês 29 flashcards

Flashcards do conjunto (29)

  1. 1VariableAn abstraction of a memory cell
  2. 2Variables can be characterized by a collection of attributes:name, address, value, type, lifetime, scope
  3. 3NameA name is a string of characters used to identify some entity in a program
  4. 4Design issues for names:Maximum length?
    Are names case sensitive?
    Are special words reserved words or keywords allowed?
  5. 5KeywordA word that is special only in certain contexts
  6. 6Reserved WordA special word that cannot be used as a user-defined name
  7. 7AddressThe memory address with which a variable is associated (also called l-value)
  8. 8TypeDetermines the range of values the variable can store and the set of operations that are defined for values of that type
  9. 9ValueThe contents of the memory cell or cells with which the variable is associated.
    The r-value of a variable is its value
  10. 10BindingAn association, such as between an attribute and an entity, or between an operation and a symbol
  11. 11Binding TimesThe time at which a binding takes place:
    Language design time
    Compile time
    Load time
    Run time
  12. 12Static BindingA binding is static if it first occurs before run time (during compile time) and remains unchanged throughout program execution
  13. 13Dynamic BindingA binding is dynamic if it first occurs during execution or can change during execution of the program
  14. 14Type BindingBefore a variable can be referenced in a program, it must be bound to a data type
  15. 15Explicit DeclarationA program statement used for declaring the types of variables
  16. 16Implicit DeclarationA default mechanism for specifying types of variables
  17. 17LifetimeLifetime of a variable is the time during which the variable is bound to a specific memory cell
  18. 18Variables can be classified into 4 categories, according to their lifetimes:static
    stack-dynamic
    explicit heap-dynamic
    implicit heap-dynamic
  19. 19StaticBound to memory cells before execution begins and remains bound to the same memory cell throughout execution
  20. 20Static advantages/disadvantagesAdvantages: efficiency (direct addressing), history-sensitive subprogram support
    Disadvantage: lack of flexibility (no recursion)
  21. 21Stack-DynamicStorage bindings are created for variables when their declaration statements are elaborated (A declaration is elaborated when the executable code associated with it is executed)
  22. 22Stack-Dynamic advantages/disadvantagesAdvantage: allows recursion; conserves storage
    Disadvantages: Overhead of allocation and deallocation Subprograms cannot be history sensitive. Inefficient references (indirect addressing)
  23. 23Explicit Heap-DynamicAllocated and deallocated by explicit directives, specified by the programmer, which take effect during execution
  24. 24Explicit Heap-Dynamic advantages/disadvantagesAdvantage: provides for dynamic storage management
    Disadvantage: inefficient and unreliable
  25. 25Implicit Heap-DynamicVariables are bound to storage only when they are assigned values
  26. 26Implicit Heap-Dynamic advantages/disadvantagesAdvantage: flexibility
    Disadvantages: Inefficient, because all attributes are dynamic. Loss of error detection
  27. 27ScopeThe range of statements over which a variable is visible
  28. 28Nonlocal VariablesVariables of a program unit that are visible but not declared there
  29. 29Referencing EnvironmentThe referencing environment of a statement is the collection of all names that are visible in the statement

Informações

Descrição
FlashCards sobre Programming Languages - Chapter 5, criado por M KB em 20-02-2018.
Criado por
M KB
Visualizações
2
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?