CACM Communications of ACM 2019 February 02
CACM Communications of ACM 2019 February 02
ACM
CACM.ACM.ORG OF THE 02/2019 VOL.62 NO.02
Association for
Computing Machinery
Call for Nominations
Editor-in-Chief
ACM Books
The ACM Publications Board is seeking an Editor-in-Chief for ACM Books
(http://books.acm.org).
Established in 2012 as a series of high-quality books for the computer
science community, the ACM Books program now lists approximately 25
published titles with a similar number in preparation.
This EiC position is responsible for the editorial management of the Books
series, consistent with general ACM policies.
The Publications Board relies on the Books EiC to ensure content maintains
its exceptional quality and that the editorial process is both timely and fair.
The EiC will work with the in-house ACM editor to develop an editorial
board and appoint associate editors.
Communications video.
https://cacm.acm.org/ By Matteo Brucato, Azza Abouzied,
videos/sonyc and Alexandra Meliou
Communications of the ACM is the leading monthly print and online magazine for the computing and information technology fields.
Communications is recognized as the most trusted and knowledgeable source of industry information for today’s computing professional.
Communications brings its readership in-depth coverage of emerging areas of computer science, new trends in information technology,
and practical applications. Industry leaders use Communications as a platform to present and debate various technology implications,
public policies, engineering challenges, and market trends. The prestige and unmatched reputation that Communications of the ACM
enjoys today is built upon a 50-year commitment to high-quality editorial content and a steadfast dedication to advancing the arts,
sciences, and applications of information technology.
ACM, the world’s largest educational STA F F EDITORIAL BOARD ACM Copyright Notice
and scientific computing society, delivers DIRECTOR OF PU BL ICATIONS E DITOR- IN- C HIE F Copyright © 2019 by Association for
resources that advance computing as a Scott E. Delman Andrew A. Chien Computing Machinery, Inc. (ACM).
science and profession. ACM provides the cacm-publisher@cacm.acm.org eic@cacm.acm.org Permission to make digital or hard copies
computing field’s premier Digital Library Deputy to the Editor-in-Chief of part or all of this work for personal
and serves its members and the computing Executive Editor Lihan Chen or classroom use is granted without
profession with leading-edge publications, Diane Crawford cacm.deputy.to.eic@gmail.com fee provided that copies are not made
conferences, and career resources. Managing Editor S E NIOR E DITOR or distributed for profit or commercial
Thomas E. Lambert Moshe Y. Vardi advantage and that copies bear this
Executive Director and CEO Senior Editor notice and full citation on the first
Vicki L. Hanson Andrew Rosenbloom NE W S page. Copyright for components of this
Deputy Executive Director and COO Senior Editor/News Co-Chairs work owned by others than ACM must
Patricia Ryan Lawrence M. Fisher Marc Snir and Alain Chesnais be honored. Abstracting with credit is
Director, Office of Information Systems Web Editor Board Members permitted. To copy otherwise, to republish,
Wayne Graves David Roman Monica Divitini; Mei Kobayashi; to post on servers, or to redistribute to
Director, Office of Financial Services Editorial Assistant Rajeev Rastogi; François Sillion lists, requires prior specific permission
Darren Ramdin Danbi Yu and/or fee. Request permission to publish
Director, Office of SIG Services VIE W P OINTS from permissions@hq.acm.org or fax
Donna Cappo Art Director (212) 869-0481.
Co-Chairs
Director, Office of Publications Andrij Borys
Tim Finin; Susanne E. Hambrusch;
Scott E. Delman Associate Art Director For other copying of articles that carry a
John Leslie King; Paul Rosenbloom
Margaret Gray code at the bottom of the first or last page
Board Members
Assistant Art Director or screen display, copying is permitted
ACM CO U N C I L Michael L. Best; Judith Bishop; Andrew W. Cross;
Mia Angelica Balaquiot provided that the per-copy fee indicated
President James Grimmelmann; Mark Guzdial;
Production Manager in the code is paid through the Copyright
Cherri M. Pancake Haym B. Hirsch; Richard Ladner;
Bernadette Shade Clearance Center; www.copyright.com.
Vice-President Carl Landwehr; Beng Chin Ooi;
Intellectual Property Rights Coordinator
Elizabeth Churchill Francesca Rossi; Loren Terveen;
Barbara Ryan Subscriptions
Secretary/Treasurer Marshall Van Alstyne; Jeannette Wing;
Advertising Sales Account Manager An annual subscription cost is included
Yannis Ioannidis Susan J. Winter
Ilia Rodriguez in ACM member dues of $99 ($40 of
Past President
Alexander L. Wolf which is allocated to a subscription to
Chair, SGB Board Columnists P R AC TIC E Communications); for students, cost
Jeff Jortner David Anderson; Michael Cusumano; Co-Chairs is included in $42 dues ($20 of which
Co-Chairs, Publications Board Peter J. Denning; Mark Guzdial; Stephen Bourne and Theo Schlossnagle is allocated to a Communications
Jack Davidson and Joseph Konstan Thomas Haigh; Leah Hoffmann; Mari Sako; Board Members subscription). A nonmember annual
Members-at-Large Pamela Samuelson; Marshall Van Alstyne Eric Allman; Samy Bahra; Peter Bailis; subscription is $269.
Gabriele Anderst-Kotis; Susan Dumais; Betsy Beyer; Terry Coatta; Stuart Feldman;
Renée McCauley; Claudia Bauzer Mederios; C O N TAC T P O IN TS Nicole Forsgren; Camille Fournier; ACM Media Advertising Policy
Elizabeth D. Mynatt; Pamela Samuelson; Copyright permission Jessie Frazelle; Benjamin Fried; Tom Killalea; Communications of the ACM and other
Theo Schlossnagle; Eugene H. Spafford permissions@hq.acm.org Tom Limoncelli; Kate Matsudaira; ACM Media publications accept advertising
SGB Council Representatives Calendar items Marshall Kirk McKusick; Erik Meijer; in both print and electronic formats. All
Sarita Adve; Jeanna Neefe Matthews calendar@cacm.acm.org George Neville-Neil; Jim Waldo; advertising in ACM Media publications is
Change of address Meredith Whittaker at the discretion of ACM and is intended
BOARD C HA I R S acmhelp@acm.org to provide financial support for the various
Letters to the Editor activities and services for ACM members.
Education Board C ONTR IB U TE D A RTIC LES
letters@cacm.acm.org Current advertising rates can be found
Mehran Sahami and Jane Chu Prey Co-Chairs
by visiting http://www.acm-media.org or
Practitioners Board James Larus and Gail Murphy
W E B S IT E by contacting ACM Media Sales at
Terry Coatta Board Members
http://cacm.acm.org (212) 626-0686.
William Aiello; Robert Austin; Kim Bruce;
REGIONA L C O U N C I L C HA I R S Alan Bundy; Peter Buneman; Jeff Chase;
WEB BOARD Single Copies
ACM Europe Council Carl Gutwin; Yannis Ioannidis;
Chair Single copies of Communications of the
Chris Hankin Gal A. Kaminka; Ashish Kapoor;
James Landay ACM are available for purchase. Please
ACM India Council Kristin Lauter; Igor Markov; Bernhard Nebel;
Board Members contact acmhelp@acm.org.
Abhiram Ranade Lionel M. Ni; Adrian Perrig; Marie-Christine
Marti Hearst; Jason I. Hong;
ACM China Council Rousset; Krishan Sabnani; m.c. schraefel;
Jeff Johnson; Wendy E. MacKay COMMUN ICATION S OF THE ACM
Wenguang Chen Ron Shamir; Alex Smola; Josep Torrellas;
Sebastian Uchitel; Hannes Werthner; (ISSN 0001-0782) is published monthly
AU T H O R G U ID E L IN ES by ACM Media, 2 Penn Plaza, Suite 701,
http://cacm.acm.org/about- Reinhard Wilhelm
PUB LICATI O N S BOA R D New York, NY 10121-0701. Periodicals
Co-Chairs communications/author-center postage paid at New York, NY 10001,
RES E A R C H HIGHLIGHTS
Jack Davidson; Joseph Konstan and other mailing offices.
Board Members Co-Chairs
ACM ADVERTISIN G DEPARTM E NT Azer Bestavros and Shriram Krishnamurthi
Phoebe Ayers; Edward A. Fox; Chris Hankin; 2 Penn Plaza, Suite 701, New York, NY POSTMASTER
Xiang-Yang Li; Nenad Medvidovic; Board Members
10121-0701 Please send address changes to
Sue Moon; Michael L. Nelson; Martin Abadi; Amr El Abbadi; Sanjeev Arora;
T (212) 626-0686 Communications of the ACM
Sharon Oviatt; Eugene H. Spafford; Michael Backes; Maria-Florina Balcan;
F (212) 869-0481 2 Penn Plaza, Suite 701
Stephen N. Spencer; Divesh Srivastava; David Brooks; Stuart K. Card; Jon Crowcroft;
New York, NY 10121-0701 USA
Robert Walker; Julie R. Williamson Alexei Efros; Bryan Ford; Alon Halevy;
Advertising Sales Account Manager Gernot Heiser; Takeo Igarashi; Sven Koenig;
Ilia Rodriguez Greg Morrisett; Tim Roughgarden;
ACM U.S. Public Policy Office ilia.rodriguez@hq.acm.org Printed in the USA.
Adam Eisgrau, Guy Steele, Jr.; Robert Williamson;
Director of Global Policy and Public Affairs Margaret H. Wright; Nicholai Zeldovich;
Media Kit acmmediasales@acm.org
1701 Pennsylvania Ave NW, Suite 300, Andreas Zeller
Washington, DC 20006 USA
Association for Computing Machinery S P EC IA L S EC TIONS
T (202) 659-9711; F (202) 667-1066
(ACM) Co-Chairs
Computer Science Teachers Association 2 Penn Plaza, Suite 701 Sriram Rajamani and Jakob Rehof A
SE
REC
Y
CL
PL
Executive Director T (212) 869-7440; F (212) 869-0481 Tao Xie; Kenjiro Taura; David Padua
NE
TH
S
I
Z
I
M AGA
DOI:10.1145/3302011
A
the special section
S I RE A D plications of technology in society. We More to Learn
on the China Region (Nov. should be suspicious of government About Machine Learning
2018), I thought privacy agencies and regulators redefining pri- In their Viewpoint “Learning Machine
in China deserved bet- vacy or downgrading it or citing nation- Learning” (Dec. 2018), Ted G. Lewis
ter treatment than was al security to make such applications fit and Peter J. Denning used a Q&A for-
expressed in the section’s foreword their agenda. A similar observation can mat to address machine learning and
“Welcome to the China Region Spe- be made about privately run corpora- neural nets but, in my view, omitted
cial Section” by co-organizers Wen- tions as well, especially social networks. two fundamental and important ques-
guang Chen and Xiang-Yang Li, that Articles and columns in Commu- tions. The first is:
“People in China seem less sensitive nications should include, along with Q. Is machine learning the best way
about privacy.” It sounded almost technological achievement, consider- to get the most reliable and efficient
identical to what Robin Li, CEO and ations on how they might be abused solution to a problem?
co-founder of Baidu, said in a talk at and the lessons that should be learned A. Not generally.
the March 2018 China Development when they are. It would mean extra To explain my answer, I need a defi-
Forum that was not well received by work for every author, as well as in- nition of “machine learning.” Machine
China’s Internet users.2 creased reader skepticism, but would learning is a machine collecting data
A March 2018 survey of 100,000 surely increase awareness. while providing service and using the
Chinese households by CCTV and Ten- As a New Year’s resolution, I re- data to improve the speed or accuracy of
cent Research reported 76.3% of par- spectfully invite everyone to read or re- the service. This is neither new nor un-
ticipants view AI as a threat to privacy.1 read the ACM Code of Ethics and Pro- usual. For example, a search program
Other global privacy surveys, including fessional Conduct (https://www.acm. can reorder its search list to move the
one by KPMG, reported privacy aware- org/code-of-ethics), especially sections most frequently requested items toward
ness in China as far more prevalent 1.1, 1.2, and 1.6, and incorporate it into the top of the list. This improves per-
than the authors seemed to imply. their research and professional prac- formance until there is a major change
One of the few critical notes in the tice, especially those with authority in the probability of the items being
special section came near the end of the and influence—or who publish in its requested. When this happens, perfor-
Elliott Zaagman’s article “China’s Com- leading publication. mance may degrade until the machine
puting Ambitions” when it called the “learns” the new probabilities. Sugges-
References
lack of (Western-style) legal protections 1. Hersey, F. Almost 80% of Chinese concerned about
tions offered by a search engine are also
and transparency “a real concern.” This AI threat to privacy, 32% already feel a threat to based on data collected while serving
their work. TechNode (Mar. 2, 2018); https://technode.
was followed by a quote on the weakness- com/2018/03/02/almost-80-chinese-concerned-ai- users; the search engine uses the data to
es of more-open digital societies. When threat-privacy-32-already-feel-threat-work/ “learn” what users are likely to ask.
2. Li, R. Are Chinese people ‘less sensitive’ about
lack of privacy rights was mentioned privacy? Sixth Tone (Mar. 27, 2018); http://www. When machine learning is used to
elsewhere in the special section, it was sixthtone.com/news/1001996/are-chinese-people- “discover” an algorithm, it may find a
less-sensitive-about-privacy%3F
described as “an accepted observation.” local optimum, or an algorithm that is
Feng Chucheng of risk-analysis firm incent Van Den Berghe,
V better than similar algorithms but very
Blackpeak, said, “Rather than simply Leuven, Belgium different from a much better one. A hu-
reflecting [the status quo] that privacy man who took the time to understand
protections are not well-developed in the situation might find that algo-
this society, [Baidu] should be leading Response from the Editor-in-Chief rithm. Machine learning is often a lazy
the charge to improve privacy rights.”2 Van Den Berghe’s letter raises a good programmer’s way to solve a problem.
Perhaps the professors and analysts point—that articles discussing technology Using machine learning may save the
who contributed articles to the sec- can and should be enriched by discussion programmer time but fail to find the
tion should have tried to do the same. of their societal context, including potential best solution. Further, the trained net-
It would not have detracted from the abuses. I am pleased to see this topic being work may fail unexpectedly when it en-
quality of their articles. raised in the context of the China Region counters data radically different from
The “West” itself shows signs of mov- special section and believe it applies much its training set.
ing toward being a surveillance society, more broadly, both globally and across The second Q&A pair Lewis and
and no amount of “privacy rights” will a variety of topics. This is an important Denning should have addressed con-
change that historical direction. More challenge to Communications authors. I am cerns “neural networks”:
than a few Western governments are sure they will rise to it. Q. If developers have constructed
actually envious of China’s unique ap- Andrew A. Chien, Chicago, IL, USA (or simulated) a physical neural net-
work and trained it to have the behav- reason beyond the standard criterion— evant data and would contribute to the
ior they want, is it possible to replace it technical merit of the papers. health of the field of computer science.
with more conventional hardware and Although the title of the Viewpoint Paul B. Schneck, Bala Cynwyd, PA, USA
software with the same behavior? referred specifically to computer sci-
A. Yes. ence conferences, Cabot et al. pointed
In other words, there is no problem out that the database of papers they Authors Respond:
that can be solved using neural nets included in their survey was limited We agree there is no evidence that opening
that could not be solved using other to the area of computer software. They up conferences increases their technical
more conventional hardware and pro- should thus have limited any conclu- quality, at least not right away, but believe it
gramming languages. Some claim the sions to conferences likewise devoted is still an important goal for the community
neural net will be faster (or more ef- to computer software. and one that will prove beneficial in the
ficient in some sense), an assertion They defined newcomer papers long term. We also agree an extended data
that remains to be proved. Any perfor- as “ … research papers where all au- analysis would be beneficial to continue the
mance advantage observed today can thors are new to the conference; that discussion. We hope the column triggers it
be attributed to the highly parallel spe- is, none of the authors has ever pub- and generates replication studies and some
cialized processors used to implement lished a paper of any kind in that pressure on conference managements to
the nets. Better performance can often same conference.” This brings up two release additional (anonymized) data.
be obtained by programming the hard- problematic analytical issues. First, Jordi Cabot, Barcelona, Spain,
ware directly. is newcomer status binary? That is, Javier Luis Cánovas Izquierdo,
David Lorge Parnas, Ottawa, Canada does publication of a single paper in a Barcelona, Spain, and
conference render a newcomer author Valerio Cosentino, Madrid, Spain
(to use their phrase) a “member of the
Authors Respond: community?” Second, how different
Given the space, we would have answered would their statistics have been if they Home Monitoring for Parkinson’s
Parnas’s provocative questions much the had used a data-collection period dif- Patients Already . . .
same way he did. We would have added ferent from the seven years on which Near the end of Leah Hoffman’s interview
how difficult it is to beat the performance they based their analysis? These ques- with Dina Katabi “Reaping the Benefits of
of neural networks on special-purpose tions went unanswered. a Diverse Background” (Oct. 2018), Kata-
hardware. We also cannot ignore AlphaGo, Moreover, they said, “ … analysis bi said, “I couldn’t tell you if . . . we
the machine that played against itself for suggests that newcomer paper sub- should change the dose of her Parkin-
several days with no outside information missions represent at least one-third son’s medication.” In fact, the winner of
and became a grandmaster at Go. The of the total number of submissions” the 2018 Human-Competitive Award at
previous IBM chess supercomputer based on the data of one of the View- the ACM Genetic and Evolutionary Com-
was carefully designed by industrious point authors as a member of the putation Conference in Kyoto, Japan
programmers over many years. Speed to program committee of four software (see http://www.human-competitive.org/
solution is a powerful motivator, even if the conferences. We cannot ignore the awards) has already done just that.
solution may not be understandable. potential correlation among the con- The prize went to Stephen L. Smith,
Ted G. Lewis and Peter J. Denning, ferences where he was a committee a senior lecturer in the Department of
Monterey, CA, USA member. It thus seems unreasonable Electronics in the University of York,
to conclude the data suggests anything York, U.K., for a home-monitoring de-
about the set of 65 conferences cov- vice for Parkinson’s dyskinesia (invol-
No Lack of Newcomer ered in the study survey. Further, their untary muscle movement).1 ClearSky’s
Authors at CS Conferences suggestion that at least one-third of LID-Monitor, which includes novel
Jordi Cabot et al. first outlined their submissions are from newcomer au- signal processing developed through
hypothesis about lack of “newcomer” thors was weakened by their later con- Cartesian genetic programming, re-
authors being accepted at computer jecture that “some potential newcom- ports the severity of shaking associated
science conferences in their Viewpoint ers refrain from submitting in the first with the disease to the patient’s medi-
“Are CS Conferences (Too) Closed Com- place,” saying, “[t]he overall presence cal team, assisting in setting the correct
munities?” (Oct. 2018) and then, seeking of newcomers decreases over time.” dose of Levodopa.
data to evaluate it, succumbed to confir- This suggests that either newcomers
mation bias, unintentionally undermin- are becoming “established members Reference
1. Lones, M.A. et al. A new evolutionary algorithm-based
ing their own hypothesis. Their stated of the conference community” or the home-monitoring device for Parkinson’s dyskinesia.
objective of “opening up” computer sci- Journal of Medical Systems 41, 11 (Nov. 2017), article
field itself is shrinking. The possibility 176; http://doi.org/10.1007/s10916-017-0811-7
ence conferences may be a laudable so- of computer software research shrink-
cial goal, but they presented no evidence ing is unlikely. W.B. Langdon, London, U.K.
that the technical quality of conferences It is thus not apparent there is a
would be enhanced by doing so. More- “problem” involving lack of newcom- Communications welcomes your opinion. To submit a
Letter to the Editor, please limit yourself to 500 words or
over, they presented little, if any, com- ers submitting papers to computer less, and send to letters@cacm.acm.org.
pelling evidence that the claimed lack science conferences or that Cabot et
of newcomer submissions is due to any al.’s suggestions are supported by rel- © 2019 ACM 0001-0782/19/02
DOI:10.1145/3297799 http://cacm.acm.org/blogs/blog-cacm
Humanities,
the 1970s, replaced analog slide rules
and digital mechanical calculators with
digital electronic computers. For many
deal with well-educated and competent consultant. Subsequently we see attenu- lie? Garrath Williams’s treatment of the
people. Whereas most clients are coop- ation of commitment, where follow-up notion of responsibility1 notes the emer-
erative and grateful, some are brusque tasks are put aside until a better time, gence of that notion only in the last two
and demanding, some are apologetic the initial momentum fades away, and or three centuries, a brevity consistent
and jocular, many are just not listening. the skills necessary for effective partici- with the lack of scholarship on client
On the tech support side, malfea- pation decay. This leads to an adversari- responsibility (also raising the ques-
sance includes overexplanation, under- al stance, where frustration morphs into tion whether there really is any such
explanation, incorrect explanation, and resentment. Whose fault is this? thing). He locates responsibility not in
impatience, all transgressions of which I Although there is plenty of research the person, but in the multifarious mod-
have been guilty from time to time. Why and commentary on the responsibility ern world. “What is central is the moral
is this all so difficult? As the perceived of the vendor, there appears to be no in- division of labor created by our institu-
burdens of technology build up on users, quiry into the responsibility of the con- tional fabric. This scheme of coopera-
cheerful cooperation gives way to weary sumer with respect to technology selec- tion delimits the normative demands
resignation and then to foot-dragging tion, mastery, and use. Should there be? upon each of us, by defining particular
resentment. And this against an activity Let’s interrogate some analogies: We spheres of responsibility. Given the flu-
that is for their own good! Users resist impose a minimal degree of responsi- idity, plurality and disagreement associ-
reading manuals, or even short instruc- bility on someone checking a book out ated with normative demands in mod-
tions, let alone working through a check- of a library—he or she should return it. ern societies, this limitation is crucial.”
list, though learning the fundamentals The reading of it may a norm, not an ob- If there is a limit on each sphere of
would help them immensely. I have of- ligation. We impose a high degree of re- responsibility, then there should be a
fered the briefest possible explanations sponsibility for driving a car, because it boundary on user support. Right now,
of the client-server environment (“where can kill people. We expect some degree no one understands the proper extent of
your programs run”), HTML URLs (“how of responsibility in the use of natural re- support; no limiting structure is defined
to reach websites”), and cloud storage sources, because the effects are broadly for the benefit of user or support staff.
(“where your files are stored”), to no dispersed. In domestic finances and To define such a limit is to grant support
avail. Direct orders, such as “Read this” budgeting, we assume the agent eventu- staff authority to demur. Unthinkable
or “Practice this,” even to people who are ally will achieve independence, making as it may seem, modern technological
sincerely motivated (no matter their in- unaided decisions and taking appropri- society needs to consider, define, and
telligence, job satisfaction, rank, or per- ate actions, out of self-interest. It’s not sanction a point at which consultants
sonality), have no effect. I have gradually clear that any of those inform our view of can say “no.” Better yet, they won’t need
come to the unsettling belief that this is the products of technology. Indeed, the to, because everyone will understand
not just exasperating, but revealing. (We very idea that software and hardware us- the limits; everyone will know where
acknowledge without comment the obvi- ers have any responsibility toward their user support ends and user responsibil-
ous possibility that I, and my fellow user technology appears to stand in direct ity begins. Everyone will know that the
support professionals, are just lousy in- conflict to pervasive expectations on manual should be read (and should be
structors or repellent individuals.) their part, as expressed thus: written in the first place), and they will
On the happy assumption that the This is a nuisance. know from accepted and ingrained cul-
average reader thinks the philosophy of My duties involve real things, where- tural mores rather than from simply be-
computer science deals with lofty issues, as this is just management of those ing told so by pesky IT people.
this may seem pedestrian. Yet a problem things, not what I signed up for. Record But we can’t work that out here and
so perplexing and intractable is ripe for a keeping and bean counting should not now! In the best case, the tribulation of
bit of philosophy. We might learn some- take time from the job. tech help is a temporary issue, reflecting
thing about education or training from This is clerical. workplace stress in the face of upheaval,
its apparent failure in such cases and These tools are complex, sure, and similar to legal and safety compliance
thereby something about intelligence. they require skill, the kind of skill embod- demands. The problem will resolve as
We might learn something about the ied in a good secretary, who can handle te- society grasps tech more firmly; that,
acceptance of responsibility from its ap- dium, the quirks, and the exceptions. But however, will take time. We wait for the
parent failure in such cases and thereby I deliberately avoided that career. emergence of norms of responsibility in
something about ethical duty. This is supposed to be easy. this and other aspects of technology.
As we look more closely (at naive us- These products are supposed to
ers, at technically competent users, and magically improve my life—vocational, Reference
even at us experts when we are faced social, and intellectual—immediately 1. Williams, G. Responsibility as a Virtue. Ethical Theory
with new technology), we see a reluc- and Moral Practice. 11:4, 455-–470.
and painlessly. (This attitude, of course, DOI: 10.1007/s10677-008-9109-7.
tance to learn definitions, commands, is cultivated by technology vendors and
good practices, and workflow. The hap- promoters.) Because the product is fab- Herbert Bruderer is a retired lecturer in didactics
less user does not build the cognitive ulous, and intended explicitly for me, of computer science at ETH Zürich. Robin K. Hill is
a lecturer in the Department of Computer Science
scaffolding necessary to organize the the trouble must lie with IT. and an affiliate of both the Department of Philosophy
concepts, so does not grasp which fea- There’s not much in those expecta- and Religious Studies and the Wyoming Institute for
Humanities Research at the University of Wyoming.
ture is relevant to what; that context is tions that can be corrected by user sup-
then even farther out of reach for the port staff. So where does responsibility © 2019 ACM 0001-0782/19/2 $15.00
DEBS 2019
24 –28th June, 2019
Darmstad�um, Schlo�graben 1, ��2�� Darmstadt, �ermany
iIn�orma�on-Centric Networking
iResearch and industry paper February 26th, 2019
iMachine Learning and its Applicability submission
iProgrammable hardware and its impact on
efficient event processing
iTutorial submission March 22nd, 2019
iBusiness Processes and Event Processing
iIn-Network Processing in Distributed and i�rand challenge solu�on April 7th, 2019
Networked Systems submission
iMul�media Analy�cs and Event-Based iAuthor no��ca�on research April 9th, 2019
Systems and industry track
iSmart Contracts and Blockchains iDoctoral symposium poster & April 22nd, 2019
demo submissions
A
LTERING THE GENETIC code
of plants and animals is
not a job for the faint of
heart. Nevertheless, in re-
search labs around the
world, scientists are increasingly peer-
ing into the cellular structures of living
things—and recombining DNA and
RNA molecules to produce everything
from new tomatoes to new medicines.
“The tools and technologies used for
viewing and manipulating genetic ma-
terials have become more widely avail-
able and much easier to use,” observes
George Church, a professor of genetics
at Harvard Medical School and a pio-
neer in genomic research.
It is no small matter, even if the
matter involved is at the molecular
level. CRISPR, a powerful gene-
editing toolkit, is advancing the field
of programmable biology by leaps
and bounds. It allows researchers to
reconfigure genes and create new ver-
sions of things. Another technology,
cryo-electron microscopy (Cryo-EM),
IMAGE BY YURC HA NKA SIA RHEI
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 11
news
and Cell Biology at the University of says Nogales, who visualizes CRISPR but this will likely change over the
California, Berkeley, and senior fac- molecules using cryo-EM. coming years.”
ulty scientist at Lawrence Berkeley For example, Synthego, which Church Further advances in software and
National Laboratory. “CRISPR and is affiliated with, has introduced kits de- algorithms will drive smarter and
Cryo-EM allow researchers to perform signed to address different gene editing better gene editing tools, Nogales
an array of tasks faster and better.” tasks. Its $1,495 Gene Knockout Kit adds. For instance, Inscripta, head-
Adds Richard Henderson, re- (GKO) drops powerful capabilities into quartered in Boulder, CO, has focused
search scientist at the Medical Re- the hands of researchers. It taps predic- on developing a biological genetic en-
search Counsel Laboratory of Molec- tive software and automation tools that gineering framework that resembles
ular Biology in Cambridge, U.K., and help a researcher select a human gene to the all-in-one capabilities of a personal
a recipient of the 2017 Nobel Prize in modify. It then applies a synthetic RNA computer, while San Francisco-based
Chemistry for his pioneering work on gene to direct a protein to the specific Twist Biosciences is developing a sys-
Cryo-EM, “We are at the cusp of re- location required for a DNA cut. The tem that places custom strands of syn-
markable advances in agriculture, firm claims this toolkit has boosted the thetic DNA—the As, Ts, Cs, and Gs that
medicine, and many other fields. accuracy of CRISPR editing methods serve as building blocks for biology—
These technologies will reshape sci- from around 50% to as much as 80%, or on semiconductor chips. This allows
ence and the world.” even more. The net result is an ability to researchers to make up to a million
cycle through variations of edited genes CRISPR edits with a single chip, rather
Cracking the Code on CRISPR faster, speeding research and develop- than using multiple systems and soft-
In only a few short years, the ability to ment for new procedures and drugs. ware to accomplish the task. The com-
reengineer the genetic structure of liv- Paul Dabrowski, co-founder and CEO pany’s self-described “smart algo-
ing things has moved from obscure re- of Redwood City, CA-based Synthego, rithm” informs users within seconds
search labs to the mainstream of sci- has said the firm’s gene editing system whether the sequence they are testing
ence. CRISPR, which stands for reduces the time it takes for a scientist to can be synthesized.
Clustered Regularly Interspaced Short perform gene edits from several months
Palindromic Repeats, beckons with the to approximately one month. This, he Cryo-EM Enters the Picture
promise of producing better tomatoes, has noted, helps researchers focus on re- Although gene editing has introduced
insect-resistant grains, malaria-resis- sults and outcomes, rather than the me- powerful capabilities into the research
tant mosquitos, and new types of phar- chanics of an experiment. lab, scientists continue to struggle with
maceutical drugs to combat conditions Nogales says that while CRISPR understanding the mechanical func-
ranging from sickle cell anemia and tools fundamentally change the na- tions of basic biological structures.
Alzheimer’s disease to cancer. Users ture of research, they also present From the invention of the microscope
can perform direct operations on challenges. For one thing, because in the 13th century to more advanced
genes by modifying and recombining of uncertainty about errors caused forms of electron microscopy, improv-
molecular structures. “As the tech- by systems, CRISPR is not yet been ing resolution and reducing noise—
nology has advanced, the need to approved for medical use by the U.S. particularly at extremely high levels of
build everything from scratch in a Food and Drug Administration. For magnification—has proved vexing.
lab has been replaced with commer- another, there is a learning curve as- “Obtaining clearer images is an ongo-
cially available products that produce sociated with the technology. “Mak- ing challenge,” states Craig Yoshioka,
effective results,” Church says. ing a cut in the wrong place could be research assistant professor and co-di-
Indeed, commercial firms with very deleterious. This is one of the rector of the Pacific Northwest Cryo-
names like Synthego, Inscripta, and reasons why CRISPR is used for agri- EM Center at Oregon Health Sciences
Twist Biosciences have developed kits culture more than human treatment, University (OHSU) in Portland, OR.
that advance gene editing in much For instance, one issue with cryo-
the way same way visual program- electron microscopy is that bombard-
ming replaced the need to manually “We are at the cusp of ing a frozen sample with electrons can
write endless lines of code for some vaporize the specimen. As a result, Yo-
software application. Although these remarkable advances shioka says, scientists must essential-
firms take aim at the task through ap- in agriculture, ly collect their images in “low light,”
proaches that range from providing thereby reducing specimen damage,
molecular resources to computation- medicine, and many but also resulting in noisy data. The
al tools in software packages, the other fields. These resulting noise makes it more difficult
common denominator for the end- to view the behavior of the molecules
technologies will
user is an ability to conduct research and understand how they react to dif-
faster, more effectively, and at a lower reshape ... the world.” ferent conditions.
cost. In fact, gene-editing tools that Meanwhile, another technique,
once had a price tag extending into called X-ray Crystallography, can pro-
the billions of dollars are now avail- duce a three-dimensional (3D) image of
able for less than $1,000. Essentially, a molecular structure at high resolu-
“Any cell biology lab can use CRISPR,” tion by measuring how diffracted X-ray
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 13
news
Technologizing
Agriculture
An array of technologies are making farms
more efficient, safer, and profitable.
A
G R I C U LT U R A L BUSINESSES
usually have a massive
number of trackable as-
sets (plants, livestock, and
machinery), often oper-
ate in wide geographic areas in which
these assets are located, and are sub-
ject to operational factors often be-
yond their control, such as the amount
of sunlight or rainfall they receive, or
temperature fluctuations. As such,
agriculture is ripe for the adoption of
new technologies to help monitor and
manage assets on a granular level, and
everything from Internet of Things
(IoT) sensors, robots, and drones are
being used by farms around the globe.
The U.S. Department of Agricul-
ture’s National Institute of Food and
Agriculture notes that the farms of to-
day are avid users of agriculture tech-
nologies such as robots, temperature
and moisture sensors, aerial imaging,
and GPS technology, which are more A robotic tractor (left) cultivates a field alongside a tractor operated by a human, during a
precise and efficient than humans demonstration in Fukushima, Japan.
alone, and allow for safer, more effi-
cient, and more profitable operations. founder of Root AI, a company devel- the side of the robot to provide a visual
One example of how technology en- oping a robotic platform that allows frame of reference.
ables new farming techniques is the the inspection, analysis, and harvest- The platform uses a customized
use of robotic harvesting on indoor ing of leafy vine plants grown indoors, convolutional neural network to de-
farms, which today account for a tiny such as tomatoes. “[A lot] of work has tect objects of interest and label them
fraction of the 900 million acres of tra- been done specifically in precision with bounding boxes, which are used
ditional farmland in the U.S. However, agriculture. ‘How do I reduce the to train and build up the system’s
these indoor farms are well suited to amount of herbicide; how do I reduce knowledge. While rolling between
the growth of vegetables such as toma- the amount of pesticide?’” rows of plants, the camera captures
toes, lettuce, and other leafy greens, Lessing notes indoor agricultural the location of each fruit or vegetable,
are highly sustainable, generally fea- practices expands a farm’s margins, be- while also measuring properties such
ture an average yield per acre more cause less is spent on pesticides, since as ripeness, size, and quality grading.
than 10 times higher than that of out- insects can be kept out of the green- The data capture is done in real time,
door farms, and represent a continua- house. Furthermore, reducing the use on the robot itself, without requiring
PHOTO BY KYODO NEW S VIA GETT Y IMAGES
tion of the agricultural sector’s trend of chemicals can also limit the environ- access to a data center or the cloud.
toward incorporating precision agri- mental impact of the operation. The robot also uses a soft gripper,
culture techniques to improve yields Root AI’s robot uses multiple cam- which looks like a pair of plastic salad
and become more sustainable. eras to collect color images and three- tongs, that can pick a fruit or vegetable
“Whether it’s indoor or outdoor dimensional (3D) depth information without damaging it. The idea is to al-
farmers, finding technologies that on growing plants. One camera is lo- low the cultivation of these types of
drive efficiencies is a big deal for cated in the arm of the robot itself, plants continuously and more effec-
[farmers],” says Josh Lessing, co- while a secondary camera is affixed to tively than humans can do, while aug-
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 15
news
but the company expects that as time The sensor has sold more than 25,000
goes on and the FAA becomes more units, and the company also offers two
comfortable with drones, other com- Livestock other applications, including Breedma-
mercial drone operators—and eventu- management also nager, a free herd management soft-
ally farmers themselves—will be able ware app that displays the herd based
to fly drones over a wider expanse be- is changing, as on breeding status; and Mooheat, a col-
yond visual contact. managers monitor lar worn by a bull, along with a RFID ear
However, drones are hardly the only tag for each cow or heifer, that can pro-
technology that allow agricultural as- herds in real time vide detailed information such as exact
set monitoring and management. Us- with Internet- times of standing heat, due dates, and
ing IoT-connected sensors placed near in-calf notifications.
plants, farm operators can capture and connected collars GlobalSign’s Desai notes that this
record environmental conditions, and and tags. type of tagging can be used to keep
then send the data back to the farm’s track of livestock herds across a wide
data center for analysis and action via grazing area. “We have a customer who
a wireless connection. In some farming is providing a solution for automated
regions, there is a robust commercial cattle tracking across a large ranch,”
wireless network (or networks) that can Desai says. “What we came up with as a
serve as a backbone for IoT-connected smart tractors and harvesters, which solution, for lack of better terms, is like
sensors, and agriculture companies can include automated functionality, a Fitbit for cows,” with tracking collars
simply need to purchase and place sen- allowing them to easily “carry” the net- with signed and encrypted certificates
sors throughout their fields. While they work wherever they are working with- affixed to cows in the herd, to ensure
need a sophisticated data capture and out requiring a pre-built networking data cannot be stolen and used by ma-
analytics solution in order to leverage infrastructure. levolent third parties. Information on
the data captured, farms like those in “The producers in Latin America, cattle movement, individually and col-
the U.S. are generally able to quickly specifically in Brazil, do not have con- lectively, is collected and analyzed to
cover their harvesting area and begin nectivity in the field,” says Joeval Mar- determine whether a specific animal or
to yield real insights by capturing data tins, Rajant channel sales director for group of animals have been separated
from the sensors, and acting on those Latin America. Martins explains that from the herd, or are ill or injured.
insights immediately. Rajant’s mobile wireless networking “The technology greatly reduces
However, in other parts of the world, technology is a more affordable build- the amount of human intervention
particularly in developing regions such ing out a fixed network that covers the or human labor actually required
as South America, Africa, and parts of entire acreage of a farm. to go and check on these animals,”
Asia, commercial wireless coverage is Food production is not limited to Desai says, reducing labor costs and
not ubiquitous, as in low-population crops. The management of livestock increasing efficiency and margins for
areas where much of the farming and is also changing, as managers of cows, the producer.
harvesting is done. Rajant Corp. of Mal- hogs, and other animals seek to moni-
verne, PA, is a provider of wireless mesh tor their herds in real time, using
Further Reading
networking technology that works with Internet-connected collars and tags.
large agriculture companies in South Moocall’s Calving Sensor was devel- TongKe, F.
Smart Agriculture Based
America to provide the connectivity re- oped in 2014 by founder Niall Austin,
on Cloud Computing and IOT,
quired to monitor the huge fields of sug- who lost a heifer and her calf during Journal of Convergence Information
ar cane, soybean, corn, and other agri- a difficult birth. Noting that cows’ tail Technology, January 2013,
culture crops, which are often located in movement often predicts the onset https://pdfs.semanticscholar.org/62ee/
remote areas with no wireless coverage. of calving, Austin and his partners b701c40626811a1111ca5d1db37650f1ea0b.
pdf
Through the use of Rajant’s mo- launched the Calving Sensor, which
bile mesh networking technology, in- clips on the tail of the cow. Luciano, M.
Satisfying Three Necessary Components for
telligent nodes called BreadCrumbs “Based on the movement of the
BVLOS Flight,
can be spread out across the fields to tail and the temperature reading, it Wireless Design Magazine, May 9, 2018,
capture a variety of attributes, includ- detects when the cow is actually calv- https://www.wirelessdesignmag.com/
ing soil nutrient content, soil pH, and ing, and it sends an SMS to the farmer, blog/2018/05/satisfying-three-necessary-
moisture levels that can be tracked who then immediately takes action,” components-bvlos-flight-operations
in real time, and alerts can signal says Ludovico Fassati, Head of IoT, Vo- Root AI-Reveal
farmers when a correction is needed. dafone Americas, which provides the August 8, 2018
https://www.youtube.com/watch?v=c-
Farmers can then make the necessary wireless infrastructure for the service.
JduOfLEpc
adjustments by adding chemicals, “In the past, the farmer needed to kind
water, or nutrients during the prime of sleep with the cow, but now, he can Keith Kirkpatrick is principal of 4K Research &
growing season. be there only when needed. It optimizes Consulting, LLC, based in Lynbrook, NY, USA.
Moreover, the mesh networking the farmer’s time,” and can reduce the
technology can be integrated with mortality rate of the calving process. © 2019 ACM 0001-0782/19/2 $15.00
Being Recognized
Everywhere
How facial and voice recognition are reshaping society.
T
HANKS TO ADVANCES in artifi-
cial intelligence (AI), society is
now facing a unique challenge:
how do we regulate the usage
of human faces and voices?
Facial recognition is the ability of
computer systems to identify and us by
our faces. Voice recognition is the abil-
ity of computer systems to do the same
for our words. Both are powered by AI,
and both create benefits for consum-
ers and citizens.
These technologies also raise diffi-
cult questions about privacy and per-
sonal rights.
Voice recognition powers popular
consumer devices like Siri and Alexa,
but it is also possible these devices are
surreptitiously logging conversations
and providing law enforcement with
information on individuals.
Consider: Amazon sold 2.5 million
of its Echo voice-assisted devices in the
first quarter of 2018, according to Geek- A Transportation Security Administration (TSA) screener uses a biometric facial recognition
Wire, while Google sold 3.2 million of scanner on a traveler at Washington Dulles International Airport.
its Google Home devices. Both devices
represent one of the main ways that in- In an age where technology can rec- to identify specific human faces in
dividuals are being listened to by ma- ognize you everywhere, visually or audi- photos or video. This technology can
chines and, in turn, by the makers of bly, how do you retain your privacy and identify and log facial details of indi-
those machines. personal agency? viduals by using cloud infrastructure
Facial recognition can be used by “Digitization facilitates the tracking to process images from a computer,
law enforcement to identify crimi- of everything we do online,” says Ei- smartphone, or camera. This infor-
nals faster, but it is also used by the leen Donahoe, executive director of the mation then may be used for a range
Chinese government for mass surveil- Global Digital Policy Incubator at Stan- of purposes, from recommending
lance of its citizenry. ford University’s Center for Democra- someone to tag on Facebook to catch-
Facebook alone has more than two cy, Development, and the Rule of Law. ing criminals.
PHOTO BY BILL O’ LEARY/TH E WASH INGTO N POST VIA GETT Y IMAGES
billion monthly active users, and any “If everything we do can be tracked and For instance, Amazon has sold fa-
of them who post photos are subject monitored by government, it will have cial recognition technology to U.S.
to the firm’s facial recognition algo- a chilling effect on what we feel free to law enforcement, where it is used to
rithms, which identify and suggest say, with whom we feel free to meet, identify persons of interest. It is also
tags to users. This is to say nothing and where we choose to go. used for mundane functions like
of widespread video surveillance “This loss of privacy in digitized so- checking for identity theft and fraud
used by national governments to ciety goes to the heart of free expres- at a Department of Motor Vehicles
identify citizens. For instance, large- sion, freedom of movement, freedom (DMV), says Clare Garvie, a facial rec-
scale facial recognition will be used of assembly and association.” ognition technology expert at George-
to identify and monitor hundreds of town University.
thousands of people during the 2020 The Dangers of Facial Recognition Facial recognition also gives cen-
Summer Olympics in Tokyo. Facial recognition is, broadly, the tralized authorities like governments
This all raises the question: ability of computer vision systems and multinational firms the power to
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 17
news
identify people and to control them mentally changes how we must view concept that government is account-
at scale. privacy and anonymity in public spac- able to the people.”
“In China, the government aims to es,” says Garvie. “With access to the Garvie observes that facial recogni-
enroll all citizens into a facial recog- right databases, law enforcement may tion is “not a monolith”; the technol-
nition database, to facilitate ubiqui- now be able to locate and identify any ogy is used by many different parties
tous tracking and identification,” says person walking by a security camera.” for many different purposes. It can
Garvie. “In Russia, face surveillance If the data produced by facial rec- enhance security and empower law en-
has been used to monitor and intimi- ognition is flawed or biased, it is pos- forcement, or it can be used to collect
date counter-government protests. In sible law enforcement and govern- data on citizens.
the United States, the Department of ment bodies could risk infringing on “As a society, we must think very
Homeland Security and some state the rights of citizens by using imper- carefully not just about its benefits, but
and local jurisdictions are exploring fect data to make legal or enforce- its risks, and use legislation to guard
the reaches of the technology as well.” ment decisions. against the latter.”
Facial recognition raises ques- “Facial recognition technology will Unfortunately, the laws governing
tions about a citizen’s right to priva- take this loss of privacy and liberty to a the use of facial recognition technol-
cy. The Electronic Frontier Founda- new level by taking choice about utili- ogy are murky at best, according to
tion (EFF) published a whitepaper in zation of the technology away from citi- WIRED magazine, which points out
which it posits that “face recognition zens,” says Donahoe. that “state and federal laws gener-
disproportionately impacts people “One of the most concerning dimen- ally leave police departments free to
of color” by misidentifying African sions of facial recognition technology do things like search video or images
Americans and minorities at higher is that it will be embedded in many collected from public cameras for
rates than whites. different dimensions of daily exis- particular faces.”
This matters, given the ubiquity of tence without any choice among citi-
facial recognition systems in modern zens, and without even the awareness Always Listening
public life. of citizens. When people lose aware- Voice recognition is the ability of
“As one of the first viable technolo- ness of and choice about when they natural language processing (NLP)
gies for conducting biometric sur- are being watched by government, it software to “understand” human
veillance, facial recognition funda- risks inverting the core democratic language. A system like Siri or Alexa
Milestones
hears your voice, processes the lan- social control. The mere possibility of
guage of your speech, then responds surveillance has the potential to make
to the content of your queries. Amazon says people feel extremely uncomfortable,
We see the value of these systems the Echo is cause people to alter their behavior,
every day. Voice assistants increasingly and lead to self-censorship and inhi-
help us search online and find relevant “constantly bition.’”
content to serve consumer needs. In listening but Donahoe is equally skeptical that
fact, about 50% of all online searches governments will make the right call
will be voice searches by 2020, accord- not recording, when it comes to balancing security
ing to media measurement and analyt- and nothing is and liberty. “The ease of use of facial
ics firm Comscore. recognition technology for security
“Voice recognition technology will streamed to purposes will make it less likely that
expand accessibility to many devices or stored in governments will protect citizen liber-
and applications, especially for people ty to the extent required by democratic
who are visually impaired,” says Do- the cloud without values,” she says.
nahoe. “I can imagine voice recogni- the wake word “A core challenge for democratic gov-
tion technologies bringing many ben- ernments will be continued adherence
eficial applications and efficiencies to being detected.” to the rule of law, where restrictions on
society, and expanding accessibility.” individual liberty that flow from use of
These could include making search- this technology must be justified by ne-
ing for information, and purchasing cessity, legitimate purpose, and use of
online, easier for consumers. the least restrictive means available.”
However, she notes, there are
downsides. No Easy Answers
Further Reading
While voice recognition may em- Given the increasing ubiquity of facial
power individuals, the technology also and voice recognition, serious impacts Simonite, T.
Few Rules Govern Police Use of Facial
may impact privacy. Voice recognition on society are inevitable.
Recognition, WIRED, May 22, 2018,
devices are listening constantly, ac- “I don’t think society is ready for the https://www.wired.com/story/few-rules-
cording to The Washington Post. These new potential of state power to track peo- govern-police-use-of-facial-recognition-
devices are listening for the “wake ple,” says Martin Chorzempa, a research technology/
up” words that activate them, such fellow at the Peterson Institute for In- Lynch, J.
as “Hey, Google” or “Alexa,” that us- ternational Economics in Washington, Face Off: Law Enforcement Use
ers must speak to alert the devices D.C. He cites the Chinese government’s of Facial Recognition Technology, EFF,
February 12, 2018,
that a request is about to be made. use of facial recognition for law enforce-
https://www.eff.org/wp/law-enforcement-
There have been allegations that ment purposes to track down everyone use-face-recognition
these devices are always listening, from wanted criminals to jaywalkers.
Lapowsky, I.
and this information is then being “It will be increasingly difficult for Schools Can Now Get Facial
logged in ways that violate user privacy. individuals to avoid broadcasting to Recognition Tech for Free. Should They?
Amazon has denied its voice- the world where they are,” Chorzem- WIRED, July 17, 2018,
controlled Echo is always capturing pa says. “For example, someone who https://www.wired.com/story/realnetworks-
what is said in its presence, saying, passes by Times Square on their way facial-recognition-technology-schools/
“that allegation—that the Echo is to work will likely show up in tourist Levy, N.
possibly recording at all times with- photos that are posted on social me- Amazon Hands Over Alexa Data
in Arkansas Hot Tub Murder Case,
out the ‘wake word’ being issued—is dia, and facial recognition could easily But 1st Amendment Questions Remain,
incorrect,” according to an Amazon piece together their route to work and GeekWire, March 7, 2017,
spokesperson. “The device is con- their schedule using the photos and https://www.geekwire.com/2017/amazon-
stantly listening but not recording, the times or dates they were taken.” hands-over-alexa-data-in-arkansas-hot-
and nothing is streamed to or stored In an era where devices are always tub-murder-case-but-questions-of-1st-
amendment-rights-remain/
in the cloud without the wake word watching and listening, personal priva-
being detected.” cy is more likely than ever to be assault- Olson, C.
Just Say It: The Future of Search
This has not stopped law enforce- ed by official institutions, even well- Is Voice and Personal Digital Assistants,
ment from lobbying Amazon for user meaning democratic governments. Campaign, April 25, 2016,
data when investigating potential “We risk chilling free speech and https://www.campaignlive.co.uk/article/
crimes, in an effort to pull voice logs assembly—rights guaranteed to us just-say-it-future-search-voice-personal-
from the company’s servers. Amazon under the First Amendment,” says digital-assistants/1392459
dropped a motion to protect audio re- Garvie. “Law enforcement agencies
Logan Kugler is a freelance technology writer based
cordings from one of its Echo devices themselves recognized this risk in a in Tampa, FL, USA. He has written for over 60 major
that belonged to a murder suspect. The 2011 Privacy Impact Assessment, stat- publications.
company had originally argued the data ing: ‘The potential harm of surveil-
was protected by the First Amendment. lance comes from its use as a tool of © 2019 ACM 0001-0782/19/2 $15.00
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 19
V
viewpoints
T
HE YEAR 2018may in the fu- estimated that today approximately On the policy front, the long-await-
ture be seen as a turning 60% of Americans of European de- ed implementation of the EU’s General
point for privacy incidents scent could be identified from their Data Protection Regulation (GDPR) in
and associated privacy- DNA, even if they had never regis- late May12 triggered many reviews of
policy concerns. In March, tered their DNA with any site.6 Fur- corporate data privacy policies glob-
the Cambridge Analytica/Facebook ther, they forecast the figure will rise ally. These revisions required untold
incident opened many eyes to the to 90% in only two or three years.9 numbers of clicks by users asked to ac-
unanticipated places personal data The John Hancock Life Insurance knowledge policy changes.
reaches, and it continues to gener- Company announced it would sell About a month later, under threat
ate repercussions.4 Google shut down life insurance only through “interac- from a strong privacy ballot initia-
its struggling Google Plus social net- tive” policies that provide financial tive, California passed the Califor-
working system in October, after an- incentives to track policyholders’ fit- nia Consumer Privacy Act of 2018.1
nouncing it had exposed the data of ness and health data through wear- It incorporates some features of the
approximately 500,000 users,15 only able devices and smartphones;2 and GDPR and gives California consum-
1% as many as involved in the Cam- the latest Apple Watch can take your ers the right to know what personal
bridge Analytica case. Facebook re- electrocardiogram. information businesses have about
vealed another data breach in Octo- them. Consumers control whom the
ber, this one affecting a reported 29 information is shared with or sold to,
million users.14 Innovation has and can request that information be
The open GEDmatch genomics deleted. This law begins to require
database, developed for genealogy its downside and consumer-facing businesses to live
research, was used by police and loss of privacy is up to some of the Fair Information
genetics experts to identify alleged Practice Principles that were mandat-
murderers in two “cold cases” and not easy to remedy. ed for U.S. government systems (but
several other crimes. 8 The site’s not commercial enterprises) by the
founders, at first uncomfortable Privacy Act of 1974.13
with its use by law enforcement, “Personal information” in the
seem to now be more comfortable California law is broadly defined. It
with it. Researchers subsequently includes biometric information, but
also “information that identifies, re- cations for, among other things, Inter- privacy practices that will help com-
lates to, describes, is capable of being net-based transactions of all kinds. panies assess privacy risk and adopt
associated with, or could reasonably The 5-4 decision had four separate measures appropriate to the risk. In
be linked, directly or indirectly, with dissenting opinions. The majority char- parallel, the NTIA, also part of the
a particular consumer or household.” acterized the decision as “narrow” Department of Commerce, released
The law enumerates almost a dozen because it did not overturn the third a Request for Comments (RFC) on a
categories of personal information, party doctrine per se. Rather, it rec- two-part approach to consumer pri-
but exempts “publicly available” in- ognized the information in this case vacy: the first part describes desired
formation (also defined in the law). (cellphone site location information user-centric privacy outcomes and
Implementation details must be or CSLI records) deserves separate the second sets high-level goals out-
worked out before the law takes effect treatment because it is so invasive lining an ecosystem to achieve those
in 2020. The law has triggered nation- of “the privacies of life.” Further, outcomes.5 The RFC proposes no
al discussion and legislative propos- Justice Gorsuch’s dissent argues for changes to existing sectoral privacy
als in other states. overturning the third-party doctrine. laws, and, perhaps because it was de-
Also in June, the U.S. Supreme Court He proposes the consumer may well veloped in cooperation with the Na-
handed down a decision in Carpenter have a property interest in CSLI re- tional Economic Council, the second
v. U.S.3 This decision represents a no- cords held by the telephone compa- part on high-level goals emphasizes
table limitation of the “third-party ny, although that argument was not maintaining “the flexibility to inno-
doctrine” wherein a government put forth in this case. Other classes vate” and proposes to employ a “risk
IMAGE BY AND RIJ BORYS ASSOCIAT ES/SHUT TERSTOCK
request to a third party to produce of data routinely collected by third and outcome-based” approach as op-
data an individual has voluntarily parties could be equally invasive to posed to one of compliance.
surrendered to it does not require the privacies of life; more litigation While no one loves red tape, inno-
a warrant. This doctrine, in place in may follow. vation has its downside (remember
the U.S. since 1979, is the basis for In the fall, NIST initiated the de- those innovative collateralized debt
the idea that once a consumer sur- velopment of a privacy framework.10 obligations?), and loss of privacy is
renders data to a company as part Like the cybersecurity framework it not easy to remedy. Companies al-
of a transaction, the consumer loses released in 2014 and updated in April ready have the option of building in
any expectation of privacy for that 2018,11 the privacy framework is not to “privacy by design,” but relatively few
data. As such, it has had major impli- be a standard, but a guide to common have done so. To me, a requirement
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 21
viewpoints
for some baseline of measures seems abuse data entrusted to them must ex-
warranted, even essential. pect to be held accountable.
And Congress, for the first time in Congress, for Facebook/Cambridge Analytica was
years, is showing some interest in the first time not the first example of abuse, nor will
drafting comprehensive privacy legis- it be the last. The FTC’s privacy protec-
lation. This may become a hot topic in years, tion is evidently not working very well.
for the 116th U.S. Congress if public in- is showing Maybe the time has come for compre-
terest continues to be strong. hensive privacy legislation focused on
Returning to the Facebook/Cam- some interest aligning corporate incentives so their
bridge Analytica incident, this is of in drafting products provide the privacy people
immediate importance to those in expect and deserve. The California law
the computing profession, particu- comprehensive might be a step in this direction.
larly those conducting research. A re- privacy legislation. A society where individuals are
searcher with academic connections willing to share data for social benefit
gained permission from Facebook must make individuals confident that
to put up an app to collect data for shared data are unlikely to be abused
research purposes in 2014. This app and that abusers can be identified
collected data from some Facebook and made accountable.
users who consented to the collec- those commercial entities that use
tion, but also from millions of others Facebook data. The U.K. has already a Research into the weaknesses of anonymiza-
tion or de-identification schemes is needed
without their knowledge or consent. levied a fine of £500,000, the largest
to understand the limitations of these tech-
This collection would now violate its legislation allows, but this is un- niques. Like research that exposes security
Facebook’s policies, but it was not a likely to provide much incentive to a weaknesses in systems, it must respect the
violation at the time. The researcher company whose 2017 net income was concerns of those whose data is being studied.
provided this data to Cambridge An- over $15 billion. The GDPR permits
alytica, presumably in violation of penalties of up to 4% of global rev- References
1. Assembly Bill 375, California Consumer Privacy Act of
Facebook’s policies. Cambridge Ana- enues, which for Facebook would be 2018; https://bit.ly/2z68PCO
lytica exploited the data for commer- well over $1 billion, but the incident 2. Barlyn, S. Strap on the Fitbit: John Hancock to sell
only interactive life insurance. Reuters (Sept. 19,
cial purposes. occurred before the GDPR took effect. 2018); https://reut.rs/2DbAq84
The primary issue here is account- The threat of future fines should give 3. Carpenter v. U.S. 16-402. Decided June 22, 2018;
https://bit.ly/2MdFKaE
ability. This was either a violation of Facebook incentive to prevent recur- 4. Confessore, N. Audit approved of Facebook policies,
even after Cambridge Analytica leak. The New York
the academic’s agreement with Face- rence. Times (Apr. 19, 2018); https://nyti.ms/2vBniFI
book, or evidence that the agreements Fines levied by the FTC go into the 5. Department of Commerce, NTIA, RIN 0660–XC043.
Developing the administration’s approach to consumer
were insufficient to meet Facebook’s U.S. Treasury. Facebook’s users took privacy. Federal Register 83,187 (Sept. 26, 2018);
2011 consent decree with the Fed- the risks and are suffering the con- https://bit.ly/2AErrZP
6. Erlich, Y. et al. Identity inference of genomic data
eral Trade Commission (FTC). The sequences. Should they be compen- using long-range familial searches. Science (Oct. 11,
privacy of millions of people was vio- sated? A penny or dime for each user 2018); https://bit.ly/2CadGTP
7. Hempel, J. A short history of Facebook’s privacy
lated and the reputation of legitimate whose privacy was violated might not gaffes. WIRED (Mar. 30, 2018); https://bit.ly/2GjTPVD
academic researchers was tarnished. be the answer. Perhaps more progress 8. Murphy, H. How an unlikely family history website
transformed cold case investigations. The New York
Facebook apparently had little incen- would come from financing investi- Times (Oct. 15, 2018); https://nyti.ms/2EnGHhE
tive to hold the researcher and Cam- gative journalism or other controls, 9. Murphy, H. Most white Americans’ DNA can be
identified through genealogy databases. The New York
bridge Analytica to account. Aware but might not be within the scope of Times (Oct. 11, 2018); https://nyti.ms/2pRFhBX
of what happened over a year before actions regulatory agencies can take. 10. NIST Privacy Framework Fact Sheet, Sept. 2018;
https://bit.ly/2AcYZ0H
the disclosure, Facebook belatedly is- Imagination might be required to 11. NIST Framework for Improving Critical
sued yet another in a long history of help Facebook hold their clients to ac- Infrastructure Cybersecurity, Version 1.1 (Apr. 16,
2018); https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.
privacy apologies.7 count in ways that compensate Face- CSWP.04162018.pdf
12. Official Journal of the European Union. General Data
The FTC and the Securities and Ex- book users. Protection Regulation. 4.5.2016. (English version);
change Commission (SEC) are inves- Computing professionals involved https://bit.ly/2s7bupy
13. Public Law 93-579. Privacy Act of 1974. (Dec. 31,
tigating this incident. The SEC could in “big data” research should pay at- 1974); https://bit.ly/2yKCboa
find Facebook liable for failing to in- tention if they wish to gain access to da- 14. Vengattil, M. and Paresh, D. Facebook now says data
breach affected 29 million users, details impact.
form its shareholders of the incident tasets containing or derived from per- Reuters (Oct. 12, 2018); https://reut.rs/2CGewZz
when discovered. The FTC could find sonal information. They must abide by 15. Wasabayashi, D. Google Plus will be shut down after
user information exposed. The New York Times (Oct. 8,
Facebook violated the terms of their agreements made with dataset provid- 2018); https://nyti.ms/2OKoFtH
2011 consent agreement by failing to ers and remember that exposing data
protect their customers’ data in ac- improperly damages public trust in Carl Landwehr (carl.landwehr@gmail.com) is Lead
cordance with the consent decree. research. Accidental or intentional re- Research Scientist the Cyber Security Policy and Research
Institute (CSPRI) at George Washington University in
A court could make Facebook pay lease of personal data provided for re- Washington, D.C., and Visiting McDevitt Professor of
fines large enough to give it suffi- search purposes to anyone else, even if Computer Science at LeMoyne College in Syracuse, NY.
Broadening Participation
How Computer Science
at CMU Is Attracting
and Retaining Women
Carnegie Mellon University’s successful efforts enrolling,
sustaining, and graduating women in computer science challenge
the belief in a gender divide in CS education.
T
HE PERSISTENT UNDERREP-
of women in
R E S E N TAT I O N
computing has gained the
attention of employers,
educators, and researchers
for many years. In spite of numerous
studies, reports, and recommenda-
tions we have seen little change in the
representation of women in computer
science (CS)—consider that only 17.9%
of bachelor’s degrees in computer sci-
ence were awarded to women in 2016
according to the annual Taulbee Sur-
vey.15 At Carnegie Mellon University
(CMU) we do not believe the situation
is an intractable problem.
By paying close attention to culture
and environment, and taking a cultural
approach rather than a gender differ-
Women comprised more than 48% of incoming first-year undergraduate students at Carnegie
ence approach, our efforts continue to Mellon University’s School of Computer Science in fall 2016, establishing a new school
pay off. The percentage of women en- benchmark for diversity.
rolling and graduating in CS at CMU
has exceeded national averages for success in addressing the gender gap. taining, and graduating women in CS.
many years (see the accompanying Harvey Mudd College, for example, Since 2002 we have conducted ongoing
PHOTO C OURT ESY OF CA RNEGIE M ELLON UNIVERSIT Y
figure and table). Indeed, the school went from 10% women in CS in 2006, case studies to understand the CMU
gained attention when 48% (of the to- the year Maria Klawe took over as col- story.b We have learned many valuable
tal 166 students), 49+% women (of the lege president, to 40% women in CS by lessons. In a nutshell, for women to be
total 205 students), and just shy of 50% 2012.2 These institutions, and the many
when 105 women (out of 211 students) others who are investing in change b Case studies were conducted in 2002, 2004,
entered the CS major in 2016, 2017, to improve gender balance, are proof 2009–2010, 2011–2012, and 2016–2017 and
and 2018 respectively.a But CMU is not that—as CMU CS Professor Lenore included a variety of data-collection tools in-
cluding face-to-face interviews, surveys, focus
alone—other institutions have also had Blum says—“it’s not rocket science!” groups, and observations. Participants in-
This column summarizes CMU’s cluded current undergraduate and graduate
a See https://bit.ly/2ULGgBS successful efforts in enrolling, sus- students, faculty, and staff.
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 23
viewpoints
Percentage of male and female first-year students by year of enrollment. benefit of all students. CMU, with its
School of Computer Science and the
seven departments within the school,
120 Male Female offers a wide variety of courses—some
100 of which are applications focused—
but the core CS curriculum and a wide
80
# of Students
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 25
viewpoints
Kode Vicious
If your test has special setup require-
ments, such as a particular configuration
of software or hardware, these must also
to test your colleague’s code. scribe the test output. Again, taking a systems code for fun and profit, teaches courses on
various programming-related subjects, and encourages
A good test plan is a lot like the lab re- networked system as an example, you your comments, quips, and code snips pertaining to his
ports some of us had to write for high might say, “A correct test result is one Communications column.
school science classes. You won’t use the where all messages are forwarded with- Copyright held by author.
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 27
V
viewpoints
Viewpoint
Tony’s Law
Seeking to promote regulations for reliable software
for the long-term prosperity of the software industry.
S
O M EO N E D I D N OT tighten
the lid, and the ants got into
the honey again. This can
be prevented by placing the
honey jar in a saucer of wa-
ter, but it is a nuisance, occupies more
counter space, and one must remem-
ber to replenish the water. So we try at
least to remember to tighten the lid.
In the context of security, the soft-
ware industry does not always tighten
the lid. In some cases it fails to put the lid
on at all, leaving the honey exposed and
inviting. Perhaps the most infamous ex-
ample of recent years is the WINvote vot-
ing machine, dubbed the worst voting
machine in the U.S. A security analysis
by the Virginia Information Technolo-
gies Agency in 2015 found, among other
issues, the machines used the depre- cluding airspace utilization (distances ers whether they wished us to provide
cated WEP encryption protocol, that between planes), aircrew work sched- an option to switch off these checks in
the WEP password was hardwired to ules, aircraft noise levels, and more. the interests of efficiency on production
“abcde,” that the underlying Windows Advertisers are required to add warn- runs. Unanimously, they urged us not
XP (which had not been patched since ing labels on advertising for cigarettes to—they already knew how frequently
2004) administrator password was set and other tobacco products. subscript errors occur on production
to “admin” with no interface to replace Computers are regulated in terms runs where failure to detect them could
it, and that the votes database was not of electrical properties, such as the be disastrous. I note with fear and hor-
secured and could be modified.7 These FCC regulations on radiation and com- ror that even in 1980, language design-
machines had been used in real elec- munication. But the software running ers and users have not learned this
tions for more than 10 years. on computers is not regulated. Nearly lesson. In any respectable branch of en-
Such cases constitute malpractice, 40 years ago, in his ACM A.M. Turing gineering, failure to observe such elemen-
and call for regulation. Regulation is Award acceptance speech, Tony Hoare tary precautions would have long been
IMAGE BY AND RIJ BORYS ASSOCIAT ES/SHUT TERSTOCK
necessary because not everything can had the following to say about the prin- against the law.” [emphasis added].
be trusted to market forces. There are ciples that guided the implementation Hoare said this when personal com-
many examples in diverse industries. of a subset of Algol 60:2 “The first prin- puters and the Internet were in their
The sale of alcohol to minors is pro- ciple was security. [...] A consequence of infancy, long before the Web, DDoS
hibited. Construction and housing this principle is that every occurrence attacks, and data breaches. Indeed, a
cannot use asbestos and lead-based of every subscript of every subscripted lot has changed during this time (see
paints due to public health concerns. variable was on every occasion checked Table 1). But one thing that has not
The automotive industry is required to at runtime against both the upper and changed is the lack of any meaningful
install seat belts and report pollution the lower declared bounds of the array. regulation on the software industry.
levels. Aviation is strictly regulated, in- Many years later we asked our custom- In retrospect, Hoare’s pronounce-
ment exhibited great foresight. To this Table 1. Changes in software and computing in the last 30 years.
day buffer errors represent the single
most common vulnerability,a even more
so among high-severity vulnerabilities 1980s 2010s
(see Figure 1 and Figure 2). Just imagine C pointers Java garbage collection
if a law requiring bounds checks had Emacs Eclipse
been enacted more than 40 years ago, Math library Frameworks
and there were no buffer overflows to- Ad hoc programming Agile methodology
day. As it stands, Microsoft for one insti- Waterfall Evolution/continuous integration
tuted its Security Development Lifecycle Flowcharts UML
as a mandatory policy in 2004. This in- Write your own sort Copy from Stack Overflow
cludes—among many other features— Computer room Computer in your pocket
the option to require compilation with Hard disk Cloud
flags that insert bounds checks and the Text terminals Touch screens
option to ban unsafe library functions. Email Internet of Things
On the one hand this demonstrates that No regulation No regulation
such practices are just a matter of decid-
ing to use them. On the other hand they
are still not universally required, and
indeed even Microsoft products still oc- Figure 1. The number of software vulnerabilities cataloged by the NIST National Vulner-
ability Database skyrocketed in 2017, and the fraction of vulnerabilities involving buffers
casionally suffer from buffer issues.b (either categorized as “buffer error” or containing the keyword “buffer”) kept pace.
Similar sentiments have been repeat-
ed several times since Hoare’s speech.
Twelve years ago, ACM President David Other Vulnerabilities Buffer Related
Patterson put forward the “SPUR mani-
12000
festo,”3 suggesting the development
of 21st-century computer (software) 10000
systems should focus on security, pri-
Vulnerabilities
25
chorus of naysayers. The typical argu-
20
Of All
a The NIST National Vulnerability Database Vulnerabilities
uses 124 of the nearly 1,000 types listed in the 15
Common Weakness Enumeration to catego-
rize vulnerabilities. In 2015–1017, buffer er- 10
rors CWE-119 accounted for 15.2%–18.4% of
all vulnerabilities each year. The next highest 5
categories were information leak/disclosure
0
CWE-200 at 9.3%–10.9%, permissions, privileg-
es, and access control CWE-264 at 8.2%–10.0%, 2007 2009 2011 2013 2015 2017
and cross-site scripting CWE-79 at 7.3%–11.2%.
b One example: Microsoft Office Equation Editor
stack buffer overflow; see https://bit.ly/2zTngss
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 29
viewpoints
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 31
V
viewpoints
Viewpoint
Do We Really Need
Computational Thinking?
Considering the expression “computational thinking” as an entry point to understand why the fundamental
contribution of computing to science is the shift from solving problems to having problems solved.
I
CONFESS UPFRONT, the title of this
Viewpoint is meant to attract
readers’ attention. As a com-
puter scientist, I am convinced
we need the concept of compu-
tational thinking, interpreted as “being
able to think like a computer scientist
and being able to apply this competence
to every field of human endeavor.”
The focus of this Viewpoint is to dis-
cuss to what extent we need the expres-
sion “computational thinking” (CT). The
term was already known through the
work of Seymour Papert,13 many com-
putational scientists,5 and a recent pa-
per15 clarifies both its historical devel-
opment and intellectual roots. After the
widely cited Communications Viewpoint
by Jeannette Wing,19 and thanks to her
role at NSF,6 an extensive discussion
opened with hundreds of subsequent
papers dissecting the expression. There
is not yet a commonly agreed definition
of CT—what I consider in this View- Wing discussed CT to argue it is im- Forsythe, a former ACM president and
point is whether we really need a defini- portant every student is taught “how one of the founding fathers of computer
tion and for which goal. a computer scientist thinks,”19 which science education in academia, in 1968
To anticipate the conclusion, we I interpret to mean it is important to wrote: “The most valuable acquisition
probably need the expression as an in- teach computer science to every stu- in a scientific or technical education are
strument, as a shorthand reference to dent. From this perspective, what is the general-purpose mental tools which
a well-structured concept, but it might important is stressing the educational remain serviceable for a lifetime. I rate
be dangerous to insist too much on it value of informatics for all students— natural language and mathematics as
and to try to precisely characterize it. Wing was in line with what other well- the most important of these tools, and
It should serve just as a brief explana- known scientists had said earlier; I computer science as a third.”9 Even if
tion of why computer science (or infor- mention several here. both citations are not relative to a school
matics, or computing: I will use these Donald Knuth, well known by math- education context, in my view they clearly
terms interchangeably) is a novel and ematicians and computer scientists, in support the importance of teaching com-
IMAGE BY VA LLIA
independent scientific subject and to 1974 wrote: “Actually, a person does not puter science in schools to all students.
argue for the need of teaching infor- really understand something until he However, the wide popularity gained
matics in schools. can teach it to a computer.”10 George by CT after Wing’s Communications
Viewpoint risks spoiling the original jor countries. Here, I discuss the three a different way of thinking, called CT”
aim. Increasingly, people are consider- most relevant ones. and “learning about programming is a
ing CT a new subject, somehow different In England, the national computing way to discover the rudiments of CT.”
or distinct from computer science. In programmes of study,a published by the It emerges, from these three ex-
the quest to identify the definition that Department of Education in September amples, that CT is not a new subject
Wing did not provide, people are stress- 2013 and mandatory since school year to teach and what should be taught in
ing one or other aspect (abstraction, 2014–2015, uses CT in the presented school is informatics.
recursivity, problem solving, …) and in sense of what one gets by the study and But on the other side, the high num-
doing so they obscure its meaning. See practice of computing. In fact, it uses it ber of papers published with CT in their
Armoni2 and Denning5 for clear and illu- in the opening statement “A high-qual- title or abstract (the ACM Digital Library
minating discussions of this issue. ity computing education equips pupils alone contains more than 400) indi-
This situation becomes even more to use CT and creativity to understand cates a lot of people seem to argue (and
garbled when it comes to education. and change the world” and then just even Wing seemed to agree21) that CT
Speaking about teaching CT is a very two more times, in goals for Key Stage is something new and different. Some
risky attitude: philosophers, rightly, ask 3 “understand several key algorithms even say “coding” (which they consider
what we mean by “teaching thinking”; that reflect CT” and KS4 “develop and different from “programming”) is all
mathematicians appropriately observe apply their analytic, problem-solving, you need to learn it! A discussion of
that many characteristics of CT (such as design, and CT skills.” The curricu- risks related to this approach and other
abstraction, recursivity, problem solv- lum never defines the term. delicate issues regarding CT appeared
ing, …) are also proper of mathematics In the U.S., the “Every Student Suc- in a recent Communications column.8
(which they do not call “mathematical ceeds Act” (ESSA), approved by Congress I am convinced that considering
thinking”); pedagogues ask how we can in 2015 with bipartisan support, has in- CT as something new and different is
be sure CT is really effective in educa- troduced computer science among the misleading: in the long run it will do
tion; teachers want to know which are “well rounded educational subjects” more harm than benefit to informatics.
the methods and the tools for teaching that needs to be taught in schools “with After all, they do not teach “linguistic
this new discipline and how they can the purpose of providing all students thinking” or “mathematical thinking”
learn to teach it; and parents are alter- access to an enriched curriculum and in schools and they do not have “body
nately happy because it appears school educational experience,” and does not of knowledge” or “assessment meth-
has finally started to align itself to the contain at all the term “computational ods” for these subjects. They just teach
digital society while they are also con- thinking.” In January 2016, President (and assess competences in) “English”b
cerned about what will happen to their Obama launched the initiative “CS and “Mathematics.” Subsequently, the
children in the future if they just learn For All” whose goal is “to empower all various linguistic (resp. mathematical)
to code with the language of today. American students from kindergarten competences gained by study of Eng-
I think a large part of the commu- through high school to learn computer lish (resp. Mathematics), beyond be-
nity of computing scientists and edu- science and be equipped with the CT ing used in themselves, find additional
cators is convinced the original Com- skills they need …”. Once again, CT is uses in other disciplines. Between CT
munications Viewpoint by Wing was what you get when you have learned and computing there exists the same
aiming at “start rolling the ball” and computer science. relation. Therefore, we should discuss
what needs to be done is teaching in- In France, the Académie des Scienc- what to teach and how to evaluate com-
formatics in schools, possibly begin- es—the highest institution represent- petences regarding informatics in pri-
ning at an early age. Moreover, I am ing French scientists—published in mary/middle/secondary schools, and
convinced the same people are fully May 2013 the report “L’enseignement forget about teaching and evaluating
able to understand the meaning of de l’informatique en France. Il est ur- competences in CT.
Wing’s expression “to think like a com- gent de ne plus attendre,” (“Teaching In summary, speaking about CT
puter scientist” without the need of ex- computer science in France. Tomorrow helps people understand that: we are
actly explaining it. Or, if it is absolutely can’t wait.”) recommending—for what focusing on scientific and cultural as-
needed, they might agree with the regard the teaching of computer science pects of computing; we are not dealing
self-referential sentence “CT is the set (“informatique”)—“teaching should with system and tools, but with principles
of mental and cognitive competences start at the primary level, through ex- and methods; we are focusing on the
obtained by the study and practice of posure to the notions of computer sci- core scientific concepts of computing,
computer science”: the “tacit knowl- ence and algorithms, … <and> should on its conceptual kernel.11 Different from
edge” defined by Polanyi.14 be further developed in middle and sec- what happens with language and math,
Already in 1974 Knuth warned, in ondary school.” Analyzing their use of we are forced to explicit this distinction
discussing computer science, that CT (“pensée informatique”), it is clear since computers are what embodies
“the underlying concepts are much that in their vision the term denotes the informatics for most of people. In addi-
more important than the name.”10 It is specific habits of thinking developed by tion, we do not think the “computer sci-
much more so, I think, for CT. What re- learning computer science. Just a cou- entists’ way of thinking” is better than
ally counts is the fact that computing is ple of examples: “computing … leads to others, just that it offers a complemen-
taught early in schools. This is actually
the path being followed by some ma- a See https://bit.ly/1f7PIFU b Or the relevant native language.
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 33
viewpoints
Modeling a situation and specifying the ways an information-processing agent can Indeed, in looking backward to-
effectively operate within it to reach an externally specified (set of) goal(s). ward how computer science was born,
it is clear the cultural seeds are in the
mathematicians’ quest for automatiz-
thought ing theorem proving, in their efforts
person
processes information to unload the burden of solving prob-
processing or
machine lems onto machines. This shift in view-
agent
point, from solving problems to having
problems solved is the intellectual birth
specifying
of informatics and is the “difference
modeling
effectiveness which makes a difference,”3 setting in-
formatics in its own proper and unique
place in the context of all sciences. The
importance of the “automaton” to give
to reach externally full sense to CT was also made explicitc
specified goals and emphasized.1,6
I also dare to provide, for the same
demonstrative purpose, a more gen-
eral explanation of what CT is, which is
somehow along a direction already hint-
ed at by Wing,16 who clarified: “My in-
terpretation of the words ‘problem’ and
‘solution’ is broad. I mean not just math-
tary and useful conceptual paradigm to ematician’s answer is: “Let R be the ring ematically well-defined problems whose
describe reality.7 of integer matrices; in this ring the sum solutions are completely analyzable,
At this point people usually ask which of two principal left ideals is principal, for example, a proof, an algorithm, or a
is this “conceptual kernel” and which ex- so let D be such that R A + R B = R D. Then program, but also real-world problems
amples can we provide. This is a critical D is the greatest common right divisor whose solutions might be in the form
passage to explain to people the novelty of A and B.”10 Clearly unsatisfactory for of large, complex software systems.”
of informatics among scientific disci- a computer scientist, for whom a solu- Nevertheless, Wing still used the word
plines and its educational value. For this tion is provided by a process computing “problem,” which conveys the meaning
purpose, the formulation attributed to the answer and not by an equation defin- of something that needs to be solved.
Cuny, Snyder and Wing16 is appropriate: ing the answer. I have intentionally used Since solving a problem is just
“CT is the thought processes involved the word “process” instead of the more an instance of a situation where one
in formulating problems and their so- usual “algorithm” to stress the fact that wants to reach a specified goal, here is
lutions so that the solutions are repre- we have a “process” only when the algo- my formulation: Computational think-
sented in a form that can be effectively rithm has been implemented in a suit- ing is the thought processes involved in
carried out by an information-process- able “language” and an “automaton” modeling a situation and specifying the
ing agent.” This is almost the same def- executes the obtained code. In such a ways an information-processing agent
inition given by Aho1 “CT is the thought way three of the main pillars on which can effectively operate within it to reach
processes involved in formulating computer science is based—algorithm, an externally specified (set of) goal(s).”
problems so their solutions can be rep- language, and machine—are all in- (See the accompanying figure.)
resented as computational steps and al- volved in characterizing the difference There are two main differences: one
gorithms” and Wing acknowledges the between the viewpoints of the math- is speaking about a situation where the
input received by him.20 The big issue, as ematician and the computer scientist. agent operates instead of a problem it
Armoni has clearly pointed out,2 is that I therefore think that, whenever has to solve, the other is clarifying the
by taking any of these as the definition of either the Cuny, Snyder, and Wing’s agent does not define by itself its overall
a new discipline instead of as an expla- formulation or Aho’s one is used for (set of) goal(s) but gets it from the out-
nation and trying to fully operationalize this explanatory purpose, the utmost side.d My formulation is also closer to
it causes more problems than benefits. stress must be put on the involve- more recent characterizations of com-
The issue of explaining in which sense ment of the information processing putation as an unbounded process.18
“the way a computer scientist thinks” agent (that is, the “automaton,” be it a
is different from “the way a mathemati- machine or a person acting mechani- c Aho wrote: “An important part of this process
cian thinks” is indeed an important one. cally). Without the agent and its capa- is finding appropriate models of computa-
Knuth had a brilliant example in his bility to operate effectively, there is no tion with which to formulate the problem and
1974 paper, which, unfortunately, is not informatics, just mathematics, which derive its solutions.” We could say, in a some-
at a level laypeople can understand. It indeed has been solving problems for what literary style, “the model is the agent is
the model.”
regarded the problem of finding the millennia, discovering and applying d If we allowed the agent to choose its own goals,
“greatest common right divisor” of two along the way abstraction, decompo- we would leave computing and enter the realm
n x n integer matrices A and B. The math- sition, recursion, and so on. of free-will entities.
We have thus a more general ex- sidering it as a foundational discipline, 14. Polanyi, M. The Tacit Dimension. The University of
Chicago Press, 1966.
planation of what CT is, covering on par with mathematics.4,17 15. Tedre, M. and Denning, P.J. The long quest for
also cases that are of high interest for computational thinking. In Proceedings of the 16th Koli
Calling Conference on Computing Education Research.
schools and education: simulations References (Nov. 2016), 120–129.
1. Aho, A.V. Computation and computational thinking. 16. The LINK. Research Notebook: Computational
in other disciplines, where one has Ubiquity, vol.2011, issue January, Article no. 1, Thinking—What and Why?. The Magazine of Carnegie
to build and manipulate a visible rep- January 2011. ACM Press. DOI: https://doi.org/ Mellon University’s School of Computer Science,
10.1145/1922681.1922682 March 2011; https://bit.ly/2UTeAed
resentation of physical laws and/or 2. Armoni, M. Computer science, computational thinking, 17. Vahrenhold, J. et al. Informatics Education in Europe:
natural/social phenomena (that is, to programming, coding: The anomalies of transitivity in Are We All In The Same Boat? ACM/Informatics
K–12 computer science education. ACM Inroads 7, 4 Europe, NY, 2017; https://doi.org/10.1145/3106077
model a situation and explore its pos- Dec. 2015), 24–27. 18. van Leeuwen, J. and Wiedermann, J. Computation as
sible evolution) rather than to solve 3. Bateson, G. Form, substance and difference. In Steps to an unbounded process. Theoretical Computer Science
an Ecology of Mind. University of Chicago Press, 1972. 429, (2012), 202–212.
a problem. Simulation is a very pow- 4. Caspersen, M.E. et al. Informatics for All: The 19. Wing, J. Computational thinking, Commun. ACM 49, 3
Strategy. ACM/Informatics Europe, NY, 2017;
erful tool to improve understanding https://doi.org/10.1145/3185594
(Mar. 2006), 33–35.
20. Wing, J. Computational thinking benefit society.
and computing is unique in its capa- 5. Denning, P.J. Computational thinking in science. Social Issues in Computing blog, January 2014;
American Scientist 105, (Jan.–Feb. 2017); 13–17.
bility of making concrete the abstract 6. Denning, P. Remaining trouble spots with
https://bit.ly/2SOnisk
21. Wing, J. Computational thinking and thinking about
models defined by a simulation.2 In computational thinking. Commun. ACM 60, 6 (June computing, Philosophical Transactions of The Royal
2017), 33–39.
addition, we have a formulation that 7. Denning, P.J. and Rosenbloom, P.S. Computing: The
Society A366, 37 (2008): 3717–3725.
can be used to explain why mathemat- fourth great domain of science. Commun. ACM 52, 9
(Sept. 2009), 27–29. Enrico Nardelli (nardelli@mat.uniroma2.it) is a
ics or other sciences are not enough 8. Denning, P.J., Tedre, M., and Yongpradit, P. Full Professor in Informatics in the Department of
for these purposes. Misconceptions about computer science. Commun. Mathematics at the University of Rome “Tor Vergata,”
ACM 60, 3 (Mar. 2017), 31–33. Italy. He is currently the president of Informatics Europe,
In such a way informatics can more 9. Forsythe, G.E. What to do till the computer scientist the association representing the academic and research
clearly explain its dual role12 both as a comes. The American Mathematical Monthly 75, (May Informatics community in Europe.
1968), 454–462; https://bit.ly/2S19xXo
fundamental scientific subject, with its 10. Knuth, D.E. Computer science and its relation to
own independent set of concepts, and mathematics. The American Mathematical Monthly Discussions with Mehdi Jazayeri, Jan van Leeuwen,
81, 4 (Apr. 1974), 323–343; https://bit.ly/2ErRMMU Michael Lodi, Simone Martini, and Guido Proietti have been
as a discipline of transversal value, pro- 11. Lodi, M., Martini, S., and Nardelli, E. Abbiamo davvero useful to focus ideas and improve presentation; comments
viding methods contributing to a bet- bisogno del pensiero computazionale? Mondo Digitale from referees have also been greatly helpful. Many of the
72 (Nov. 2017), AICA, Milan; https://bit.ly/2CLJcr5 ideas first presented in this Viewpoint have been further
ter understanding of other disciplines.7 12. Nardelli, E. Informatica nella scuola: disciplina developed by the author in subsequent papers since
fondamentale e trasversale, ovvero “di cosa parliamo this material was reviewed, revised, and accepted for
This latter role of computing is also of quando parliamo di pensiero computazionale.” publication in early 2017.
particular importance for its introduc- Scienze e Ricerche Magazine (Apr. 2017), 36-40;
https://bit.ly/2GqszFk
tion as a regular subject in schools, and 13. Papert, S. Mindstorms: Children, Computers, and
can constitute a solid argument for con- Powerful Ideas. Basic Books, 1980. Copyright held by author.
“The indispensable guide to “An inspirational must-read and delightful guide “What Can Be Computed? should
numerical trickery, deception, for anyone interested in traveling from the succeed brilliantly in capturing the
and flimflam!” computational past through to the present.” imagination of students.”
—Harry Lewis, —Andrew Adamatzky, —Matt Franklin,
coauthor of Blown to Bits University of the West of England University of California, Davis
Cloth $22.95 Cloth $27.95 Cloth $85.00
Social icon
Rounded square
Only use blue and/or white.
CodeFlow:
interesting in the sense that, beyond
their important role in software engi-
neering integration, code reviews in-
volve some rather complex social dy-
Improving
namics that elude simple modeling.
Then there also was the fact that
Microsoft’s code-review tool repre-
sented an opportunity to touch every
the Code
developer throughout the entire com-
pany. For a group charged with boost-
ing developer productivity, that is just
the sort of lever dreams are made of.
Review
What’s more, the tool also offered
TSE’s researchers something they
could instrument to collect data and
generate metrics that, in turn, could
Process at
be used to enable further research.
So, that is why the group set out on
this journey. To recount what it was
like, where it led, and what was learned
Microsoft
along the way, Czerwonka discusses
the undertaking here, along with fel-
low researchers Michaela Greiler and
Christian Bird. Also on hand to help
steer the discussion are Lucas Panjer,
the senior director of engineering at
Tasktop, and Terry Coatta, the CTO at
Marine Learning Systems, a Vancou-
ver-based startup working to develop
a learning platform.
YOU M AY B E wondering, “Code review process? Isn’t LUCAS PANJER: What exactly is it that
initially moved you to zero in on the
that obvious?” But code reviews are pervasive. Any code-review process?
developer is likely to be asked at any time to review JACEK CZERWONKA: This group was
someone else’s code. And you can be sure your code formed several years ago with the goal
of encouraging the adoption of a com-
is reviewed. For some developers, code reviews take mon set of software engineering tools
up a portion of each day. So there is your answer: large across the whole of Microsoft. We have
been on this path for a while now. We
numbers of very well-compensated people spend are not done yet. But there are a few
a great deal of time on this activity, meaning the places where we’ve managed to cen-
aggregate costs are substantial. If you’re talking about tralize the tools quickly, and one of
those is in code-review tooling.
a development shop the size of, say, Microsoft … well, Clearly, in looking at that aspect
then, the investment regularly made in code reviews of the engineering workflow, we saw
tative data we could get our hands on many people were usually involved? fact, it was just the opposite. People
that had to do with the code-review What types of issues were being raised? generally were very supportive of im-
tooling and process already in place What was it that led people to make proving the code-review process and, if
at Microsoft. That’s how we started changes? And what typically led people anything, said they wished it was treat-
on this journey of trying to under- not to make changes? ed as a first-class citizen. Also, many
stand where the process originated TERRY COATTA: Were the engineering were pretty excited to learn there was
and how it has evolved over time. teams themselves pushing for this line data available they would be able to
What are the factors that drove that of inquiry? That is, were people com- track themselves.
evolution? How is the process cur- ing to you to say, “We’re sure spending LP: Once people engaged with you
rently applied? How does it work a lot of time with code reviews, but it and told you what they thought was
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 37
practice
JACEK CZERWONKA
MICHAELA GREILER
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 39
practice
CHRISTIAN BIRD
The code-review
process we now
have at Microsoft
has more or less
grown organically—
through
experimentation—
from the grassroots.
LUCAS PANJER
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 41
practice
TERRY COATTA
discover where people were having are followed at companies other than JC: One of our top goals was to re-
problems understanding the code- Microsoft—or, for that matter, by duce the amount of time required to
base and then using those insights open source projects. do a code review on average. We looked
to drive their training programs. We to discover where it was that people
ended up talking with at least another seemed to be spending an inordinate
dozen teams, and it was interesting LP: Looking back to when you first amount of time, and that is what led
and surprising to learn about the dif- started this project, what would you to the creation of a reviewer recom-
ferent ways some of those teams had say came up most whenever you ques- mender. It’s such a simple thing, re-
used our data. tioned people about their primary mo- ally, but it can be hard to find people
LP: What were some of the bigger tives for doing code reviews? with the right experience if you are part
surprises? MG: We did a survey where we asked of a large team. Having an automated
CB: The biggest surprise for me was people to rank their reasons. What system to identify those engineers
learning that some teams would use our came out of that tended to be fairly who have some familiarity with the file
tools to identify code reviews that took obvious: improving the code, finding where some changes have been made
too long or contained only a few com- defects, knowledge transfer … that sort can help cut down on the time required
ments. Then they would open the code of thing. But then, when we launched to get those changes reviewed.
reviews based on that data, and the re- this other study to categorize the com- Something else we’ve done, quite
views would tell them what code had ments that had been left in the actual recently, is to give the developers a
been used and what part of the code code, we found they only rarely aligned way to explain what it was they were
was being reviewed. They would dig with those stated motivations. trying to accomplish. This is because
into that and quickly determine, “Oh, LP: Interesting. What did those com- a complaint we commonly hear from
it looks like people are having a tough ments chiefly focus on? reviewers is that it can be quite chal-
time reviewing code that uses this par- MG: There were a lot of comments lenging to understand the reasoning
ticular API.” That’s how they would de- about the documentation, of course. behind a code change. Which is to say
termine that their next training session And you would see some remarks hav- they would like some way to get into
ought to be devoted to that API. ing to do with alternative solutions. the mindset of the person who made
TC: Have you developed any metrics There also were comments about vali- that change so they can better under-
for essentially grading the quality of dation, which admittedly leaned in the stand whether it actually makes any
code reviews? direction of bug resolution since peo- sense or not.
CB: Not as such, but I know some ple would say, “You know, if this partic- One way of dealing with this is to
teams have built live dashboards ular corner case went away, you would show more than just the isolated sec-
around this data. Some develop- be able to eliminate some of these tion of code where a change has been
ment teams have mounted a massive problems.” People also had things to made. Instead, we show entire files
TV monitor right on the wall where say about API usage—and best practic- so reviewers can get a better sense of
metrics like “Time since last bug” or es as well. On the whole, I’d say these the code around each change. We also
“Time to delivery of next release” can sorts of comments far outweighed any wanted to provide some means for the
be displayed. One team told us they that focused on specific defects. author of a change to offer additional
also put code-review data up on their JC: To Michaela’s point regarding information so reviewers could better
scoreboard so people could see how this mismatch between expectations understand their reasoning. Toward
many code reviews are on backlog or and reality, despite the fact that peo- that end, our system now lets authors
how much time on average is required ple consistently said their primary put tags on files and regions to indi-
to complete a code review. From what reason for doing code reviews was cate which files are at the heart of a
they told us, it seems that having that to discover bugs in code, only 15% of change and so should probably be giv-
data up on a real-time dashboard, the comments we found in code actu- en particular attention. For example,
mission-control style, has proved to be ally related to bugs. For example, we the tags can be used to quickly indi-
quite motivating. would find comments about control- cate which changes have been made
flow issues or use of the wrong API— to test cases as opposed to the product
or even use of the right API but in codes. Or they can be used to call out
Delivering a new set of capabilities for the wrong way. On the other hand, at certain files or changes with potential
managing and improving Microsoft’s least half of the comments were about security implications.
code-review process was the primary maintainability. So, it would seem LP: Do you have any other new capa-
goal right from the start. In the course that for the reviewers themselves, bilities in the works?
of accomplishing that, much was also identifying maintainability issues JC: The fundamental underlying fac-
learned about certain general code- proves to be more of a priority than tor we’re trying to address is the size of
review principles—guidelines that uncovering bugs. code reviews since that affects both the
might also be applied to beneficial LP: Now that your work has been out time required to produce a review and
effect elsewhere. In fact, subsequent there for a number of years, what sort the usefulness of the comments that
research has offered surprising evi- of impact have you seen on code-review come out of it. It’s a difficult problem
dence of just how similar the impact policies and practices across all the dif- to address because some of the issues
can be when many of these principles ferent development teams? are cultural in nature, and some relate
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 43
practice
to workflow. Still, there are times when study of all the data at our disposal, otherwise be using to create code. If
two unrelated concerns end up getting we’ve concluded that for more than developers are rewarded only for add-
crammed into a single review, so we 20 files the density and usefulness ing functionality, that’s going to end
are hoping we will be able to untangle of comments degrades significantly. up crippling the code-review process,
some reviews by automatically split- This is actually more a rule of thumb which in turn will almost certainly have
ting those concerns into two smaller than a precise limit, but it is useful to an adverse effect on the maintainabil-
reviews. On average, that ought to lead keep in mind. ity of the code that’s generated.
to better turnaround times, as well as Also, if your organization has data CB: One thing I would like to add is
better outcomes. from past reviews, I would suggest in- that the code-review process we now
LP: Have you taken any steps to get vesting in a recommender system that have at Microsoft has more or less
development teams to focus their can help make some of the administra- grown organically—through experi-
code-review time on correctness and tive steps a little less tedious. You can mentation—from the grassroots. I
content versus style? Have any tool even use these systems to automatical- mention this only because I think it
changes or process changes been im- ly address some of your maintainabil- might also work well for smaller com-
plemented toward that end? ity issues, which is something we’re panies, instead of having some process
JC: We haven’t done a proper study starting to get into these days. That is, that’s mandated from the top down.
of that, but there is a team here that’s you can imagine that some of these Also, each product group at Micro-
done something along those lines. maintainability issues are essentially soft does code reviews a little differ-
This is something that had to do with things that might be autodiscovered ently, with each group using its own
some factoring changes they consid- and flagged, which means you then set of policies that have essentially
ered to be low-risk—such as the re- don’t have to expend any human re- come together organically. While this
naming of methods or local variables. sources to get this accomplished. probably won’t come as a ground-
For example, this might involve put- Another thing, as we just dis- breaking revelation, it can definitely
ting a special tag on a review to say, cussed, is the idea that two signoffs be said that there is no one-size-fits-
“We don’t really need to have two on every change might be too many. all solution for code reviews. This
people look at this. One is enough If you look at the distribution of com- only serves to reinforce the impor-
since it’s very unlikely we’ll have any ments made by either the first or the tance of being willing to let your ap-
functionality issues here.” Modest as second reviewer, you’ll find that your proach evolve organically such that it
that might seem, it can also prove pro- first reviewer typically discovers the ends up fitting in with your work pro-
found since it turns out there are many most egregious problems. In many cesses with the least amount of fric-
changes like this floating through a cases, waiting for a second reviewer tion while putting the lightest burden
legacy system—clogging the system. to corroborate those findings before possible on your developers.
The thing to remember is that it’s allowing the commit into the main Another important point is some-
not just about making one change go source tree might be less efficient. thing Michaela talked about earlier,
faster, since what you’re dealing with MG: My biggest takeaway from the which is that treating code review as a
here is a pipeline of changes—mean- survey is to always make the burden of first-class citizen—just as many com-
ing that any change you can redirect to code reviews just as small as you pos- panies are likely to treat testing—is
a lighter-weight path is going to lower sibly can. Part of that comes down to probably the best way to get the most
the load on your key people and get it having a good code-review process that bang for your buck. If, instead, it be-
out of the way of other changes wait- enables and encourages comments comes something you are just expect-
ing to be reviewed. That’s just the sort that can be easily reviewed. ed to do, like flossing your teeth daily,
of thing that makes for a more efficient Another important consideration then you’ll find people aren’t going to
system all the way around. has to do with supporting the review- embrace it. But if you say this is impor-
TC: With an eye to the people out- ers themselves by giving them advance tant and so will be tracked and evalu-
side of Microsoft that don’t have your notice about any reviews that might be ated, then people are likely to respond
tooling, do you have any recommenda- coming up and giving them enough to that. Certainly, that’s how it has
tions from your experience that might context so they will be able to dive worked out here.
prove relevant? right into a review without having to And then the other thing I would
JC: I would say the one thing to figure all that out for themselves. Do- add is that it’s instructive to think in
recognize is that comments related ing what you can to reduce the size of some depth about what it is you’re re-
to maintainability are primarily what reviews can also be helpful. But I think ally looking to get out of code reviews.
you are going to get out of the code- what is really important is to make the Then, of course, you should also think
review process. Contrary to popular reviews just as uncomplicated as pos- about how you can go about measur-
opinion, locating bugs is not the pri- sible, since, otherwise, you may end up ing that. To the degree that you can
mary outcome. The other important with reviewers who have no clue about track those metrics and set targets,
thing to bear in mind is that the small- where even to start. you’re always going to achieve more.
er a review is, the better it’s going to Also, organizations need to show
be. In our case, we’ve found that if a they recognize the value of code reviews
review contains more than 20 files, since there’s no question that they take
it’s too big already. In fact, from our away from the time developers could © 2019 ACM 0001-0782/19/2 $15.00.
Article development led by
queue.acm.org
The
Importance
of a Great
Finish
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 45
practice
formation every day that it is impos- every project you work on has a suc- done because you would have a bug-
sible to remember everything com- cessful, strong conclusion. If you are in gy, clunky product. When the details
pletely. As a result, our brains have to a position to present the project to your are done right, it looks seamless and
give priority to certain pieces of infor- leadership, make sure they see how you forget about how much work went
mation over others. your hard work applies to their goals into finishing.
This means we usually have the and the things that are most important Unfortunately, letting these boring
clearest recall for things that were as- to them. details go is akin to undoing all the ex-
sociated with strong emotions and citing work you already put in on the
things that happened most recently. Why So Few People Finish Strong project. If you want the beautiful thing
This is known as the Peak-End Rule Starting work on a new project or goal you built to stay standing, you have to
(https://en.wikipedia.org/wiki/Peak– is usually an exciting time. In the be- finish it out right.
end_rule). ginning, there is a lot of momentum.
This applies to all areas of our You are excited to tackle a big prob- How To Make a Great Finish
lives. It’s why you should always stay lem, and energy is high in meetings. a Priority
at the nicest hotel at the very end of The first 80% of a project is all about The next time you are hard at work on
your vacation—it’s the one you will building up; there is a thrill in creating a big project, make sure you allot time
remember most when you think something new. and energy for a strong finish. Set aside
about that trip. By the end, though, energy is low. time in your project plans for the bor-
At work, your performance reviews You push to get things done by a ing detail work; that way, it won’t catch
are usually weighted toward the work deadline, and you procrastinate on you by surprise. Make it seem just as
you did most recently. Why? Because it the boring stuff that still has to get important as all the rest of the work
is freshest in your manager’s mind. done, like extra testing, polishing, you do—because it is.
So, when you are working on a documentation, and boundary cases As you get to work on your next big
project, think about how it will be you missed earlier. goal, keep in mind these three ways
perceived by your leadership, keep- The less elegant work is not as much to make sure you finish strong and
ing in mind the importance of the fun to work on, so people don’t really make the biggest possible impact
end result. work on it. Plus, there is very little rec- with your work.
While you might remember the ognition for this kind of work.
long hours you worked to build a new Our brains are resistant to work- 1. Think Big Picture
feature one night, your boss may have ing on tasks that don’t seem to offer When you are working on a project,
a different perspective. If, for example, some kind of reward. They seem too always keep the bigger-picture goals
that feature you built had bugs that had small, or too tedious. It can be men- in mind. What is the overall impact of
to be fixed at the last minute, or opera- tally, and even physically, taxing to this project on your company? What
tional problems that generated nega- spend time on a job that you do not does your manager see as your team’s
tive attention, that’s what the boss will want to do or know you will not be biggest goal?
IMAGE BY PK.PH UKET ST UDIO
remember more than the many hours directly rewarded for. You may remember an amazing so-
you put in. These mundane tasks, when done lution you came up with early in the
Therefore, if you want to make a big correctly, make the problems they project, but your manager or executive
impact at work, you need to take advan- are solving invisible. You would only team—who were not in the trenches
tage of the Peak-End Rule by ensuring ever notice if that work had not been with you every day, and who instead are
making judgments based on limited a team that executed well. In time, you
information channeled up to them— will become known for always being on
have only so many details to go on. One the team that succeeds.
of the biggest factors they use to deter-
mine success or failure is how a project
wrapped up. When people 3. Channel Your Ability
To Keep Going
Did the project miss the deadline?
Were tons of bugs reported right after
lose momentum Have you ever heard a story about a
mother who lifted a car to save her
the launch? Did your team have to ex- on a project, child? What about marathon runners
plain to the boss why x, y, z didn’t work?
Whenever you are choosing what
it is usually right who talk about having “nothing left”
but go on to finish the race?
to work on or where to apply your around the time We all have extreme strength within
best efforts, take a moment to step
back. Zoom out from your own pref-
the shiniest, us; we just don’t usually see it because
it comes out only in extreme circum-
erences and remind yourself what most interesting stances.
the bigger-picture goals are. Where
will your work mean the most to the work gets In normal life, your brain commu-
nicates with your body about what you
people in charge? completed. can and cannot do. Your brain says,
If you are not sure, ask. Go to your
manager and say, “I am thinking about Don’t let “Hey, that will hurt,” and your body
slows down. In most situations, this
working on A or B next. Which is most
important? Or is there another place I
this happen serves you well. You cannot actually
lift a car every day, and you would not
should be focusing?” to you. want to try.
It may seem counterintuitive—you However, the ability to power
might worry that asking about priori- through challenges that you normally
ties might make you look stupid—but don’t face is in your toolkit. Remember
checking in with your manager is actu- that the next time you are nearing the
ally really smart. Not only do you en- end of a long, exhausting project. You
sure you are working on the right pri- can do it. You might feel like you have
orities, but it is also a great way to keep nothing left, but the end is the most
your manager up to date about your important part—so, draw on your re-
contributions and show that you are sources and make the last steps count.
focused on the big-picture goals that If you work hard on a project, your
matter most to managers. hours will not be worth as much if
you are not seen delivering a strong
2. Make the Unglamorous a Priority finish. So, make all that work worth
When people lose momentum on a it, and follow through on every single
project, it is usually right around the step. Dot your i’s, cross your t’s, and
time the shiniest, most interesting deliver amazing results that will take
work gets completed. Don’t let this you far in your career.
happen to you.
One way to approach the boring de-
Related articles
tails of a project—bug fixes, use cases, on queue.acm.org
among others—is to reframe them in
The Small Batches Principle
your mind. Tell yourself that this is ac-
Thomas A. Limoncelli
tually some of the most important work https://queue.acm.org/detail.cfm?id=2945077
you’ll do because you will be helping the
outcome to be as perfect as it can be. Kode Vicious Unleashed
George Neville-Neil
Look for opportunities to make
https://queue.acm.org/detail.cfm?id=1046939
these tasks more challenging or in-
teresting. Instead of slogging through Culture Surprises in Remote Software
boring details, try to bring new energy Development Teams
Judith S. Olson, Gary M. Olson
to them.
https://queue.acm.org/detail.cfm?id=966804
Although this work may not be all
that visible, it is still important. Re-
Kate Matsudaira (katemats.com) is an experienced
member that a rising tide lifts all boats. technology leader. She has worked at Microsoft and
Even if you do not get the glory for fixing Amazon and successful startups before starting her own
company, Popforms, which was acquired by Safari Books.
small final details, your work will make
the overall project more successful in Copyright held by owner/author.
the end, and you will have been part of Publication rights licensed to ACM. $15.00.
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 47
turing lecture
DOI:10.1145/ 3282307
A New Golden
Age for
Computer
Architecture
WE BEGAN OUR Turing Lecture June 4, 201811 with a review
of computer architecture since the 1960s. In addition
to that review, here, we highlight current challenges
and identify future opportunities, projecting another
golden age for the field of computer architecture in
the next decade, much like the 1980s when we did the
research that led to our award, delivering gains in cost, engineers, including ACM A.M. Tur-
energy, and security, as well as performance. ing Award laureate Fred Brooks, Jr.,
thought they could create a single ISA
that would efficiently unify all four of
“Those who cannot remember the past are condemned these ISA bases.
to repeat it.” —George Santayana, 1905 They needed a technical solution
for how computers as inexpensive as
signers then and now is the “brains” croinstructions. The control store was they took more clock cycles to execute
of the processor—the control hard- implemented through memory, which a System/360 instruction.
ware. Inspired by software program- was much less costly than logic gates. Facilitated by microprogramming,
ming, computing pioneer and Turing The table here lists four models IBM bet the future of the company
laureate Maurice Wilkes proposed of the new System/360 ISA IBM an- that the new ISA would revolutionize
how to simplify control. Control was nounced April 7, 1964. The data paths the computing industry and won the
specified as a two-dimensional ar- vary by a factor of 8, memory capacity bet. IBM dominated its markets, and
ray he called a “control store.” Each by a factor of 16, clock rate by nearly 4, IBM mainframe descendants of the
column of the array corresponded to performance by 50, and cost by near- computer family announced 55 years
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 49
turing lecture
ago still bring in $10 billion in rev- ated for the Xerox Palo Alto Research operating system written in the then-
enue per year. Center in 1973. It was indeed the first new programming language Ada.
As seen repeatedly, although the personal computer, sporting the first This ambitious project was alas sev-
marketplace is an imperfect judge of bit-mapped display and first Ethernet eral years late, forcing Intel to start an
technological issues, given the close local-area network. The device control- emergency replacement effort in Santa
ties between architecture and com- lers for the novel display and network Clara to deliver a 16-bit microproces-
mercial computers, it eventually deter- were microprograms stored in a 4,096- sor in 1979. Intel gave the new team 52
mines the success of architecture inno- word × 32-bit WCS. weeks to develop the new “8086” ISA
vations that often require significant Microprocessors were still in the and design and build the chip. Given
engineering investment. 8-bit era in the 1970s (such as the In- the tight schedule, designing the ISA
Integrated circuits, CISC, 432, 8086, tel 8080) and programmed primarily took only 10 person-weeks over three
IBM PC. When computers began us- in assembly language. Rival design- regular calendar weeks, essentially by
ing integrated circuits, Moore’s Law ers would add novel instructions to extending the 8-bit registers and in-
meant control stores could become outdo one another, showing their ad- struction set of the 8080 to 16 bits. The
much larger. Larger memories in turn vantages through assembly language team completed the 8086 on schedule
allowed much more complicated ISAs. examples. but to little fanfare when announced.
Consider that the control store of the Gordon Moore believed Intel’s To Intel’s great fortune, IBM was
VAX-11/780 from Digital Equipment next ISA would last the lifetime of developing a personal computer to
Corp. in 1977 was 5,120 words × 96 Intel, so he hired many clever com- compete with the Apple II and needed
bits, while its predecessor used only puter science Ph.D.’s and sent them a 16-bit microprocessor. IBM was in-
256 words × 56 bits. to a new facility in Portland to invent terested in the Motorola 68000, which
Some manufacturers chose to make the next great ISA. The 8800, as Intel had an ISA similar to the IBM 360, but
microprogramming available by let- originally named it, was an ambi- it was behind IBM’s aggressive sched-
ting select customers add custom tious computer architecture project ule. IBM switched instead to an 8-bit
features they called “writable control for any era, certainly the most ag- bus version of the 8086. When IBM an-
store” (WCS). The most famous WCS gressive of the 1980s. It had 32-bit nounced the PC on August 12, 1981, the
computer was the Alto36 Turing laure- capability-based addressing, ob- hope was to sell 250,000 PCs by 1986.
ates Chuck Thacker and Butler Lamp- ject-oriented architecture, variable- The company instead sold 100 million
son, together with their colleagues, cre- bit-length instructions, and its own worldwide, bestowing a very bright fu-
ture on the emergency replacement
Features of four models of the IBM System/360 family; IPS is instructions per second. Intel ISA.
Intel’s original 8800 project was
Model M30 M40 M50 M65 renamed iAPX-432 and finally an-
Datapath width 8 bits 16 bits 32 bits 64 bits nounced in 1981, but it required sev-
Control store size 4k x 50 4k x 52 2.75k x 85 2.75k x 87 eral chips and had severe performance
Clock rate 1.3 MHz 1.6 MHz 2 MHz 5 MHz problems. It was discontinued in 1986,
(ROM cycle time) (750 ns) (625 ns) (500 ns) (200 ns)
the year after Intel extended the 16-
Memory capacity 8–64 KiB 16–256 KiB 64–512 KiB 128–1,024 KiB bit 8086 ISA in the 80386 by expand-
Performance (commercial) 29,000 IPS 75,000 IPS 169,000 IPS 567,000 IPS ing its registers from 16 bits to 32 bits.
Performance (scientific) 10,200 IPS 40,000 IPS 133,000 IPS 563,000 IPS Moore’s prediction was thus correct
Price (1964 $) $192,000 $216,000 $460,000 $1,080,000 that the next ISA would last as long as
Price (2018 $) $1,560,000 $1,760,000 $3,720,000 $8,720,000 Intel did, but the marketplace chose
the emergency replacement 8086 rath-
er than the anointed 432. As the archi-
Figure 1. University of California, Berkeley, RISC-I and Stanford University MIPS tects of the Motorola 68000 and iAPX-
microprocessors.
432 both learned, the marketplace is
rarely patient.
From complex to reduced instruc-
tion set computers. The early 1980s
saw several investigations into com-
plex instruction set computers (CISC)
enabled by the big microprograms in
the larger control stores. With Unix
demonstrating that even operating sys-
tems could use high-level languages,
the critical question became: “What in-
structions would compilers generate?”
instead of “What assembly language
would programmers use?” Significant-
ly raising the hardware/software inter-
face created an opportunity for archi- datapath, along with instruction and
tecture innovation. data caches, in a single chip.
Turing laureate John Cocke and his For example, Figure 1 shows the
colleagues developed simpler ISAs and RISC-I8 and MIPS12 microprocessors
compilers for minicomputers. As an
experiment, they retargeted their re- In today’s post-PC developed at the University of Califor-
nia, Berkeley, and Stanford University
search compilers to use only the simple
register-register operations and load-
era, x86 shipments in 1982 and 1983, respectively, that
demonstrated the benefits of RISC.
store data transfers of the IBM 360 ISA, have fallen almost These chips were eventually presented
avoiding the more complicated instruc-
tions. They found that programs ran up
10% per year since at the leading circuit conference, the
IEEE International Solid-State Circuits
to three times faster using the simple the peak in 2011, Conference, in 1984.33,35 It was a re-
subset. Emer and Clark6 found 20% of
the VAX instructions needed 60% of the
while chips with markable moment when a few gradu-
ate students at Berkeley and Stanford
microcode and represented only 0.2% RISC processors could build microprocessors that were
of the execution time. One author (Pat-
terson) spent a sabbatical at DEC to have skyrocketed arguably superior to what industry
could build.
help reduce bugs in VAX microcode. If to 20 billion. These academic chips inspired
microprocessor manufacturers were many companies to build RISC micro-
going to follow the CISC ISA designs processors, which were the fastest for
of the larger computers, he thought the next 15 years. The explanation is
they would need a way to repair the due to the following formula for pro-
microcode bugs. He wrote such a cessor performance:
paper, 31 but the journal Computer Time/Program = Instructions /
rejected it. Reviewers opined that it was Program × (Clock cycles) /
a terrible idea to build microproces- Instruction × Time / (Clock cycle)
sors with ISAs so complicated that they DEC engineers later showed2 that
needed to be repaired in the field. That the more complicated CISC ISA execut-
rejection called into question the value ed about 75% of the number instruc-
of CISC ISAs for microprocessors. Iron- tions per program as RISC (the first
ically, modern CISC microprocessors term), but in a similar technology CISC
do indeed include microcode repair executed about five to six more clock
mechanisms, but the main result of his cycles per instruction (the second
paper rejection was to inspire him to term), making RISC microprocessors
work on less-complex ISAs for micro- approximately 4× faster.
processors—reduced instruction set Such formulas were not part of com-
computers (RISC). puter architecture books in the 1980s,
These observations and the shift to leading us to write Computer Architec-
high-level languages led to the opportu- ture: A Quantitative Approach13 in 1989.
nity to switch from CISC to RISC. First, The subtitle suggested the theme of the
the RISC instructions were simplified book: Use measurements and bench-
so there was no need for a microcod- marks to evaluate trade-offs quanti-
ed interpreter. The RISC instructions tatively instead of relying more on the
were typically as simple as microin- architect’s intuition and experience, as
structions and could be executed di- in the past. The quantitative approach
rectly by the hardware. Second, the we used was also inspired by what Tur-
fast memory, formerly used for the ing laureate Donald Knuth’s book had
microcode interpreter of a CISC ISA, done for algorithms.20
was repurposed to be a cache of RISC VLIW, EPIC, Itanium. The next ISA
instructions. (A cache is a small, fast innovation was supposed to succeed
memory that buffers recently execut- both RISC and CISC. Very long instruc-
ed instructions, as such instructions tion word (VLIW)7 and its cousin, the
are likely to be reused soon.) Third, explicitly parallel instruction computer
register allocators based on Gregory (EPIC), the name Intel and Hewlett
Chaitin’s graph-coloring scheme made Packard gave to the approach, used wide
it much easier for compilers to efficient- instructions with multiple independent
ly use registers, which benefited these operations bundled together in each
register-register ISAs.3 Finally, Moore’s instruction. VLIW and EPIC advocates
Law meant there were enough transis- at the time believed if a single instruc-
tors in the 1980s to include a full 32-bit tion could specify, say, six independent
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 51
turing lecture
Figure 2. Transistors per chip of Intel microprocessors vs. Moore’s Law. tion of the RISC microinstructions.
Any ideas RISC designers were using
Moore’s Law vs. Intel Microprocessor Density for performance—separate instruc-
Moore’s Law (1975 version) Density tion and data caches, second-level
10,000,000 caches on chip, deep pipelines, and
1,000,000 fetching and executing several in-
structions simultaneously—could
100,000
then be incorporated into the x86.
10,000 AMD and Intel shipped roughly 350
million x86 microprocessors annually
1,000
at the peak of the PC era in 2011. The
100 high volumes and low margins of the
PC industry also meant lower prices
10
than RISC computers.
Given the hundreds of millions
1980 1990 2000 2010
of PCs sold worldwide each year, PC
software became a giant market.
Whereas software providers for the
Figure 3. Transistors per chip and power per mm2. Unix marketplace would offer differ-
ent software versions for the differ-
Technology (nm) Power/nm2
ent commercial RISC ISAs—Alpha,
200 4.5 HP-PA, MIPS, Power, and SPARC—the
180 4 PC market enjoyed a single ISA, so
120
3 wrap” software that was binary com-
100
2.5 patible with only the x86 ISA. A much
80 2 larger software base, similar perfor-
60 1.5 mance, and lower prices led the x86
40 1 to dominate both desktop computers
20 0.5 and small-server markets by 2000.
0 0 Apple helped launch the post-PC
2000 2002 2004 2006 2008 2010 2012 2014 2016 2018 2020
era with the iPhone in 2007. Instead of
buying microprocessors, smartphone
companies built their own systems
operations—two data transfers, two in- to write.” Pundits noted delays and on a chip (SoC) using designs from
teger operations, and two floating point underperformance of Itanium and re- other companies, including RISC
operations—and compiler technology christened it “Itanic” after the ill-fated processors from ARM. Mobile-device
could efficiently assign operations into Titantic passenger ship. The market- designers valued die area and energy
the six instruction slots, the hardware place again eventually ran out of pa- efficiency as much as performance,
could be made simpler. Like the RISC tience, leading to a 64-bit version of disadvantaging CISC ISAs. Moreover,
approach, VLIW and EPIC shifted work the x86 as the successor to the 32-bit arrival of the Internet of Things vastly
from the hardware to the compiler. x86, and not Itanium. increased both the number of proces-
Working together, Intel and Hewlett The good news is VLIW still matches sors and the required trade-offs in die
Packard designed a 64-bit processor based narrower applications with small pro- size, power, cost, and performance.
on EPIC ideas to replace the 32-bit x86. grams and simpler branches and omit This trend increased the importance
High expectations were set for the first caches, including digital-signal processing. of design time and cost, further dis-
EPIC processor, called Itanium by In- advantaging CISC processors. In to-
tel and Hewlett Packard, but the real- RISC vs. CISC in the day’s post-PC era, x86 shipments have
ity did not match its developers’ early PC and Post-PC Eras fallen almost 10% per year since the
claims. Although the EPIC approach AMD and Intel used 500-person de- peak in 2011, while chips with RISC
worked well for highly structured sign teams and superior semicon- processors have skyrocketed to 20 bil-
floating-point programs, it struggled ductor technology to close the per- lion. Today, 99% of 32-bit and 64-bit
to achieve high performance for in- formance gap between x86 and RISC. processors are RISC.
teger programs that had less predict- Again inspired by the performance Concluding this historical review,
able cache misses or less-predictable advantages of pipelining simple vs. we can say the marketplace settled the
branches. As Donald Knuth later complex instructions, the instruction RISC-CISC debate; CISC won the later
noted:21 “The Itanium approach ... decoder translated the complex x86 stages of the PC era, but RISC is win-
was supposed to be so terrific—un- instructions into internal RISC-like ning the post-PC era. There have been
til it turned out that the wished-for microinstructions on the fly. AMD no new CISC ISAs in decades. To our
compilers were basically impossible and Intel then pipelined the execu- surprise, the consensus on the best
ISA principles for general-purpose generation of technology, computers cluding approximately 15 branches,
processors today is still RISC, 35 years would become more energy efficient. as they represent approximately 25%
after their introduction. Dennard scaling began to slow sig- of executed instructions. To keep the
nificantly in 2007 and faded to almost pipeline full, branches are predicted
Current Challenges for nothing by 2012 (see Figure 3). and code is speculatively placed into
Processor Architecture Between 1986 and about 2002, the the pipeline for execution. The use
“If a problem has no solution, it may exploitation of instruction level paral- of speculation is both the source of
not be a problem, but a fact—not to be lelism (ILP) was the primary architec- ILP performance and of inefficiency.
solved, but to be coped with over time.” tural method for gaining performance When branch prediction is perfect,
—Shimon Peres and, along with improvements in speed speculation improves performance
While the previous section focused of transistors, led to an annual perfor- yet involves little added energy cost—
on the design of the instruction set mance increase of approximately 50%. it can even save energy—but when it
architecture (ISA), most computer The end of Dennard scaling meant ar- “mispredicts” branches, the proces-
architects do not design new ISAs chitects had to find more efficient ways sor must throw away the incorrectly
but implement existing ISAs in the to exploit parallelism. speculated instructions, and their
prevailing implementation technol- To understand why increasing ILP computational work and energy are
ogy. Since the late 1970s, the technol- caused greater inefficiency, consider wasted. The internal state of the pro-
ogy of choice has been metal oxide a modern processor core like those cessor must also be restored to the
semiconductor (MOS)-based inte- from ARM, Intel, and AMD. Assume it state that existed before the mispre-
grated circuits, first n-type metal–ox- has a 15-stage pipeline and can issue dicted branch, expending additional
ide semiconductor (nMOS) and then four instructions every clock cycle. It time and energy.
complementary metal–oxide semi- thus has up to 60 instructions in the To see how challenging such a design
conductor (CMOS). The stunning rate pipeline at any moment in time, in- is, consider the difficulty of correctly
of improvement in MOS technology—
captured in Gordon Moore’s predic- Figure 4. Wasted instructions as a percentage of all instructions completed on an Intel
Core i7 for a variety of SPEC integer benchmarks.
tions—has been the driving factor
enabling architects to design more-
aggressive methods for achieving 40% 39% 38%
performance for a given ISA. Moore’s 35% 32%
30%
original prediction in 196526 called 25%
25% 24%
for a doubling in transistor density 22%
20%
yearly; in 1975, he revised it, project- 15% 15%
11%
ing a doubling every two years.28 It 10%
6% 7%
eventually became called Moore’s 5% 5%
1%
Law. Because transistor density grows 0
LIBQUANTUM
XALANCBMK
OMNETPP
PERLBEN
H264REF
quadratically while speed grows lin-
HMMER
GOBMK
SJENG
ASTAR
BZIP2
MCF
GCC
35
proaches fundamental limits. 30
Accompanying Moore’s Law was a 2%
25
projection made by Robert Dennard 20
4%
called “Dennard scaling,”5 stating that 15 6%
as transistor density increased, power 10 8%
10%
consumption per transistor would 5
drop, so the power per mm2 of sili- 0
1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65
con would be near constant. Since the
Processor Count
computational capability of a mm2 of
silicon was increasing with each new
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 53
turing lecture
predicting the outcome of 15 branches. ent approach to achieve performance a single core, assuming different por-
If a processor architect wants to limit improvements. The multicore era was tions of serial execution, where only
wasted work to only 10% of the time, thus born. one processor is active. For example,
the processor must predict each branch Multicore shifted responsibility for when only 1% of the time is serial, the
correctly 99.3% of the time. Few general- identifying parallelism and deciding speedup for a 64-processor configura-
purpose programs have branches that how to exploit it to the programmer tion is about 35. Unfortunately, the
can be predicted so accurately. and to the language system. Multicore power needed is proportional to 64
To appreciate how this wasted work does not resolve the challenge of ener- processors, so approximately 45% of
adds up, consider the data in Figure 4, gy-efficient computation that was exac- the energy is wasted.
showing the fraction of instructions erbated by the end of Dennard scaling. Real programs have more complex
that are effectively executed but turn Each active core burns power whether structures of course, with portions
out to be wasted because the proces- or not it contributes effectively to the that allow varying numbers of proces-
sor speculated incorrectly. On average, computation. A primary hurdle is an sors to be used at any given moment
19% of the instructions are wasted for old observation, called Amdahl’s Law, in time. Nonetheless, the need to com-
these benchmarks on an Intel Core i7. stating that the speedup from a paral- municate and synchronize periodically
The amount of wasted energy is great- lel computer is limited by the portion means most applications have some
er, however, since the processor must of a computation that is sequential. portions that can effectively use only
use additional energy to restore the To appreciate the importance of this a fraction of the processors. Although
state when it speculates incorrectly. observation, consider Figure 5, show- Amdahl’s Law is more than 50 years
Measurements like these led many to ing how much faster an application old, it remains a difficult hurdle.
conclude architects needed a differ- runs with up to 64 cores compared to With the end of Dennard scaling,
increasing the number of cores on a
Figure 6. Growth of computer performance using integer programs (SPECintCPU). chip meant power is also increasing
at nearly the same rate. Unfortunately,
End of the Line ⇒ 2X/20 years (3%/yr) the power that goes into a processor
Amdahl’s Law ⇒ 2X/6 years (12%/year) must also be removed as heat. Mul-
End of Dennard Scaling ⇒ Multicore 2X/3.5 years (23%/year) ticore processors are thus limited by
CISC 2X/2.5 years RISC 2X/1.5 years the thermal dissipation power (TDP),
(22%/year) (52%/year)
100,000 or average amount of power the pack-
age and cooling system can remove.
Although some high-end data centers
Performance vs. VAX11-780
10,000
may use more advanced packages and
cooling technology, no computer us-
1,000 ers would want to put a small heat
exchanger on their desks or wear a ra-
100 diator on their backs to cool their cell-
phones. The limit of TDP led directly
10 to the era of “dark silicon,” whereby
processors would slow on the clock
1 rate and turn off idle cores to prevent
1980 1985 1990 1995 2000 2005 2010 2015
overheating. Another way to view this
approach is that some chips can real-
locate their precious power from the
Figure 7. Potential speedup of matrix multiply in Python for four optimizations. idle cores to the active ones.
An era without Dennard scaling,
Matrix Multiply Speedup Over Native Python along with reduced Moore’s Law and
62,806 Amdahl’s Law in full effect means
100,000
inefficiency limits improvement in
6,727 performance to only a few percent
10,000
per year (see Figure 6). Achieving
Speedup
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 55
turing lecture
14 GiB/s 30 GiB/s
DDR3 Weight FIFO
Interfaces (Weight Fetcher)
Lo
165
10 GiB/s Unified Buffer (96K
Systolic GiB/s Matrix
(Local
Interface
Storage)
Host
Control Accumulators
D
R
A
Activation M C
port
Instr
165 GiB/s
ddr3
Off-Chip I/O Normalize/Pool 3%
Data Buffer
Computation
Control Control
Control
Not to Scale
level languages with dynamic typing and An interesting research direction application-specific integrated cir-
storage management. Unfortunately, concerns whether some of the perfor- cuits (ASICs) that are often used for a
such languages are typically interpreted mance gap can be closed with new com- single function with code that rarely
and execute very inefficiently. Leiserson piler technology, possibly assisted by changes. DSAs are often called acceler-
et al.24 used a small example—perform- architectural enhancements. Although ators, since they accelerate some of an
ing matrix multiply—to illustrate this the challenges in efficiently translating application when compared to execut-
inefficiency. As in Figure 7, simply re- and implementing high-level scripting ing the entire application on a general-
writing the code in C from Python—a languages like Python are difficult, the purpose CPU. Moreover, DSAs can
typical high-level, dynamically typed lan- potential gain is enormous. Achieving achieve better performance because
guage—increases performance 47-fold. even 25% of the potential gain could they are more closely tailored to the
Using parallel loops running on many result in Python programs running needs of the application; examples of
cores yields a factor of approximately tens to hundreds of times faster. This DSAs include graphics processing
7. Optimizing the memory layout to ex- simple example illustrates how great units (GPUs), neural network proces-
ploit caches yields a factor of 20, and a the gap is between modern languages sors used for deep learning, and pro-
final factor of 9 comes from using the emphasizing programmer productivity cessors for software-defined networks
hardware extensions for doing single in- and traditional approaches emphasiz- (SDNs). DSAs can achieve higher per-
struction multiple data (SIMD) parallel- ing performance. formance and greater energy efficiency
ism operations that are able to perform Domain-specific architectures. A for four main reasons:
16 32-bit operations per instruction. more hardware-centric approach is to First and most important, DSAs
All told, the final, highly optimized ver- design architectures tailored to a spe- exploit a more efficient form of par-
sion runs more than 62,000× faster on cific problem domain and offer signif- allelism for the specific domain. For
a multicore Intel processor compared icant performance (and efficiency) example, single-instruction multiple
to the original Python version. This is of gains for that domain, hence, the data parallelism (SIMD), is more ef-
course a small example, one might ex- name “domain-specific architectures” ficient than multiple instruction mul-
pect programmers to use an optimized (DSAs), a class of processors tailored tiple data (MIMD) because it needs to
library for. Although it exaggerates the for a specific domain—programmable fetch only one instruction stream and
usual performance gap, there are likely and often Turing-complete but tai- processing units operate in lockstep.9
many programs for which factors of 100 lored to a specific class of applica- Although SIMD is less flexible than
to 1,000 could be achieved. tions. In this sense, they differ from MIMD, it is a good match for many
DSAs. DSAs may also use VLIW ap- cessors operate. For suitable applica- to the processor efficiently. Examples
proaches to ILP rather than specula- tions, user-controlled memories can of DSLs include Matlab, a language for
tive out-of-order mechanisms. As men- use much less energy than caches. operating on matrices, TensorFlow, a
tioned earlier, VLIW processors are a Third, DSAs can use less precision dataflow language used for program-
poor match for general-purpose code15 when it is adequate. General-purpose ming DNNs, P4, a language for pro-
but for limited domains can be much CPUs usually support 32- and 64-bit in- gramming SDNs, and Halide, a lan-
more efficient, since the control mech- teger and floating-point (FP) data. For guage for image processing specifying
anisms are simpler. In particular, most many applications in machine learn- high-level transformations.
high-end general-purpose processors ing and graphics, this is more accuracy The challenge when using DSLs is
are out-of-order superscalars that re- than is needed. For example, in deep how to retain enough architecture in-
quire complex control logic for both neural networks (DNNs), inference dependence that software written in
instruction initiation and instruction regularly uses 4-, 8-, or 16-bit integers, a DSL can be ported to different ar-
completion. In contrast, VLIWs per- improving both data and computation- chitectures while also achieving high
form the necessary analysis and sched- al throughput. Likewise, for DNN train- efficiency in mapping the software
uling at compile-time, which can work ing applications, FP is useful, but 32 to the underlying DSA. For example,
well for an explicitly parallel program. bits is enough and 16 bits often works. the XLA system translates Tensorflow
Second, DSAs can make more effec- Finally, DSAs benefit from targeting to heterogeneous processors that
tive use of the memory hierarchy. Mem- programs written in domain-specific use Nvidia GPUs or Tensor Processor
ory accesses have become much more languages (DSLs) that expose more Units (TPUs).40 Balancing portability
costly than arithmetic computations, parallelism, improve the structure and among DSAs along with efficiency is
as noted by Horowitz.16 For example, representation of memory access, and an interesting research challenge for
accessing a block in a 32-kilobyte cache make it easier to map the application ef- language designers, compiler creators,
involves an energy cost approximately ficiently to a domain-specific processor. and DSA architects.
200× higher than a 32-bit integer add. Example DSA: TPU v1. As an example
This enormous differential makes Domain-Specific Languages DSA, consider the Google TPU v1, which
optimizing memory accesses critical DSAs require targeting of high-level op- was designed to accelerate neural net
to achieving high-energy efficiency. erations to the architecture, but trying inference.17,18 The TPU has been in
General-purpose processors run code to extract such structure and informa- production since 2015 and powers ap-
in which memory accesses typically ex- tion from a general-purpose language plications ranging from search queries
hibit spatial and temporal locality but like Python, Java, C, or Fortran is sim- to language translation to image recog-
are otherwise not very predictable at ply too difficult. Domain specific lan- nition to AlphaGo and AlphaZero, the
compile time. CPUs thus use multilevel guages (DSLs) enable this process and DeepMind programs for playing Go and
caches to increase bandwidth and hide make it possible to program DSAs ef- Chess. The goal was to improve the per-
the latency in relatively slow, off-chip ficiently. For example, DSLs can make formance and energy efficiency of deep
DRAMs. These multilevel caches often vector, dense matrix, and sparse ma- neural net inference by a factor of 10.
consume approximately half the energy trix operations explicit, enabling the As shown in Figure 8, the TPU or-
of the processor but avoid almost all DSL compiler to map the operations ganization is radically different from a
accesses to the off-chip DRAMs that re-
quire approximately 10× the energy of a Figure 9. Agile hardware development methodology.
last-level cache access.
Caches have two notable disadvan-
tages: Big Chip
Tape-Out
When datasets are very large. Caches
simply do not work well when datasets Tape-Out
are very large and also have low tempo-
ral or spatial locality; and
When caches work well. When
Tape-In
caches work well, the locality is very
high, meaning, by definition, most
of the cache is idle most of the time. ASIC Flow
In applications where the memory-
access patterns are well defined and FPGA
discoverable at compile time, which
is true of typical DSLs, programmers C++
and compilers can optimize the use of
the memory better than can dynami-
cally allocated caches. DSAs thus usu-
ally use a hierarchy of memories with
movement controlled explicitly by the
software, similar to how vector pro-
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 57
turing lecture
general-purpose processor. The main amine and make complex trade-offs and Foundation (http://riscv.org/). Being
computational unit is a matrix unit, optimizations will be advantaged. open allows the ISA evolution to occur
a systolic array22 structure that pro- This opportunity has already led to in public, with hardware and software
vides 256 × 256 multiply-accumulates a surge of architecture innovation, at- experts collaborating before decisions
every clock cycle. The combination of tracting many competing architectural are finalized. An added benefit of an
8-bit precision, highly efficient sys- philosophies: open foundation is the ISA is unlikely to
tolic structure, SIMD control, and GPUs. Nvidia GPUs use many cores, expand primarily for marketing reasons,
dedication of significant chip area to each with large register files, many sometimes the only explanation for ex-
this function means the number of hardware threads, and caches;4 tensions of proprietary instruction sets.
multiply-accumulates per clock cycle TPUs. Google TPUs rely on large RISC-V is a modular instruction set.
is approximately 100× what a general- two-dimensional systolic multipli- A small base of instructions run the full
purpose single-core CPU can sustain. ers and software-controlled on-chip open source software stack, followed by
Rather than caches, the TPU uses a lo- memories;17 optional standard extensions designers
cal memory of 24 megabytes, approxi- FPGAs. Microsoft deploys field pro- can include or omit depending on their
mately double a 2015 general-purpose grammable gate arrays (FPGAs) in its needs. This base includes 32-bit address
CPU with the same power dissipa- data centers it tailors to neural network and 64-bit address versions. RISC-V can
tion. Finally, both the activation applications;10 and grow only through optional extensions;
memory and the weight memory (in- CPUs. Intel offers CPUs with many the software stack still runs fine even if
cluding a FIFO structure that holds cores enhanced by large multi-level architects do not embrace new exten-
weights) are linked through user- caches and one-dimensional SIMD in- sions. Proprietary architectures gener-
controlled high-bandwidth memory structions, the kind of FPGAs used by ally require upward binary compatibil-
channels. Using a weighted arith- Microsoft, and a new neural network ity, meaning when a processor company
metic mean based on six common processor that is closer to a TPU than adds new feature, all future processors
inference problems in Google data to a CPU.19 must also include it. Not so for RISC-V,
centers, the TPU is 29× faster than a In addition to these large players, whereby all enhancements are optional
general-purpose CPU. Since the TPU dozens of startups are pursuing their and can be deleted if not needed by an
requires less than half the power, it own proposals.25 To meet growing de- application. Here are the standard ex-
has an energy efficiency for this work- mand, architects are interconnecting tensions so far, using initials that stand
load that is more than 80× better than a hundreds to thousands of such chips to for their full names:
general-purpose CPU. form neural-network supercomputers. M. Integer multiply/divide;
This avalanche of DNN architec- A. Atomic memory operations;
Summary tures makes for interesting times in F/D. Single/double-precision float-
We have considered two different ap- computer architecture. It is difficult to ing-point; and
proaches to improve program perfor- predict in 2019 which (or even if any) of C. Compressed instructions.
mance by improving efficiency in the these many directions will win, but the A third distinguishing feature of
use of hardware technology: First, by marketplace will surely settle the com- RISC-V is the simplicity of the ISA.
improving the performance of modern petition just as it settled the architec- While not readily quantifiable, here are
high-level languages that are typically tural debates of the past. two comparisons to the ARMv8 archi-
interpreted; and second, by building do- tecture, as developed by the ARM com-
main-specific architectures that greatly Open Architectures pany contemporaneously:
improve performance and efficiency Inspired by the success of open source Fewer instructions. RISC-V has many
compared to general-purpose CPUs. software, the second opportunity in fewer instructions. There are 50 in
DSLs are another example of how to im- computer architecture is open ISAs. the base that are surprisingly similar
prove the hardware/software interface To create a “Linux for processors” the in number and nature to the origi-
that enables architecture innovations field needs industry-standard open nal RISC-I.30 The remaining standard
like DSAs. Achieving significant gains ISAs so the community can create extensions—M, A, F, and D—add 53
through such approaches will require open source cores, in addition to indi- instructions, plus C added another 34,
a vertically integrated design team that vidual companies owning proprietary totaling 137. ARMv8 has more than
understands applications, domain- ones. If many organizations design 500; and
specific languages and related compil- processors using the same ISA, the Fewer instruction formats. RISC-V
er technology, computer architecture greater competition may drive even has many fewer instruction formats,
and organization, and the underlying quicker innovation. The goal is to six, while ARMv8 has at least 14.
implementation technology. The need provide processors for chips that cost Simplicity reduces the effort to both
to vertically integrate and make design from a few cents to $100. design processors and verify hardware
decisions across levels of abstraction The first example is RISC-V (called correctness. As the RISC-V targets range
was characteristic of much of the early “RISC Five”), the fifth RISC architecture from data-center chips to IoT devices,
work in computing before the industry developed at the University of Califor- design verification can be a significant
became horizontally structured. In this nia, Berkeley.32 RISC-V’s has a commu- part of the cost of development.
new era, vertical integration has become nity that maintains the architecture Fourth, RISC-V is a clean-slate de-
more important, and teams that can ex- under the stewardship of the RISC-V sign, starting 25 years later, letting its
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 59
turing lecture
Even Central
Users Do Not
Always Drive
Information
Diffusion
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 61
contributed articles
During diffusion, all nodes in a network are divided into three categories: source nodes, infected nodes,
and susceptible nodes. The source nodes receive information first and trigger the overall diffusion
process. The infected and susceptible nodes represent nodes that have or have not received information.
At each time step, each infected node tries to infect all susceptible neighbors with a certain probability.
The final infected time of each node is labeled; for example, at time step t = 8, two snapshots are used to
present two diffusion processes: (a) the process is triggered by two highly connected source nodes; and
(b) the process starts from the relatively least-connected source nodes. In particular, solid and dashed
arrows associated with links denote successful and unsuccessful infection paths. Section (c) reports the
dynamic changes of infected nodes in (a) and (b) at each time step. The crossover of the two propagation
scales in (a) and (b) is plotted in (c).
each other.2 A greater value means a assuming the behavior of each user pose of giving an intuitive demonstra-
network’s greater inherent tendency to is independent, we used a Gaussian tion of a crossover, as plotted in Figure
cluster of a network. distribution to depict the features of 2a. We also investigated the dynamic
Simulation model. Each user is es- two behaviors when the sample size is changes of two propagation scales by
sentially represented by two states large.7 In this article, we use two nor- calculating the numerical difference
in the scenario of information diffu- mal distribution functions—N(40, 202) of two propagation processes at each
sion—“received” a message or “not and N(0.5, 0.32)—to represent the fea- time t, as plotted in Figure 2b. Three
received” a message. We adopt a typi- tures of checking intervals and clicking critical points are labeled t1, tc, and t2.
cal “two-state” diffusion model—the probability.7,22 When t < tc, the difference between
interactive email model proposed by Experimental settings. We set the per- propagation scales is positive, as shown
Zou et al.22 and implemented by Gao centage of initial source nodes at 20%. in Figure 2b. That difference corre-
et al.7—as a testbed for characterizing We simulated two diffusion processes sponds to the stage (see t < tc in Figure
various kinds of information-diffusion triggered by maximum-degree nodes 2a) when the propagation process, trig-
processes.6,7 Each node in the model and minimum-degree nodes in the gered by the maximum degree nodes,
reflects one of two corresponding email network simultaneously and diffuses more quickly than the other
states—“susceptible” or “infected”— independently. We averaged simula- process. The maximum difference is
and the transition cannot be reversed; tion results by following 100 runs for found the moment t = t1 in Figure 2b.
that is, a user who receives a message is wiping off the computational fluctua- However, as the propagation contin-
denoted as an “infected” node, and oth- tion. In each run, we terminated the ues (see t1 < t < t2), the numerical dif-
ers are denoted as “susceptible.” In a propagation process after 2,000 time ference decreases sharply, as plotted
diffusion process, a basic step that ben- steps to ensure the whole system is in Figure 2b. This unexpected change
efits the subsequent process is a user and would remain stable. implies the propagation process, trig-
must change state from “susceptible” Experimental results. In general, we gered by the minimum-degree nodes,
to “infected.” The diffusion process is used the proportion or total number represents relatively greater propaga-
triggered by user behavior—the email- of infected nodes to evaluate a propa- tion ability. The shift coincides with
checking time interval and the email- gation process. Here, we adopt the to- the dynamic change of the propagation
clicking probability. The diffusion rate tal number of infected nodes at time scale in Figure 2a. When t > tc, the shift
is thus different for different users. By t as the propagation scale for the pur- is completely reversed. The propaga-
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 63
contributed articles
tion process, triggered by minimum- we conducted more simulations, as we 631,632 links,18 looking to identify
degree nodes, leads to a larger scale of explore in two real-world networks in community-based features on co-au-
diffusion until the whole propagation the next section. thorship patterns. The average degree
system is stable. The maximum differ- and clustering coefficient of the Arxiv
ence is reached numerically at time t2, Nonlinear Crossover Phenomenon networks were 11.23 and 0.69, respec-
even exceeding that of time t1. The time To obtain a deeper understanding of tively, and the overall Arxiv network
tc is the exact crossover point of the two such a phenomenon, we simulated included 42 communities.
propagation processes in Figure 2. propagations in real-world networks: Experimental settings. The initial
During the propagation process, the Datasets. We included two real- proportion of source nodes we denote
most important period is between t1 world networks with a potential com- as i0 varied from 0.01 to 0.5 and was di-
and t2 when the two potential propaga- munity structure—a U.S. political vided into two parts. When the initial
tion processes undergo different tran- weblog network (PolBlogs)1 and a proportion is between 0.01 and 0.05,
sitions. The phenomenon in Figure 2 scientific collaboration network (Arx- the rate of increase increases by 1%, af-
shows that, compared to nodes with iv).18 The PolBlogs network includes ter which the rate of increase increases
relatively greater centrality, those with 1,490 nodes and 19,025 links. Its aver- to 5%. We selected the initial source
relatively less centrality could ensure age degree and clustering coefficient nodes based on four kinds of central-
the stability of propagation, reflecting were 22.44 and 0.36, respectively. Two ity measures: degree,2 betweenness,11
its vital role in long-term diffusion. political communities represent lib- k-core,14 and eigenvector.3
Such an interesting phenomenon also eral blogs and conservative blogs, Experimental results. Under the
implies that in some cases, even central respectively.1 Mark Newman of the same experimental conditions as
users may not always drive information University of Michigan analyzed the outlined in the previous section, two
diffusion. To validate this assumption, Arxiv network, with 56,276 nodes and propagation processes are triggered by
source nodes with relatively greatest
Figure 2. Crossover of two propagation processes in terms of propagation scale in a and relatively least centrality. Our focus
university email network.
is still on the critical crossover points.
Time tc represents the critical moment the crossover begins, indicating nodes with relatively greater
Since they are relevant to the time steps
centrality do not always drive diffusion. of each propagation, we recorded the
time each crossover point emerged
X102 X102
12 and normalized them based on tc/2000,
Maximum degree t1
of two propagation scales
Minimum degree 1
10 is plotted in Figure 3. Despite different
Propagation scale
crossover points
Time of different
Time of different
vails and will intensify when the initial the diffusion network. Specifically, al-
proportion of source nodes increases. though the initial source nodes in two
We also investigated the influence of propagation processes share the same
different initial states on effective dif- proportion, the potential processes
fusion links to verify our hypothesis, as
proposed in Figure 1. The underlying can be different in light of the diversity
of the underlying diffusion network.
Diffusion links analysis. Taking the
email network as an example, we evalu-
attack reflects a Since both the initial proportion of
source nodes and the strength of com-
ated two opposite initial states under malicious diffusion munity structure influence potential
four kinds of centrality measures by cal-
culating the average distance of source
in the presence crossover points, we explored more
simulations in synthetic networks to
nodes. This distance can reveal the de- of communities; identify the influence of these factors.
gree to which source nodes are close to
each other. A shorter average distance
that is, the Influence Comparison
refers to a relatively greater probability homogeneous To help us understand the influence of
of being clustered together. Diffusion
links between source nodes could thus feature of the strength of community structure
on the diffusion process, we adopted
be decreased. As outlined in Figure 4, individuals leads a community-network generator12 with
under the condition of nodes with rela-
tively greatest centrality functioning as to the community’s tunable parameters:
Datasets. We built two synthetic net-
source nodes, the average distance of
these sources is much shorter than the
vulnerability. works by varying the mix parameter μ
= 0.05 and 0.5. This parameter controls
distance under nodes with relatively the strength of a community structure,
least centrality being treated as source indicating that with a smaller μ, the
nodes. The reason for the shorter dis- community structure of a synthetic
tance is that nodes with relatively least network is stronger. The generator in-
centrality are located at the boundary cludes two kinds of parameters—spec-
of a network, and vice versa. Hence, ified and default settings. We assigned
when nodes with relatively greatest the specified settings as follows: to-
centrality are selected as sources, the tal number of nodes = 1,000; average
increasing proportion of source nodes degree = 15; maximum degree in the
can lead to a relative decrease in effec- network = 50; and maximum and mini-
tive diffusion links. Moreover, the sub- mum community sizes = 50 and 20,
sequent propagation process would be respectively. We kept the default set-
suppressed. How nodes with relatively tings, with the exponent for the degree
greatest centrality might enhance in- distribution at 2; the exponent for the
formation diffusion depends on the community-size distribution at 1; and
number of initial source nodes cluster- the number of overlapping nodes and
ing together. In particular, when there number of memberships of the over-
are few initial source nodes (such as lapping nodes both at 0.
less than 1%), the propagation ability Experimental results. Following the
of nodes with relatively greatest cen- same experimental scenario, we per-
trality can take full effect.
Behind the crossover phenomenon, Figure 4. Average distance of source
nodes in the email network. Statistical
this shift is derived by taking into ac- results indicate source nodes with
count two propagation processes—great- relatively greater centrality tend to be
est-centrality-based and least-centrality- clustered together.
based—as triggered by different initial
states. In the domain of social net- 8
Minimum degree
works, analysis of a diffusion process is Minimum betweenness
6 Minimum k-core
Average distance
Minimum eigenvector
model and the topology of an underly- 4
ing network. In our experiments, we
simulated two propagation processes 2
Maximum degree
simultaneously based on the same Maximum betweenness
model, indicating the crossover phe- 0 Maximum k-core
Maximum eigenvector
nomenon is independent of the select-
0.0 0.1 0.2 0.3 0.4 0.5
ed simulation models. The only factor Initial proportion
that should be relevant to this observed of source nodes (i0)
phenomenon is thus the structure of
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 65
contributed articles
formed extensive simulations in two cludes average time and standard devi- ther detail, in addition to the crossover
such synthetic networks.12 Compar- ation of different crossover points with phenomenon:
ing the influence of the initial propor- respect to four kinds of centrality mea- Crossover points. Comparing the
tion of source nodes and the strength sures: degree,2 betweenness,11 k-core,14 statistical results in the phase II seg-
of community structure, Figure 5 in- and eigenvector.3 Figure 5 includes fur- ment of the figure, although the incre-
ment of the mix parameter μ triggers
Figure 5. Average time of crossover points in synthetic networks with different community the crossover points slightly earlier,
structures.
it is still far less than the influence
The mix parameter μ controls the strength of community structure of the synthetic networks.
resulting from increasing the initial
Each subgraph includes the average crossover point of four measures of centrality and the standard source nodes; and
deviation. The statistical results indicate the increment of the initial source nodes is the main factor Deviation. The deviation of different
causing earlier crossover points, while the stronger a community structure a network has, the less crossover points tends to be stable in
stable are the crossover points.
the wake of a weaker community struc-
1 1
ture, or greater value for μ.
On the basis of the simulation re-
of different crossover points
Average time
work influence:
Phase II Phase II
Strength of community structure.
0.01 0.01
The stability of crossover points is
Phase I Phase I
inversely related to the strength of a
1E-3 1E-3
community structure, demonstrating
0.0 0.1 0.2 0.3 0.4 0.5 0.0 0.1 0.2 0.3 0.4 0.5 the strong (though indirect) influence
Initial proportion Initial proportion of community structure on the diffu-
of source nodes (i0) of source nodes (i0)
sion process; and
(a) Synthetic network with µ = 0.05 (b) Synthetic network with µ = 0.50
Increment of initial source nodes. The
increment of the initial source nodes is
the primary factor resulting in an ear-
Figure 6. Visualization of two propagation processes—maximum-degree-based and lier crossover phenomenon.
minimum-degree-based—in the synthetic network with μ = 0.05 when the crossover
phenomenon emerges; the susceptible nodes are marked in cyan.
We likewise analyzed the influence of
community structure on two diffusion
processes—maximum-degree-based
The infected nodes, highlighted in red or blue, belong solely to the maximum-degree-based process or
and minimum-degree-based—to verify
the minimum-degree-based process, respectively. The black ones represent the infected nodes in both
processes. Five communities—“C0,” “C1,” “C2,” “C3,” and “C4”—include two kinds of nodes, demonstrating our hypothesis, as proposed in Figure 1.
that a strong community structure could hinder or even prevent global diffusion. Influence of community structure.
Taking the synthetic network with μ
= 0.05 (Figure 5a) as an example, the
moment the crossover phenomenon
begins to emerge was visualized to
show the states of all nodes in two
propagation processes being initial-
ized based on degree of centrality.
C1 C2 Figure 6 highlights the detailed states
of nodes in each community in vari-
ous colors. Moreover, we extracted
C0 five communities we labeled as “C0”,
“C1,” “C2,” “C3,” and “C4” that include
only two kinds of nodes.
C3 C4 Figure 6 outlines that a strong
community structure does not ben-
efit a subsequent propagation process.
When nodes with relatively greater
centrality are treated as sources, source
nodes tend to be clustered together,
decreasing (to some extent) the effec-
tive diffusion links. In a network with
a strong community structure, global
diffusion can be enhanced only when
the nodes on the intercommunity links
become infected. In the worst case, all
source nodes are distributed over only of capturing both network topology (June 2012), 70–75.
6. Gao, C. and Liu, J.M. Network-based modeling for
one community, thereby suppressing and dynamical correlations remains characterizing human collective behaviors during
global diffusion. an open topic.20 Even with the con- extreme events. IEEE Transactions on System, Man,
and Cybernetics: Systems 47, 1 (Jan. 2017), 171–183.
However, diffusion is quite different tinuous-time Markov approach, the 7. Gao, C., and Liu, J.M. Modeling and restraining mobile
when nodes characterized by relatively complicated master equations lead virus propagation. IEEE Transactions on Mobile
Computing 12, 3 (Mar. 2013), 529–541.
least centrality are viewed as sources. to yet another challenge—that the 8. 8 Goel, S., Watts, D.J., and Goldstein, D.G. The
Source nodes under such conditions approach is unlikely to directly yield structure of online diffusion networks. In Proceedings
of the 13th ACM Conference on Electronic Commerce
are distributed over more communi- analytical or numerical results for (Valencia, Spain, June 4–8). ACM Press, New York,
2012, 623–638.
ties and more likely to facilitate global large-scale networks. Studies inves- 9. Guimerá, R., Danon, L., Díaz-Guilera, A., Giralt, F., and
diffusion. Moreover, the worst case tigating the balance between poten- Arenas, A. Self-similar community structure in a
network of human interactions. Physical Review E 68,
is unlikely to appear due to the rela- tial diffusion dynamics and solving 6 (Dec. 2003), 065103.
tively greater proportion of low-degree computational complexity are still 10. Howard, B. Analyzing online social networks.
Commun. ACM 51, 11 (Nov. 2008), 14–16.
nodes in a network. That is why there being challenged. 11. Kitsak, M., Gallos, L.K., Havlin, S., Liljeros, F., Muchnik,
are fewer red nodes in “C0,” “C1,” “C2,” This article has offered insight into L., Stanley, H.E., and Makse, H.A. Identification of
influential spreaders in complex networks. Nature
“C3,” and “C4” than blue nodes. As the the dynamics of information diffu- Physics 6, 11 (Aug. 2010), 888–893.
two propagation processes in Figure sion in community-based networks. 12. Lancichinetti, A., Fortunato, S., and Radicchi, F.
Benchmark graphs for testing community detection
6—maximum-degree-based and min- For instance, compared with the abil- algorithms. Physical Review E 78, 4 (Oct. 2008).
imum-degree-based—proceed, such ity of nodes with relatively greater 13. Leskovec, J., Kleinberg, J., and Faloutsos, C. Graph
evolution: Densification and shrinking diameters. ACM
phenomenon will intensify. Finally, the centrality to dramatically enhance Transactions on Knowledge Discovery from Data 1, 1
various diffusion scenarios we have ad- diffusion speed at the initial stage, (Mar. 2007).
14. Liu, Y.Y., Slotine, J.J., and Barabási, A.-L.
dressed also increase the fluctuation of nodes with relatively least centrality Controllability of complex networks. Nature 473, 7346
crossover points. could in fact have a greater propaga- (May 2011), 167–173.
15. McGoogan, C. What is WannaCry and how does
For networks with weak community tion effect in the long term, especially ransomware work? The Telegraph (May 18,
2017); http://www.telegraph.co.uk/technology/0/
structures, the increasing proportion when a network includes more initial ransomware-does-work/
of intracommunity links makes global source nodes. However, we are not 16. Nematzadeh, A., Ferrara, E., Flammini, A., and Ahn,
Y.-Y. Optimal network modularity for information
diffusion more likely, making cross- saying nodes with relatively least cen- diffusion. Physical Review Letters 113, 8 (Aug. 2014),
over points relatively stable. trality are critically important. It is the 088701.
17. Newman, M.E.J. Modularity and community structure
topological structure that establishes in networks. Proceedings of the National Academy of
Conclusion an explicit and complex connection Sciences 103, 23 (June 2006), 8577–8582.
18. Newman, M.E.J. Co-authorship networks and patterns
We have explored the nonlinear cross- between the two kinds of nodes. In of scientific collaboration. Proceedings of the National
over of two diffusion processes—cen- some cases, such connections suggest Academy of Sciences 101, Supplement 1 (Apr. 2004),
5200–5205.
tral-user-based and boundary-user- users with relatively least centrality 19. Ranjbar, A. and Maheswaran, M. Using community
based—triggered by two opposite should be taken into consideration, as structure to control information sharing in online
social networks. Computer Communications 41 (Jan.
initial states in networks with commu- they could still significantly influence 2014), 11–21.
nity structure. We first considered the global diffusion. 20. Wang, W., Tang, M., Stanley, H.E., and Braunstein, L.A.
Unification of theoretical approaches for epidemic
universality of the crossover phenom- spreading on complex networks. Reports on Progress
enon, then offered a detailed compari- Acknowledgments in Physics 80, 3 (Feb. 2017), 036603.
21. Xie, J.R., Kelley, S., and Szymanski, B.K. Overlapping
son with respect to the influence of This work was supported by the Na- community detection in networks: The state-of-the-
art and comparative study. ACM Computing Surveys
community structure and initial pro- tional Natural Science Foundation 45, 4 (Aug. 2013), 43:1–43:35.
portion of source nodes on the diffu- of China (grant No. 61402379), Hong 22. Zou, C.C., Towsley D., and Gong W. Modeling and
simulation study of the propagation and defense
sion process. The results were twofold: Kong Research Grants Council (No. of Internet e-mail worms. IEEE Transactions on
Networks with weak community struc- HKBU12202415), CQ CSTC (grant No. Dependable and Secure Computing 4, 2 (Apr. 2007),
105–118.
ture could increase the stability of cstc2018jcyjAX0274), the Fundamen-
crossover points; and compared to the tal Research Funds for the Central Uni-
Chao Gao (cgao@swu.edu.cn) is a professor in the
influence of community structure, the versities (grant No. XDJK2016A008), College of Computer and Information Science, Southwest
increment of the initial source nodes and Chongqing Graduate Student Re- University, Chongqing, China, and a visiting scholar in the
Humboldt University of Berlin, Germany.
is the primary factor leading to an ear- search Innovation Project (grant No.
Zhen Su (zsstarry@outlook.com) is pursuing a master’s
lier crossover phenomenon. CYS17075). degree in the College of Computer and Information
The crossover phenomenon shows Science, Southwest University, Chongqing, China.
the topology of a network is a major References Jiming Liu (jiming@comp.hkbu.edu.hk) (corresponding
factor affecting the diffusion process. 1. Adamic, L.A. and Glance, N. The political blogosphere author) is a professor of computer science and associate
and the 2004 U.S. election: Divided they blog. In vice president (research) at Hong Kong Baptist University,
A deep understanding of diffusion Proceedings of the Third International Workshop on Hong Kong, China.
dynamics requires consideration of Link Discovery (Chicago, IL, Aug. 21–25). ACM Press,
Jürgen Kurths (Juergen.Kurths@pik-potsdam.de)
New York, 2005, 36–43.
both network topology and dynamical 2. Albert, R. and Barabási, A.-L. Statistical mechanics of is a professor of nonlinear dynamics in the Humboldt
complex networks. Reviews of Modern Physics 74, 1 University of Berlin, Germany, and Chair of the Research
correlations. Many popular theoreti- Domain Transdisciplinary Concepts in the Potsdam
(Jan. 2002), 47–97.
cal approaches (such as mean field, 3. Borgatti, S.P. Centrality and network flow. Social Institute for Climate Impact Research, Potsdam,
Networks 27, 1 (Jan. 2005), 55–71. Germany.
dynamical message passing, and pair- 4. De Meo, P., Ferrara, E., Fiumara, G., and Provetti, A. On
wise approximation) are used to study Facebook, most ties are weak. Commun. ACM 57, 11
(Oct. 2014), 78–84.
the dynamics of different kinds of in- 5. Doerr, B., Fouz, M., and Friedrich, T. Why rumors spread
formation diffusion, but the difficulty so quickly in social networks. Commun. ACM 55, 6 © 2019 ACM 0001-0782/19/2 $15.00
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 67
contributed articles
DOI:10.1145/ 3224204
decreased memory capacity, reading
SONYC integrates sensors, machine listening, skills, and test scores.2,5
The economic impact of noise is
data analytics, and citizen science to address also significant. The World Health Or-
noise pollution in New York City. ganization estimates that, as of 2012,
one million healthy life-years in West-
BY JUAN P. BELLO, CLAUDIO SILVA, ODED NOV, ern Europe were being lost annually
R. LUKE DUBOIS, ANISH ARORA, JUSTIN SALAMON, to environmental noise.11 Other esti-
CHARLES MYDLARZ, AND HARISH DORAISWAMY mates put the external cost of noise-re-
lated health issues in the E.U. between
SONYC:
0.3%–0.4% of GDP14 and 0.2% of GDP
in Japan.16 Studies in the U.S. and Eu-
rope also demonstrate the relationship
between environmental noise and real
A System
estate markets, with housing prices
falling as much as 2% per decibel (dB)
of noise increase.21,30 Noise pollution
for Monitoring,
is not merely an annoyance but an im-
portant problem with broad societal
effects that apply to a significant por-
tion of the population. It is clear that
Analyzing, and
effective noise mitigation is in the pub-
lic interest, with the promise of health,
economic, and quality-of-life benefits.
Noise Pollution
end by, say, wearing earplugs or along
the transmission path by, say, erecting
sound barriers along major roads. These
strategies do not, however, reduce noise
emissions but instead put the burden of
mitigation on the receiver.12 Alternative-
ly, noise can be mitigated at the source
(such as by designing aircraft with
quieter engines, acoustically treating
NOISE IS UNWANTED or harmful sound from night clubs, muffling jackhammers for
roadwork, and stopping unnecessary
environmental sources, including traffic, construction,
industrial, and social activity. Noise pollution is one key insights
of the topmost quality-of-life concerns for urban ˽˽ Public exposure to noise is a growing
concern in cities, leading to substantial
residents in the U.S., with more than 70 million people health, educational and economic costs,
nationwide exposed to noise levels beyond the limit the but noise is ephemeral and invisible,
making it dificult for city agencies to
U.S. Environmental Protection Agency (EPA) considers monitor it effectively.
harmful.12 Such levels have proven effects on health, ˽˽ An interdisciplinary effort explores
new ways to use both fixed and mobile
including sleep disruption, hypertension, heart disease, sensors, with output annotated by
citizen scientists, for training novel
and hearing loss.5,11,12 In addition, there is evidence machine-listening models and analyzing
spatiotemporal noise patterns.
of harmful effects on educational performance, with ˽˽ The resulting fine-grain and aggregate
studies showing noise pollution causing learning and analytics layers help public agencies
monitor the local environment and
cognitive impairment in children, resulting in intervene to mitigate noise pollution.
emissions, is far from trivial. data does not accurately capture in- with fewer complaints citing traffic
Consider New York City. Beyond formation about all noise exposure in or construction. Notably, residents of
the occasional physical inspection, the city.22 It identified the top sources Manhattan, home to many affluent
the city government monitors noise of disruptive noise to be traffic, si- New Yorkers, are more than twice as
through its 311 service for civil com- rens, and construction; the effect to likely to file 311 complaints than those
plaints. Since 2010, 311 has logged be similar in the boroughs of Manhat- in the other boroughs. This pattern
more than 2.7 million noise-related clearly highlights the need to collect
complaints, significantly more than a http://www1.nyc.gov/311 objective noise measurements across
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 69
contributed articles
Figure 1. The SONYC cyber-physical system loop, including intelligent sensing, noise analysis at city-scale, and data-driven mitigation. SONYC
supports new research in the social sciences and public health while providing the data citizens need to improve their communities.
the city, along with citizen reporting, weighted decibels (dBA)20 that aggre- ducted in 2017 showing how SONYC
to fully characterize the phenomenon. gate all sound energy in an acoustic can help understand and address im-
A closely related challenge involves scene. Existing technologies are un- portant gaps in the process of urban
how to respond to potential violations able to isolate the effect of offending noise mitigation.
of the noise code. In New York, the sources, especially in urban environ-
subset of noise complaints pertain- ments flooded with multiple sounds. SONYC
ing to static, systemic sources (such as As a result, inspectors resort to long, Multiple research projects have sought
construction, animals, traffic, air con- complicated measurement strategies to create technological solutions to
ditioning, and ventilation units) are that often require help from the peo- improve the cycle of urban noise pol-
routed to the city’s Department of En- ple responsible for the violation in the lution. For example, some have used
vironmental Protection (DEP), which first place, an additional factor con- mobile devices to crowdsource instan-
employs approximately 50 highly tributing to the difficulty and reduced taneous SPL measurements, noise la-
qualified inspectors to measure sound efficiency of the enforcement process. bels, and subjective responses3,24,28 but
levels and issue a notice of violation Here, we outline the opportunities generally lag well behind the coverage
as needed. Unfortunately, the limited and challenges associated with SONYC, in space-time of civic complaint sys-
human resources and high number of our cyber-physical systems approach tems like 311, while the reliability of
complaints result in average response to the monitoring, analysis, and mit- their objective measurements suffers
times of more than five days. Given igation of urban noise pollution. from a lack of adequate calibration.
the ephemeral nature of sound, a very Connecting various subfields of com- Others have deployed static-sensing
small proportion of inspections actu- puting, including wireless sensor net- solutions that are often too costly to
ally result in a violation observed, let works, machine learning, collaborative scale up or go beyond the capabilities
alone penalized. and social computing, and computer of standard noise meters.4,23,29 On the
To complicate matters, even when graphics, it creates a potentially analytical side, a significant amount of
noise sources are active during in- transformative solution to this im- work has focused on noise maps gener-
spections, isolating their individual portant quality-of-life issue affecting ated from sound propagation models
effect is difficult. Noise is commonly millions of people worldwide. To il- for major urban noise sources (such as
measured in overall sound pressure lustrate this potential, we present industrial activity and road, rail, and
levels (SPL) expressed in so-called A- findings from an initial study we con- air traffic).13,17 However, these maps
lack temporal dynamics and make an inspector issuing a violation. Sta- cilitate seamless interaction between
modeling assumptions that often tistical analysis can then be used by humans and cyber-infrastructure.
render them too inaccurate to sup- researchers or city officials to validate Worth emphasizing is that this line of
port mitigation or action planning. 1 whether the action is short-lived in work is fundamentally different from
Few of these initiatives involve act- time or whether its effect propagates current research on human-in-the-
ing on the sensed or modeled data to neighboring construction sites or loop cyber-physical systems that often
to affect noise emissions, and even distant ones by the same company. By focuses on applications in which con-
fewer have included participation from systematically monitoring interven- trol is centralized and fully or mostly
local governments.15 tions, inspectors can understand how automated while usually only a single
SONYC (Sounds of New York City), often penalties need to be issued be- human is involved (such as in assis-
our novel solution, as outlined in Fig- fore the effect becomes long term. The tive robots and intelligent prosthet-
ure 1, aims to address these limitations overarching goal is to understand how ics). The synthesis of approaches from
through an integrated cyber-physical to minimize the cost of interventions social computing, citizen science, and
systems’ approach to noise pollution. while maximizing noise mitigation, data science to advance integration,
First, it includes a low-cost, intelli- a classic resource-allocation prob- management, and control of large and
gent sensing platform capable of con- lem that motivates much research in variable numbers of human agents in
tinuous, real-time, accurate, source- smart-cities initiatives. cyber-physical systems is potentially
specific noise monitoring. It is scalable All this is made possible by formu- transformative, addressing a crucial
in terms of coverage and power con- lating our solution in terms of a cyber- bottleneck for the widespread adop-
sumption, does not suffer from the physical system. However, unlike most tion of similar methods in all kinds
same biases as 311-style reporting, and cyber-physical systems covered in the of socio-technical systems, including
goes well beyond SPL-based measure- literature, the distributed and decen- transportation networks, power grids,
ments of the acoustic environment. tralized nature of the noise-pollution smart buildings, environmental con-
Second, SONYC adds new layers of problem requires multiple socioeco- trol, and smart cities.
cutting-edge data-science methods for nomic incentives (such as fines and Finally, SONYC uses New York
large-scale noise analysis, including peer comparisons) to exercise indi- City, the largest, densest, noisiest city
predictive noise modeling in off-net- rect control over tens of thousands of in North America, as its test site. The
work locations using spatial statistics subsystems contributing noise emis- city has long been at the forefront of
and physical modeling, development sions. It also calls for developing and discussions about noise pollution,
of interactive 3D visualizations of noise implementating a set of novel mecha- has an exemplary noise codeb and,
activity across time and space to enable nisms for integrating humans in the in 311, the most comprehensive citi-
better understanding of noise patterns, cyber-physical system loop at scale zen noise-reporting system. Beyond
and novel information-retrieval tools and at multiple levels of the system’s noise, the city collects vast amounts
that exploit the topology of noise events management hierarchy, including ex- of data about everything from public
to facilitate search and discovery. And tensive use of human-computer inter-
third, it uses this sensing and analysis action (HCI) research in, say, citizen b http://www.nyc.gov/html/dep/html/noise/
framework to improve mitigation in science and data visualization, to fa- index.shtml
two ways—first by enabling optimized,
data-driven planning and scheduling Figure 2. Acoustic sensing unit deployed on a New York City street.
of inspections by the local government,
thus making it more likely code viola-
tions will be detected and enforced; and
second, by increasing the flow of infor-
mation to those in a position to control
emissions (such as building and con-
struction-site managers, drivers, and
neighbors) thus providing credible in-
centives for self-regulation. Because the
system is constantly monitoring and
analyzing noise pollution, it generates
information that can be used to vali-
date, and iteratively refine, any noise-
mitigating strategy.
Consider a scenario in which a sys-
tem integrates information from the
sensor network and 311 to identify a
pattern of after-hours jackhammer
activity around a construction site.
This information triggers targeted in-
spections by the DEP that results in
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 71
contributed articles
safety, traffic, and taxi activity to con- housed in an aluminum casing we methods to automatically detect specif-
struction, making much of it publicly chose to reduce RFI interference and ic types of sound sources (such as jack-
available.c Our work involves close solar heat gain. The microphone mod- hammers, idling engines, car horns,
collaboration with city agencies, in- ule is mounted externally via a flexible and police sirens) from environmental
cluding DEP, DOHMH, various busi- metal gooseneck attachment, making audio. Detection is a challenge, given
ness improvement districts, and it possible to reconfigure the sensor the complexity and diversity of sources,
private initiatives (such as LinkNYC) node for deployment in varying loca- auditory scenes, and background con-
that provide access to existing infra- tions, including sides of buildings, ditions routinely found in noisy urban
structure. As a powerful sensing-and- light poles, and building ledges. acoustic environments.
analysis infrastructure, SONYC thus Apart from continuous SPL measure- We thus created an urban sound tax-
holds the potential to empower new ments, we designed the nodes to onomy, annotated datasets, and vari-
research in environmental psychol- sample 10-second audio snippets at ous cutting-edge methods for urban
ogy, public health, and public policy, random intervals over a limited peri- sound-source identification.25,26 Our
as well as empower citizens seeking od of time, collecting data to train research shows that feature learning,
to improve their own communities. and benchmark our machine-listen- using even simple dictionary-based
We next describe the technology and ing solutions. SONYC compresses the methods (such as spherical k-means)
methods underpinning the project, audio using the lossless FLAC audio makes for significant improvement in
presenting some of our early findings coding format, using 4,096-bit AES performance over the traditional ap-
and future challenges. encryption and the RSA public/pri- proach of feature engineering. More-
vate key-pair encryption algorithm. over, we have found that temporal-
Acoustic Sensor Network Sensor nodes communicate with the shift invariance, whether through
As mentioned earlier, SONYC’s intel- server via a virtual private network, up- modulation spectra or deep convolu-
ligent sensing platform should be loading audio and SPL data at one- tional networks, is crucial not only for
scalable and capable of source iden- minute intervals. overall accuracy but also to increase
tification and high-quality, round- As of December 2018, the parts of robustness in low signal-to-noise-ra-
the-clock noise monitoring. To that each sensor cost approximately $80 tio (SNR) conditions, as when sources
end we have developed an acoustic using mostly off-the-shelf compo- of interest are in the background of
sensor18 (see Figure 2) based on the nents. We fully expect to reduce the acoustic scenes. Shift invariance also
popular Raspberry Pi single-board unit cost significantly through custom results in more compact machines
computer outfitted with a custom redesign for high-volume, third-party that can be trained with less data,
microelectromechanical systems assembly. However, even at the cur- thus adding greater value for edge-
(MEMS) microphone module. We rent price, SONYC sensors are signifi- computing solutions. More recent re-
chose MEMS microphones for their cantly more affordable, and thus ame- sults highlight the benefits of using
low cost and consistency across units nable to large-scale deployment, than convolutional recurrent architectures,
and size, which can be 10x smaller existing noise-monitoring solutions. as well as ensembles of various models
than conventional microphones. Moreover, this reduced cost does not via late fusion.
Our custom standalone microphone come at the expense of measurement Deep-learning models necessitate
module includes additional circuitry, accuracy, with our sensors’ perfor- large volumes of labeled data tradi-
including in-house analog-to-digital mance comparable to high-quality tionally unavailable for environmental
converters and pre-amp stages, as devices that are orders of magnitude sound. Addressing this lack of data, we
well as an on-board microcontroller more costly while outperforming solu- have developed an audio data augmen-
that enables preprocessing of the tions in the same price range. Finally, tation framework that systematically
incoming audio signal to compen- the dedicated computing core opens deforms the data using well-known
sate for the microphone’s frequency the possibility for edge computing, audio transformations (such as time
response. The digital MEMS micro- particularly for in-situ machine lis- stretching, pitch shifting, dynamic
phone features a wide dynamic range tening intended to automatically and range compression, and addition of
of 32dBA–120dBA, ensuring all urban robustly identify the presence of com- background noise at different SNRs),
sound pressure levels are monitored mon sound sources. This unique fea- significantly increasing the amount of
effectively. We calibrated it using a ture of SONYC goes well beyond the data available for model training. We
precision-grade sound-level meter as capabilities of existing noise-monitor- also developed an open source tool
reference under low-noise anecho- ing solutions. for soundscape synthesis.27 Given a
ic conditions and was empirically collection of isolated sound events,
shown to produce sound-pressure- Machine Listening at the Edge it functions as a high-level sequencer
level data at an accuracy level compli- Machine listening is the auditory coun- that can generate multiple sound-
ant with the ANSI Type-2 standard20 terpart to computer vision, combining scapes from a single probabilistically
required by most local and national techniques from signal processing and defined “specification.” We generated
noise codes. machine learning to develop systems large datasets of perfectly annotated
The sensor’s computing core is able to extract meaningful information data in order to assess algorithmic
from sound. In the context of SONYC, performance as a function of, say,
c https://nycopendata.socrata.com we focus on developing computational maximum polyphony and SNR ratio,
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 73
contributed articles
Figure 3. (left) Interactive 3D visualization of a New York neighborhood using Urbane. By selecting specific sensors (red pins) and buildings
(purple) researchers can retrieve and visualize multiple data streams associated with these locations. (right) SPL data at various resolutions
and time scales retrieved using the time lattice. Each sub-figure reflects different individual (gray) and aggregated (red) sensor data for the
three sensor units highlighted in the left plot.
Figure 4. Case study involving the area around Washington Square Park: (a) Distribution of 311 outdoor noise complaints in the focus area
during the study period; the bar graph shows clear predominance of after-hours construction noise. (b) Distribution of complaint resolution for
after-hours construction complaints; almost all complaints result in “violation not observed” status. (c) Sensor data for the after-hours period
corresponding to six complaints: continuous SPL data (blue), background level (green), event-detection threshold at 10dB above background
level (black), and potential noise code violation events (red).
(c) Decibels A-weighted (dBA)
cluding crowdsourcing workers and the analysis of a subset of our own sen- sensor data of a potential violation.
volunteers, and bear meaningful rela- sor data during the same period, and How does this evidence stack up
tionship to the properties of the data information gathered through inter- against the enforcement record for
in the physical world that, in the case actions and site visits with inspectors the complaints? Citizen complaints
of sound, implies the need for three- from the DEP tasked with enforcing submitted via 311 and routed to the
dimensional visualization. the city’s noise code. DEP trigger an inspection, and pub-
We have been working on a three- For the study we chose an area in lic-record repositories made avail-
dimensional, urban geographic in- Greenwich Village with a relatively able by the city include information
formation system (GIS) framework dense deployment of 17 nodes. We about how each complaint was re-
called Urbane9 (see Figure 3), an established a 100-meter boundary solved. Examining the records, we
interactive tool, including a novel around each node and merged them found that, for all complaints in this
three-dimensional map layer, we de- to form the focus area. From 311, study, 78% resulted in a “No viola-
veloped from the ground up to take we collected all non-duplicate noise tion could be observed” status and
advantage of the GPU capabilities complaints occurring within this area only 2% in a violation ticket being is-
of modern computing systems. It that had been routed to the DEP while sued. Figure 4b shows, in the specific
allows for fast, potentially real-time neighboring sensors were active. Note case of after-hours construction
computation, as well as integration this criterion discards complaints noise, no violation could be observed
and visualization of multiple data about noise from residents that are in 89% of all cases, and none of the in-
streams commonly found in major routed to the police department and spections resulted in a violation ticket
cities like New York City. In the con- tend to dominate the 311 log; see Fig- being issued.
text of SONYC, we have expanded ure 4a for a breakdown of selected There are multiple possible expla-
Urbane’s capabilities to include ef- complaint types. nations for the significant gap be-
ficient management of high-reso- Over an 11-month period—May tween the evidence collected by the
lution temporal data. We achieve 2016 to April 2017—51% of all noise sensor network and the results of the
this efficiency through a novel data complaints in the focus area were re- inspections. For example, we specu-
structure we call the “time lattice” lated to after-hours construction ac- late it is due in part to the delay in the
that allows for fast retrieval, visual- tivity (6 P.M.–7 A.M.), three times the city’s response to complaints, four to
ization, and analysis of individual amount in the next category. Note com- five days on average, which is too
and aggregate sensor data at multi- bining all construction-related com- great for phenomena that are both
ple time scales (such as hours, days, plaints adds up to 70% of this sample, transient and traceless. Another fac-
weeks, and months). An example of highlighting how disruptive to the lives tor is the conspicuousness of the in-
data retrieved through this capabil- of ordinary citizens this particular cat- spection crew that alone modifies the
ity can be seen in Figure 3, right plot. egory of noise can be. behavior of potentially offending
We have since used Urbane and the Figure 4c includes SPL values (blue sources, as we observed during our
time lattice to support the prelimi- line) at a five-minute resolution for site visits with the DEP. Moreover, un-
nary noise analysis we cover in the the after-hours period during or im- der some circumstances the city gov-
next section, but their applicability mediately preceding a subset of the ernment grants special, after-hours
goes well beyond audio. complaints. Dotted green lines corre- construction permits under the as-
We are currently expanding Ur- spond to background levels, comput- sumption of minimal noise impact,
bane to support visual spatiotempo- ed as the moving average of SPL mea- as defined by the noise code. It is
ral queries over noise data, including surements within a two-hour window. thus possible that some after-hours
computational-topology methods for Dotted black lines correspond to SPL activity results from such permits.
pattern detection and retrieval. Similar values 10dB above the background, We are currently mining after-hours-
tools have proved useful in smart-cities the threshold defined by the city’s construction-permit data to under-
research projects, including prior col- noise code to indicate potential vio- stand this relationship better.
laborations between team members lations. Finally, we were able to iden- In all cases, the SONYC sensing
and the New York City Department of tify events (in red) in which instanta- and analytical framework is able to
Transportation and Taxi and Limou- neous SPL measurements were above address the shortcomings of cur-
sine Commission.7,10 the threshold. Our analysis resulted rent monitoring and enforcement
in detection of 324 such events we mechanisms by providing hard data
Data-Driven Mitigation classified by noise source and deter- to: quantify the actual impact of af-
We conducted a preliminary study in mined 76% (246) were related to con- ter-hours construction permits on
2017 on the validity and response of struction as follows: jackhammer- the acoustic environment, and thus
noise complaints around the Wash- ing (223), compressor engines (16), nearby residents; provide historical
ington Square Park area of Manhattan metallic banging/scraping (7), and data that can validate complaints
using SONYC’s sensing and analytics the remainder to non-construction and thus support inspection efforts
infrastructure.19 The study combined sources, mainly sirens and other traf- on an inconspicuous and continuous
information mined from the log of civ- fic noise. Our analysis found for 94% basis; and develop novel, data-driven
ic complaints made to the city over the of all after-hours construction com- strategies for the efficient alloca-
study period through the 311 system, plaints quantitative evidence in our tion of inspection crews in space and
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 75
contributed articles
time using the same tools from oper- citizens will necessarily be sparse in
ations research that optimize routes space and time. In order to perform
for delivery trucks and taxis. Worth meaningful analyses and help inform
noting is that, even though our pre- decisions by city agencies, it is essen-
liminary study focused on validating
311 complaints, SONYC can be used The dedicated tial for the system to compensate for
this sparseness. Several open datas-
to gain insight beyond complaint computing core ets are available that could, directly
or indirectly, provide information
opens the possibility
data, allowing researchers and city
officials to understand the extent and on the noise levels in the city; for
type of unreported noise events, iden-
tify biases in complaint behavior, and
for edge computing, example, locations of restaurants,
night clubs, and tourist attractions
accurately measure the level of noise particularly for indicate areas where sources of so-
pollution in the local environment.
in-situ machine cial noise are likely, while social me-
dia data streams can be used to un-
Looking Forward listening intended derstand the temporal dynamics of
The SONYC project is currently in
the third of five years of its research to automatically crowd behavior. Likewise, multiple
data streams associated with taxi,
and development agenda. Its initial and robustly identify bus, and aircraft traffic can pro-
focus was on developing and deploy-
ing intelligent sensing infrastructure the presence vide indirect information on traf-
fic-based noise levels. We plan to
but has progressively shifted toward
analytics and mitigation in collabo-
of common develop noise models that use spa-
tiotemporal covariance to predict
ration with city agencies and other sound sources. unseen acoustic responses through
stakeholders. Here are some areas we a combination of sensor and open
intend to address in future work: data. We will also explore combina-
Low-power mesh sensor network. To tions of data-driven modeling, ap-
support deployment of sensors at plying physical models that exploit
significant distances from Wi-Fi or the three-dimensional geometry of
other communication infrastruc- the city, sound type and localization
ture and at locations lacking ready cues from sensors and 311, and basic
access to electrical power, we are de- principles of sound propagation. We
veloping a second generation of the expect that through a combination
sensor node to be mesh-enabled and of techniques from data mining, sta-
battery/solar powered. Each sensor tistics, and acoustics, as well as our
node will serve as a router in a low- own expertise developing models
power multi-hop wireless network in suitable for GPU implementation
the 915MHz band, using FCC-compat- using ray-casting queries in the con-
ible cognitive radio techniques over text of computer graphics, we will
relatively long links and energy-effi- be able to create accurate, dynamic,
cient multi-channel routing for com- three-dimensional urban noise maps
municating to and from infrastruc- in real time.
ture-connected base stations. The Citizen science and civic participa-
sensor design will further reduce pow- tion. The role of humans in SONYC is
er consumption for multi-label noise not limited to annotating sound. In
classification by leveraging heteroge- addition to the fixed sensors located
neous processors for duty-cycled/ in various parts of the city, we will be
event-driven hierarchical computing. designing a SONYC mobile platform
Specifically, the design of the sensor aimed at enabling ordinary citizens
node will be based on a low-power sys- to record and annotate sounds in
tem-on-chip—the Ineda i7d—for situ, view existing data contributed
which we are redesigning “mote-scale” and analyzed by others, and contact
computation techniques originally city authorities about noise-related
developed for single microcontroller concerns. A mobile platform will
devices to support heterogeneous allow them to leverage slices taken
processor-specific operating sys- from this rich dataset to describe
tems via hardware virtualization. and support these concerns with
Modeling. The combination of evidence as they approach city au-
noise data collected by sensors and thorities, regulators, and policymak-
ers. Citizens will not only be more
d http://inedasystems.com/wearables.php informed and engaged with their envi-
ronment, they will be better equipped Work and Social Computing (Jersey City, NJ, Nov. Pervasive Computing and Communications Workshops
3–7). ACM Press, New York, 2018, 29:1–29:21. (San Diego, CA, Mar. 18–22). IEEE, Piscataway, NJ,
to voice their concerns when interact- 7. Doraiswamy, H., Ferreira, N., Damoulas, T., Freire, 670–675.
ing with city authorities. J., and Silva, C. T. Using topological analysis to 25. Salamon, J. and Bello, J. Deep convolutional neural
support event-guided exploration in urban data. IEEE networks and data augmentation for environmental
Transactions on Visualization and Computer Graphics sound classification. IEEE Signal Processing Letters
Conclusion 20, 12 (Dec. 2014), 2634–2643. 24, 3 (Mar. 2017), 279–283.
8. Fekete, J.-D. and Silva, C. Managing data for visual 26. Salamon, J., Jacoby, C., and Bello, J.P. A dataset and
SONYC is a smart-cities, next-gener- analytics: Opportunities and challenges. IEEE Data taxonomy for urban sound research. In Proceedings of
ation application of a cyber-physical Engineering Bulletin 35, 3 (Sept. 2012), 27–36. the 22nd ACM International Conference on Multimedia
9. Ferreira, N., Lage, M., Doraiswamy, H., Vo, H., Wilson, (Orlando, FL, Nov. 3–7). ACM Press, New York, 2014.
system. Its development calls for in- L.,Werner, H., Park, M.C., and Silva, C. Urbane: A 27. Salamon, J., McConnell, D., Cartwright, M., Li, P.,
3D framework to support data-driven decision and Bello, J. SCAPER: A library for soundscape
novation in various fields of com- synthesis and augmentation. In Proceedings of the
making in urban development. In Proceedings of the
puting and engineering, including IEEE Conference on Visual Analytics Science and IEEE Workshop on Applications of Signal Processing
Technology (Chicago, IL, Oct. 25–30), 2015, 97–104. to Audio and Acoustics (Mohonk, New Paltz, NY, Oct.
sensor networks, machine learning, 10. Ferreira, N., Poco, J., Vo, H.T., Freire, J., and Silva, C.T. 15–18). IEEE, Piscataway, NJ, 2017.
human-computer interaction, citizen Visual exploration of big spatiotemporal urban data: A 28. Schweizer, I., Meurisch, C., Gedeon, J., Bärtl, R.,
study of New York City taxi trips. IEEE Transactions and Mühlhäuser, M. Noisemap: Multi-tier incentive
science, and data science. The tech- on Visualization and Computer Graphics 19, 12 (Dec. mechanisms for participative urban sensing. In
nology will be able to support novel 2013), 2149–2158. Proceedings of the Third International Workshop on
11. Fritschi, L., Brown, L., Kim, R., Schwela, D., Sensing Applications on Mobile Phones (Toronto, ON,
scholarly work on the effects of noise and Kephalopolos, S. Burden of disease from Canada, Nov. 6–9). ACM Press, New York, 2012, 9.
pollution on public health, public environmental noise: Quantification of healthy 29. Steele, D., Krijnders, D., and Guastavino, C. The Sensor
years life lost in Europe. World Health Organization, City Initiative: Cognitive sensors for soundscape
policy, environmental psychology, Bonn, Germany, 2012; http://www.euro.who.int/en/ transformations. In Proceedings of GIS Ostrava 2013:
and economics. But the project is far publications/abstracts/burden-of-disease-from- Geoinformatics for City Transformation (Ostrava,
environmental-noise.-quantification-of-healthy-life- Czech Republic, Jan. 21–23). Technical University of
from purely scholarly. By seeking to years-lost-in-europe Ostrava, 2013.
improve urban-noise mitigation, a 12. Hammer, M.S., Swinburn, T.K., and Neitzel, R.L. 30. Theebe, M.A. Planes, trains, and automobiles: The
Environmental noise pollution in the United States: impact of traffic noise on house prices. The Journal
critical quality-of-life issue, SONYC Developing an effective public health response. of Real Estate Finance and Economics 28, 2–3 (Mar.
promises to benefit urban citizens Environmental Health Perspectives 122, 2 (Feb. 2014), 2004), 209–234.
115–119.
worldwide. Our agenda calls for the 13. Kaliski, K., Duncan, E., and Cowan, J. Community and
system to be deployed, tested, and regional noise mapping in the United States. Sound Juan Pablo Bello (jpbello@nyu.edu) is a professor of
and Vibration 41, 9 (Sept. 2007), 12. music technology and computer science and engineering
used in real-world urban conditions, 14. Maibach, M., Schreyer, C., Sutter, D., Van Essen, H., at New York University, New York, USA, and director of the
potentially resulting in a model that Boon, B., Smokers, R., Schroten, A., Doll, C., Pawlowska, Center for Urban Science of Progress and of the Music and
B., and Bak, M. Handbook on estimation of external Audio Research Laboratory.
can be scaled and replicated through- costs in the transport sector. CE Delft, Feb. 2008;
out the U.S. and beyond. https://ec.europa.eu/transport/sites/transport/files/ Claudio Silva (csilva@nyu.edu) is a professor of computer
themes/sustainable/doc/2008_costs_handbook.pdf science and engineering and data science at New York
15. Manvell, D., Marcos, L.B., Stapelfeldt, H., and Sanzb, University, New York, USA.
Acknowledgments R. SADMAM—Combining measurements and
Oded Nov (onov@nyu.edu) is an associate professor of
calculations to map noise in Madrid. In Proceedings
This work is supported in part by the of the 33rd Congress and Exposition on Noise Control technology management and innovation at New York
Engineering (Internoise) (Prague, Czech Republic, Aug. University, New York, USA.
National Science Foundation (Award 22–25). Institute of Noise Control Engineering, Reston,
R. Luke DuBois (dubois@nyu.edu) is co-director and an
# 1544753), NYU’s Center for Urban VA, 2004.
associate professor of integrated digital media at New
16. Mizutani, F., Suzuki, Y., and Sakai, H. Estimation of
Science and Progress, NYU’s Tandon social costs of transport in Japan. Urban Studies 48,
York University, New York, USA.
School of Engineering, and the Trans- 16 (Apr. 2011), 3537–3559. Anish Arora (arora.9@osu.edu) is a professor of computer
17. Murphy, E. and King, E. Strategic environmental
lational Data Analytics Institute at The noise mapping: Methodological issues concerning
science and engineering at The Ohio State University,
Columbus, OH, USA.
Ohio State University. the implementation of the EU Environmental Noise
Directive and their policy implications. Environment Justin Salamon (justin.salamon@nyu.edu) is a senior
International 36, 3 (Apr. 2010), 290–298. research scientist at the Music and Audio Research
References 18. Mydlarz, C., Salamon, J., and Bello, J. The Laboratory and the Center for Urban Science and Progress
1. Ausejo, M., Recuero, M., Asensio, C., Pavón, I., and implementation of low-cost urban acoustic monitoring at New York University, New York, USA.
Pagán, R. Study of uncertainty in noise mapping. In devices. Applied Acoustics, Special Issue on Acoustics
for Smart Cities 117, B (Feb. 2017), 207–218. Charles Mydlarz (cmydlarz@nyu.edu) is a senior
Proceedings of 39th International Congress on Noise
19. Mydlarz, C., Shamoon, C., and Bello, J. Noise research scientist at the Music and Audio Research
Control Engineering, Internoise (Lisbon, Portugal,
monitoring and enforcement in New York City using Laboratory and the Center for Urban Science and Progress
June 13–16). Portuguese Acoustical Society, Lisbon,
a remote acoustic sensor network. In Proceedings at New York University, New York, USA.
2010, 6210–6219.
2. Basner, M., Babisch, W., Davis, A., Brink, M., Clark, of the INTER-NOISE and NOISE CON Congress and
Harish Doraiswamy (harishd@nyu.edu) is a research
C., Janssen, S., and Stansfeld, S. Auditory and non- Conference (Hong Kong, China, Aug. 27–30). Institute
assistant professor of computer science and engineering
auditory effects of noise on health. The Lancet 383, of Noise Control Engineering, Reston, VA, 2017.
and a research scientist at the Center for Data Science at
9925 (Apr. 2014), 1325–1332. 20. National Academy of Engineering. Technology for a
New York University, New York, USA.
3. Becker, M., Caminiti, S., Fiorella, D., Francis, L., Quieter America: NAEPR-06-01-A. Technical Report.
Gravino, P., Haklay, M. M., Hotho, A., Loreto, V., The National Academies Press, Washington, D.C.,
Mueller, J., Ricchiuti, F. et al. Awareness and learning Sept. 2010; https://www.nap.edu/catalog/12928/
in participatory noise sensing. PloS One 8, 12 (Dec. Technology-for-a-quieter-america Copyright held by authors.
2013), 1–12. 21. Nelson, J. P. Highway noise and property values:
4. Bell, M.C. and Galatioto, F. Novel wireless pervasive A survey of recent evidence. Journal of Transport
sensor network to improve the understanding of noise Economics and Policy 16, 2 (May 1982), 117–138.
in street canyons. Applied Acoustics 74, 1 (Jan. 2013), 22. New York City Department of Health and Mental
169–180. Hygiene. Ambient Noise Disruption in New York City,
5. Bronzaft, A. and Van Ryzin, G. Neighborhood Noise Data Brief 45. New York City Department of Health
and Its Consequences: Implications for Tracking and Mental Hygiene, Apr. 2014; https://www1.nyc.gov/
Effectiveness of NYC Revised Noise Code. Special assets/doh/downloads/pdf/epi/databrief45.pdf
Report #14. Survey Research Unit, School of Public 23. Pham, C. and Cousin, P. Streaming the sound of smart
Affairs, Baruch College, CUNY, New York, Apr. 2007; cities: Experimentations on the SmartSantander test-
http://www.noiseoff.org/document/cenyc.noise. bed. In Proceedings of IEEE International Conference
report.14.pdf on Green Computing and Communications, IEEE
6. Cartwright, M., Seals, A., Salamon, J., Williams, A., Internet of Things, and IEEE Cyber, Physical and
Mikloska, S., McConnell, D., Law, E., Bello, J., and Social Computing (Beijing, China, Aug. 20–23). IEEE,
Nov, O. Seeing sound: Investigating the effects of Piscataway, NJ, 2013, 611–618. Watch the authors discuss
visualizations and complexity on crowdsourced 24. Ruge, L., Altakrouri, B., and Schrader, A. Sound of the this work in the exclusive
audio annotations. In Proceedings of the 21st ACM city: Continuous noise monitoring for a healthy city. In Communications video.
Conference on Computer-Supported Cooperative Proceedings of the IEEE International Conference on https://cacm.acm.org/videos/sonyc
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 77
review articles
DOI:10.1145/ 3209623
This article is not a technical manu-
The roots of blockchain technologies are al, nor is it a broad survey of the litera-
ture (both widely available elsewhere).
deeply interwoven in distributed computing. Instead, it attempts to explain block-
chain research in terms of the many
BY MAURICE HERLIHY similarities, parallels, semi-reinven-
tions, and lessons not learned from
Blockchains
distributed computing.
This article is intended mostly to ap-
peal to blockchain novices, but perhaps
it will provide some insights to those
from a
familiar with blockchain research but
less familiar with its precursors.
Distributed
The abstraction at the heart of block-
chain systems is the notion of a ledger,
an invention of the Italian Renais-
sance originally developed to support
Computing
double-entry bookkeeping, a distant
precursor of modern cryptocurren-
cies. For our purposes, a ledger is
just an indelible, append-only log of
Perspective
transactions that take place between
various parties. A ledger establishes
which transactions happened (“Alice
transferred 10 coins to Bob”), and
the order in which those transactions
happened (“Alice transferred 10 coins
to Bob, and then Bob transferred title
to his car to Alice”). Ledgers are pub-
lic, accessible to all parties, and they
BITCOIN FIRST APPEARED in a 2008 white paper authored must be tamper-proof: no party can
add, delete, or modify ledger entries
by someone called Satoshi Nakamoto,18 the mysterious once they have been recorded. In
deus absconditus of the blockchain world. Today, short, the algorithms that maintain
ledgers must be immune to attack, en-
cryptocurrencies and blockchains are very much in the suring the ledger remains secure even
news. Much of this coverage is lurid, sensationalistic,
and irresistible: roller-coaster prices and instant key insights
riches, vast sums of money stolen or inexplicably lost, ˽˽ The long-term scientific value of
blockchain algorithms and systems is
underground markets for drugs and weapons, and independent of the fates of today’s coins.
promises of libertarian utopias just around the corner. ˽˽ Many of the basic algorithms and
IMAGE BY AND RIJ BORYS ASSOCIAT ES/SHUT TERSTOCK
the perspective that much of the blockchain world ˽˽ A smart contract language should have
an explicit concurrency model to make
is a disguised, sometimes distorted, mirror image of programmers aware of well-known
concurrency-related pitfalls and hazards.
the distributeda computing world. ˽˽ The blockchain world encompasses both
“permissioned” and “permissionless”
a In this article, “distributed computing” is used to encompass both message passing chains, and a number of promising
and shared-memory models of concurrent computation. application areas beyond just coins.
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 81
review articles
applications such as
three and four, then only the party who
Such programs are often called crashes ends up worse off. If either par-
smart contracts (or contracts) (though
they are arguably neither smart nor
Bitcoin, which seek ty tries to cheat, for example, by pub-
lishing an incorrect contract, then the
contracts). Here we focus on Ethere- to ensure nobody other party can simply stop participat-
um-style contracts.
Here are some examples of simple
can control ing and its asset will be refunded. Al-
ice’s contract needs a 48-hour timelock
contract functionality. A hashlock h pre- who can participate, to give Bob enough time to react when
vents an asset from being transferred
until the contract receives a matching and participants she releases her secret before her 24
hours are up.
secret s, where h = H(s), for H a crypto- may not be eager This example illustrates the power
graphic hash function (see the sidebar
“Cryptographic Hash Function”). to have their of smart contracts. There are many
other uses for smart contracts, includ-
Similarly, a timelock t prevents an asset
from being transferred until a specified
identities known. ing finance,23 digital rights manage-
ment,26 supply chain,19 insurance,16
future time t. and even off-chain transactions,21 a
Suppose Alice wants to trade some way of streamlining commerce by con-
of her coupons to Bob in return for ducting most business off-chain, and
some bitcoins. Alice’s coupons live on falling back to the blockchain only as
one blockchain, and Bob’s bitcoins necessary to settle balances.
live on another, so they must devise Smart contracts as objects. A smart
an atomic cross-chain swap protocol to contract resembles an object in an
consummate their deal. Naturally, nei- object-oriented programming lan-
ther one trusts the other. guage. A contract encapsulates long-
Here is a simple protocol. Let us lived state, a constructor to initialize
generously assume 24 hours is enough that state, and one or more functions
time for anyone to publish a smart con- (methods) to manage that state. Con-
tract on either blockchain, and for the tracts can call one another’s functions.
other party to detect that the contract In Ethereum, all contracts are re-
has been published. corded on the blockchain, and the
1. Alice creates a secret s, h = H(s), ledger includes those contracts’ cur-
and publishes a contract on the cou- rent states. When a miner constructs
pon blockchain with hashlock h and a block, if fills that block with calls
timelock 48 hours in the future, ensur- to smart contract functions, and ex-
ing the contract will transfer the cou- ecutes them one-by-one, where each
pons to Bob if Bob can produce s with- contract’s final state is the next con-
in 48 hours. If he cannot, the coupons tract’s initial state. These contract
will be refunded to Alice. executions occur in order, so it would
2. When Bob confirms that Alice’s appear there is no need to worry about
contract has been published on the concurrency.
coupon blockchain, he publishes a Smart contracts as monitors. The
contract on the Bitcoin blockchain Decentralized Autonomous Organiza-
with the same hashlock h but with tion (DAO) was an investment fund set
timelock 24 hours in the future, en- up in 2016 to be managed entirely by
suring the contract will transfer the smart contracts, with no direct human
bitcoins to Alice if Alice can produce s administration. Investors could vote
within 24 hours. If she cannot, the bit- on how the fund’s funds would be in-
coins will be refunded to Bob. vested. At the time, there were breath-
3. When Alice confirms that Bob’s less journalistic accounts explaining
contract has been published on the Bit- how the DAO would change forever
coin blockchain, she sends the secret s the shape of investing.22,27
to Bob’s contract, taking possession of Figure 1 shows a fragment of a
the bitcoins, and revealing s to Bob. DAO-like contract, illustrating a func-
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 83
review articles
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 85
review articles
DOI:10.1145/ 3211968
embedded pointers. One of the found-
Separation logic is a key development in ing papers of separation logic summa-
rized the problem as follows.32
formal reasoning about programs, opening up "The main difficulty is not one of find-
new lines of attack on longstanding problems. ing an in-principle adequate axiomatiza-
tion of pointer operations; rather there
BY PETER O’HEARN is a mismatch between simple intu-
Separation
itions about the way that pointer opera-
tions work and the complexity of their
axiomatic treatments. … when there is
aliasing, arising from several pointers to
a given cell, an alteration to a cell may af-
Logic
fect the values of many syntactically un-
related expressions."
Bornat provided a good description
of the struggles in reasoning about mu-
table data structures up to 2000.6
In joint work with John Reynolds and
others we developed separation logic
(SL) to address the fundamental prob-
lem of reasoning about programs that
mutate data structures. From a special
logic for heaps, it gradually evolved into
a general theory for modular reasoning
A FUNDAMENTAL TECHNIQUE in reasoning about programs about concurrent as well as sequential
is the use of logical assertions to describe properties of programs. Efforts by many research-
ers established that the logic provides a
program states. Turing used assertions to argue about basis for efficient proof search in auto-
the correctness of a particular program in 1949,40 and matic and semi-automatic proof tools,
they were incorporated into general formal systems for for example, giving rise to the Infer static
analyzer, a tool that is in deployment at
program proving starting with the work of Floyd21 and Facebook where it catches thousands
Hoare22 in the 1960s. Hoare logic, which separation of bugs per month before code reaches
logic builds upon, is a formal system for proving production in products used daily by
over one billion people.
specifications of the form Separation logic is an extension of
Hoare logic, which employs novel logi-
cal operators, most importantly the sep-
arating conjunction * (pronounced “and
where the precondition and postcondition are
vassertions describing properties of the input and key insights
output states. For example, ˽˽ Separation logic supports in-place
updating of facts as we reason, in a way
that mirrors in-place update of memory
during execution, and this leads to logical
can serve as a specification of an imperative program proofs about imperative programs that
match computational intuition.
that computes the factorial of the value held in variable x ˽˽ Separation logic supports scalable
and places it in y. reasoning by using an inference rule
(the frame rule) that allows a proof to be
Hoare logic and related systems worked very well for localized to the resources that a program
component accesses (its footprint).
programs manipulating simple primitive data types ˽˽ Concurrent separation logic shows
such as for integers or strings, but proofs became more that modular reasoning about threads
that share storage and other resources
complex when dealing with structured data containing is possible.
variable x holds the address of a memory key difficulty where “an alteration to a (nonconstructive) variant was possible
location where v is stored (or more brief- cell may affect the values of many syntac- in which one could reason about explicit
ly, x points to v), and a command of the tically unrelated expressions.” memory management (Reynolds had as-
form [x] = v updates the location referred Reynolds was the first to describe a sumed garbage collection). They also in-
to by x so that its contents becomes v′. program logic including the separating troduced the separating implication –*.
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 87
review articles
covered and the number of program- * is often used with linked struc- A * (A –* B) B
mers served. Static analysis with SL has tures. If list (x, y) describes an acyclic
matured to the point where it has been linked list running from x to y, then we (where reads “entails”) is a SL relative
applied industrially in the Facebook can describes a structure with a list seg- of “modus ponens.”
Infer program analyzer, an open source ment, followed by a single pointer, fol- Although we will concentrate on the
tool used at Facebook, Mozilla, Spotify, lowed by a further list running up to 0 informal picture semantics in this ar-
Amazon Web Services, and other com- (null), as follows: ticle, for the theoretically inclined we
panies (www.fbinfer.com). have included a glimpse of the formal
The purpose of this article is to de- x t y semantics in Figure 2.
scribe the basic ideas of SL as well as
these and other developments. Rules for Program Proof
This is the kind of structure you Figure 3 contains a selection of proof
Separating Conjunction might need to consider when deleting rules of SL. The rules are divided into
and Implication an element from a list, or inserting one axioms for basic mutation commands
Mathematical semantics has been into it. (the “small axioms”) and inference
critical to the discovery and further SL There is a further connective, the sep- rules for modular reasoning. An infer-
development, but many of the main arating implication or “magic wand.” ence rule says “if you can derive what
points can be gleaned from “picture P –* Q says that whenever the current is above the line, then so can you what
semantics.” Consider the first picture heaplet is extended with a separate is below,” and the axioms are deriv-
in Figure 1. We read the formula at heaplet satisfying P, the resulting com- able true statements that are given.
the top of this figure as “x points to bined heaplet will satisfy Q. For exam- The small axioms are for a program-
y and separately y points to x.” Go- ple, (x –) * ((x 3) –*Q) says that x is ming language with load and store
ing down the middle of the diagram allocated in the current heap, and that if instructions similar to an assembly
is a line that represents a heap par- you mutate its contents to 3 then Q will language. If we vary the programming
titioning: a separating conjunction hold. This describes the “weakest pre- language the small axioms change.
asks for a partitioning that divides condition” for the mutation [x] = 3 with The concurrency rule uses a composi-
the heap into parts, heaplets, satisfy- postcondition Q.26 tion operator || for running two pro-
ing its two conjuncts. At the bottom Finally, there is an assertion emp cesses in parallel, derived from Dijks-
of the first picture is an example of which says “the heaplet is empty,” emp tra’s parbegin/parend.16
a concrete memory description that is the unit of *, so that P = emp * P = P * The first small axiom just says that if
corresponds to the diagram. There, emp. Also, –* and * fit together is a way x points to something beforehand, then
x and y have values 10 and 42 (in the similarly to how implication ⇒ and con- it points to v afterward, and it says this
“environment,” or “register bank”), junction ∧ do in standard logic. For ex- for a small portion of the state in which x
and 10 and 42 are themselves loca- ample, the entailment is the only active cell.
tions with the indicated contents (in
the “heaplet,” or even “RAM”). Figure 3. Separation logic proof system (a selection).
The indicated separating con-
junction here is true of the pictured
memory because the parts satisfy the
conjuncts, as indicated in the second
picture. The meaning of “x points to
y and yet to nothing” is precisely dis-
ambiguated in the RAM description
below the diagram: x and y denote val-
ues (10 and 42), x’s value is an allocat-
ed memory address which contains
y’s value, but y’s value is not allocated.
The separating conjunction splits the
heap/RAM, but it does not split the as-
sociation of variables to values.
Generally speaking, the separating
conjunction P * Q is true of a heap if it
can be split into two heaplets, one of
which makes P true and the other of
which makes Q true. A distinction be-
tween * and Boolean conjunction ∧ is
that P * P ≠ P where P ∧ P = P. In particu-
lar, x v * x v is always false: there is
no way to divide any heap in such a way
that a cell x goes to both partitions.
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 89
review articles
The second axiom says that if x points come as a shock: aren’t they too sim- for the second step of the code to wire up
to v and we read x into y, then y will have ple? Previous approaches had complex a cyclic linked list described at the start
value v. Here, we distinguish between descriptions accounting for the effect of the paper.
the value in a variable or register (x and of mutations on global properties of The ultimate theoretical support for
y) and the r-value in a heap cell whose l- graph-like structures.6 the small axioms came from a complete-
value is the value held in x. The second In actuality, there is a sense in which ness theorem in Yang’s Ph.D. thesis.42
axiom assumes that x does not appear the small axioms capture all that is He showed the small axioms and frame
in syntactic expression v (see O’Hearn et needed to know about the statements rule and several other inference rules
al.32 for a precise description of this and they describe. In intuitive terms, we can (particularly Hoare’s rules for strength-
other variable side conditions). say that imperative computation pro- ening preconditions and weakening
The allocation axiom says: If you start ceeds by in-place update, where these postconditions, and a rule for existential
with no heap, then you end with a heap primitive statements update or access a quantifiers) can be used to derive all true
of size 1. Conversely the De-Allocation single memory cell at a time; describing Hoare triples for these statements.
axiom starts with a hap of size 1 and what happens to only that cell should be Locality properties of program be-
ends with the empty heap. The Appli- enough. The small axioms are thus an havior, and their connection to logic,13,44
cation axiom assumes that allocation extreme illustration of the principle of are critical for these results:
always succeeds. To model a case where local reasoning. "An assertion talks about a heaplet
allocation might fail we could use a dis- The frame rule in Figure 3 provides rather than the global heap, and a spec
junctive postcondition, like x – ∨ x == logical support for this intuition. It al- {P} C {Q} says that if C is given a heaplet
0; this is what tools such as SpaceInvad- lows us to extend reasoning from one satisfying P then it will never try to ac-
er and Infer, discussed later, do for mal- to multiple cells; so the seeming restric- cess heap outside of P (other than cells
loc() in C. tion to one cell in the small axioms is not allocated during execution) and it will
The small axioms are so named be- a restriction at all, but rather a pleasantly deliver a heaplet satisfying Q if it termi-
cause each mentions a small amount succinct description. For instance, if we nates.2"
of memory: a single memory cell. When choose x y as our frame then the first In-place reasoning as with the two-
people first see the axioms they can instance in Figure 4 gives the reasoning element cyclic list has been applied to
many imperative programs. As an ex-
Figure 4. Frame and concurrency examples. ample, consider the insertion of a node
y into a linked list after position x. We
can do this in two steps: first we swing
x’s pointer so it points to y, and then we
swing y to point to z (the node after x).
The concurrency rule is the main rule and is a typical pattern in SL reasoning: cal tree. An assertion like this would tell
of CSL. In applying CSL to languages “small specifications” are used which us that we could mutate one of the trees
with dynamic thread creation instead mention only the cells touched by the without affecting the other (at which
of parbegin/-parend different rules are program component (its footprint). point they would cease to represent the
needed, but the basic point that sepa- The critical part of the proof of the same tree).
ration allows independent reasoning program is presented in (4), where the For data structures without much
about processes carries over. precondition at the beginning is ob- sharing, such as variations on lists and
SL’s concurrency rule took inspira- tained by unwinding the recursive defi- trees, reasoning in SL is reminiscent
tion from the “disjoint concurrency nition using the if condition root ! = 0. of reasoning about purely functional
rule” of Hoare.23 Hoare’s rule used ∧ in The proof steps then follow the intuitive programs: you unroll an inductive defi-
place of * together with side conditions description of the algorithm: the first nition, then mutate, then roll it back
to rule out interference.b * allows us to recursive call deletes the left subtree, up. Inductive definitions using * and
extend its applicability to pointer struc- the second call deletes the right sub- mutation go well together. The first SL
tures. But even without pointers, the tree, and the final statement deletes the proof to address complex sharing was
CSL rule is more powerful. Indeed, upon root node. In the pictured reasoning, done by Yang in his Ph.D. thesis, where
seeing CSL the overall specification of the proce- he provided a verification of the classic
Hoare immediately exclaimed to the dure is applied as an induction hypoth- Schorr-Waite graph-marking algorithm.
author: “We can prove parallel quick- esis at each call site, together with the The algorithm works by reversing links
sort!” A direct proof can be given using Frame Rule for showing that the parts during search, and then restoring them
* to recognize and unite disjoint array not touched by recursive calls are left later: A space-saving representation of
partitions.30 unchanged. For instance, the asser- the stack of a recursive algorithm. Part
tions for the second recursive call are of the main invariant in Yang’s proof is
Frames, Footprints, an instance of the Frame Rule with the
and Local Reasoning triple {tree(right)} deletetree(right)
The previous section describes how the {emp} as the premise. * –*
separating conjunction leads to simple The simplicity of this proof comes
proofs of the individual steps of heap about because of the principle of local capturing the idea that if you replace
mutations, and how the frame rule em- reasoning. The frame rule allows in- the list of marked nodes by a restored
beds reasoning about small chunks of place reasoning for larger-scale opera- list, then you get a spanning tree. Yang’s
memory within larger memories. Here, tions (entire procedures) than individual proof reflected the intuition that the al-
the rules' more fundamental role as a ba- heap mutations. And it allows the speci- gorithm works by a series of local sur-
sis for scalable reasoning is explained. fication to concentrate on the footprint geries that mutate small parts of the
I illustrate by reasoning about a re- of a procedure instead of the global state. structure: The proof decomposed into
cursive program for deleting the nodes Put contrapositively, the deletetree verifications of the surgeries, and ways
in a binary tree. Consider the C program procedure could not be verified without of combining them.
in (1) of Figure 5. This program satis- the frame rule, unless we were to compli- The idiomatic use of –* in assertions
fies the specification in (2) of the figure, cate the initial specification by including of the form A * (B –* C) to describe gen-
where the tree predicate says that its ar- some representation of frame axioms eralized update was elevated to a general
gument points to a binary tree in mem- (saying what does not change) to enable principle in work of Hobor and Villard.25
ory. The predicate is defined recursively the proofs at the recursive call sites. They give proofs of a number of pro-
in (3), with a diagram below depicting This reasoning uses a tree predicate grams with significant sharing, includ-
what is described by the else part of the suitable for reasoning about mem- ing graphs, dags, overlaid structures (for
definition. Note that here we are using a ory safety; it mentions that we have a example, a list overlaying a tree), and
“points-to” predicate root [l : x, r : y] tree, but not what data it holds. For culminating in the copying algorithm in
for describing records with l and r fields. functional correctness reasoning, it Cheney’s garbage collector.
The use of emp in the if branch of is typical to use inductive predicates Many papers on SL have avoided –*,
the definition means that tree(r) is true that connect memory structures to often on the grounds that it complicates
of a heaplet that contains all and only mathematical entities. In place of tree automation and is only needed for pro-
the cells in the tree; there are no ad- (root) we could have a predicate tree (τ, grams with significant sharing. How-
ditional cells. Thus, the specification root) that says root points to an area of ever, –* is recently making something of
of deletetree(r) does not mention memory representing the mathemati- a comeback. For example, it is used rou-
nodes not in in the tree. This is analo- cal binary tree τ, where a mathemati- tinely as a basic tool in the Iris higher-
gous to what we did with the small axi- cal tree is either empty or an atom or order logic.29
oms for basic statements in Figure 3, a pair of trees. We could then specify
a procedure for copying a tree using a Concurrency, Ownership,
postcondition of the form and Separation
b There are variable conditions in some pre- The concurrency rule in Figure 3 says:
sentations of SL, that can technically be done
away with eliminated by using a version of *
To prove a parallel composition we give
that separates variables as well as heap.34 This that says we have two structures in mem- each process a separate piece of state,
article glosses over this issue. ory representing the same mathemati- and separately combine the postcon-
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 91
review articles
Abstraction and
the Fiction of Separation
There was considerable work on extend-
ing SL after those early papers. Some of it
concentrated on different programming
paradigms, such as object-oriented pro-
gramming or scripting languages, or
on additional programming primitives
such as message passing, reentrant lock
and fork/join concurrency. Besides ex-
tensions to cover an ever-greater variety
of programming, two conceptual devel-
opments opened major new directions.
ditions for each process. The rule sup- We could not prove a mutation were ˲˲ In his Ph.D. thesis, Parkinson
ports completely independent reason- we to place it there, because emp is not showed how abstract predicates (predi-
ing about processes. This rule can be a sufficient precondition for any muta- cate variables) fit together nearly with *
used to provide straightforward proofs tion; that is fortunate as such a muta- in the description of classes and other
of processes that don’t share access to tion could lead to a race condition. But stateful data abstractions.33
storage. We mentioned parallel quick- it is not the case that we know the glob- ˲˲ Gardner and others emphasized a
sort earlier, and deletetree() pro- al heap is empty, because the pointer concept of fictional separation, where
vides another illustration: we can run x could still persist. Rather, the knowl- strong separation properties could be
the two recursive calls in parallel rather edge that it points to something has assumed of data abstractions, even for
than sequentially, as presented in the been forgotten, transferred to the sec- implementations relying on sharing.
proof outline (1) in Figure 6. ond process where it materializes as These ideas were first described in
In work on CSL, proof outlines are y –. A reading of assertions began a sequential setting. Dinsdale-Young,
often presented in a spatial fashion like to form based on the “right to deref- Gardner and Wheelhouse described
this: this outline shows the premises of erence” or “ownership” (taken as syn- an implementation of a module of se-
the concurrency rule in the left and right onymous with right to dereference). quences in terms of linked lists and not-
Hoare triples, the overall precondition On this reading emp says “I don’t have ed a mismatch: at the abstract level an
(the pre1 * pre2) at the beginning, and permission to dereference any heap,” operation might affect a small part of a
the post at the end. or “I own nothing,” rather than “the sequence, where at the implementation
While this reasoning is simple, if CSL heap is empty.” Similarly, x – says “I level its footprint could involve the en-
had only been able to reason about dis- own x” (where “I” is the process from tire list; conversely, locality can increase
joint concurrency, where there is no inter- which the assertion is made). with abstraction.19 Meanwhile, Parkin-
process interaction, then it would have The ownership transfer example son initially targeted a sequential subset
rightly been considered rather restrictive. made it clear that quite a few concur- of Java. Subsequent work showed how
An important early example done with CSL rent programs would have much sim- abstract predicates could be understood
was a pointer-transferring buffer, where pler proofs than before. Modular proofs using higher-order versions of SL.5
one thread allocates a pointer and puts it were provided of semaphore programs, While they could be expressed in a
into a buffer while the other thread reads it of a toy memory manager, and programs sequential setting, the ideas took flight
out and frees it. Crucially, not only is the with interacting resources. It seemed as when transported to concurrency. The
pointer deemed to transfer from one pro- if the proofs mirrored design principles CAP logic18 combined insights on ab-
cess to another, but the “knowledge that it used to simplify reasoning about con- stract predicates and fiction, along
is allocated” transfers with the proof. The current processes, such as in Dijkstra’s with those of CSL, to reason about data
proof establishing absence of memory er- idea of loosely connected processes: abstractions with interference in their
rors is shown in (2) of Figure 6. A way to “[A]part from the (rare) moments of implementations. The views theory17
implement the buffer code for put and explicit intercommunication, the indi- provided a foundation where separa-
get is to use locks to synchronize access to vidual processes are to be regarded as tion does not appear in the normal exe-
a shared variable and a Boolean to signal completely independent of each other.”16 cution semantics of programs, but only
when the buffer is full. We will not delve However, the very feature that gave in an abstraction of it. Views showed
into the subproofs of buffer operations rise to the unexpected power, ownership that a simple version of CSL can embed
here—for that, consult O’Hearn30—but transfer, made soundness (whether the many other techniques including even
we want to talk about a shift in perspec- rules prove only true statements) non- the classic rely-guarantee method;27
tive on the meanings of logical assertions obvious. O’Hearn worked on soundness this is surprising because rely-guaran-
that the proof (2) led to. during 2001 and 2002, without success. tee was invented for reasoning about
Notice the assertion emp after the In May of 2002 he turned to Brookes who interference, almost the opposite of
put(x) statement in the left process. eventually (with important input from the basis of original SL.
Today, advanced logics are often for- O’Hearn, was the first SL verification used to prove crypto code. For example,
mulated as variations on the theme of tool. Given procedure pre/post specs, OpenSSL’s HMAC authentication code,
“higher-order concurrent separation loop invariants and invariants governing comprising 134 lines of C, was proven
logic.” One of these, Verifiable C, is the lock usage, Smallfoot attempts to con- using 2,832 lines of Coq.4
foundation of Appel’s Verified Software struct a proof. For the pointer-transfer- A larger example is the FSCQ file sys-
Toolchain,1 and includes an expressive ring buffer, given a buffer invariant and tem.14 The code and the proof are both
higher-order logic supporting recursive pre/post specs for put and get it can done in Coq, taking up 31k lines of
predicates. Iris29 encompasses reason- verify memory safety and race freedom. proof+code. This compares to 3k lines of
ing about fine-grained concurrency and Smallfoot used a decidable fragment C for a related unverified file system. Al-
even relaxed memory, based on differ- of SL dubbed “symbolic heap,” formu- though the initial effort, which included
ent instantiations of a single generic lae of the form B ∧ H where H is a sepa- development of a program logic frame-
model. Iris has been used to provide rating conjunction of heap facts and B work in Coq, took several person years,
a foundation of the type system of the is a Boolean assertion over non-heap experiments show incremental, lower
Rust programming language,28 which data. The format was chosen to make cost when modifying code+proof.
is very natural when you consider that in-place symbolic execution efficient. A commercial example concerns
ownership transfer is one of the central Smallfoot’s heap facts were restricted key modules of a preemptive OS ker-
ideas in Rust. to points-to assertions, linked lists and nel, the μC/OS-II.41 Modules verified
Technically, these works are based on trees. Subsequent works extended sym- include the scheduler, interrupt han-
“non-standard models” of SL, different bolic heaps in numerous directions, dlers, and message queues. 1.3k lines
from the heaplet model but instances of covering more inductive definitions as of C were proven using 216k lines of
Pym’s resource semantics as in Figure well as arrays and arithmetic; see appen- Coq. It took four person years to de-
2; see Pym et al.36 There are many such dix (https://bit.ly/2CQD9CU). velop the framework, one-person year
models, including ones incorporating Some of the most substantial auto- to prove the first module, and then the
read and other permissions,7 auxiliary matic verifications done with SL have remaining modules, around 900 lines
state,39 time,39 protocols,29 and others. been carried out with the VeriFast tool of of C, took six person-months.
Abstract SL13 showed how general pro- Jacobs and colleagues. VeriFast employs Automatic program analysis. With a
gram logic could be defined based on a symbolic execution engine like Small- verification-oriented program analysis
these models, and the works just men- foot, but integrates a dedicated SL theo- the annotations that a human would
tioned and others showed that some of rem prover with a classical SMT solver supply to a mostly automatic verifier
them had surprising ramifications. for non-heap data. A paper reports on like Smallfoot—invariants and pre/post
Fictional separation and views the verification of several industrial case specs—are inferred. A tool will be able
worked to reimagine fundamental con- studies, including Java Card programs to prove weaker properties when the hu-
cepts. The programs being proven go and device drivers written in C;35 see Ver- man is not supplying annotations, but
beyond the loosely connected processes iFast’s GitHub site for these and many can more easily be deployed broadly to
that CSL was originally designed for. other examples (https://github.com/ many programmers.
Significant new theoretical insights and verifast/verifast). Program analysis with SL has re-
soundness arguments were needed to Interactive verification. In an auto- ceived a great deal of attention. At first,
justify the program-proof rules support- matic verifier like Smallfoot, the proof analysis was formulated for simple
ing the fine-grained concurrency exam- construction is automatic, given the linked lists,20 and progressively re-
ples.17 This led to a flowering of interest pre/post annotations plus invariants. searchers moved on to more involved
and new ideas which is still in progress. In interactive verification the human data structures. A practical high point
A recent survey on CSL provides many helps guide the proof search, com- in this line of work was the verification
more references in addition to those monly using a proof assistant such of pointer safety in Linux and Win-
mentioned here.9 as Coq, HOL4, or Isabelle. Interactive dows device drivers up to 10k LOC by
verification can often prove stronger the SpaceInvader program analyzer.43
Directions in properties than automatic verifiers, SpaceInvader was an academic tool;
Mechanized Reasoning but the cost is higher. its sibling, SLAyer,3 developed in par-
SL spawned new approaches to verifi- Interactive verifiers have been used allel at Microsoft, was used internally
cation tools. In order to provide a taste to prove small, intricate algorithms. A to find 10s of memory safety errors in
of where the field has gone, we present recent paper reports on the verification Windows device drivers. SpaceInvader
a sampling of practical achievements; of low-level concurrent algorithms in- and SLAyer were able to analyze com-
that is, we focus on the end points rath- cluding a CAS-lock, a ticketed lock, a GC plex, linear data structures: for exam-
er than the (important) advancements allocator, and a non-blocking stack.39 An ple, oneWindows driver manipulated
along the way that helped get there. emphasis is placed on reusability; for in- five-cyclic doubly linked lists sharing a
Further references to the literature, in- stance, the stack uses the GC allocator, common header node, three of which
cluding discussion on intermediate ad- which in turn uses a lock, but the stack had acyclic sublists.
vances, may be found in the appendix uses the spec of the allocator and the Like much research in verification-
(https://bit.ly/2CQD9CU). allocator uses the spec rather than the oriented program analysis these tech-
Mostly automatic verification. Small- implementation of a lock. niques worked in a whole-program
foot,2 from Calcagno, Berdine, and The verifiable C logic1 has been fashion: you start from main() or
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 93
review articles
other entry points and explore the pro- sis not infrequently finds more general
gram graph, perhaps visiting proce- specifications than a top-down analysis
dure bodies multiple times. This can With bi-abduction we can automate that dives into procedures at call sites;
be expensive. While accurate analysis the local reasoning idea by abducing finding general specs is important for
of 10k LOC can be a leading research assertions that describe preconditions, both scalability and precision.
achievement, 10k is tiny compared to and using frame inference to keep speci- The main bi-abduction paper12
software found in the wild. A single fications small. Let us illustrate with the contributed proof techniques and al-
company can have tens of millions of program we started the paper with. We gorithms for abduction, and a novel
lines of code. Progress toward big code begin symbolic execution with nothing compositional algorithm for generat-
called for a radical departure. in the precondition, and we ask a bi- ing pre/post specs of program compo-
abduction question, using the current nents. Experimental results scaled to
Bi-Abduction and Facebook Infer state emp as the A part of the bi-abduc- hundreds of thousands of lines, and a
In 2008 Calcagno asked: What is the main tion query and the pre of the small axi- part of Linux of 3M lines. This form of
obstacle blocking application of SpaceIn- om for [x] = y as B. analysis finds preconditions support-
vader and similar tools to programs in the ing safety proofs of clusters of proce-
millions of LOC? O’Hearn answered: The dures as well as indicating potential
need for the human to supply precondi- bugs where proofs failed.
tions. He proposed that a “truly modu- This work led to the program proof
lar” analysis based on local reasoning startup Monoidics, founded by Calc-
could accept a program component with agno, Distefano and O’Hearn in 2009.
no human annotations, and generate Monoidics developed and marketed the
a pre/post spec where the precondition Now, we move the abduced anti-frame Infer tool, based on the abductive tech-
approximates the footprint. The analysis to the overall precondition, we take nique. Monoidics was acquired by Face-
would then “stitch” these specifications one step of symbolic execution using book in 2013 at which point Calcagno,
together to obtain results for larger pro- the small axiom for Pointer Write from Distefano, and O’Hearn moved to Face-
gram parts. The analysis would be com- Figure 2, we install the post of the small book with the Monoidics engineering
positional, in that a spec for a procedure axiom as the pre of the next instruction, team (www.fbinfer.com).
could be obtained without knowing its and we continue. The compositional nature of In-
callers, and the hypothesis was that it fer turned out to be a remarkable fit
would scale because procedures could be for Facebook’s software development
visited independently. This implied giv- process.11 A codebase with millions
ing up on whole-program analysis. of lines is altered thousands of times
Calcagno, O’Hearn, Distefano and per day in “code diffs” submitted by
Yang set to work on realizing a truly the programmers. Instead of doing
modular analysis. Yang developed a a whole-program analysis for each
scheme based on gleaning information The formula y – in the bi-abduc- diff, Infer analyzes changes (the diffs)
from failed proofs to discover a foot- tion query is the precondition of the compositionally, and reports regres-
print. Distefano made a breakthrough small axiom for the pointer write [y] = x: sions as a bot participating in the in-
on the stitching issue for the modular we abduce it as the anti-frame, and add ternal code review process. Using bi-
analysis that involved a new inference it to the overall precondition. The frame abduction, the frame rule picks off (an
problem: rule tells us that the inferred frame x approximation of) just enough state
Bi-abduction: given A and B, find y is unaltered by [y] = x, when it is sepa- to analyze a diff, instead of consider-
?frame and ?anti-frame such that rately conjoined with y –, and this ing the entire global program state.
with the small axiom gives us our overall The way that compositional analysis
postcondition in supports incremental diff analysis is
even more important than the ability
where is read ‘entails’ or ‘implies.’ to scale; a linear-time analysis operat-
The inference of ?frame (the leftover ing on the whole program would usu-
part in A but not B) was present in ally be too slow for this deployment
Smallfoot, and is used in many tools. model. Indeed, Infer has evolved from
The ?anti-frame part (the missing bit So, starting from specifications for a standalone SL-based analyzer to a
needed to establish B), is abduction, primitive statements, we can infer both general framework for compositional
or inference of hypotheses, an infer- a precondition and a postcondition for analyses (http://fbinfer.com/docs/
ence problem identified by the philos- a compound statement by repeated ap- checkers.html and appendix; https://
opher Charles Peirce in his conceptu- plications of bi-abduction and the frame bit.ly/2CQD9CU).
al analysis of the scientific method. As rule. This facility leads to a high degree
a simple example, of automation. Also, note that the pre- Conclusion
condition here is more general than the Some time during 2001, while sitting
one at the start of the paper, because it together in his back garden, Reynolds
can be solved with does not mention 0. Bi-abductive analy- turned to me and exclaimed: “The
logic is nice, but it’s the model that’s mental understanding and in mecha- concurrent programs. In Proceedings of POPL, 2013,
287–300.
really important.” My own prejudice nized techniques that help program- 18. Dinsdale-Young, T., Dodds, M., Gardner, M., Parkinson,
for semantics made me agree imme- mers in their daily work. I hope that M.J. and Vafeiadis, V. Concurrent abstract predicates. In
Proceedings of ECOOP, 2010, 504–528.
diately. We were both beguiled by the scientists and engineers will continue to 19. Dinsdale-Young, T., Gardner, P. and Wheelhouse, M.J.
fact that this funky species of logic innovate on the fascinating problems in Abstraction and refinement for local reasoning. In
Proceedings of VSTTE, 2010, 199–215.
could be described using down-to- this area. 20. Distefano, D., O’Hearn, P.W. and Yang, H. A local shape
earth computer science concepts like Acknowledgments. This article is analysis based on separation logic. In Proceedings of
TACAS, 2006, 287–302.
RAMs and access bits. dedicated to the memory of John C. 21. Floyd, R.W. Assigning meanings to programs. In
Proceedings of the Symposium on Applied Mathematics.
What happened later came as a sur- Reynolds (1935–2013). Our work to- J.T. Schwartz, ed. AMS, 1967, 19–32.
prise. The specific heap/RAM model gether at the formative stage of sepa- 22. Hoare, C.A.R. An axiomatic basis for computer
programming. Commun. ACM 12, 10 (1969), 576–580.
gave way in importance to a more gen- ration logic was incredibly intense, 23. Hoare, C.A.R. Towards a theory of parallel
eral class of nonstandard models based exciting, and huge fun. I am fortunate programming. Operati ng Systems Techniques.
Academic Press, 1972.
on fictional rather than down-to-earth to have worked so closely with such 24. Hoare, T., Möller, B., Struth, G. and Wehrman, I.
separation. And the logic itself, particu- a brilliantly insightful scientist, who Concurrent Kleene algebra and its foundations. J. Log.
Algebr. Program 80, 6 (2011), 266–296.
larly its proof theory, turned out to be ex- was also a valued friend. 25. Hobor, A. and Villard, J. The ramifications of sharing
tremely useful in automatic verification, I thank my many other collabo- in data structures. In Proceedings of 40th POPL, 2013,
523–536.
leading to many novel research tools rators in the development of this 26. Ishtiaq, S.S. and O’Hearn, P.W. BI as an assertion
and eventually to Facebook Infer. research, particularly David Pym, language for mutable data structures. In Proceedings of
POPL, 2001, 14–26.
Still, I expect that in the long run it Hongseok Yang, Richard Bornat, Cris- 27. Jones, C.B. Specification and design of (parallel)
will be the spirit rather than the letter of tiano Calcagno, Josh Berdine, Dino programs. In Proceedings of IFIP Congress, 1983,
321–332.
SL that is more significant. Concepts of Distefano, Steve Brookes, Matthew 28. Jung , R. Jourdan, J.-H., Krebbers, R. and Dreyer.
frames, footprints, and separation as a Parkinson, Philippa Gardner, and D. RustBelt: Securing the foundations of the Rust
programming language. In Proceedings of PACMPL,
basis for modular reasoning seem to be Tony Hoare. Finally, thanks to my col- 2018.
29. Krebbers, R., Jung, R., Bizjak, A., Jourdan, J-H, Dreyer, D.
of fundamental importance, indepen- leagues at Facebook for our work to- and Birkedal, L. The essence of higher-order concurrent
dently of the syntax used to describe gether and for teaching me about ap- separation logic. In Proceedings of ESOP, 2017,
696–723.
them. Indeed, one of the more impor- plying logic in the real world. 30. O’Hearn, P.W. Resources, concurrency, and local
tant directions I see for further work is reasoning. Theor. Comput. Sci. 375, 1-3 (2007), 271–307.
31. O’Hearn, P.W and Pym, D.J. The logic of bunched
in theoretical foundations that get at References implications. Bulletin of Symbolic Logic 5, 2 (1999),
1. Appel, A.W. Program Logics for Certified Compilers.
the essence of scalable, modular rea- Cambridge University Press, U.K., 2014.
215–244.
32. O’Hearn, P.W., Reynolds, J.C. and Yang, H. Local
soning in as formalism-independent 2. Berdine, J. Calcagno, C. and O’Hearn, P.W. Smallfoot: reasoning about programs that alter data structures. In
Modular automatic assertion checking with separation
a way as possible. Theoretical synthe- logic. LNCS FMCO 4111 (2005) 115–137, 2005.
Proceedings of CSL, 2001, 1–19.
33. Parkinson. M.J. Local reasoning for Java. Ph.D. thesis.
sis would be extremely useful for three 3. Berdine, J., Cook, B. and Ishtiaq, S. SLAyer: Memory University of Cambridge, U.K., 2005.
safety for systems-level code. In Proceedings of CAV,
reasons: To make it easier for people 2011, 178–183.
34. Parkinson, M.J., Bornat, R. and Calcagno, C. Variables
as resource in Hoare logics. In Proceedings of 21st LIC,
to understand what has been achieved 4. Beringer, L., Petcher, A., Ye, K.Q. and Appel, A.W. Verified 2006, 137–146.
correctness and security of OpenSSL HMAC. In 35. Philippaerts, P., Mühlberg, J.T., Penninckx, W., Smans,
by each new idea; to provide a simpler Proceedings of 24th USENIX Security Symposium, 2015, J., Jacobs, B. and Piessens, F. Software verification with
jumping-off point for future work than 207–221. verifast: Industrial case studies. Sci. Comput. Program.
5. Biering, B., Birkedal, L. and Torp-Smith, N. BI- 82 (2014), 77–97.
the union of the many specific advanc- hyperdoctrines, higher-order separation logic, and 36. Pym, D., O’Hearn, P. and Yang, H. Possible worlds and
es; and, to suggest new, unexplored abstraction. ACM TOPLAS 29, 4 (2007). resources: The semantics of BI. Theoret. Comp. Sci. 315,
6. Bornat, R. Proving pointer programs in Hoare logic. 1 (2004), 257–305.
avenues. Hoare has been advancing LNCS MPC 1837 (2000) 102–126. 37. Reynolds, J,C. Intuitionistic reasoning about shared
an abstract, algebraic theory related to 7. Bornat, R., Calcagno, C., O’Hearn, P.W. and Parkinson, mutable data structure. Millennial Perspectives in
M.J. Permission accounting in separation logic. In Computer Science, Cornerstones of Computing. Palgrave
CSL, which has components covering Proceedings of POPL, 2005, 259–270. Macmillan, 2000.
semantics, proof theory, and testing,24 8. Brookes, S. A semantics for concurrent separation logic. 38. Reynolds, J.C. Separation logic: A logic for shared
Theor. Comput. Sci., 375, 1–3 (2007), 227–270. mutable data structures. LICS, 2002, 55–74.
and work along these lines is well worth 9. Brookes, S. and O’Hearn, P.W. Concurrent separation 39. Sergey, I., Nanevski, A. and Banerjee, A. Mechanized
logic. SIGLOG News 3, 3 (2016), 47–65.
exploring further. 10. Burstall, R.M. Some techniques for proving correctness
verification of fine-grained concurrent programs. In
Proceedings of 36th PLDI, 2015, 77–87.
Other relevant reference points are of programs which alter data structures. Machine 40. Turing, A.M. Checking a large routine. Report of a
Intelligence 7, 1 (1972), 23–50.
works on general versions of SL,13,17 11. Calcagno, C. et al. Moving fast with software verification.
Conference on High-Speed Automatic Calculating
Machines. Univ. Math. Lab., Cambridge, U.K., 1949,
abstract interpretation,15 and work on In Proceedings of NASA Formal Methods Symposium, 67–69.
2015, 3–11.
“separation without SL” discussed in 12. Calcagno, C., Distefano, D., O’Hearn, P.W. and Yang, H.
41. Xu, F., Fu, M., Feng, X., Zhang, X., Zhang, H. and Li, Z.
A practical verification framework for preemptive OS
the appendix (https://bit.ly/2CQD9CU). Compositional shape analysis by means of bi-abduction. kernels. In Proceedings of CAV, 2016.
J. ACM 58, 6 (2011), 26. Preliminary version in 42. Yang, H. Local Reasoning for Stateful Programs. Ph.D.
Semantic fundamentals would be cru- Proceedings of POPL’09. thesis. University of Illinois, 2001.
cial to an adequate general foundation, 13. Calcagno, C., O’Hearn, P.W. and Yang, H. Local action and 43. Yang, H., Lee, O., Berdine, J., Calcagno, C., Cook, B.,
abstract separation logic. LICS, 2007, 366–378. Distefano, D. and O’Hearn, P.W. Scalable shape analysis
but I stress that proof theoretic and es- 14. Chen, H., Ziegler, F., Chajed, T., Chlipala, A., Kaashoek, for systems code. In Proceedings of CAV, 2008,
pecially algorithmic aspects addressing M.F. and Zeldovich, N. Using Crash Hoare logic for 385–398.
certifying the FSCQ file system. In Proceedings of 44. Yang, H. and O’Hearn, P.W. A semantic basis for local
the central problem of scale should be SOSP, pages 18–37, 2015. reasoning. In Proceedings of FoSSaCS, 2002, 402–416.
covered as well. 15. Cousot, P. and Cousot, R. Abstract interpretation: A
unified lattice model for static analysis of programs
In conclusion, scalable reasoning by construction or approximation of fixpoints. In
Peter O’Hearn (p.ohearn@ucl.ac.uk) is a research
about code has come a long way since Proceedings of POPL, 1977, 238–252.
scientist at Facebook and professor of computer science
16. Dijkstra, E.W. Cooperating sequential processes.
at University College London, U.K.
the birth of SL around the turn of the Programming Languages, Academic Press, 1968,
43–112.
millennium, but it seems to me that 17. Dinsdale-Young, T., Birkedal, L., Gardner, P., Parkinson,
much more is possible both in funda- M.J. and Yang, H. Views: Compositional reasoning for © 2019 ACM 0001-0782/19/2 $15.00
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 95
research highlights
P. 97 P. 98
Technical
Perspective Distributed Strategies for
How Economic Computational Sprints
Theories Can By Songchun Fan, Seyed Majid Zahedi, and Benjamin C. Lee
Help Computers
Beat the Heat
By Thomas F. Wenisch
P. 107 P. 108
Technical
Perspective Scalable Computation of High-
To Do or Not to Do: Order Optimization Queries
Extending SQL By Matteo Brucato, Azza Abouzied, and Alexandra Meliou
with Integer Linear
Programming?
By Surajit Chaudhuri
Technical Perspective
To view the accompanying paper,
visit doi.acm.org/10.1145/3299885 rh
N E A R LY E V E R Y C O M P U T E R system today Current datacenters must either run are free to choose when to sprint, but
runs hot … too hot. For over a decade, complex, centralized control systems to must wait for a cool-off period before
thermal constraints have limited the allocate power and thermal budgets at sprinting again. Moreover, if too many
computational capability of computing fine granularity, or reserve large guard- nodes sprint at once, supplemental bat-
systems of all sizes—from mobile bands to avoid power or thermal emer- tery power must be used to avoid trip-
phones to datacenters. And, for nearly gencies. But, because they require fre- ping circuit breakers; servers connected
that long, system designers have cheated quent communication, centralized to that power circuit are not allowed to
those thermal limits, allowing systems systems are prone to failure and notori- sprint again until the battery recharg-
to burn more power, and produce more ously difficult to scale—the frequent es. To “win” in this game, agents must
heat, for short periods to deliver bursts communication rapidly becomes a bot- choose to sprint when they achieve the
of peak performance beyond what can tleneck. Moreover, workloads benefit to maximum performance benefit while
be sustained. This idea—running a com- different degrees at different times from taking into account the risk they incur
puter too hot for a short period of time to computational sprinting; judicious use that too many concurrent sprinters
get a burst of performance—is called of scarce power and cooling budgets can cause a circuit to trip.
computational sprinting. lead to better overall performance. The To optimize the datacenter as a
We have likely all experienced compu- challenges of allocating budgets grow whole, each agent provides a broker with
tational sprinting on our smartphones; even more daunting in cloud computing its best estimate of its utility curve—how
it turns out that, if all the cores, accelera- environments, where each cloud tenant much benefit it gains from sprinting for
tors, and peripherals on a modern smart- seeks to maximize its own performance various fractions of its execution while
phone are turned on at once, the phone and may have no incentive to cooperate. taking into account the risks of a circuit
will generate several times more heat Economics has long studied the chal- breaker trip. The broker then solves for a
than can be dissipated through its case. If lenges of allocating scarce resources. global equilibrium that maximizes util-
you play a demanding 3D video game for Game theory, in particular, studies ity, and provides each agent the strategy
more than a few minutes, you might no- resource allocation among strategic it should follow to reach that equilib-
tice the phone get uncomfortably warm. agents that seek to maximize their indi- rium. The strength of the underlying
As the phone heats up, eventually, pro- vidual utility and might even lie about economic theory is that agents prov-
cessing speeds have to slow to keep tem- their preferences to do so. ably cannot gain an advantage from ly-
perature rise in check. When the phone The authors of the following paper, ing about their utility curve or deviating
cools, its processor can run full-tilt again. Distributed Strategies for Computational from their assigned strategy … so, they
What might be less widely known Sprints, bring this rich theory to the are incentivized to cooperate.
is that modern datacenters can play challenge of managing computational The beauty of this approach is that
similar tricks; they oversubscribe both sprinting in datacenters. They formu- it provides nearly the effectiveness of
power delivery and cooling capability late the problem of managing compu- perfect centralized control while requir-
to eke out greater efficiency. Individual tational sprinting as a repeated game: ing only simple, infrequent interactions
servers may sprint by consuming more agents managing individual workloads with the broker. Because agents can-
than their fair share of power to maxi- not gain an advantage by cheating, this
mize performance when their workload kind of coordination mechanism can be
is high. In a datacenter running diverse When we consider the used even among mutually distrusting
workloads, different systems will likely agents, as in the cloud. More generally,
sprint at different times, and the aver- resource management the paper teaches us that, when we con-
age demands of the facility will (prob- challenges that arise sider the myriad resource management
ably) remain sustainable. But, a local challenges that arise in computer sys-
spike in one server rack might draw too in computer systems, tems, we ought to look beyond the con-
much power from a particular circuit, we should look fines of our own discipline; economics
risking that a circuit breaker trips. Or, provides a rich toolset from which all of
all the cores in a particular server might beyond the confines us can learn.
run a sustained compute job at full bore of our own discipline.
and risk local over-heating. To maximize Thomas F. Wenisch is an associate professor of
computer science and engineering at the University of
efficiency, a datacenter should sprint as Michigan, Ann Arbor, MI, USA.
close to its power and thermal limits as
it can … without going over them. Copyright held by author/owner.
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 97
research highlights
DOI:10.1145/ 32 9 9 8 8 5
Non−sprinting Sprinting
1.5
Normalized power
5
40
4 1.0
30
3
2 0.5 20
1 10
0 0.0 0
le
Pa elat S
ia C
L M
e ar
ge ion
le
Pa elat S
SV t
ia C
L M
e ar
ge ion
Co ans
SV t
c ve
le
Pa elat S
nk
ia C
L M
e ar
Co ans
ad n
ge ion
c ve
SV t
ad n
nk
Co ans
c ve
nk
ad n
ien
ien
rr AL
ien
Tr C
rr AL
Tr C
Gr isio
rr AL
ng
Gr isio
Tr C
ng
Kmine
Gr isio
ng
Kmine
Kmine
De Na i
De Na i
ra
De Na i
ra
ra
and heat sink must absorb surplus heat during a sprint.14, 15 Figure 2. Typical trip curve of a circuit breaker.5
Second, the datacenter rack must employ batteries to guard
against power emergencies caused by a surplus of sprinters 3600
on a shared power supply. Third, the system must imple- Long-delay
To
chip’s maximum power level and dictates the duration of a 2 ler
an P =1
sprint.13, 15 More expensive heat sinks employ PCMs, which Ptrip=0 ce trip
ba
increase thermal capacitance, and permit sprint durations nd Tripped
on the order of minutes if not hours. We estimate a chip 0.1
with paraffin wax can sprint with durations on the order of
150s.
After a sprint, the thermal package must release its heat
before the chip can sprint again. The average cooling dura- Not tripped
tion, denoted as ∆tcool, is the time required before the PCM
returns to ambient temperature. The rate at which the PCM
dissipates heat depends on its melting point and the ther-
mal resistance between the material and the ambient. Both 1 2 3 5 10 20
factors can be engineered and, with paraffin wax, we esti- Current normalized to rated current
mate a cooling duration on the order of 300s, twice the
sprint’s duration.
Power delivery and circuit breakers. Datacenter archi- to the number of simultaneous sprints as each sprinter con-
tects deploy servers and multiprocessors to oversubscribe tributes to the load above rated current. Higher currents
power distribution units for efficiency. Oversubscription increase the probability of tripping the breaker.
utilizes a larger fraction of the facility’s provisioned power. Let nS denote the number of sprinters and let Ptrip denote
But it relies on power capping and varied computational the probability of tripping the breaker. The breaker occupies
load across servers to avoid tripping circuit breakers or vio- one of the following regions:
lating contracts with utility providers.4 Although sprints
can boost computation, the risk of a power emergency • Non-Tripped. Ptrip is zero when nS < Nmin
increases with the number of sprinters in a power capped • Non-Deterministic. Ptrip is a non-decreasing function of
datacenter. nS when Nmin ≤ nS < Nmax
Figure 2 presents the circuit breaker’s trip curve, which • Tripped. Ptrip is one when nS ≥ Nmax
specifies how sprint duration and power combine to deter-
mine whether the breaker trips. The trip time corresponds Note that Nmin and Nmax depend on the breaker’s trip curve and
to the sprint’s duration. Longer sprints increase the proba- the application’s demand for power when sprinting. For
bility of tripping the breaker. The current draw corresponds Spark on chip multiprocessors, we find that the breaker does
F E B R UA RY 2 0 1 9 | VO L. 6 2 | N O. 2 | C OM M U N IC AT ION S OF T HE ACM 99
research highlights
not trip when less than 25% of the chips sprint and definitely arallelism when sprinting powers-on cores and tolerates
p
trips when more than 75% of the chips sprint. In other faults when cooling and recovery powers-off cores.
words, Nmin = 0.25N and Nmax = 0.75N. We consider circuit Agents are strategic and selfish entities that act on users’
breakers that can be overloaded to 125–175% of rated current behalf. They decide whether to sprint by continuously ana-
for a 150s sprint.18, 21 lyzing fine-grained application phases. Because sprints are
Uninterruptible power supplies. When the breaker trips followed by cooling and recovery, an agent sprints judi-
and resets, power distribution switches from the branch cir- ciously and targets application phases that benefit most
cuit to the uninterruptible power supply (UPS).7 The rack from extra capability. Agents use predictors that estimate
augments power delivery with batteries to complete sprints utility from sprinting based on software profiles and hard-
in progress. Lead acid batteries support discharge times of ware counters. Each agent represents a user and her applica-
5–120min, long enough to support the duration of a sprint. tion on a chip multiprocessor.
After completing sprints and resetting the breaker, servers Coordination. The coordinator collects profiles from
resume computation on the branch circuit. all agents and assigns tailored sprinting strategies to each
Servers are forbidden from sprinting again until UPS bat- agent. The coordinator interfaces with strategic agents who
teries are recharged. Sprints before recovery compromises may attempt to manipulate system outcomes by misreport-
server availability and increases vulnerability to power emer- ing profiles or deviating from assigned strategies.
gencies. Moreover, frequent discharges without recharges Fortunately, our game-theoretic mechanism guards against
shorten battery life. The average recovery duration, denoted such behavior.
by ∆trecover, depends on the UPS discharge depth and recharg- First, agents will truthfully report their performance pro-
ing time. A battery can be recharged to 85% capacity in 8–10× files. In large systems, game theory provides incentive com-
the discharge time, which corresponds to 8–10× the sprint patibility, which means that agents cannot improve their
duration. utility by misreporting their preferences. An agent who mis-
reports her profile has little influence on conditions in a
2.2 Management architecture large system. Not only does she fail to affect others, an agent
Figure 3 illustrates the management framework for a rack who misreports suffers degraded performance as the coor-
of sprinting chip multiprocessors. The framework sup- dinator assigns her a poorly suited strategy based on inac-
ports policies that pursue the performance of sprints curate profiles.
while avoiding system instability. Unmanaged and exces- Second, agents will implement their assigned strategies
sive sprints may trip breakers, trigger emergencies, and because the coordinator optimizes those strategies to pro-
degrade performance at scale. The framework achieves its duce an equilibrium. In equilibrium, every agent imple-
objectives with strategic agents and coarse-grained ments her strategy and no agent benefits by deviating from
coordination. it. An equilibrium has compelling implications for manage-
Users and agents. Each user deploys three run-time com- ment overheads. If each agent knows that every other agent
ponents: executor, agent, and predictor. Executors provide is playing her assigned strategy, she will do the same without
clean abstractions, encapsulating applications that could further communication with the coordinator. Global com-
employ different software frameworks.10 The executor sup- munication between agents and the coordinator is infre-
ports task-parallel computation by dividing an application quent and occurs only when system profiles change. In
into tasks, constructing a task dependence graph, and effect, an equilibrium permits the distributed enforcement
scheduling tasks dynamically based on available resources. of sprinting policies.
Task scheduling is particularly important as it increases Equilibria are especially compelling when compared to
the centralized enforcement of coordinated policies, which
Figure 3. Users deploy task executors and agents that decide when poses several challenges. First, centralized enforcement
to sprint. Agents send performance profiles to a coordinator and requires frequent and global communication as each agent
receives optimized sprinting strategies. decides whether to sprint by querying the coordinator at the
Coordinator start of each epoch. The length of an epoch is short and cor-
responds to sprint duration. Moreover, without equilibria,
Alg 1 agents with kernel privileges could ignore prescribed poli-
cies, sprint at will, and cause power emergencies that harm
all agents.
fi le
Pro gy
ate
Str 3. THE SPRINTING GAME
User User We design a sprinting game to govern power supply and
Agent Predictor Agent Predictor manage system dynamics. The game divides time into
Executor engine
... Executor engine
epochs and asks agents to play repeatedly. Agents represent
chip multiprocessors that share power. Each agent chooses
to sprint independently, pursuing benefits in the current
Task Task epoch and estimating repercussions in future epochs. An
agent’s utility from sprinting varies across epochs according
to her application’s phases. Multiple agents can sprint
dynamic programming. Markov chain that describes each agent’s behavior. As agents
Value in active state. An action’s value depends on bene- play their strategies, the Markov chain converges to a station-
fits in the current epoch plus the discounted value from ary distribution in which each agent is active with probability
future epochs. Suppose an agent in the active state decides pA. Given N agents, the expected number of sprinters is
to sprint. Her value from sprinting is her immediate utility u
plus her discounted future utility. When she sprints, future (9)
utility is calculated for the cooling state V (C) or the recovery
state V (R) when her sprint trips the breaker. Given the expected number of sprinters, the game
updates the probability of tripping the breaker according to
(2) its trip curve (e.g., Figure 2).
(3)
Ptrip may change uT and nS, which may produce a new . If
V (A) denotes an agent’s expected value from being in the Ptrip = , then agents are playing optimized strategies that
active state. The game profiles an application and its time- produce an equilibrium.
varying computational phases to obtain a density function
f(u), which characterizes how often an agent derives utility u 4.4 Finding the equilibrium
from sprinting. With this density, the game estimates When the game begins, agents make initial assumptions
expected value. about population behavior and the probability of tripping
the breaker. Agents optimize their strategies in response to
(4) population behavior. Strategies produce sprints that affect
the probability of tripping the breaker. Over time, popula-
Value in cooling and recovery states. An active agent transi- tion behavior and agent strategies converge to a stationary
tions into cooling and recovery states when she and/or oth- distribution. The game is in equilibrium if the following
ers sprint. conditions hold.
reflect agents’ best responses to system dynamics. These well by embracing agents’ strategies. E-T produces an equi-
thresholds produce an equilibrium and agents cannot ben- librium in which agents play their optimal strategies and
efit by deviating from their assigned strategy. converge to a stationary distribution. In equilibrium, the
number of sprinters is just slightly above Nmin, the number
6.1 Sprinting behavior that causes a breaker to transition from the non-tripped
Figure 4 compares sprinting policies and resulting system region to the tolerance band. After emergency and recovery,
dynamics as 1000 instances of Decision Tree, a representa- the system quickly returns to equilibrium.
tive application, computes across over time. Sprinting poli- Figure 5 shows the percentage of time an agent spends in
cies determine how often agents sprint and whether sprints each state. E-T and C-T sprints are timely as strategic agents
trigger emergencies. Ideally, policies would permit agents sprint only when estimated benefits exceed an optimized
to sprint up until they trip the circuit breaker. In this exam- threshold. A sprint in E-T or C-T contributes more to perfor-
ple, 250 of the 1000 agents can sprint before triggering a mance than one in G or E-B. Moreover, G and E-B ignore the
power emergency. consequences of a sprint. With G, an agent spends more
Greedy heuristics are aggressive and inefficient. A than 50% of its time in recovery, waiting for batteries to
sprint in the present precludes a sprint in the near future, recharge after an emergency. With E-B, an agent spends
harming subsequent tasks that could have benefited more nearly 40% of its time in active mode but not sprinting.
from the sprint. Moreover, frequent sprints risk power
emergencies and require rack-level recovery. G produces 6.2 Sprinting performance
an unstable system, oscillating between full-system Figure 6 shows task throughput under varied policies. The
sprints that trigger emergencies and idle recovery that sprinting game outperforms greedy heuristics and is com-
harms performance. petitive with globally optimized heuristics. Rather than
Control-theoretic approaches are more conservative, sprinting greedily, E-T uses equilibrium thresholds to select
throttling sprints in response to power emergencies. E-B more profitable epochs for sprinting. E-T outperforms G
adaptively responds to feedback, producing a more stable and E-B by up to 6.8× and 4.8×, respectively. Agents who use
system with fewer sprints and emergencies. Indeed, E-B may their own strategies to play the game competitively produce
be too conservative, throttling sprints beyond what is neces- outcomes that rival expensive cooperation. E-T’s task
sary to avoid tripping the circuit breaker. The number of throughput is 90% that of C-T’s for most applications.
sprinters is consistently lower than Nmin, which is safe but Linear Regression and Correlation are outliers, achieving
leaves sprinting opportunities unexploited. In neither G nor only 36% and 65% of cooperative performance. For these
E-B do agents sprint to full advantage. applications, E-T performs as badly as G and E-B because
In contrast, the computational sprinting game performs the applications’ performance profiles exhibit little variance
Figure 4. Sprinting behavior for a representative application, Decision Tree. Black line denotes number of sprinters. Gray line denotes the
point at which sprinters risk a power emergency, Nmin.
300 600
Greedy
Number of sprinting users
300 600 0
Exponential backoff
300 600 0
Cooperative threshold
300 600 0
Equilibrium threshold
0
0.4
Active (not sprinting) Global recovery
Local cooling Sprinting
100%
0.2 0.3
0.20
Density
Density
0.10
75%
0.1
0.00
50%
0.0
2 3 4 5 6 0 5 10 15
Normalized TPS Normalized TPS
25%
0%
Greedy Exponential Equilibrium Cooperative Figure 8. Probability of sprinting.
1.0
0.8
Probability of sprinting
Figure 6. Performance, measured in tasks per second and
normalized against greedy, for a single application type. 0.6
Greedy
6
0.4
Performance (Normalized to Greedy)
Exponential backoff
Equilibrium threshold
5
0.0
3
le
S
CC
M
ar
n
t
ns
ive
nk
n
ien
io
AL
io
ng
SV
ne
ea
ra
at
Na
cis
ad
ia
2
Li
ge
Km
el
Tr
De
Gr
rr
Pa
Co
1
0
le
S
CC
M
ar
n
t
ns
ive
k
n
ien
io
AL
n
io
ng
SV
ne
ea
ra
at
Na
cis
ad
ia
Li
ge
el
Km
Gr
rr
Pa
Co
and all epochs benefit similarly from sprinting. When an 6.4 Equilibrium versus cooperation
agent cannot distinguish between epochs, she sets a low Equilibrium thresholds are robust to strategic behavior and
threshold and sprints for every epoch. In effect, for such perform well, but cooperative thresholds can perform even
applications, E-T produces a greedy equilibrium. better. The sprinting game’s equilibrium delivers 90% of the
performance from cooperation because the penalties from
6.3 Sprinting strategies non-cooperative behavior are low. Figure 9 shows how effi-
Figure 7 uses density plots for two representative applica- ciency falls as recovery from power emergencies become
tions, Linear Regression and PageRank, to show how often and increasingly expensive. Recall that pr is the probability an
how much their tasks benefit from sprinting. Linear Regression agent in recovery stays in that state.
presents a narrower distribution and performance gains The sprinting game fails when an emergency requires indefi-
from sprinting vary in a band between 3× and 5×. In contrast, nite recovery and pr is one. This game has no equilibrium that
PageRank’s performance gains can often exceed 10×. avoids tripping the breaker and triggering indefinite recovery.
The coordinator uses density plots to optimize threshold If a strategic agent were to observe system dynamics that avoid
strategies. Linear Regression’s strategy is aggressive and uses a tripping the breaker, which means Ptrip is zero, she would realize
low threshold that often induces sprints. This strategy arises that other agents have set high thresholds to avoid sprints. Her
from its relatively low variance in performance gains. If sprint- best response would be lowering her threshold and sprinting
ing’s benefits are indistinguishable across tasks and epochs, more often. Others would behave similarly and drive Ptrip
an agent sprints indiscriminately and at every opportunity. higher. In equilibrium, Ptrip would rise above zero and agents
PageRank’s strategy is more nuanced and uses a high thresh- would eventually trip the breaker, putting the system into
old, which cuts her bimodal distribution and implements indefinite recovery. Thus, selfish agents would produce inef-
judicious sprinting. She sprints for tasks and epochs that ficient equilibria—the Prisoner’s Dilemma in which each
benefit most (i.e., those that see performance gains greater agent’s best response performs worse than a cooperative one.
than 10×). The Folk theorem guides agents to a more efficient equilib-
Figure 8 illustrates diversity in agents’ strategies by rium by punishing agents whose responses harm the system.
reporting their propensities to sprint. Linear Regression and The coordinator would assign agents the best cooperative
Correlation’s narrow density functions and low thresholds thresholds to maximize system performance from sprinting.
cause these applications to sprint at every opportunity. The When an agent deviates, she is punished such that
3. Chase, J.S., Anderson, D.C., Thakar, P.N., (Austin, TX, USA, 2017), 421–432.
Figure 9. Efficiency of equilibrium thresholds. Vahdat, A.M., Doyle, R.P. Managing 13. Raghavan, A., Emurian, L., Shao, L.,
energy and server resources in Papaefthymiou, M., Pipe, K.P.,
Efficiency of equilibrium hosting centers. In Proceedings of the Wenisch, T.F., Martin, M.M.
18th Symposium on Operating Computational sprinting on a
Systems Principles (SOSP) (Banff, hardware/software testbed. In
Alberta, Canada, 2001), 103–116. Proceedings of the 18th International
0.8
4. Fan, X., Weber, W.-D., Barroso, L.A. Conference on Architectural Support
Power provisioning for a warehouse- for Programming Languages and
sized computer. In Proceedings of the Operating Systems (ASPLOS)
34th Annual International (Houston, TX, USA, 2013), 155–166.
0.4
Technical Perspective
To view the accompanying paper,
visit doi.acm.org/10.1145/3299881 rh
To Do or Not to Do:
Extending SQL with Integer
Linear Programming?
By Surajit Chaudhuri
have
R E L AT I O N A L Q U E R Y L A N G U A G E S Despite the advances that have al- Java or C#) other than the native SQL.
enabled the programmer to express ready taken place along these three The paper also addresses techniques
queries using a logical model of data dimensions, there continues to be for solving large ILP problems using of-
without any knowledge of the under- proposals from time to time to fur- fline partitioning and approximation
lying physical structures. To help ap- ther enrich functionality of relation- techniques to break down the global ILP
plications realize the benefits of such al databases to support important instance into smaller ILP sub-problems.
declarative querying of data fully, there classes of applications. However, while their offline partitioning
has been much work along the follow- The following paper by Brucato et al. is a good physical design optimization
ing three dimensions: is one such proposal for making relation- to have in the repertoire, its applicabil-
a) Application programming inter- al databases do more. It makes a case ity also depends on the characteristics of
faces (for example, ODBC, JDBC) have for marrying the well-established para- the production workload on the system.
been developed to enable applications digms of constrained optimization (spe- Adding any new functionality to
connect to and access data in a rela- cifically, ILP or integer linear program- a query language as rich as SQL has
tional database system. However, when ming) and traditional SQL querying. complex trade-offs. Issues that influ-
connecting using these interfaces, the The challenge of augmenting query ence such a decision are ease of speci-
application programmer must still han- languages with the power of specify- fication of the new functionality in the
dle two different programming models. ing constraints has been well studied query, execution efficiency of the en-
Language integrated query (LINQ) is an in the literature, both in the context of riched query system, data movement,
elegant example of integration where database querying as well as logic pro- and increased software complexity of
query expressions are introduced as a gramming. Earlier research has stud- the database systems. Moreover, even
first-class citizen in the programming ied schemes for adding constraints on when a new functionality is incorporat-
languages to avoid the above problem, individual rows (beyond simple selec- ed, there is a question of whether the
and a mapping tool (LINQ to SQL) trans- tion) as well as aggregate constraints core SQL should be enriched like other
lates language-integrated queries into that the set of answer rows to a query examples in (c), as suggested by this pa-
SQL for the database backend. More re- must satisfy collectively. Introduction per, or if the functionality should be in-
cently, databases have been exposing a of aggregate constraints makes query corporated strictly via the extensibility
REST API for the ease of mobile and web evaluation especially challenging. The mechanisms. Specifically, in this case,
applications. paper demonstrates that when you add an alternative to extending SQL will be
b) Modern database systems pro- an optimization criterion to a query to have a separate domain-specific lan-
vide extensibility so that applications language with aggregate constraints guage (potentially using a syntax like
programmers are not limited to using to choose among qualifying sets of an- that of package queries), interpreted by
the built-in types and functions in SQL. swer sets, the query evaluation can be the ILP solver runtime, and integrated
All major database systems support us- accomplished by a combination of the with the database system.
er-defined functions that may be used relational query execution engine and If you are interested in the topic of
in selection, aggregation, or table ex- an off-the-shelf ILP solver. constraint specification and optimiza-
pressions in a query. These user-defined The authors explain how such que- tion over data stored in databases, this
functions (potentially with parameters) ries may be specified declaratively (re- paper is sure to interest you. Also, it is
are written in native SQL or program- ferred to as package queries). These worth a read for anyone who wants to
ming languages for which the database package queries are evaluated by first consider adding extensions to SQL to
server provides runtime support. Such executing the traditional relational part ease application tasks, as the authors
extensibility mechanisms have been of the query and then mapping the con- illustrate the key dimensions of what it
used by database systems to add sup- straint satisfaction and objective crite- takes to add any new functionality to re-
port for data types such as geospatial. rion as an instance of the ILP problem. lational querying: language extension,
c) The SQL standard has added The extensibility features of the data- changes to the query execution engine,
new operators and constructs to make base system, as explained in (b), may and techniques to cope with scale.
declarative querying in relational lan- be used to add such an ILP solver to the
guages more convenient or expressive, database systems just like the support Surajit Chaudhuri is a Distinguished Scientist at Microsoft
Research, Redmond, WA, USA.
for example, recursion, window func- for user defined functions written in
tions, grouping sets, within group. programming languages (for example, Copyright held by author.
Figure 2. Specification of the PaQL syntax (left), and the PaQL query for Example 1 (right).
only contain references to package_name, which specifies constraints, they are specified over the package result P, for
the name of the package result. example, COUNT(P.*) = 3, which limits the query results to
Basic package query. The new keyword PACKAGE differ- packages of exactly 3 tuples.
entiates PaQL from traditional SQL queries. The global predicates in query abbreviate aggregates
that are in reality SQL subqueries. For example, COUNT(P.*)
1
: SELECT * 2
: SELECT PACKAGE(*) AS P = 3, abbreviates (SELECT COUNT(*) FROM P) = 3. Using sub-
FROM Recipes R FROM Recipes R queries, PaQL can express arbitrarily complex global con-
straints among aggregates over a package.
The semantics of 1 and 2 are fundamentally different: 1 is Objective clause. The objective clause specifies a ranking
a traditional SQL query, with a unique, finite result set (the among candidate package results and appears with either
entire Recipes table), whereas there are infinitely many pack- the MINIMIZE or MAXIMIZE keyword. It is a condition on the
ages that satisfy the package query 2: all possible multisets of package-level, and hence it is specified over the package
tuples from the input relation. The result of a package query result P, for example, MINIMIZE SUM(P.sat_fat). Similar to
like 2 is a set of packages. Each package resembles a relational global predicates, this form is a shorthand for MINIMIZE
table containing a collection of tuples (with possible repeti- (SELECT SUM(sat_fat) FROM P). A PaQL query with an objec-
tions) from relation Recipes, and therefore a package result of tive clause returns a single result: the package that optimizes
2
follows the schema of Recipes. Similar to SQL, the PaQL syn- the value of the objective. The evaluation methods that we
tax allows the specification of the output schema in the SELECT present in this work focus on such queries. In prior work,6
clause. For example, PACKAGE(sat_fat, kcal) only returns the we described preliminary techniques for returning multiple
saturated fat and calorie attributes of the package. packages in the absence of optimization objectives, but a
Although semantically valid, a query like 2 would not thorough study of such methods is left to future work.
occur in practice, as most application scenarios expect few, Expressiveness and complexity. PaQL can express gen-
or even exactly one result. We proceed to describe the addi- eral ILP, which means that evaluation of package queries is
tional constraints in the example query (Figure 2) that NP-complete.4, 5 As a first step in package evaluation, we pro-
restrict the number of package results. ceed to show how a PaQL query can be transformed into a
Repetition constraints. The REPEAT 0 statement in linear program and solved using general ILP solvers.
query from Figure 2 specifies that each tuple from the
input relation Recipe can appear in a package result at 3. ILP FORMULATION
most once (no repetitions are allowed). If this restriction is In this section, we present an ILP formulation for package
absent (as in query 2), the multiplicity of a tuple is queries, which is at the core of our evaluation methods
unbounded. By allowing no repetitions, restricts the Direct and SketchRefine. The results in this section are
package space from infinite to 2n, where n is the size of the inspired by the translation rules employed by Tiresias15 to
input relation. Generalizing, REPEAT ρ allows a package to answer how-to queries.
repeat tuples up to ρ times, resulting in (2 + ρ)n candidate
packages. 3.1. PaQL to ILP translation
Base and global predicates. A package query defines two Let R indicate the input relation of the package query, n = |R|
types of predicates. A base predicate, defined in the WHERE be the number of tuples in R, R.attr an attribute of R, P a pack-
clause, is equivalent to a selection predicate and can be eval- age, f a linear aggregate function (such as COUNT and SUM),
uated with standard SQL: any tuple in the package needs to ∈ {≤,≥} a constraint inequality, and v ∈ R a constant. For
individually satisfy the base predicate. For example, query each tuple ti from R, 1 ≤ i ≤ n, the ILP problem includes a
from Figure 2 specifies the base predicate: R.gluten = ‘free’. nonnegative integer variable xi, xi ≥ 0, indicating the number
Since base predicates directly filter input tuples, they are of times ti is included in an answer package. We also use
specified over the input relation R. Global predicates are the to denote the vector of all integer variables.
core of package queries, and they appear in the new SUCH A PaQL query is formulated as an ILP problem using the fol-
THAT clause. Global predicates are higher-order than base lowing translation rules.
predicates: they cannot be evaluated on individual tuples, Repetition constraint. The REPEAT keyword, expressible
but on tuple collections. Since they describe package-level in the FROM clause, restricts the domain that the variables
Figure 4. The original tuples (a) are partitioned into four groups and a representative is constructed for each group (b). The initial sketch
package (c) contains only representative tuples, with possible repetitions up the size of each group. The refine query for group G1 (d)
involves the original tuples from G1 and the aggregated solutions to all other groups (G2, G3, and G4). Group G2 can be skipped (e) because no
representatives could be picked from it. Any solution to previously refined groups is used while refining the solution for the remaining groups
(f and g). The final approximate package (h) contains only original tuples.
Multiplicity of representative Representative and original tuples selected during previous steps, shown by
tuples in the initial package hatching lines, are aggregated and used to modify later refinement queries
G1 G2 G1 G2 G1 G2 G1 G2
2 0 0
G3 G3 G3 G3
2 1 2 1 2 1 1
G4 G4 G4 G4
(a) Original tuples (b) Initial query using (c) Initial package (d) Refinement (e) Skipping G2 (f) Refinement (g) Refinement (h) Final approximate
representative tuples query for group G1 query for group G3 query for group G4 package
PARTITION SKETCH REFINE
initial package by evaluating the package query only setting can lead to an order of magnitude improvement in
over the set of representative tuples. query response time.
3. Refine (Section 4.2.2): Finally, SketchRefine transforms The diameter bounds, wi j, are not required, but they can
the initial package into a complete package by replacing be enforced to ensure a desired approximation guarantee.
each representative tuple with some of the original tuples In general, enforcing the diameter limits may cause the
from the same group, one group at a time. resulting partitions to become excessively small. While still
SketchRefine always constructs approximate feasible obeying the approximation guarantees, this could increase
packages, that is, packages that satisfy all the query con- the number of resulting partitions and thus degrade the
straints, but with a possibly sub-optimal objective value that running time performance of SketchRefine. This is an
is guaranteed to be within certain approximation bounds. important trade-off between running time and quality that
SketchRefine may suffer from false infeasibility, which we also observe in our experiments, and it is a very common
happens when the algorithm reports a feasible query to be characteristic of most approximation schemes.24
infeasible. The probability of false infeasibility is, however, low Partitioning method. Our partitioning procedure is
and bounded. We formalize these properties in Section 4.3. based on k-dimensional quad-tree indexing.11 The method
In the subsequent discussion, we use R(attr1, …, attrk) to recursively partitions a relation into groups until all the
denote an input relation with k attributes. R is partitioned groups satisfy the size threshold and meet the diameter
into m groups G1, …, Gm. Each group Gi ⊆ R, 1 ≤ i ≤ m, has a limits. First, relation R is augmented with an extra group
representative tuple , which may not always appear in R. ID column gid, such that t.gid = i if tuple t is assigned to
We denote the partitioned space with . group Gi. The procedure initially creates a single group G1
We refer to packages that contain representative tuples as that includes all the original tuples from relation R, by ini-
sketch packages and packages with only original tuples as tializing gid = 1 for all tuples. Our method recursively com-
complete packages (or simply packages). We denote a com- putes the sizes and diameters of the current groups, as well
plete package with p and a sketch package with p , where as the centroid of each group. It then partitions the groups that
⊆ is the set of groups that are yet to be refined to trans- violate either the size or the diameter limits, using the cen-
form p to a complete answer package p. troids as partitioning boundaries. In the last iteration, the
centroids for each group become the representative tuples,
~
4.1. Offline partitioning , 1 ≤ i ≤ m, and get stored in a new representative relation R
SketchRefine relies on an offline partitioning of the input (gid, attr1, …, attrk).
relation R into groups of similar tuples. Partitioning is based One-time cost. Partitioning is an expensive procedure.
on a set of partitioning attributes from the input relation R, a Partitioning the data in advance avoids this cost at query
size threshold, and a set of diameter bounds. The size thresh- time. For a known workload, our experiments show that
old t, 1 ≤ t ≤ n, restricts the size of each partitioning group Gi, partitioning the dataset on the union of all query attributes
1 ≤ i ≤ m, to a maximum of t original tuples, that is, |Gi| ≤ t. provides the best performance in terms of query evaluation
The diameter di j ≥ 0 of a group Gi, 1 ≤ i ≤ m, on attribute attrj, 1 time and approximation error for the computed answer
≤ j ≤ k, is the greatest absolute distance between all pairs of package. We also demonstrate that our query evaluation
tuples within group Gi. The diameter bounds, wi j ≥ 0, 1 ≤ i ≤ m, approach is robust to a wide range of partition sizes, and to
1 ≤ j ≤ k, require all diameters to be bounded by di j ≤ wi j. imperfect partitions that cover more or fewer attributes
Setting the partitioning parameters. The size threshold, than those used in a particular query. This means that,
t, affects the number of partitions, m: a lower t leads to even without a known workload, a partitioning performed
smaller partitions, but more of them (larger m). For best on all of the data attributes still provides good perfor-
response time of SketchRefine, t should be set so that mance. Note that the same partitioning can be used to sup-
both m and t are small. Our experiments show that a proper port different queries over the same dataset. In our
~
(R): SELECT PACKAGE(*) AS p • The algorithm adds the result of i(p ), pi, in the current
~
FROM R solution, p . Now, group Gi is refined with actual tuples.
~
WHERE R.gluten = ‘free’
SUCH THAT In i( p ), COUNT( .*) and SUM( .kcal) are values com-
COUNT( p .*) = 3 AND puted directly on before the query is formed. They are
SUM( p .kcal) BETWEEN 2.0 AND 2.5 AND
used to modify the original constraint bounds to account for
(select count(*) from p where gid = 1) ≤ |G1| tuples and representatives already chosen for all the other
AND … groups. The global constraints in i(p ) ensure that the combi-
(select count(*) from p where gid = m) ≤ |Gm| nation of tuples in pi and satisfy the original query .
MINIMIZE SUM( p .sat_fat) Thus, this step produces the new refined sketch package
p′ ′ = pi ∪ pi, where ′ = .
The new global constraints (in bold) ensure that every Since Gi has at most t tuples, the ILP problem correspond-
representative tuple does not appear in p more times ing to i(p ) has at most t variables. This is typically small
than the size of its group, Gi. This accounts for the repeti- enough for the black-box ILP solver to solve using the Direct
tion constraint REPEAT 0 in the original query. method. Similar to the sketch query, if t is too large,
Generalizing, with REPEAT ρ, each can be repeated up to SketchRefine can evaluate the query recursively: the tuples in
~
|Gi|(1 + ρ) times. These constraints are omitted from (R) if group Gi are further partitioned into smaller groups until the
the original query does not contain a repetition subproblems reach a size that can be efficiently solved
constraint. directly.
~
Since the representative relation R contains exactly m Ideally, the Refine step will only process each group with
representative tuples, the ILP problem corresponding to representatives in the initial sketch package once. However,
this query has only m variables. This is typically small the order of refinement matters as each refinement step is
enough for the black-box ILP solver to manage directly, greedy: it selects tuples to replace the representatives of a
and thus we can solve this package query using the Direct single group, without considering the effects of this choice
method. If m is too large, we can solve this query recur- on other groups. As a result, a particular refinement step
sively with SketchRefine: the set of m representatives may render the query infeasible (no tuples from the remain-
is further partitioned into smaller groups until ing groups can satisfy the constraints). When this occurs,
the subproblems reach a size that can be efficiently Refine employs a greedy backtracking strategy that recon-
solved directly. siders groups in a different order.
~
The Sketch procedure fails if the sketch query (R) is Greedy backtracking. Refine activates backtracking when
infeasible, in which case SketchRefine reports the orig- it encounters an infeasible refine query, i(p ). Backtracking
inal query as infeasible. This may constitute false infea- greedily prioritizes the infeasible groups. This choice is moti-
sibility, if is actually feasible. In Section 4.3, we show vated by a simple heuristic: if the refinement on Gi fails, it is
that the probability of false infeasibility is low and likely due to choices made by previous refinements; there-
bounded. fore, by prioritizing Gi, we reduce the impact of other groups
Refine. Using the sketched solution over the represen- on the feasibility of i(p ). This heuristic does not affect the
tative tuples, the Refine procedure iteratively replaces approximation guarantees.
the representative tuples with tuples from the original The algorithm logically traverses a search tree (which is
relation R, until no more representatives are present in only constructed as new branches are created and new
the package. The algorithm refines the sketch package nodes visited), where each node corresponds to a unique
p one group at a time. For a group Gi with representative sketch package p . The traversal starts from the root, corre-
, let ⊆ p be the set of representatives picked from sponding to the initial sketch package, where no groups
Gi (i.e., with possible duplicates). The algorithm pro- have been refined ( = ), and finishes at the first encoun-
ceeds as follows: tered leaf, corresponding to a complete package ( = ). The
algorithm terminates as soon as it encounters a complete our techniques for package query execution on real-world
package, which it returns. The algorithm assumes a (ini- data. The results show the following properties of our meth-
tially random) refinement order for all groups in and ods: (1) SketchRefine evaluates package queries an order of
places them in a priority queue. During refinement, this magnitude faster than Direct; (2) SketchRefine scales up to
group order can change by prioritizing groups with infea- sizes that Direct cannot handle directly; (3) SketchRefine
sible refinements. produces packages of high quality (similar objective value as
Runtime complexity. In the best case, all refine queries the packages returned by Direct). We have also performed
are feasible and the algorithm never backtracks. In this case, extensive experiments on benchmark data that demonstrate
the algorithm makes up to m calls to the ILP solver to solve the robustness of SketchRefine under imperfect partition-
problems of size up to t, one for each refining group. In the ing and different approximation parameters.4, 5
worst case, SketchRefine tries every group ordering lead-
ing to an exponential number of calls to the ILP solver. Our 5.1. Experimental setup
experiments show that the best case is the most common We implemented our package evaluation system as a layer
and backtracking occurs infrequently. on top of PostgreSQL.a The system interacts with the DBMS
via SQL and uses IBM’s CPLEX12 as the black-box ILP solver.
4.3. Theoretical guarantees A package is materialized into the DBMS as a relation, only
We present two important results on the theoretical guaran- when necessary (e.g., to compute its objective value). The
tees of SketchRefine: (1) it produces packages that closely experiments compare Direct with SketchRefine. Both
approximate the objective value of the packages produced methods use the PaQL to ILP translation presented in
by Direct; (2) the probability of false negatives (i.e., queries Section 3.1: Direct translates and solves the original query;
incorrectly deemed infeasible) is low and bounded. The SketchRefine translates and solves the subqueries. We
extended version of this work4 includes the formal proofs of demonstrate the performance of our query evaluation meth-
both results. ods using a real-world dataset consisting of approximately
For a desired approximation parameter e, we can derive 5.5 million tuples extracted from the Galaxy view of the
diameter bounds wi j for the offline partitioning that guaran- SDSS,22 and a workload of seven feasible package queries
tee that SketchRefine will produce a package with objec- (Figure 5) constructed by adapting some of the real-world
tive value (1±e)-factor close to the objective value of the sample SQL queries available directly from the SDSS
solution generated by Direct for the same query. Website. The experiments use the following efficiency and
effectiveness metrics:
Theorem 1 (Approximation Bounds). Let R(attr1, . . ., attrk) Response time. We measure response time as wall-clock
be a relation with k attributes, and let be a feasible package time to generate an answer package. This includes the time
query with a maximization (minimization, resp.) objective over to translate the PaQL query into one or several ILP problems,
R. Let S be an exact solver that produces an answer to with the time to load the problems to the solver, and the time the
optimal objective value OPT. We denote with ALG the objective solver takes to produce a solution.
value of the package returned by SketchRefine using S as a Approximation ratio. We compare the objective value of a
black-box solver. For any e ∈ [0, 1) (e ∈ [0, ∞), resp.), there package returned by SketchRefine with the objective value
exists b ∈ [0, 1) (b ∈ [1, ∞), resp.) that depends on e, such that if of the package returned by Direct on the same query. Using
R is partitioned into m groups with diameter limits: ObjS and ObjD to denote the objective values of SketchRefine
and Direct, respectively, we report the empirical approxima-
(1) tion ratio for maximization queries, and for minimiza-
tion queries. An approximation ratio of one indicates that
then ALG ≥ (1 − e)OPT (ALG ≤ (1 + e)OPT, resp.). SketchRefine produces a solution with same objective
value as the solution produced by the solver on the entire
For a feasible query , false infeasibility may happen in two problem. The higher the approximation ratio, the lower the
~
cases: (1) when the sketch query (R) is infeasible; (2) when quality of the result package.
greedy backtracking fails (possibly due to suboptimal parti-
tioning). In both cases, SketchRefine would (incorrectly) 5.2. Results and discussion
report a feasible package query as infeasible. False negatives We evaluate two fundamental aspects of our algorithms: (1)
are, however, extremely rare, as the following theorem
establishes. a
Our code is publicly available on our project Website: http://packagebuilder.
cs.umass.edu.
Theorem 2 (False-infeasibility Bounds). For any query
and any random package P, if P is feasible for , then with high
~ Figure 5. Summary of queries in the Galaxy workload. The full PaQL
probability: (1) the Sketch query (R) is feasible; (2) all queries appear in the extended version of this work.4
Refine queries i(p ), 1 ≤ i ≤ m, are feasible. Thus,
Query
SketchRefine returns a feasible result. Objective
1
max min
2 3
min min
4
min
5
min
6
max
7
# of SUM constraints 2 4 2 1 1 5 5
5. EXPERIMENTAL EVALUATION COUNT (∗) BETWEEN 5 AND 10
Figure 6. Scalability on the Galaxy workload. SketchRefine uses an offline partitioning computed on the full dataset, using the workload
attributes, t = 10% of the dataset size, and no diameter condition. Direct scales up to millions of tuples in about half of the queries, but it fails
on the other half. SketchRefine scales well in all cases and runs about an order of magnitude faster than Direct. Its approximation ratio is
always low, even though the partitioning is constructed without diameter conditions.
Direct SketchRefine
1 2 3 4 5 6 7
102
10 2
10 2 102 10 2
10 2
Time (s)
Figure 7. Impact of partition size threshold t on the Galaxy workload, using 30% of the original dataset. Partitioning is performed at each
value of t using all the workload attributes, and with no diameter condition. The baseline Direct and the approximation ratios are only shown
when Direct is successful. The results show that t has a major impact on the running time of SketchRefine, but almost no impact on the
approximation ratio. Direct can be an order of magnitude faster than Direct with proper tuning of t.
Direct SketchRefine
1 2 3 4 5 6 7
10 1
101 101 101
101 101 101
6 4 2 6 4 2 6 4 2 6 4 2
106 104 102 106 104 102 10 10 10 10 10 10 10 10 10 10 10 10 106 104 102
Partition size threshold Partition size threshold Partition size threshold Partition size threshold Partition size threshold Partition size threshold Partition size threshold
Approximation ratio: Approximation ratio: Approximation ratio: Approximation ratio: Approximation ratio: Approximation ratio: Approximation ratio:
Mean: 1.00, Median: 1.00 Mean: —, Median: — Mean: —, Median: — Mean: 1.78, Median: 1.01 Mean: 1.00, Median: 1.00 Mean: —, Median: — Mean: 1.01, Median: 1.00
partitioning to limit the size of each partition, to study its efficiently, that behave well under the many possible realiza-
effects on the query response time and the approximation tions of the uncertain data.
ratio of SketchRefine. In all cases, along the lines of the Another open problem is to efficiently handle incremental
previous experiments, we do not enforce diameter condi- package queries to enable user-facing, interactive constrained
tions. Figure 7 show the results obtained on the Galaxy work- optimization applications such as vacation planning. Rather
load, using 30% of the original data. We vary t from higher than calling the solver for each incremental query variation
values corresponding to fewer but larger partitions, on the from scratch, we are exploring the use of efficient database
left-hand size of the x-axis, to lower values, corresponding to techniques, such as top-k querying, to provide faster, albeit
more but smaller partitions. When Direct is able to pro- approximate, solutions for interactive applications.
duce a solution, we also report its running time (horizontal
line) as a baseline for comparison. Acknowledgments
The results show that the partition size threshold has a This research is supported by the National Science Foundation
major impact on the execution time of SketchRefine, with under grants IIS-1420941, IIS-1421322, and IIS-1453543.
extreme values of t (either too low or too high) often resulting References In KDD '09 Proceedings of the 15th
in slower running times than Direct. With bigger partitions, 1. Alagoz, O., Schaefer, A.J., Roberts, M.S. ACM SIGKDD International
Optimizing Organ Allocation and Conference on Knowledge Discovery
on the left-hand side of the x-axis, SketchRefine takes about Acceptance. Springer, Boston, MA, and Data Mining (Paris, France, June
the same time as Direct because both algorithms solve prob- 2009, 1–24. 28–July 01, 2009) ACM, NY, 467–476.
2. Baykasoglu, A., Dereli, T., Das, S. 14. Makuch, W.M., Dodge, J.L., Ecker, J.G.,
lems of comparable size. When the size of each partition starts Project team selection using fuzzy Granfors, D.C., Hahn, G.J. Managing
to decrease, moving from left to right on the x-axis, the optimization approach. Cybern. Syst. consumer credit delinquency in the us
38, 2 (2007), 155–185. economy: A multi-billion dollar
response time of SketchRefine decreases rapidly, reaching 3. Bisschop, J. AIMMS Optimization management science application.
about an order of magnitude improvement with respect to Modeling. Paragon Decision Interfaces 22, 1 (1992), 90–109.
Technology, 2006. 15. Meliou, A., Suciu, D. Tiresias: The
Direct. Most of the queries show that there is a “sweet spot” 4. Brucato, M., Abouzied, A., Meliou, A. database oracle for how-to queries.
at which the response time is the lowest: when all partitions Package queries: efficient and In SIGMOD '12 Proceedings of the
scalable computation of high-order 2012 ACM SIGMOD International
are small, and there are not too many of them. This point is constraints. VLDB J. (Oct. 2017). Conference on Management of Data
consistent across different queries, showing that it only 5. Brucato, M., Beltran, J.F., Abouzied, (Scottsdale, Arizona, USA, May
A., Meliou, A. Scalable package 20–24, 2012) ACM, NY, 337–348.
depends on the input data size. After that point, although the queries in relational database 16. Padberg, M., Rinaldi, G. A branch-and-
partitions become smaller, the number of partitions starts to systems. PVLDB 9, 7 (2016), 576–587. cut algorithm for the resolution of
6. Brucato, M., Ramakrishna, R., Abouzied, large-scale symmetric traveling
increase significantly. This increase has two negative effects: it A., Meliou, A. PackageBuilder: From salesman problems. SIAM Rev. 33, 1
tuples to packages. PVLDB 7, 13 (2014), (1991), 60–100.
increases the number of representative tuples, and thus the 1593–1596. 17. Parameswaran, A.G., Venetis, P.,
size and complexity of the initial Sketch query, and it 7. Chen, D.-S., Batson, R.G., Dang, Y. Garcia-Molina, H. Recommendation
Applied Integer Programming: systems with complex constraints: A
increases the number of groups that Refine may need to Modeling and Solution. John Wiley & course recommendation perspective.
refine to construct the final package. This causes the running Sons, 2011. ACM TOIS 29, 4 (2011), 1–33.
8. Cook, W., Hartmann, M. On the 18. Pinel, F., Varshney, L.R. Computational
time of SketchRefine, on the right-hand side of the x-axis, to complexity of branch and cut creativity for culinary recipes. In CHI
increase again and reach or surpass the running time of methods for the traveling salesman EA ‘14 CHI ‘14 Extended Abstracts on
problem. Polyhedral Comb. 1 (1990), Human Factors in Computing Systems
Direct. The mean and median approximation ratios are in all 75–82. (Toronto, Ontario, Canada, April
cases very close to one, indicating that SketchRefine retains 9. De Choudhury, M., Feldman, M., 26–May 01, 2014) ACM, NY, 439–442.
Amer-Yahia, S., Golbandi, N., Lempel, R., 19. Rushmeier, R.A., Kontogiorgis, S.A.
very good quality regardless of the partition size threshold. Yu, C. Automatic construction of travel Advances in the optimization of airline
itineraries using social breadcrumbs. fleet assignment. Transp. Sci. 31, 2
In Proceedings of the 21st ACM (1997), 159–169.
6. CONCLUSION AND FUTURE WORK Conference on Hypertext and 20. Sauer, O.A., Shepard, D.M., Mackie, T.R.
We introduced a complete system that supports the declarative Hypermedia (Toronto, Ontario, Canada, Application of constrained optimization
June 13–16, 2010) ACM, NY, 35–44. to radiotherapy planning. Med. Phys.
specification and efficient evaluation of package queries. We 10. Deng, T., Fan, W., Geerts, F. On the 26, 11 (1999), 2359–2366.
presented PaQL, a declarative extension to SQL, and we devel- complexity of package 21. Terrer, J.M.A., Benede, M.A.N.,
recommendation problems. In PODS del Rio, E.B., Llanas, S.C. A feasible
oped a flexible approximation method, with strong theoretical ‘12 Proceedings of the 31st ACM application of constrained optimization
SIGMOD-SIGACT-SIGAI in the IMRT system. IEEE Trans.
guarantees, for the evaluation of PaQL queries on large-scale Symposium on Principles of Database Biomed. Eng. 54, 3 (2007), 370–379.
datasets. Our experiments on real-world data demonstrate that Systems (Scottsdale, Arizona, USA, 22. The Sloan Digital Sky Survey. http://
May 21–23, 2012) ACM, NY, 261–272. www.sdss.org/.
our scalable evaluation strategy is effective and efficient over 11. Finkel, R.A., Bentley, J.L. Quad trees 23. Wang, X., Dong, X.L., Meliou, A. In
varied data sizes and queries. We have further extended our a data structure for retrieval on SIGMOD '15 Proceedings of the 2015
composite keys. Acta Inf. 4, 1 ACM SIGMOD International
techniques and experimental evaluation and placed our (1974), 1–9. Conference on Management of Data
research in the context of related work.4 12. IBM CPLEX Optimization Studio. (Melbourne, Victoria, Australia, May
http://www.ibm.com/software/ 31–June 04, 2015) ACM, NY,
Our work so far focused on deterministic package queries, commerce/optimization/cplex- 1231–1245.
but many applications of constrained optimization require sup- optimizer/. 24. Williamson, D.P., Shmoys, D.B. The
13. Lappas, T., Liu, K., Terzi, E. Finding a Design of Approximation Algorithms.
port for uncertainty: airline fleet scheduling has uncertain pas- team of experts in social networks. Cambridge University Press, 2011.
senger demands, or investment portfolio optimization deals
with uncertain returns and risks, etc. We are currently working Matteo Brucato and Alexandra Meliou Azza Abouzied (azza@nyu.edu),
on extending our system to support optimization of the ({matteo,ameli}@cs.umass.edu), College Computer Science, New York University,
of Information and Computer Sciences, Abu Dhabi, UAE.
expected value of an objective function subject to expectation University of Massachusetts, Amherst,
constraints of the form E(SUM(x) ) ≥ b, or probabilistic con- MA, USA.
Southern University of Science and To apply, please provide a cover letter iden- level of appointment. Successful applicants are
Technology (SUSTech) tifying the primary area of research, curriculum expected to show evidence of a quality research
Tenure-Track Faculty Positions vitae, and research and teaching statements, and program, effective collaboration with other fac-
forward them to cshire@sustc.edu.cn. ulty, and excellence in teaching at both the gradu-
The Department of Computer Science and Engi- ate and undergraduate levels.
neering (CSE, http://cse.sustc.edu.cn/en/), South- The Computer Science Department has 25
ern University of Science and Technology (SUS- Stevens Institute of Technology faculty members (17 tenured/tenure-track facul-
Tech) has multiple Tenure-track faculty openings ECE Department ty), over 700 undergraduates in an ABET-accred-
at all ranks, including Professor/Associate Profes- Assistant/Associate/Full Professor ited program, and approximately 40 graduate
sor/Assistant Professor. We are looking for out- students. Current faculty members are funded
standing candidates with demonstrated research The Department of Electrical and Computer at by agencies such as NSF, Google, Departments of
achievements and keen interest in teaching, in Stevens Institute of Technology invites applica- Education and Commerce, various Defense agen-
the following areas (but are not restricted to): tions for several tenure-track/tenured faculty cies, multiple State agencies and other sponsors.
˲˲ Data Science positions at the rank of Assistant/Associate/Full Applicants should apply online at https://fac-
˲˲ Artificial Intelligence Professors, starting on August 16, 2019 or later. ultyjobs.ua.edu. For additional details, please
˲˲ Computer Systems (including Networks, Cloud Qualified candidates can also be considered for contact Dr. Yang Xiao (yangxiao@cs.ua.edu) or
Computing, IoT, Software Engineering, etc.) an endowed chair professor position. visit http://cs.ua.edu.
˲˲ Cognitive Robotics and Autonomous Systems Applicants should have earned a Ph.D. in Elec- The University of Alabama is an Equal Em-
˲˲ Cybersecurity (including Cryptography) trical or Computer Engineering or a related disci- ployment/Equal Educational Opportunity In-
Applicants should have an earned Ph.D. de- pline. The department is looking for researchers stitution. All qualified applicants will receive
gree and demonstrated achievements in both with a strong funding and publication record consideration for employment without regard to
research and teaching. The teaching language at in key areas of interest: artificial intelligence, race, color, religion, national origin, sex, sexual
SUSTech is bilingual, either English or Putong- computer architecture, smart and automated orientation, gender identity, gender expression,
hua. It is perfectly acceptable to use English in all systems, electronics and digital system design. pregnancy, age, genetic or family medical history
lectures, assignments, exams. In fact, our exist- Successful applicants are expected to develop a information, disability, or protected veteran sta-
ing faculty members include several non-Chinese strong externally funded, globally recognized re- tus, or any other legally protected basis, and will
speaking professors. search program. They should also possess a pas- not be discriminated against because of their pro-
Established in 2012, the Southern University sion for and be committed to excellence in both tected status. Applicants to and employees of this
of Science and Technology (SUSTech) is a public undergraduate and graduate education. institution are protected under Federal law from
institution funded by the municipal of Shenzhen, Stevens Institute of Technology is a private discrimination on several bases.
a special economic zone city in China. Shenzhen university located in Hoboken, New Jersey. Ste-
is a major city located in Southern China, situ- vens is an Equal Opportunity Employer that is
ated immediately north to Hong Kong Special building a diverse faculty, staff and student body University of South Carolina
Administrative Region. As one of China’s major and strongly encourages applications from fe- Director of Artificial Intelligence Institute
gateways to the world, Shenzhen is the country’s male and minority candidates as well as veterans
fastest-growing city in the past two decades. The and individuals with disabilities. Stevens is an The University of South Carolina is initiating a
city is the high-tech and manufacturing hub of NSF ADVANCE institution committed to equi- search for the Director of the new Artificial Intel-
southern China, home to the world’s third-busiest table practices and policies. ligence Institute. The pan-University Institute
container port, and the fourth-busiest airport on Applications will be accepted until the po- is expected to engage core and affiliated faculty
the Chinese mainland. As a picturesque coastal sitions are filled. All applications must be sub- from a range of disciplines. The College of En-
city, Shenzhen is also a popular tourist destina- mitted electronically through the HR website at gineering and Computing is well positioned to
tion and was named one of the world’s 31 must- https://stevens.wd5.myworkdayjobs.com/en-US/ support this University-wide Institute and is in
see tourist destinations in 2010 by The New York External/job/Hoboken-NJ---Main-Campus/Assis- the midst of expanding its tenured and tenure-
Times. Shenzhen ranks the 66th place on the 2017 tant-Associate-Professor--Electrical-and-Com- track ranks by over 40 faculty members. The Di-
Global City Competitiveness List, released by puter-Engineering_RQ22188. Applicants should rector will be expected to create the vision for the
the National Academy of Economic Strategy, the submit their curriculum vitae, a research plan Institute and lead it to international prominence
Chinese Academy of Social Sciences and United (3-5 pages), teaching interests and philosophy, in several areas of research, real-world applica-
Nations Habitat. By the end of 2016, there were and contact information including at least three tions, work-force preparation, and job creation
around 20 million residents in Shenzhen. references to the HR system. For any inquiries, in intelligent systems.
SUSTech is committed to increase the di- please contact the Search Committee Chair, Prof. The new Director will have the opportunity to
versity of its faculty, and has a range of family- Hong Man (hong.man@stevens.edu). grow strategic areas of research and oversee in-
friendly policies in place. The university offers novation of curricula, as well as hire the core fac-
competitive salaries and fringe benefits includ- ulty and attract as affiliates several dozen faculty
ing medical insurance, retirement and housing University of Alabama members across the university, and spanning all
subsidy, which are among the best in China. Sal- Computer Science Faculty Position – fields (medicine, pharmacy, public health, educa-
ary and rank will commensurate with qualifica- Cybersecurity tion, journalism, social work, nursing, business,
tions and experience. humanities, physical sciences, engineering, and
We provide some of the best start-up packages The University of Alabama is accepting applica- computing). The Institute will be housed centrally
in the sector to our faculty members, including tions for an Associate or Full Professor in the area in the University, and the Director will have signif-
one PhD studentship per year, in addition to a of Cybersecurity to begin August 2019. A Ph.D. icant input into design and function of the space.
significant amount of start-up funding (which in Computer Science or a closely related field is The Director will be expected to:
can be used to fund additional PhD students required. Applicants must demonstrate a strong ˲˲ Conduct convergent, team-oriented, high im-
and postdocs, research travels, and research external funding record, publication record, and pact research, with a substantial portfolio of com-
equipments). Ph.D. graduation rate commensurate with this petitive and institute-scale research funds from
ranging from
theoretical research
to algorithmic solutions
to empirical research
to experiential
evaluations. Its
mission is to publish ADVERTISING IN
high impact articles CAREER OPPORTUNITIES
contributing to the
field of data and How to Submit a Classified Line Ad:
Send an e-mail to acmmediasales@acm.org. Please include text,
information quality (IQ). and indicate the issue/or issues where the ad will appear, and a
contact name and number.
Estimates:
An insertion order will then be e-mailed back to you. The ad will
by typeset according to CACM guidelines. NO PROOFS can be sent.
Classified line ads are NOT commissionable.
Deadlines:
20th of the month/2 months prior to issue date. For latest deadline
info, please contact:
acmmediasales@acm.org
Future Tense
Hawking’s Nightmare
Stephen Hawking warned us not to contact E.T.
directed by the telescope with milli-arc- The supply capsule docked with messages to Prox Cen b has passed,
second accuracy, toward the exoplanet the habitat, and the shuttle ignited plus enough time for a reply message
four light years away. It also supplied its engines to propel it back to lunar to arrive at the speed of light. It’s
enough direct heat to make the human orbit and where it was scheduled to no wonder [C O NTINUED O N P. 119]
The book describes, for the broad computing community, the unique nature,
significance, and impact of Mike’s achievements in advancing modern database
systems over more than forty years. Today, data is considered the world’s most
valuable resource, whether it is in the tens of millions of databases used to manage
the world’s businesses and governments, in the billions of databases in our
smartphones and watches, or residing elsewhere, as
yet unmanaged, awaiting the elusive next generation of
database systems. Every one of the millions or billions
of databases includes features that are celebrated by
the 2014 Turing Award and are described in this book.