A Higher (Order) Calling,
Not Yet Answered
by John P. Dougherty,
Iam looking forward to preparing again for our core course on computer or- ganization and architecture. There are
many ways to approach this topic, but I
have enjoyed starting with what might
be classified as “extreme applied discrete
mathematics.” This would include Boolean
representations and logic gates, circuits
both combinational and sequential, as well
as the reasoning techniques to abstract,
simplify, and implement a few finite state
machines, and eventually a basic single-cy-cle processor chip (all in simulation, though
we dream of FPGAs).
I realize there are many programming
languages for logic design, such as VHDL
and Verilog. Still, I like that students
“see” as much as possible the hardware,
incrementally and persistently designing,
abstracting and implementing lower level
logic. I want students to “feel” the algorithms involved in these hardware designs,
that once again there are choices to be
made, trade-offs to appreciate (and quantify as much as possible), and granularity
discussions to resolve.
Yes, we connect truth tables to Boolean
expressions to circuit logic. There is a degree of mathematical reasoning involved.
But I wonder if I can use more standard
programming to encourage students to
better make the connections between the
topics in the discrete mathematics course
and the ideas we will explore in computer organization. I genuinely believe this
approach is more scalable (i.e., useful for
current and future trends in architecture)
for the foreseeable future of the students.
Presently, I work with a few program-
ming language experts, and each has
extolled the virtues of Haskell to some
degree. There are materials that connect
Haskell with logic and mathematics already
[ 1, 2, 7]. I have yet to write more than a few
lines of code, but from what I have seen
it does resemble the way equations can
be expressed in a discrete mathematics
course, apparently as much as Scheme (in
my humble, limited opinion for now).
I also understand that Haskell is
typically introduced in the programming
language course as a lazy functional
alternative with other features. I am not
planning to utilize most of these features.
What I am hoping is that it might provide a
better way to connect discrete mathematics to computer architecture.
So why Haskell? I discovered motivations in [ 5], and I will now quote a few of
those that appear relevant to my mission.
“Haskell allows you to compute directly
with the fundamental objects of discrete
mathematics.” I hope this is “spot on,” considering that my goal is to connect discrete
mathematics with logic and reasoning in
“It is a powerful language, allowing pro-
grams that would be long and complicated
in other languages to be expressed simply
and concisely.” Brevity is always a plus, as
long as it is expressive enough for students
to recall and reason about.
“You can reason mathematically about
Haskell programs in the same way you do
in elementary algebra.” I hope this is true
as I hope for the students to connect this
reasoning to the behavior of the components of an architecture.
So, I tried the online browser-based
Haskell environment at [ 6], then another
tutorial, and then some examples. I looked
at many course sites for both discrete
mathematics and for computer architecture. Then I ran out of time for this article,
and thus for my experiment into using
Haskell with my computer architecture
course; at least, for now. I know I can always turn to more standard hardware description languages, and that may happen
(we have used register transfer language
in past offerings). But in my liberal arts
way of thinking, I hear a calling for an
answer at a higher level, and I am hoping
for something more abstract to encourage
my students to see how these concepts
connect among courses.
I wonder if I can use more standard
programming to encourage
students to better make the connections
between the topics in the discrete
mathematics course and the ideas we will
explore in computer organization.