Invited Talk: If programming is like math, why don’t math teachers teach programming?

نویسندگان

  • Emmanuel Schanzer
  • Carl Eastlund
  • Matthias Felleisen
چکیده

Researchers have developed a large variety of semantic models of object-oriented computations. These include object calculi as well as denotational, small-step operational, big-step operational, and reduction semantics. Some focus on pure object-oriented computation in small calculi; many others mingle the object-oriented and the procedural aspects of programming languages. In this paper, we present a novel, two-level framework of objectoriented computation. The upper level of the framework borrows elements from UML’s sequence diagrams to express the message exchanges among objects. The lower level is a parameter of the upper level; it represents all those elements of a programming language that are not object-oriented. We show that the framework is a good foundation for both generic theoretical results and practical tools, such as object-oriented tracing debuggers. 1. Models of Execution Some 30 years ago, Hewitt [22, 23] introduced the ACTOR model of computation, which is arguably the first model of object-oriented computation. Since then, people have explored a range of mathematical models of object-oriented program execution: denotational semantics of objects and classes [7, 8, 25, 33], object calculi [1], small step and big step operational semantics [10], reduction semantics [16], formal variants of ACTOR [2], and others [4, 20]. While all of these semantic models have made significant contributions to the community’s understanding of object-oriented languages, they share two flaws. First, consider theoretical results such as type soundness. For ClassicJava, the type soundness proof uses Wright and Felleisen’s standard technique of ensuring that type information is preserved while the computation makes progress. If someone extends ClassicJava with constructs such as while loops or switch statements, it is necessary to re-prove everything even though the extension did not affect the object-oriented aspects of the model. Second, none of these models are good starting points for creating practical tools. Some models focus on pure core objectoriented languages; others are models of real-world languages but mingle the semantics of object-oriented constructs (e.g., method invocations) with those of procedural or applicative nature (internal blocks or while loops). If a programmer wishes to debug the object-oriented actions in a Java program, a tracer based on any of these semantics would display too much procedural information. Proceedings of the 2009 Scheme and Functional Programming Workshop California Polytechnic State University Technical Report CPSLO-CSC-09-03 Figure 1. Graphical sequence trace. In short, a typical realistic model is to object-oriented debugging as a bit-level representation is to symbolic data structure exploration. In this paper, we introduce a two-level [32] semantic framework for modeling object-oriented programming languages that overcomes these shortcomings. The upper level represents all objectoriented actions of a program execution. It tracks six kinds of actions via a rewriting system on object-configurations [26]: object creation, class inspection, field inspection, field mutation, method calls, and method return; we do not consider any other action an object-oriented computation. The computations at this upper level have a graphical equivalent that roughly corresponds to UML sequence diagrams [17]. Indeed, each configuration in the semantics corresponds to a diagram, and each transition between two configurations is an extension of the diagram for the first configuration. The upper level of the framework is parameterized over the internal semantics of method bodies, dubbed the lower level. To instantiate the framework for a specific language, a semanticist must map the object-oriented part of a language to the object-oriented level of the framework and must express the remaining actions as the lower level. The sets and functions defining the lower level may be represented many ways, including state machines, mathematical functions, or whatever else a semanticist finds appropriate. We demonstrate how to instantiate the framework with a Java subset. In addition to developing a precise mathematical meaning for the framework, we have also implemented a prototype of the framework. The prototype traces a program’s object-oriented actions and allows programmers to inspect the state of objects. It is a component of the DrScheme programming environment [13] and covers the kernel of PLT Scheme’s class system [15]. The next section presents a high-level overview. Section 3 introduces the framework and establishes a generalized soundness theorem. Section 4 demonstrates how to instantiate the framework for a subset of Java and extends the soundness theorem to that instantiation. Section 5 presents our tool prototype. The last two sections are about related and future work.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Bricklayer Ecosystem - Art, Math, and Code

This paper describes the Bricklayer Ecosystem – a freely-available online educational ecosystem created for people of all ages and coding backgrounds. Bricklayer is designed in accordance with a “low-threshold infinite ceiling” philosophy and has been successfully used to teach coding to primary school students, middle school students, university freshmen, and in-service secondary math teachers...

متن کامل

Shortages of Math and Science Teachers and the Feminization of Teachers: A Common Reason

Two concerns in US education are shortages of qualified math and science teachers and the feminization of teaching. I draw on the National Education Longitudinal Study of 1988 to identify a common reason for the two phenomena. Controlling for self-selection by a propensity score matching estimator and the Heckit, I find that the rigid pay structure for teachers, rather than the pay level, appea...

متن کامل

The Extent of Using Real Problems and Emphasizing Modelling in the 10th Grade Math Textbook

Modelling is emphasized heavily in the national math curriculum, yet the extent to which this concept is covered in the math textbooks is, while of great importance, unknown. To discover the extent to which this issue, and real problems in general, are covered in the 10th grade math textbooks, the content of the textbook for the ‘theoretical’ (“nazari”) branch was analyzed. In doing so, the vie...

متن کامل

کمک به دانش آموزان دارای ناتوانی در ریاضی برای موفق شدن

 Teachers and parents are often perplexed when an intelligent student performs poorly in mathematics. Research tells us that this is often due to math disability, otherwise known as dyscalculia. The authors define dyscalculia and describe its major subtypes. Also, the authors describe characteristics of dyscalculia and explain why dyscalculia is difficult to assess and identify. In addition, th...

متن کامل

SOME PROPERTIES FOR FUZZY CHANCE CONSTRAINED PROGRAMMING

Convexity theory and duality theory are important issues in math- ematical programming. Within the framework of credibility theory, this paper rst introduces the concept of convex fuzzy variables and some basic criteria. Furthermore, a convexity theorem for fuzzy chance constrained programming is proved by adding some convexity conditions on the objective and constraint functions. Finally,...

متن کامل

Teaching Mathematics Graduate Students to Teach: An International Perspective

High-quality teaching of mathematics at the university level is important to every country. Almost all of the best jobs in the global economy require fluency in mathematics, and a great many require advanced technical knowledge. High-quality university math instruction contributes to high student achievement in the quantitative disciplines and prepares students for good jobs. Moreover, universi...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009