In which we get started.
3 Modeling, formal methods, Alloy
- What is modeling?
- Taking modeling seriously
- The automation of logic
- Formal methods
3.1 What is modeling?
To an observer B, an object A* is a model of an
object A to the extent that B can use A* to answer questions that
interest him about A.
Marvin Minsky,
‘Matter, Mind and Models’
(1954, rev. 1968, rev. 1995).
As a definition, this isn't much good,
because it includes a lot that we don't think of as
models (native speakers as a way to answer questions
about their languages; books to answer questions about
their topics, ...).
But it does capture some key aspects of models:
- Models (like A*) are models of something
(A).
- Models (like A*) are models for someone (B)
and for some purpose.
- Models need not be complete.
3.2 Axes of variation
Models vary in several ways:
-
a priori vs a posteriori
- utilitarian or ends in themselves
- formal or informal
- prescriptive vs. descriptive
- for ourselves or for others
3.3 Abstraction
No substantial part of the universe is so
simple that it can be grasped and controlled without
abstraction.
Abstraction consists in replacing the part of the universe
under consideration by a model of similar but simpler structure.
Rosenblueth and Wiener, ‘The role of models in
science’, Philosophy of Science 12 (1945): 316
Rosenblueth and Wiener continue
“Models, formal or intellectual on the one hand, or material on the
other, are thus a central necessity of scientific procedure.”
3.4 Simplification
Models typically simplify the object:
- as a pragmatic compromise (to keep cost low).
- as a pedagogic or heuristic device.
- as an attempt to distinguish essence from accidence.
3.5 What is modeling (2)
Modeling is the making explicit of our assumptions and beliefs
about a thing.
More precisely:
Modeling is the making more or less explicit of
some of
our assumptions and beliefs
about a thing.
3.6 What's it good for?
Models can aid:
- planning (e.g. for software design)
- clarity, pedagogy
- insight
3.7 Modeling for planning
Ihr [der EDV] Einsatz ist überall dort möglich,
wo Daten irgendwelcher Art — also auch Texte — nach
eindeutig formulierbaren und vollständig formalisierbaren
Regeln verarbeitet werden müssen.
Wilhelm Ott,
Metrische Analysen zu Vergils Aeneis, Buch VI
(Tübingen: Niemeyer, 1973), p v.
3.8 Modeling for clarity of thinking
No, humanists don't need to write their own programs ... But
experience with computer programming provides an understanding of
fundamental computing concepts, familiarity with the principles
of algorithmic thought, and a grasp of the ways in which information
is stored, accessed, and manipulated ...
So, yes, humanists need to learn how to program, not in order to
write their own software but to learn how to look at the materials
within their disciplines in new ways and intelligently utilize (and
perhaps develop) tools that help them do it.
Nancy M. Ide,
Pascal for the humanities
(Philadelphia: Univ. of Pennsylvania Press, 1977), p. X.
3.9 Modeling for insight
I think that some of those linguists who have questioned the
value of precise and technical development of linguistic theory
may have failed to recognize the productive potential in the
method of rigorously stating a proposed theory and applying
it strictly to linguistic material with no attempt to avoid
unacceptable conclusions by ad hoc adjustments
or loose formulation.
Noam Chomsky,
Syntactic Structures
(The Hague: Mouton, 1957), p. [5]
3.10 Software models
Programs are explicit, and in some ways formal.
Are they models?
In some sense, yes. But not
necessarily
clean, clear, insightful, or insight-inducing.
And very hard to reason about.
3.11 Taking modeling seriously
So, if we want to model things, how
should we go about it?
- metaphor (“the desktop model” of user interfaces)
- small-scale working systems (mockups, prototypes)
- database designs
- vocabulary designs (DTD, XSD, RNG, ...)
- programs
- symbolic logic
This course is about the last option.
3.12 A virtue of formality
Precisely constructed models for linguistic structure can play an
important role, both negative and positive, in the process of
discovery itself. By pushing a precise but inadequate formulation
to an unacceptable conclusion, we can often expose the exact
source of this inadequacy and, consequently, gain a deeper
understanding of the linguistic data. More positively, a
formalized theory may automatically provide solutions for many
problems other than those for which it was explicitly designed.
Noam Chomsky,
Syntactic Structures, p [5]
3.13 More Chomsky ...
Obscure and intuition-bound notions can neither lead to absurd
conclusions nor provide new and correct ones, and hence they fail to
be useful in two important respects.
Noam Chomsky,
Syntactic Structures, p [5].
3.14 Logic
Logic attempts to make common sense
more systematic.
What are the formal patterns of reasoning that
produce true inferences from true premises?
3.15 The automation of logic
Long process or formalization and automation:
- medieval syllogistic (and Llull!)
- Leibniz and mechanical reasoning
- Boole and algebraic logic
- Peano, Frege, Russell/Whitehead
- Hilbert, Gödel, Herbrand, Gentzen
- Robinson, unification, Prolog
- theorem provers
3.16 Formal methods
Formal methods are “mathematically rigorous techniques and tools
for the specification, design and verification of software and
hardware systems” (-Butler).
- formal specification (VDM, Z, ...)
- formal development
- formal verification
- machine proofs
Isn't that way too complicated?
3.17 Lightweight formal methods
Getting the advantages of formal methods without
a big initial investment.
3.18 Alloy
A modeling tool aimed at lightweight formal methods,
especially sanity checking for software designs.
Daniel Jackson,
Software abstractions
(Cambridge: MIT Press, 2006, 2d ed. 2012).
Exploits progress in ‘model-checking software’
and SAT-checking.