Recent posts on money and time have produced some excellent comments and correspondence. There is even recent OMG effort that is right on the money, at least concerning time. For details, see the Date-Time Foundational Vocabulary RFP. I am particularly impressed with SBVR “Foundation” Vocabularies, which I understand Mark Linehan of IBM presented last week at an OMG meeting in DC^{[1]}.

Mark’s suggestions include establishing standard upper ontologies for:

- Time & dates
- Monetary amount
- Location
- Unit of measure
- Quantities, cardinalities, and ratios
- Arithmetic operations

I will skip operations for now since they are not taxonomic concepts but functional relationships involving such concepts. I believe the post on CEP and BPM covered time in adequate detail and the post on Siebel’s handling of foreign exchange covered the currency exchange aspects of money. It only touched on the more general concept of amounts that I will focus on here.

The remaining concepts are common to almost every application conceivable. They are some of the most primitive, domain-independent concepts of a critical and practical upper ontology. They include:

- Time
- Amounts
- Numbers
- Location

Notice that money is not listed, nor are units of measure. For more details, read on and consider the sections on “units as constants” and “much versus many” here.

Also note that cardinalities and ratios are simply numbers. Consider, for now, an amount as a number and unity of measure. I’m treating amounts and numbers as quantities. That is, a quantity is either a number or an amount. Taking this view, the order of ontological development could be expressed as:

- Time
- Numbers
- Units of Measure
- Amounts
- Quantities

As we will discuss below and as I have discussed previously, however, units of measure are amounts, so the preceding is tautological. Moreover, modeling quantities after modeling amounts (which includes or requires modeling numbers) is so trivial that is not worth mentioning. Therefore, the order and focus I recommend is:

- Numbers
- Amounts

And in modeling amounts, we will model “stuff” like time, money, and distance.

**Amounts before time**

An ontology that covers time also needs amounts. For example, what separates one point in time (or a date) from another point in time (or another date)? The difference is an amount of time. In other words, we will not model time well without first understanding (and subsequently modeling) what an amount is.

But to model an amount, one needs to model stuff. And to discuss an amount, one needs to be able to state how much stuff some stuff is. That is, one needs to say that an amount of stuff is a number of reference amounts of stuff. For example, the amount of time it takes to read this second can be measured by a number of seconds. Of course, a second is also an amount of time. But it is an amount that we all understand so we can use it as a reference. None of us really knows how much an inch is, but we know enough about it that we now a twenty five inch newborn would be pretty long.

Authority could not model stuff. Its concepts were implemented only to handle concepts labeled by common count nouns and instances of such concepts. Any new concept had to be one of the following:

There was no way to model “steel” or “water” or any other mass noun. As we will discuss, we cheated our way out of this by modeling:

- an amount of money
- an amount of time (or a duration)
- an amount of length (or distance)

Essentially, an amount is a count noun. Its plural is “amounts” and a particular bunch of some stuff is an amount. An amount of any kind of stuff can be measured using a number and a unit of the same kind of stuff. The same is true for the word “unit”. These words are known as “partitive” nouns. Using them with a mass noun produce as noun phrases that is a count noun. See the section titled “monthly partitions” in the post about events and time for more on partitives.

**Numbers before amounts**

The point here is simply to point out that it won’t do much good to measure amounts until we also model numbers, because without numbers we cannot specify how much of some kind of stuff (e.g., time or money) we are talking about!

So the upper ontology should be developed in the following order:

- Numbers
- Amounts
- Time

Note that location has been dropped for now. The next section explains why we recommend modeling distance as part of amounts but deferring location. If you want to get on to what amounts are (including what kinds of stuff there is), please skip ahead.

**Time and distance before location**

Modeling time is much simpler in practice than modeling position since we all share the same time but have different perspectives on even the same position. For example, in modeling location, we will need to model position. Modeling position will require modeling systems of coordinates in up to three dimensions. This will require defining what a dimension is and, when used in a system of coordinates, how positions are defined along that dimension. With peculiar exceptions, such as longitude and latitude, coordinate systems have at least one dimension along which position is measured by distance. In Cartesian coordinates, position is specified by distance from the origin in all dimensions. In two or three dimensions, one or two of the dimensions may be specified by an angle. In cylindrical coordinates, one of the dimensions is angular and the other two are Cartesian. In spherical coordinates, two dimensions are specified by angle.

We have not even begun to model perspectives (each involving a coordinate system and point of origin) or motion (which requires time) which seem so natural to consider as one models location. In addition, we have not modeled geography, including hemispheres or continents. Without geography, we cannot adequately progress to political geography, especially countries (at least not by location, we may model them for currencies, perhaps within continent and by neighbor).

For example, Cartesian coordinates, position is measured by distance from the origin in all dimensions. Geographic position requires only two, but it also requires a notion of angle and the reference points for Greenwich (which relates geo-position to Universal Time) and the equator. Of course, we may also need to model a sphere, which will require modeling circles, which will turn out to be required simply to model angles.

All these issues will need to be addressed in a robust upper ontology, but we can skirt the issue for now by realizing that the amount of space between two positions is similar to the amount of time between two points in time. More specifically, the length of a line between two points in space is a distance, just as the length the line between two points in time is its duration.

We can model distance as an amount, just as we can model duration as an amount. Each has reference amounts, such as meters and seconds. And as we will discuss, we can compose them into area, volume, and speed. But without direction, which requires a much of the modeling discussed above, we cannot fully model velocity or acceleration.

**Amounts are stuff**

An amount of money is money. An amount of time is time. An amount of distance is distance. Each kind of stuff has units of measure. Currencies are the units of money. Good units of time are seconds, days, lunar months, and solar years. Good units of distance are inches and meters.

Money, aside from currency and exchange issues discussed elsewhere, is a mass noun. Most people find it peculiar to talk about “monies”, unless they are referring to amounts of money. The same is true for time. Of course, words are also ambiguous. When we say “what time is it” we are referring to a time of day, not time itself. When we refer to ‘a number of times”, we are referring to a number, not time itself.

- What is the difference between an amount of money and money itself?
- What is the difference between an amount of time and time itself?

The difference is that mass nouns refer to something that is not measurable or countable but to the stuff itself. You cannot measure time, but you can measure an amount of time.

It turns out that the difference between stuff and amounts of stuff is beyond the capabilities of most products today. For example, my previous work tries to avoid modeling mass nouns by, as Mark suggests above, modeling amounts of stuff (e.g., “monetary amounts”).

The trick is that putting “amount of “in front of whatever kind of stuff, produces a count noun! Then, even if we think everything is an object, we can handle mass nouns. For example, we already discussed how this works in Authority above. If we are using OWL, we can introduce “an amount of money” or “a monetary amount” as a kind of thing.

The fact that most knowledge representations do not address mass nouns well, if at all, may be surprising. What is even more surprising is how poorly most knowledge representations handle. The fact that RDF and OWL do not address them explicitly is stunning. The fact that OMG is considering how to address this in SBVR or its object definition meta-model (ODM) is tremendous!^{[2]}

**On Numbers**

For most computer people, numbers are either integers or real numbers. There are several other relevant kinds of numbers, however. For the best overview and surfing, I recommend Wolfram’s Math World. A good taxonomy of numbers should include the integers and the real numbers, the later including fractions (rational numbers). It may also be useful to model the natural or positive integers (and the disjoint negatives, perhaps), but I would probably avoid modeling complex numbers, even though I’m a “retired” physicist. Too many years in business, I guess.

This really isn’t enough on numbers, though. Modeling a percent(age) is important, as are ratios in general. Ratios can be modeled as fractions. Like fractions they have denominators and numerators, each of which is, in general, a quantity. If the units of the denominator and the numerator are the same (including non-existent) then the result is unit-less. That is, the result will be a number.

A decibel is also a number, as is a Richter magnitude. Each is a logarithm of a ratio between some metric of power, energy or intensity over a reference metric. Any logarithm results in a unit-less number, of course.

In my experience, percentages are more important than fractions or ratios and logarithmic units are rarely used. This may simply amount to an admission of too much financial services work since my days as a scientist!

**Another angle**

Modeling angles can be avoided in most cases, but problems like Halo’s attempts to pass the physics AP test will certainly require it! Any significant effort to model location, including other than Cartesian coordinates will also require an understanding of angle.

An angle is measured as the numerator of fraction where the denominator is implicit. For example, when measuring in radians, the denominator is the 2 pi radians in a full circle.

Perhaps it would be better to add “angle” as one of the primitive types of stuff, like distance? What do you think?

**Kinds of stuff**

The International System of Units designates the following most “base units”:

Note that these are physical units. Money is important, too.

Note that a mole is actually a count, not a kind of stuff. One mole is Avogadro’s number of molecules of some kind of matter.

Dropping moles (since they are not a kind of stuff) and adding money gives the base units that we provided in Authority. With the exception that Dr. Novak kept moles, this we took an approach similar to his approach in this 1995 paper, at least on what stuff is. We did not have all the concerns about single step unit conversion that he addressed.

This is count is sometimes more useful than than mass in chemistry. The mass of a mole of a substance is its atomic mass, which is a function (primarily) of the number of neutrons and protons in each molecule. Moles are used primarily in chemistry to describe or control how many of various kinds of molecules are available to react with each other.

**Base units**

In addition to the SI units listed above, it is nice to add things like inches and ounces and their multiples, feet, yards, miles and pounds and tons. You also want the common divisions and multiples of the SI units, like minutes and hours. Days, months and years are also handy, of course, but these are not strict multiples of seconds. See our prior post on events and processes needing a good ontology of time.

The upper ontology should also include degrees Celsius and Fahrenheit, because these are somewhat common. Degrees Kelvin is less relevant to most, as are units of luminosity and charge. Note that in Authority, I took the liberty of disagreeing with the Bureau International des Poids et Mesures. Charge, which was the SI base unit before they changed it to current in 1961, strikes this physicist as the better primitive, since current also requires the notion of time and is therefore less primitive. In any case, neither coulombs nor amperes are terribly relevant to most.

**Weight: one minute**

Practically speaking, the difference between weight and mass can be ignored if gravity can be assumed constant at the earth’s surface and location will always remain close to the earth’s surface. Nonetheless, weight is a force not a mass and it can be modeled properly. More importantly, any inability to do so with semantic accuracy is a serious issue!

**Composing derived units**

Given the following kinds of stuff and some reference amounts for each that we call units, we can describe almost all of a person’s everyday world:

- Money (e.g., dollars and cents)
- Time (e.g., seconds, minutes, hours, days, weeks, months, and years)
- Distance (e.g., inches, feet, yards, miles and meters, including mm, cm, km)
- Mass or weight (e.g., tons, pounds, ounces or grams, including mg, kg)

For example:

- Speed is distance over time, as in a mile per hour or a meter per second.
- Area is distances times distance, as in a square meter or an acre.
- Volume is distance cubed, as in a cubic meter, a liter or a gallon or an ounce.
- Acceleration is distance over time over time or distance over time squared, as in meters per second per second or G, which is a constant approximating the acceleration of a mass at the earth’s surface due to gravity.
- Weight is a force, which is mass times acceleration. A kilogram on the earth’s surface weighs (i.e., exerts a force downward) of approximately 2.2 pounds. A Newton is a kilogram accelerating at one meter per second per second.
- Energy or work is force times distance, as in a joule, which is a Newton meter.
- Power is work over time, as in a Watt, which is a joule per second.
- Current is charge over time, as in an ampere, which is a coulomb per second.

We compose new kinds of stuff very simply:

- Multiple or divide one kind of stuff by another.

Manipulating amounts is much trickier. That’s what Novak’s 1995 paper was all about.

**Working with amounts**

A long time ago (on the first page of this post!), Mark Linehan listed arithmetic operations as necessary in what he is reluctant to call an upper ontology. I am not so reluctant but he is on the money about arithmetic operations.

Readers of this blog will recall some discussion about adding amounts of money using Siebel’s model of money (which includes currencies, inflation, and exchange rates) from that article. In general:

- An amount of stuff plus another amount of the same kind of stuff equals a total amount of the same stuff.
- A total amount of stuff minus an amount of the same kind of stuff yields another amount of the same stuff.

So the upper ontology on amounts needs a relation that handles this. It needs to support inferences, such as:

- A second plus a minute is 61 seconds.
- A kilometer plus a mile is (5,280 plus 3,280.8399) feet.
- 212°F minus 100°C is 0°C or 32°F
- A second plus a mile is a problem.

It will be interesting to see how OWL, RIF and OMG come out on this. **Some of the standards** **may land up being revised deeply to address these issues**.

**Composing amounts**

We have already discussed that distance over time is speed. What happens if we multiply an amount of speed by an amount of time? For example:

- How much is 100 kilometers an hour times 90 seconds?
- How much is one mile per day times a month?
- How many acres in a square kilometer?
- How much is minimum wage for a week?

The infrastructure required for this kind of reasoning is critical if an ontology for amounts is to be broadly useful. Novak’s paper is the tip of the iceberg. Authority does much of this well, but we need vendors and/or the W3C and OMG to bring the semantic web and MDA stack up to snuff.

The efforts at OMG on such ontologies are a great step in that direction.

^{[1]}Where the need for an ontology of events also arose.

^{[2]}I guess it will be hard to convince OMG that “concept” is more appropriate than “object”, though. 😎

Nice post on how Haley Authority handled ontology. I particularly like how it uses amount as a counting word. In chinese, there are counting words, which are used in similar way.

peter

There have been several efforts at making class libraries unit aware so that math operations are kept consistent.

I attempt to write a .NET compatible library myself.

http://www.oonumerics.org/tmpw01/brown.pdf

General units stuff.

http://www.unc.edu/~rowlett/units/