Academia.edu no longer supports Internet Explorer.
To browse Academia.edu and the wider internet faster and more securely, please take a few seconds to upgrade your browser.
Adding Comments to a Procedure Consider the following example.
Maple Transactions
Maple's main strength is its ability to compute with mathematical formulasand not just with numbers. It can multiply and factor, differentiate and integrate, and simplify formulas. In this article, using differentiation as an example, I explain how to program with formulas in Maple. The key is the data representation that Maple uses for a formula and the operations Maple provides for operating on formulas. I will also discuss Automatic Differentiation as an alternative which differentiates programs.
Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis, 2018
Procedure specifications are useful in many software development tasks. As one example, in automatic test case generation they can guide testing, act as test oracles able to reveal bugs, and identify illegal inputs. Whereas formal specifications are seldom available in practice, it is standard practice for developers to document their code with semi-structured comments. These comments express the procedure specification with a mix of predefined tags and natural language. This paper presents Jdoctor, an approach that combines pattern, lexical, and semantic matching to translate Javadoc comments into executable procedure specifications written as Java expressions. In an empirical evaluation, Jdoctor achieved precision of 92% and recall of 83% in translating Javadoc into procedure specifications. We also supplied the Jdoctor-derived specifications to an automated test case generation tool, Randoop. The specifications enabled Randoop to generate test cases that produce fewer false alarms and reveal more defects. CCS CONCEPTS • Software and its engineering → Software testing and debugging; Documentation;
2012
This paper is an example-based demonstration of our initial results on the formal specification of programs written in the computer algebra language MiniMaple (a substantial subset of Maple with slight extensions). The main goal of this work is to define a verification framework for MiniMaple. Formal specification of MiniMaple programs is rather complex task as it supports non-standard types of objects, eg symbols and unevaluated expressions, and additional functions and predicates, eg runtime type tests etc.
Journal of Symbolic Computation, 1986
The Maple computer algebra system is described. Brief sample sessions show the user syntax and the mathematical power of the system for performing arithmetic, factoring, simplification, differentiation, integration, summation, solving algebraic equations, solving differential equations, series expansions, and matrix manipulations. Time and space statistics for each sample session show that the Maple system is very efficient in memory space utilisation, as well as in time. The Maple programming language is presented by describing the most commonly used features, using some non-trivial computations to illustrate the language features. 1. Overview Maple is an interactive system for algebraic computation. It is designed for the calculations one learns in high school algebra and university mathematics-integers, rational numbers, polynomials, equations, sets, derivatives, indefinite integrals, etc. This article explains how to use Maple interactively as an algebraic calculator, for casual users. It also explains the basic elements of Maple's programming language, giving examples of how to use it for programming extended algebraic calculations. The Maple project was started at Waterloo in 1980. While the facilities provided by Maple are, at a superficial level, similar to the facilities of other computer algebra systems such as MACSYMA (Pavelle & Wang, 1985) and REDUCE (Fitch, 1985), several design features make Maple unique. The most distinctive feature is Maple's compactness which reduces the basic computer memory requirements per user to a few hundred kilobytes rather than the few thousand kilobytes typically required by MACSYMA or REDUCE. (Of course, Maple's data space may grow to a few thousand kilobytes when performing difficult mathematical computations, if necessary, but this is not generally the case for the calculations required by undergraduate student users nor for many research calculations .) Maple was also designed to allow portability to a variety of different operating systems. Concurrent with the above goals, Maple incorporates an extensive set of mathematical knowledge via a library of functions. The library functions are coded in the user-level Maple programming language which was designed to facilitate the expression of, and the efficient execution of, mathematical operations. A consequence of Maple's design is user extensibility since user-defined functions are equal in status to the system's library functions. These design goals led to several novel design features. Maple's fundamental data structures are tagged objects represented internally as dynamic vectors (variable-length arrays). Specifically, each instance of a data structure is a vector in which the first component encodes the following information : the length of the structure, the type of data object (such as sum, product, set, rational number, etc.
Lecture Notes in Computer Science, 2012
Abstract. In this paper, we present our ongoing work and initial results on the formal specification and verification of MiniMaple (a substantial subset of Maple with slight extensions) programs. The main goal of our work is to find behavioral errors in such ...
Springer eBooks, 1992
Library of Congress Caltaloging-in-Publication Data First Leaves: a tutorial introduction to Maple V / Bruce W. Char ... let aLl. p. em. Includes bibliographical references and index. 1. Maple (Computer program) 2. Algebra-Data processing. 1. Char, Bruce W. QA155.7.E4556 1992 510'" .285' 369-dc20 91-47590 CIP Maple is a registered trademark of Waterloo Maple Software.
Special Talk, 2019
* Introduction - Expressions - Functions * Solving Equations - Solutions of Equations - Solving a System of Equations for Several Unknowns - Solving Differential Equations * Plotting - Three-dimensional plotting - Create a 2-D or 3-D animation on one parameter * Procedures, Variables, and Extending Maple * Sample Programming - Fibonacci Series - Applications of Bisection Method - New Root-Finding Algorithm * Maple Help * References
Studies have shown that good comments can help programmers quickly understand what a method does, aiding program comprehension and software maintenance. Unfortunately, few software projects adequately comment the code. One way to overcome the lack of human-written summary comments, and guard against obsolete comments, is to automatically generate them. In this paper, we present a novel technique to automatically generate descriptive summary comments for Java methods. Given the signature and body of a method, our automatic comment generator identifies the content for the summary and generates natural language text that summarizes the method's overall actions. According to programmers who judged our generated comments, the summaries are accurate, do not miss important content, and are reasonably concise.
2006
We wish to answer the following question: what is the most appropriate language for describing the "contracts" that Maple routines offer? In this, we are seeking much more than types (which Maple does not have, at least statically), as these are not sufficiently expressive to capture what is going on. We also wish to study what is actually in Maple, rather than what should be there. Put another way, we do not expect to find that a type system like Aldor's or Axiom's would be especially helpful in explaining Maple. Our real goal is a mathematical description of the interfaces between routines. As such, the only current terminology flexible enough to encompass reality is that of contracts, by which we mean simply statements of complex properties (static as well as dynamic) in a sufficiently general logic.
2018
In this chapter we explore the ways to create a function and a loop in Python. We may need to create a loop to iterate an action over a list, or to create a function to extract some cases from a dataset. Writing functions is very important to automating data analysis.
2010 Annual Conference & Exposition Proceedings
The information contained in this paper is of an introductory nature a tutorial on the 'Maplet Development and Programming' for selected science and engineering students. The knowledge gained by the authors is documented here to help students who are interested in pursuing science and/or engineering for their degree, and who have a keen interest in a hands-on experience for solving selected science/engineering problems using MAPLE. As a part of this tutorial, technical how-to details are given to help the student develop simple maplets with simple programming constructs that are needed to solve these selected problems. The process of developing Maplets demonstrated within this tutorial will provide a hands-on experience using MAPLE. The authors believe that this paper will engage engineering and science students to create or modify existing Maplets for their other college course activities. The tutorial assumes a familiarity with basic programming constructs, and would be appropriate after an introductory programming course, one year of the calculus and one year of any physical science.
Information Processing Letters
Various proof rules for procedure calls in weakest precondition semantics have been proposed. The author gives a proof rule that is very easy to use, but does not yield the best possible answer for every specification – only for a large class of specifications called normal specifications. In the Appendix, he shows how every specification can be transformed into an equivalent normal one.
Programming Languages and Systems, 2007
We describe a new technique for computing procedure summaries for performing an interprocedural analysis on programs. Procedure summaries are computed by performing a backward analysis of procedures, but there are two key new features: (i) information is propagated using "generic" assertions (rather than regular assertions that are used in intraprocedural analysis); and (ii) unification is used to simplify these generic assertions. We illustrate this general technique by applying it to two abstractions: unary uninterpreted functions and linear arithmetic. In the first case, we get a PTIME algorithm for a special case of the long-standing open problem of interprocedural global value numbering (the special case being that we consider unary uninterpreted functions instead of binary). This also requires developing efficient algorithms for manipulating singleton context-free grammars, and builds on an earlier work by Plandowski [13]. In linear arithmetic case, we get new algorithms for precise interprocedural analysis of linear arithmetic programs with complexity matching that of the best known deterministic algorithm [11].
ACM Transactions on Programming Languages and Systems, 1980
The multiple assignment statement is defined in full generality—including assignment to subscripted variables and record fields—using the “axiomatic” approach of Hoare. Proof rules are developed for calls of procedures using global variables, var parameters, result parameters, and value parameters, using the idea of multiple assignment to provide understanding. An attempt is made to clarify some issues that have arisen concerning the use of rules of inference to aid in generating “verification conditions” in mechanical verifiers and the use of logical variables to denote initial values of program variables.
2002
Advanced Mathematical Methods with Maple During the past five years there has been an immense growth in the use of symbolic computing and mathematical software packages, such as Maple, which provide an invaluable tool for mathematicians and physical scientists alike. ...
1978
The presence of procedures and procedure calls in a programming language can give rise to various kinds of side effects. Calling a procedure can cause unexpected references and modifications to variables (variable side effects) and non-obvious transfers of control (exit side effects). In addition procedure calls and parameter passing mechanisms can cause several different variable names to refer to the same location thus making them aliases. This in turn causes all of these variables to be accessed whenever one of the variables is modified or referenced. Determining the aliases of variables and the exit and variable side effects of procedure calls is important for a number of purposes including the generation of optimized code for high level languages. This paper presents a method of determining exit and variable side effects and gives an algorithm for determining the aliases of variables. The principal advantage over previous methods is that only one pass over a program is used to ...
Loading Preview
Sorry, preview is currently unavailable. You can download the paper by clicking the button above.