Robin K. Hill, University of Wyoming
In the realm of computer science and everyday digital life, the term “variable” is thrown around quite frequently. We often hear that a variable is “the name of a value.” Similarly, an “attribute” is described as “the name of a property.” For many, these definitions suffice for daily tasks and basic understanding. However, when we delve deeper, we begin to explore the ontology of a variable – its fundamental nature and existence. Is there a more comprehensive definition of “variable” that resonates with both students and those outside the field?
Before we get lost in abstract definitions, let’s consider where the rubber meets the road: professional ontology design. In real-world applications, particularly when designing databases for commercial purposes, the question shifts to “What information do we need to track?”. Answering this question, which has significant financial implications, demands extensive knowledge of a specific domain, whether it’s fashion design, financial instruments, military strategy, or wine production, coupled with the technical skills to translate that knowledge into a data language. Experts in the entity-relationship model excel at identifying and documenting the entities, attributes, and relationships crucial to a given domain.
The principles of working ontology are a topic of interest for numerous philosophers of computing, often focusing on knowledge representation, information sharing, and organizational structure. Scholars like Barry Smith and his colleagues bridge the gap between abstract, formal concepts and domain-specific applications, offering templates and tools rooted in engineering and addressing the philosophical questions that emerge from these practical applications.
However, our focus here is not on these lucrative applications of ontology. Instead, we aim to explore the essence of the variable, this ubiquitous abstraction at the heart of computing. We’re not seeking minute distinctions but rather aiming for a broader understanding of identifiers and their associated values. While W.V. Quine’s notion that “to be is to be the value of a bounded variable” offers an intriguing perspective, our goal is a more accessible, informal explanation. We seek to articulate a comprehensive definition of the ontology of a variable as it is used in computer programming. Think about common phrases like, “What’s the variable for the tax rate?” or “That variable name is misleading,” or “We don’t need a variable for the month because it can be derived from the date.” The very fact that variables are so fundamental to computing suggests that their ontology holds valuable insights into the nature of computation itself.
To guide our exploration, let’s consider several key questions:
Variable vs. Constant: Exploring the Nuances
If a variable is simply the name of a value, how do we differentiate it from a constant? In programming, the distinction is clear, but outside of this context, it becomes less so. Is a constant merely a specialized type of variable, perhaps a variable with an additional property of “immutability”? And how does the “attribute” in database design fit into this picture? Can attributes be further categorized into variables and constants? William Kent, in 1978, highlighted the challenging ontology of the attribute, noting its complexity and even suggesting that there might not be a fundamental difference between an attribute and a relationship. This prompts us to consider if the variable concept itself is more fluid than we initially assume.
Variable vs. Value: Placeholder or Entity?
What exactly is the difference between a variable and a value? Is a variable a tangible entity or merely a characteristic of something else? When we say we don’t need a variable for the month because it can be calculated from the date, we imply that the value, but not necessarily the variable itself, is redundant. The idea that variables “disappear” when values are substituted leads to the common perception of a variable as a “placeholder.” But what exactly is it holding a place for? Is it a predicate, a proposition, or an entity? In essence, what is the fundamental nature or category of a variable? Is it an attribute describing something, a complete statement about something, or the thing itself? While programming languages and formal semantics clearly define the distinction between variable and value, understanding this difference conceptually remains a crucial aspect of grasping the ontology of a variable.
Instantiation and Scope: The Many Faces of a Variable
What about the concept of multiple instantiations, the fact that all occurrences of a variable within a specific scope are linked to the same value? When we criticize “a misleading variable name,” we are implicitly referring to multiple instances of that variable throughout the code. How can we incorporate this aspect of scope and binding – which is clearly defined in formal semantics – into a comprehensive definition of a variable? The behavior of a variable isn’t just about its name or value in isolation, but also about how it behaves within a larger system and how changes to it propagate.
Variable as Known Unknown: Algebra and Programming Perspectives
Is a variable something known or unknown? In algebra, a variable is often defined as an “unknown.” Yet, when we encounter a variable ‘x’ in an equation like f(x) = ax² + bx + c, we know a great deal about it. We know it represents a number, that it’s appropriate for this mathematical context, and that its value is constrained by its relationships to other values within the equation. What remains “unknown” is the specific numerical value of ‘x’. We always “know” the variable in a weaker sense – we understand its purpose and necessity within the system. Similarly, in programming, a variable’s value is “unknown” in the source code, which is a human-authored creation. During program execution, once a variable is bound to a value, that value becomes “known” in a certain sense – but known to whom or what? This duality of known and unknown aspects is central to the nature of a variable.
The philosophy of definition itself is a complex field. Experts in this area would not be surprised by the challenges in defining something as seemingly simple as a variable. Computer scientists, however, might find it surprising that such a commonplace and familiar concept can lead to such profound and intricate questions. Exploring these questions is crucial for a deeper understanding of not just variables, but the very foundations of computer science itself.
References
[Buffalo Ontology] Buffalo Ontology Site. University at Buffalo. Accessed 29 January 2019.
[Kent] Kent, William. 1978. Data and Reality. North-Holland Publishing Company. Chapter 5.0. Attributes.
[McKay] McKay, Donald. 1969. Information, Mechanism and Meaning. MIT Press.
[Noy and McGuiness] Natalya F. Noy and Deborah L. McGuinness. Undated. Ontology Development 101: A Guide to Creating Your First Ontology.
[SEP-Definition] Gupta, Anil. 2015. Definitions. The Stanford Encyclopedia of Philosophy. Edward N. Zalta, editor. Accessed 31 January 2019.
[Smith 2004] Smith, Barry. “Beyond concepts: ontology as reality representation.” In Proceedings of the Third International Conference on Formal Ontology in Information Systems (FOIS 2004). Pgs. 73-84. IOS Press.
[Smith 2008] Smith, Barry. “Ontology (science).” Formal Ontology in Information Systems. C. Eschenbach and M. Grüninger, editors. Proceedings of the Fifth International Conference on Formal Ontology in Information Systems (FOIS 2008). Pgs. 21-35. IOS Press. DOI:10.3233/978-1-58603-923-3-21
Robin K. Hill is a lecturer in the Department of Computer Science and an affiliate of both the Department of Philosophy and Religious Studies and the Wyoming Institute for Humanities Research at the University of Wyoming. She has been a member of ACM since 1978.