Language scoping for modular, flexible, concise, configuration descriptions
First Claim
Patent Images
1. In a computer system for processing a computer program, said computer program including a plurality of functions including a plurality of variables, a method for defining said variables comprising the steps of:
- A) storing in a static scope a first plurality of variable names corresponding to a first plurality of said variables and a plurality of first values associated with said first plurality of variable names;
B) storing a dynamic scope a second plurality of variable names corresponding to a second plurality of said variables and a plurality of second values associated with said second plurality of said variable names;
C) binding at least one of said first and second values to each said variable during evaluation of said functions, said binding step including, with respect to each said variable, the steps ofi) searching for the variable name corresponding to said variable in said static scope and, if found, binding to said variable the one of said first values associated with said corresponding variable name in said static scope; and
ii) if said corresponding variable name is not found in said static scope, searching for said corresponding variable name in said dynamic scope and, if found, binding to said variable the one of said second values associated with said variable name in said dynamic scope,whereby said static scope takes precedence over said dynamic scope in evaluating said functions.
3 Assignments
0 Petitions
Accused Products
Abstract
The problems of efficiently building a large software system are solved by the present invention of language scoping for effective configuration descriptions. A software system is defined by a tree of system models which are written in a functional language. The functional language provides a unique combination of static and dynamic scoping. This combination is required to write modular, flexible, and concise, yet complete, configuration descriptions.
-
Citations
16 Claims
-
1. In a computer system for processing a computer program, said computer program including a plurality of functions including a plurality of variables, a method for defining said variables comprising the steps of:
-
A) storing in a static scope a first plurality of variable names corresponding to a first plurality of said variables and a plurality of first values associated with said first plurality of variable names; B) storing a dynamic scope a second plurality of variable names corresponding to a second plurality of said variables and a plurality of second values associated with said second plurality of said variable names; C) binding at least one of said first and second values to each said variable during evaluation of said functions, said binding step including, with respect to each said variable, the steps of i) searching for the variable name corresponding to said variable in said static scope and, if found, binding to said variable the one of said first values associated with said corresponding variable name in said static scope; and ii) if said corresponding variable name is not found in said static scope, searching for said corresponding variable name in said dynamic scope and, if found, binding to said variable the one of said second values associated with said variable name in said dynamic scope, whereby said static scope takes precedence over said dynamic scope in evaluating said functions. - View Dependent Claims (2, 3, 4)
-
-
5. A method of operating a computer system comprising the steps of:
-
A) processing a computer program in a processor, during which a plurality of program values are assigned to a plurality of program variables for evaluating a plurality of functions included in said program; B) storing a plurality of name/value pairs in a memory, each name/value pair comprising a variable name and an associated value, said storing step including the steps of i) storing a first set of said name/value pairs in a static scope, said name/value pairs of said first set including values for the associated variable names that are defined when, during processing of said program, a first set of said functions is defined, said first set of said functions including a first plurality of said program variables that correspond to said variable names of said first set of name/value pairs; and ii) storing a second set of said name/value pairs in a dynamic scope, said name/value pairs of said second set including values for the associated variable names that are defined when, during processing of said program, a second set of said functions is applied, said second set of said functions including a second plurality of said program variables that correspond to said variable names of said second set of name/value pairs; and C) said processing step including, for each program variable, the steps of (i) checking whether a corresponding name/value pair is stored in said static scope means, and (ii) if corresponding name/value pair is not stored in said static scope, both retrieving a value of one of said name/value pairs corresponding to said program variable from said dynamic scope, and binding said retrieved value as said program value to said program variable. - View Dependent Claims (6, 7, 8, 9)
-
-
10. A computer system comprising:
-
A) processing means for processing a computer program, during which a plurality of program values are assigned to a plurality of program variables for evaluating a plurality of functions included in said program; B) a memory for storing a plurality of name/value pairs, each comprising a variable name and an associated value, said memory including i) static scope means for storing a first set of said name/value pairs for which the values for the associated variable names are defined when, during processing of said program by said processing means, a first set of said functions is defined, said first set of said functions including a first plurality of said program variables that correspond to said variable names of said first set of name/value pairs; and ii) dynamic scope means for storing a second set of said name/value pairs for which the values for the associated variable names are defined when, during processing of said program by said processing means, a second set of said functions is applied, said second set of said functions including a second plurality of said program variables that correspond to said variable names of said second set of name/value pairs; and C) during said processing, for each program variable, said processing means checks whether a corresponding name/value pair is stored in said static scope means, and if said static scope means does not store a corresponding name/value pair, said processing means both retrieves a value of one of said name/value pairs corresponding to said program variable from said dynamic scope, and binds said retrieved value as said program value to said program variable. - View Dependent Claims (11, 12, 13, 14, 15, 16)
-
Specification