Search code examples
alloy

Abstraction: design pattern versus essential concept


A book that I am reading on UML defines abstraction this way:

Abstraction is a design principle. In a classification (type) hierarchy, the supertype is an abstraction of its subtypes. Abstractions let you define a common feature in the supertype and that common feature propagates down the type hierarchy to all subtypes.

I think "abstraction" means something different in Alloy. Here are a few excerpts from the book Software Abstractions:

Software is built on abstractions. Pick the right ones and programming will flow naturally from design; modules will have small and simple interfaces; and new functionality will more likely fit in without extensive reorganization ... Users want programs whose abstractions are simple and easy to understand; experts want abstractions that are robust and general enough to be combined in new ways ... An abstraction is not a module, or an interface, class, or method; it is a structure, pure and simple--an idea reduced to its essential form.

So, in UML and OO, an abstraction is a specific design approach whereas in Alloy an abstraction is an idea. Is that right? Would you characterize the distinction between abstraction in UML and OO (Object-Oriented) versus abstraction in Alloy, please?


Solution

  • The term abstraction can be used in two senses: as an activity and as a result of that activity. Your UML book is using it in the first sense, and the Alloy book uses it in the second sense. Nowadays, I'd use the term "concept" instead of "abstraction" in that excerpt that you quoted.