Ulf's  >  Worlds  >  Software  >     
                   
  Components    Values    Variables    Semaphores    ^Software    
     

Software: Variables

  • cf. ^VARIABLE in programming languages
  • cf. ^imperative model of computation
    store component
    VARIABLE
    «Once a programmer has understood the use of variables, he has understood the essence of programming» (Edsger Dijkstra [Watts 37])

  • passive software system component
  • with value input & output
  • stateful, identified by "location"
  • its characteristic behavior can be described in two ways:
  • a. Black box description: trace semantics
    ie., a description in terms of the data exchanged between the component and its environment, in terms of the I/O-trace, ie., the order of inputs (data crossing into the component on the "set"-channel in "set"-events) and outputs (data crossing into the environment on the "get"-channel in "get"-events).
     set 
    vn   ...   vk+1  
     c:variable 
     get 
      vk ... vk   ...   v1 ... v1  
    Variables c are characterized by the following trace:

    trace(c) = ( set:vk · {get:vk}* )k:=1,...

    cf. [RegTy]

    b. Gray box description: Value container model
     set 
    vn   ...   vk+1  
     c:variable 
     
    vk
     
     get 
      vk ... vk   ...   v1 ... v1  
    «In computing, a variable is an object that contains a value; this value may be inspected and updated as often as desired» [Watt 37].

     UPDATE EVENT 
    = change of variable's value
    to next value vk+1
    (old value vk is forgotten)
    effect

     
    Location: http://www.cs.mun.ca/~ulf/two/sw-var.html © Ulf Schünemann; ulf@cs.mun.ca; 201004