Using modula-2 to teach data abstraction

Author:

Mohr J.1

Affiliation:

1. Assistant Professor of Computing Science, Camrose Lutheran College, Camrose, Alberta, Canada

Abstract

The principle of abstraction has assumed a central role in modern software engineering. Most modern textbooks on data structures and algorithms propound the advantages of abstraction as a programming tool. Aho, Hopcroft, and Ullman cite generalization and encapsulation as the two primary advantages of both data and procedural abstraction.Allen Tucker echoes these advantages, defining abstraction as "a conscious process of generalizing a type, procedure, or data structure in such a way that it can serve more purposes than the one for which it was originally designed," and encouraging the packaging of procedures in libraries "to promote their wide utility through generalization."Michael Feldman focuses on the use of abstraction to reduce complexity through information hiding. Encapsulating the details of a representation allows us to "concentrate on the mathematical properties of these entities, their visible structure, and the set of operations that can be performed on them."Robert Kruse shows how distinguishing between a general concept and a particular implementation can clarify code, which often allows us to recognize similiarities between situations which were presumed to be different. He also clearly outlines the various levels at which we solve problems: the abstract (conceptual), data structures (algorithmic), implementation and application (programming) levels.Unfortunately, many students have trouble grasping the concept of abstraction. They see Kruse's hierarchical approach to problem solving as a complication rather than a tool, and have difficulty distinguishing one level from another. (Perhaps this problem is unique to the students I have encountered . . . but I doubt it.)Part of the problem in teaching abstraction is that Pascal, C, and most of the other languages which are widely used in data structures courses do not enforce the use of abstraction. Writing a high-level procedure which uses a lower-level one to do its work seems to be merely a stylistic issue ("The prof wants us to write it this way.") The power of hierarchical structure for controlling complexity is easily overlooked when it just seems to make one's program longer.Modula-2 is one of the more recent languages which support data abstraction by separating the definition of an abstract data type (ADT) from its implementation in separately compiled modules. We have used Modula-2 in our data structures and algorithms class for the past two years, and are converting our introductory programming courses (CS1 and CS2) to Modula-2 beginning this fall. We are convinced that the use of Modula-2 helps students understand data abstraction by experiencing it in a concrete way. In essence, the hierarchical view of a problem is not merely encouraged, but can be enforced by the modular nature of the language.

Publisher

Association for Computing Machinery (ACM)

Reference9 articles.

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3