Interfacing Mathemagix with C++∗

Total Page:16

File Type:pdf, Size:1020Kb

Interfacing Mathemagix with C++∗ Interfacing Mathemagix with C++ ∗ Joris van der Hoeven Grégoire Lecerf Laboratoire d’Informatique Laboratoire d’Informatique UMR 7161 CNRS UMR 7161 CNRS Campus de l’École polytechnique Campus de l’École polytechnique 91128 Palaiseau Cedex 91128 Palaiseau Cedex France France Email: [email protected] Email: [email protected] Preliminary version of January 8, 2013 Abstract system would evolve. This has discouraged many of the programmers who did care about the novel programming In this paper, we give a detailed description of the inter- language concepts in these systems. face between the Mathemagix language and C++. In In our opinion, this has led to an unpleasant current particular, we describe the mechanism which allows us to situation in computer algebra: there is a dramatic lack of import a C++ template library (which only permits static a modern, sound and fast general purpose programming tm instantiation) as a fully generic Mathemagix template language. The major systems Mathematica [31] and tm library. Maple [20] are both interpreted, weakly typed, besides being proprietary and expensive. The Sage system [26] Keywords: Mathemagix, C++, generic programming, relies on Python and merely contents itself to glue template library together various existing libraries and other software com- A.M.S. subject classification: 68W30 ponents. The absence of modern languages for computer algebra 1 Introduction is even more critical whenever performance is required. Nowadays, many important computer algebra libraries 1.1 Motivation behind Mathemagix (such as Gmp [10], Mpfr [6], Flint [12], FGb [5], etc.) are directly written in C or C++. Performance issues Until the mid nineties, the development of computer are also important whenever computer algebra is used in algebra systems tended to exploit advances in the area combination with numerical algorithms. We would like to of programming languages, and sometimes even influenced emphasize that high level ideas can be important even the design of new languages. The Formac system [2] for traditionally low level applications. For instance, in was developed shortly after the introduction of Fortran. a suitable high level language it should be easy to operate Symbolic algebra was an important branch of the arti- on SIMD vectors of, say, 256 bit floating point num- ficial intelligence project at Mit during the sixties. During bers. Unfortunately, Mpfr would have to be completely a while, the Macsyma system [21, 23, 25] was the largest redesigned in order to make such a thing possible. program written in Lisp, and motivated the development For these reasons, we have started the design of a new of better Lisp compilers. software, Mathemagix [14, 15], based on a compiled and The Scratchpad system [11, 16] was at the origin of strongly typed language, featuring signatures, dependent yet another interesting family of computer algebra sys- types, and overloading. Mathemagix is intended as a gen- tems, especially after the introduction of domains and eral purpose language, which supports both functional and categories as function values and dependent types in imperative programming styles. Although the design has Modlisp and Scratchpad II [17, 19, 27]. These devel- greatly been influenced by Scratchpad II and its succes- opments were at the forefront of language design and type sors Axiom and Aldor, the type system of Mathemagix theory [9, 22, 24]. Scratchpad later evolved into the contains several novel aspects, as described in [13]. Math- Axiom system [1, 18]. In the A# project [29, 30], later emagix is also a free software, which can be downloaded renamed into Aldor, the language and compiler were from http://www.mathemagix.org. redesigned from scratch and further purified. After this initial period, computer algebra systems 1.2 Interfacing Mathemagix with C++ have been less keen on exploiting new ideas in language design. One important reason is that a good language One major design goal of the Mathemagix compiler is for computer algebra is more important for developers to admit a good compatibility with existing program- than for end users. Indeed, typical end users tend to use ming languages. For the moment, we have focussed on C computer algebra systems as enhanced pocket calculators, and C++. Indeed, on the one hand, in parallel with the and rarely write programs of substantial complexity them- development of the compiler, we have written several high selves. Another reason is specific to the family of systems performance C++ template libraries for various basic that grew out of Scratchpad: after IBM’s decision to mathematical structures (polynomials, matrices, series, no longer support the development, there has been a long etc.). On the other hand, the compiler currently gener- period of uncertainty for developers and users on how the ates C++ code. ∗ . This work has been partly supported by the Digiteo 2009-36HD grant of the Région Ile-de-France. 1 We already stated that Mathemagix was inspired 2 Basic interface principles to C++ by Axiom and Aldor in many respects. Some early work on interfacing with C++ was done in the context 2.1 Preparing imports from C++ of Aldor [4, 7]. There are two major differences between Different programming languages have different conven- C++ and Aldor which are important in this context. tions for compiling programs, organizing projects into On the one hand, Aldor provides support for gen- libraries, and mechanisms for separate compilation. uine generic functional programming: not only functions, C++ is particularly complex, since the language does but also data types can be passed as function arguments. not provide any direct support for the management of big For instance, one may write a routine which takes a ring projects. Instead, this task is delegated to separate con- R and an integer n on input and which returns the ring figuration and Makefile systems, which are responsible for R[ X1 ] [ Xn ] . The language also provides support for the detection and specification of external and internal dependent types: a function may very well take a ring R dependencies, and the determination of the correct com- together with an instance x of R as its arguments or return pilation flags. Although these tasks may be facilitated up value. to a certain extent when using integrated development tm On the other hand, C++ provides support for tem- environments such as Eclipse (trademark of Eclipse tm plates. We may write a routine cube which takes an Foundation, Inc.), Xcode (trademark of Apple Inc.), tm instance x of an arbitrary type R on input and returns or C++ Builder (trademark of Embarcadero Tech- x*x*x. However, and even though there is some work in nologies, Inc.), they usually remain non trivial for projects this direction [8], it is currently not possible to add the of a certain size. requirement that R must be a ring when declaring the tem- Mathemagix uses a different philosophy for managing plate cube. Hence, the correctness of the template body big projects. Roughly speaking, any source file contains x*x*x can only be checked at the moment when the tem- all information which is necessary for building the cor- plate is instantiated for a particular type R. Furthermore, responding binary. Consequently, there is no need for only a finite number of these instantiations can occur in external configuration or Makefile systems. a program or library, and template parameters cannot be Whenever we import functionality from C++ into passed to functions as objects. Mathemagix, our design philosophy implies that we have In Aldor, there is no direct equivalent of templates. to specify the necessary instructions for compiling and/or Mathemagix Nevertheless, it is possible to implement a function cube linking the imported code. To this effect, which takes a ring R and an instance x of R on input, provides special primitives cpp_flags, cpp_libs and cpp_include and which returns x*x*x. It thus makes sense to consider for specifying the compilation and linking the importation of C++ template libraries into Aldor. flags, and C++ header files to be included. numerix Mathemagix Although [4, 7] contain a precise strategy for realizing such For instance, the library of interfacing, part of the interface still had to be written by contains implementation for various numerical types. In particular, it contains wrappers for the Gmp and hand. Mpfr libraries [6, 10] with implementations of arbitrary Mathemagix features two main novelties with respect precision integers, rational numbers and floating point to the previous work which was done in the context of numbers. The Mathemagix interface for importing the Axiom and Aldor. First of all, the language itself admits wrapper for arbitrary precision integers starts as follows: full support for templates with typed parameters; see our paper [13] on the type system for more details. Secondly, foreign cpp import { C++ template libraries can be imported into Math- cpp_flags "`numerix-config --cppflags`" ; emagix in a straightforward way, without the need to cpp_libs "`numerix-config --libs`" ; write any non trivial parts of the interface by hand. cpp_include "numerix/integer.hpp" ; The ability to transform a C++ template library which ... } only permits static instantiation into a fully generic tem- plate library is somewhat surprising. Part of the magic On installation of the numerix library, a special script occurs in the specification of the interface itself. Indeed, numerix-config is installed in the user’s path. In the the interface should in particular provide the missing type above example, we use this script in order to retrieve information about the parameters of the C++ templates. the compilation and linking flags. Notice also that In this paper, we will describe in more details how this numerix/integer.hpp is the C++ header file for basic mechanism works. We think that similar techniques can arbitrary precision integer arithmetic. be applied for the generic importation of C++ templates into other languages such as Aldor or OCaml.
Recommended publications
  • Axiom / Fricas
    Axiom / FriCAS Christoph Koutschan Research Institute for Symbolic Computation Johannes Kepler Universit¨atLinz, Austria Computer Algebra Systems 15.11.2010 Master's Thesis: The ISAC project • initiative at Graz University of Technology • Institute for Software Technology • Institute for Information Systems and Computer Media • experimental software assembling open source components with as little glue code as possible • feasibility study for a novel kind of transparent single-stepping software for applied mathematics • experimenting with concepts and technologies from • computer mathematics (theorem proving, symbolic computation, model based reasoning, etc.) • e-learning (knowledge space theory, usability engineering, computer-supported collaboration, etc.) • The development employs academic expertise from several disciplines. The challenge for research is interdisciplinary cooperation. Rewriting, a basic CAS technique This technique is used in simplification, equation solving, and many other CAS functions, and it is intuitively comprehensible. This would make rewriting useful for educational systems|if one copes with the problem, that even elementary simplifications involve hundreds of rewrites. As an example see: http://www.ist.tugraz.at/projects/isac/www/content/ publications.html#DA-M02-main \Reverse rewriting" for comprehensible justification Many CAS functions can not be done by rewriting, for instance cancelling multivariate polynomials, factoring or integration. However, respective inverse problems can be done by rewriting and produce human readable derivations. As an example see: http://www.ist.tugraz.at/projects/isac/www/content/ publications.html#GGTs-von-Polynomen Equation solving made transparent Re-engineering equation solvers in \transparent single-stepping systems" leads to types of equations, arranged in a tree. ISAC's tree of equations are to be compared with what is produced by tracing facilities of Mathematica and/or Maple.
    [Show full text]
  • Nonlinear Evolution Equations and Solving Algebraic Systems: the Importance of Computer Algebra
    - Y'M?S </#i/ ИНСТИТУТ ядерных исследований дубна Е5-89-62Ц V.P.Gerdt, N.A.Kostov, A.Yu.Zharkov* NONLINEAR EVOLUTION EQUATIONS AND SOLVING ALGEBRAIC SYSTEMS: THE IMPORTANCE OF COMPUTER ALGEBRA Submitted to International Conference "Solitons and its Applications", Dubna, August 25-27, 1989 * Saratov State University, USSR 1989 1.INTRODUCTION A wide-spread problem in the theory of nonlinear evolution equations (NEE) is to find the exact solutions of complicated algebraic systems. For example, let us consider the following evolution systems U - AU + F(U,U , ..U ), U=U(x,t)-(U1, . ,UH) , U=D1(U), D=d/dx IN 1 N-1 I /ii F«(F\ . -FH) , A==diag(A , . .A) , A *0, A *A , (i*j). The general symmetry approach to checking up the integrability and classification of integrable NEE (see the reviews [1,2] and references therein) allows to obtain the integrability conditions which are related to existence of higher order symmetries and conservation laws in a fully algorithmic way. The implementation of these algorithms in a form of FORMAC program FORMINT have been given for scalar equations (M=l in (1)) in [3 j and for the general case (M>1) in [4]. Using this program one can automatically obtain the equations in right hand side of (l) which follow from the necessary integrability conditions. The integrabiiity conditions for the right hand side with arbitrary functions have the form of systems of differential equations, the procedure of solving these equations is not generally algorithmic. But in the important particular cases when the right hand side F are polynomials and the integrability conditions are reduced to a system of nonlinear algebraic equations in coefficients of the polynomials.
    [Show full text]
  • Aldor Generics in Software Component Architectures
    Aldor Generics in Software Component Architectures (Spine title: Aldor Generics in Software Component Architectures) (Thesis Format: Monograph) by Michael Llewellyn Lloyd Graduate Program in Computer Science Submitted in partial fulfillment of the requirements for the degree of Masters Faculty of Graduate Studies The University of Western Ontario London, Ontario October, 2007 c Michael Llewellyn Lloyd 2007 THE UNIVERSITY OF WESTERN ONTARIO FACULTY OF GRADUATE STUDIES CERTIFICATE OF EXAMINATION Supervisor Examiners Dr. Stephen M. Watt Dr. David Jeffrey Supervisory Committee Dr. Hanan Lutfiyya Dr. Eric Schost The thesis by Michael Llewellyn Lloyd entitled Aldor Generics in Software Component Architectures is accepted in partial fulfillment of the requirements for the degree of Masters Date Chair of the Thesis Examination Board ii Abstract With the introduction of the Generic Interface Definition Language(GIDL), Software Component Architectures may now use Parameterized types between languages at a high level. Using GIDL, generic programming to be used between programming modules written in different programming languages. By exploiting this mechanism, GIDL creates a flexible programming environment where, each module may be coded in a language appropriate to its function. Currently the GIDL architecture has been implemented for C++ and Java, both object-oriented languages which support com- pile time binding for generic types. This thesis examines an implementation of GIDL for the Aldor language, an imperative language with some aspects of functional pro- gramming, particularly suited for representing algebraic types. In particular, we ex- periment with Aldors implementation of runtime binding for generic types, and show how GIDL allows programmers to use a rich set of generic types across language barriers.
    [Show full text]
  • WORKSHOP on COMPUTATIONAL ASPECTS in the CONTROL of FLEXIBLE SYSTEMS
    NASA Technical Memorandum 10 1578, Part One WORKSHOP on COMPUTATIONAL ASPECTS in the CONTROL of FLEXIBLE SYSTEMS Held at the Royce Hotel in WiIIiamsburg, Virginia (\!~?~-~*-lolj?d-pt-l) P&~C~L~IN~Y-F THE <UL (; 8.; t\jo~-l?~Su ~~KY,~+~JDfl~CnHPUTATIONAL ASPFCTI IY TcF --T )~uI)-- ~f'4T1.1L dC Ei'XfrLt. >Y>TtU,, f'AQT i (.\A>A- r\eu-lP>CL L an-1-y Rps~arihCentnr) 492 p C5CL 2LR UnLl ~s 55 3 G;/i3 J,'i74qA Sponsored by the NASA Langley Research Center Proceedings Compiled by Larry Taylor Table of Contents Page Introduction Computational Aspects Workshop Call for Papers 1 Workshop Organizing Committee 5 Attendance List 7 --------___-----__-------------------------------------- Needs for Advanced CSI Software NASA's Control/Structures Interaction (CSI) Program Brantley R. Hanks, NASA Langley Research Center 21-, Computational Controls for Aerospace Systems Guy Man, Robert A. Laskin and A. Fernando Tolivar Jet Propulsion Laboratory 33. Additional Software Developments Wanted for Modeling and Control of Flexible Systems Jiguan G. Lin, Control Research Corporation 4 9 Survey of Available Software Flexible Structure Control Experiments Using a Real-Time Workstation for Computer-Aided Control Engineering Michael E. Steiber, Communications Research Centre 6 7 CONSOLE: A CAD Tandem for Optimizationl-Based Design Interacting with User-Supplied Simulators Michael K.H. Fan, Li-Shen Wang, Jan Koninckx and Andre L. Tits,University of Maryland, College Park 8 9 mLPAGE IS QUALfTY ORIGINAL PAGE IS OF POOR QUALITY The Application of TSIM Software to ACT Design and Analysis of Flexible Aircraft Ian W. Kaynes, Royal Aerospace Establishment, Farnborouth 109 - Control/Structure Interaction Methods for Space Statian Power Systems Paul Blelloch, Structural Dynamics Research Corporation 121L, Flexible Missile Autopilot Design Studies with PC-MATLAB386 Michael J.
    [Show full text]
  • (12) United States Patent (10) Patent No.: US 6,203,987 B1 Friend Et Al
    USOO6203987B1 (12) United States Patent (10) Patent No.: US 6,203,987 B1 Friend et al. (45) Date of Patent: Mar. 20, 2001 (54) METHODS FOR USING CO-REGULATED Garrels, JI et al “Quant exploration of the REF52 protein GENESETS TO ENHANCE DETECTION AND database: cluster analysis reveals major protein expression CLASSIFICATION OF GENE EXPRESSION profiles in resonses to growth regulation, Serum Stimulation, PATTERNS and viral transformation’, Electrophoresis, 12/90, 11(12): 1114–30.* (75) Inventors: Stephen H. Friend, Seattle, WA (US); Anderson et al., 1994, “Involvement of the protein tyrosine Roland Stoughton, San Diego, CA kinase p56' in T cell signaling and thymocyte develop (US) ment.” Adv. Immunol. 56:151-178. (73) Assignee: Rosetta Inpharmatics, Inc., Kirkland, Anderson, 1995, “Mutagenesis", Methods Cell. Biol. 48:31. WA (US) Baudin et al., 1993, “A simple and efficient method for direct gene deletion in Saccharomyces cerevisiae, ' Nucl. Acids (*) Notice: Subject to any disclaimer, the term of this ReS. 21:3329-3330. patent is extended or adjusted under 35 Belshaw et al., 1996, “Controlling protein association and U.S.C. 154(b) by 0 days. Subcellular localization with a Synthetic ligand that induces heterodimerization of proteins,” Proc. Natl. Acad. Sci. USA (21) Appl. No.: 09/179,569 93:46O4-46O7. (22) Filed: Oct. 27, 1998 Bernoist and Chambon, 1981, “In vivo sequence require ments of the SV40 early promoter region”, Nature 290: (51) Int. Cl. ............................ C12O 1/68; C12P 21/04; 304-310. GO1N 33/543 Biocca, 1995, “Intracellular immunization: antibody target ing to subcellular compartments,” Trends in Cell Biology (52) U.S.
    [Show full text]
  • A Review of Mathematica
    A Review of Mathematica RICHARD J. FATEMAN ∗ [email protected] Computer Science Division, University of California, Berkeley, CA 94720, USA 16 September 1991 Abstract The Mathematica computer system is reviewed from the perspective of its contributions to symbolic and algebraic computation, as well as its stated goals. Design and implementation issues are discussed. 1 Introduction The Mathematica1 computer program is a general system for doing mathematical computation [51][52]. It includes a command language, a programming language, and a calculation environment that is oriented toward symbolic as well as numeric mathematics. The back cover of the manual [52] provides excerpts from rave notices like “The importance of [Mathematica] cannot be overlooked. it so fundamentally alters the mechanics of mathematics.” —The New York Times. Fortune [47] says “. it will do, instantaneously, virtually all of applied mathematics. .” Hype aside, the program is without question interesting to mathematicians, computer scientists, and engineers because of its combination of a number of ∗This work has been supported in part by the following: the National Science Foundation under grant numbers CCR-8812843 and CDS-8922788, through the Center for Pure and Applied Mathe- matics and the Electronics Research Laboratory (ERL) at the University of California at Berkeley; the Defense Advanced Research Projects Agency (DoD) ARPA order #4871, monitored by Space & Naval Warfare Systems Command under contract N00039-84-C-0089, through ERL; and grants from the IBM Corporation, the State of California MICRO program, and Sun Microsystems. 1 Mathematica is a trademark of Wolfram Research Inc. (WRI). 1 technologies that have arisen in initially separate contexts—numerical and sym- bolic mathematics, graphics, and modern user interfaces.
    [Show full text]
  • 1. with Examples of Different Programming Languages Show How Programming Languages Are Organized Along the Given Rubrics: I
    AGBOOLA ABIOLA CSC302 17/SCI01/007 COMPUTER SCIENCE ASSIGNMENT ​ 1. With examples of different programming languages show how programming languages are organized along the given rubrics: i. Unstructured, structured, modular, object oriented, aspect oriented, activity oriented and event oriented programming requirement. ii. Based on domain requirements. iii. Based on requirements i and ii above. 2. Give brief preview of the evolution of programming languages in a chronological order. 3. Vividly distinguish between modular programming paradigm and object oriented programming paradigm. Answer 1i). UNSTRUCTURED LANGUAGE DEVELOPER DATE Assembly Language 1949 FORTRAN John Backus 1957 COBOL CODASYL, ANSI, ISO 1959 JOSS Cliff Shaw, RAND 1963 BASIC John G. Kemeny, Thomas E. Kurtz 1964 TELCOMP BBN 1965 MUMPS Neil Pappalardo 1966 FOCAL Richard Merrill, DEC 1968 STRUCTURED LANGUAGE DEVELOPER DATE ALGOL 58 Friedrich L. Bauer, and co. 1958 ALGOL 60 Backus, Bauer and co. 1960 ABC CWI 1980 Ada United States Department of Defence 1980 Accent R NIS 1980 Action! Optimized Systems Software 1983 Alef Phil Winterbottom 1992 DASL Sun Micro-systems Laboratories 1999-2003 MODULAR LANGUAGE DEVELOPER DATE ALGOL W Niklaus Wirth, Tony Hoare 1966 APL Larry Breed, Dick Lathwell and co. 1966 ALGOL 68 A. Van Wijngaarden and co. 1968 AMOS BASIC FranÇois Lionet anConstantin Stiropoulos 1990 Alice ML Saarland University 2000 Agda Ulf Norell;Catarina coquand(1.0) 2007 Arc Paul Graham, Robert Morris and co. 2008 Bosque Mark Marron 2019 OBJECT-ORIENTED LANGUAGE DEVELOPER DATE C* Thinking Machine 1987 Actor Charles Duff 1988 Aldor Thomas J. Watson Research Center 1990 Amiga E Wouter van Oortmerssen 1993 Action Script Macromedia 1998 BeanShell JCP 1999 AngelScript Andreas Jönsson 2003 Boo Rodrigo B.
    [Show full text]
  • Insight MFR By
    Manufacturers, Publishers and Suppliers by Product Category 11/6/2017 10/100 Hubs & Switches ASCEND COMMUNICATIONS CIS SECURE COMPUTING INC DIGIUM GEAR HEAD 1 TRIPPLITE ASUS Cisco Press D‐LINK SYSTEMS GEFEN 1VISION SOFTWARE ATEN TECHNOLOGY CISCO SYSTEMS DUALCOMM TECHNOLOGY, INC. GEIST 3COM ATLAS SOUND CLEAR CUBE DYCONN GEOVISION INC. 4XEM CORP. ATLONA CLEARSOUNDS DYNEX PRODUCTS GIGAFAST 8E6 TECHNOLOGIES ATTO TECHNOLOGY CNET TECHNOLOGY EATON GIGAMON SYSTEMS LLC AAXEON TECHNOLOGIES LLC. AUDIOCODES, INC. CODE GREEN NETWORKS E‐CORPORATEGIFTS.COM, INC. GLOBAL MARKETING ACCELL AUDIOVOX CODI INC EDGECORE GOLDENRAM ACCELLION AVAYA COMMAND COMMUNICATIONS EDITSHARE LLC GREAT BAY SOFTWARE INC. ACER AMERICA AVENVIEW CORP COMMUNICATION DEVICES INC. EMC GRIFFIN TECHNOLOGY ACTI CORPORATION AVOCENT COMNET ENDACE USA H3C Technology ADAPTEC AVOCENT‐EMERSON COMPELLENT ENGENIUS HALL RESEARCH ADC KENTROX AVTECH CORPORATION COMPREHENSIVE CABLE ENTERASYS NETWORKS HAVIS SHIELD ADC TELECOMMUNICATIONS AXIOM MEMORY COMPU‐CALL, INC EPIPHAN SYSTEMS HAWKING TECHNOLOGY ADDERTECHNOLOGY AXIS COMMUNICATIONS COMPUTER LAB EQUINOX SYSTEMS HERITAGE TRAVELWARE ADD‐ON COMPUTER PERIPHERALS AZIO CORPORATION COMPUTERLINKS ETHERNET DIRECT HEWLETT PACKARD ENTERPRISE ADDON STORE B & B ELECTRONICS COMTROL ETHERWAN HIKVISION DIGITAL TECHNOLOGY CO. LT ADESSO BELDEN CONNECTGEAR EVANS CONSOLES HITACHI ADTRAN BELKIN COMPONENTS CONNECTPRO EVGA.COM HITACHI DATA SYSTEMS ADVANTECH AUTOMATION CORP. BIDUL & CO CONSTANT TECHNOLOGIES INC Exablaze HOO TOO INC AEROHIVE NETWORKS BLACK BOX COOL GEAR EXACQ TECHNOLOGIES INC HP AJA VIDEO SYSTEMS BLACKMAGIC DESIGN USA CP TECHNOLOGIES EXFO INC HP INC ALCATEL BLADE NETWORK TECHNOLOGIES CPS EXTREME NETWORKS HUAWEI ALCATEL LUCENT BLONDER TONGUE LABORATORIES CREATIVE LABS EXTRON HUAWEI SYMANTEC TECHNOLOGIES ALLIED TELESIS BLUE COAT SYSTEMS CRESTRON ELECTRONICS F5 NETWORKS IBM ALLOY COMPUTER PRODUCTS LLC BOSCH SECURITY CTC UNION TECHNOLOGIES CO FELLOWES ICOMTECH INC ALTINEX, INC.
    [Show full text]
  • Emacs for Aider: an External Learning System
    Emacs For Aider: An External Learning System Jeremy (Ya-Yu) Hsieh B.Sc., University Of Northern British Columbia, 2003 Thesis Submitted In Partial Fulfillment Of The Requirements For The Degree Of Master of Science in Mathematical, Computer, And Physical Sciences (Computer Science) The University Of Northern British Columbia May 2006 © Jeremy (Ya-Yu) Hsieh, 2006 Library and Bibliothèque et 1^1 Archives Canada Archives Canada Published Heritage Direction du Branch Patrimoine de l'édition 395 Wellington Street 395, rue Wellington Ottawa ON K1A 0N4 Ottawa ON K1A 0N4 Canada Canada Your file Votre référence ISBN: 978-0-494-28361-5 Our file Notre référence ISBN: 978-0-494-28361-5 NOTICE: AVIS: The author has granted a non­ L'auteur a accordé une licence non exclusive exclusive license allowing Library permettant à la Bibliothèque et Archives and Archives Canada to reproduce,Canada de reproduire, publier, archiver, publish, archive, preserve, conserve,sauvegarder, conserver, transmettre au public communicate to the public by par télécommunication ou par l'Internet, prêter, telecommunication or on the Internet,distribuer et vendre des thèses partout dans loan, distribute and sell theses le monde, à des fins commerciales ou autres, worldwide, for commercial or non­ sur support microforme, papier, électronique commercial purposes, in microform,et/ou autres formats. paper, electronic and/or any other formats. The author retains copyright L'auteur conserve la propriété du droit d'auteur ownership and moral rights in et des droits moraux qui protège cette thèse. this thesis. Neither the thesis Ni la thèse ni des extraits substantiels de nor substantial extracts from it celle-ci ne doivent être imprimés ou autrement may be printed or otherwise reproduits sans son autorisation.
    [Show full text]
  • The Aldor-- Language
    The Aldor-- language Simon Thompson and Leonid Timochouk Computing Laboratory, University of Kent Canterbury, CT2 7NF, UK ׺ºØÓÑÔ×ÓҸк ºØ ÑÓÓÙÙº ºÙ Abstract This paper introduces the Aldor-- language, which is a functional programming language with dependent types and a powerful, type-based, overloading mechanism. The language is built on a subset of Aldor, the ‘library compiler’ language for the Axiom computer algebra system. Aldor-- is designed with the intention of incorporating logical reasoning into computer algebra computations. The paper contains a formal account of the semantics and type system of Aldor--; a general discus- sion of overloading and how the overloading in Aldor-- fits into the general scheme; examples of logic within Aldor-- and notes on the implementation of the system. 1 Introduction Aldor-- is a dependently-typed functional programming language, which is based on a subset of Aldor [16]. Aldor is a programming language designed to support program development for symbolic mathe- matics, and was used as the library compiler for the Axiom computer algebra system [8]. Aldor-- embodies an approach to integrating computer algebra and logical reasoning which rests on the formulas-as-types principle, sometimes called the Curry-Howard isomorphism [14], under which logical formulas are represented as types in a system of dependent types. Aldor and Axiom have dependent types but, as was argued in earlier papers [11, 15], because there is no evaluation within the type-checker it is not possible to see the Aldor types as providing a faithful representation of logical assertions. A number of other implementations of dependently-typed systems already exist, including Coq [13], Alfa [1] and the Lego proof assistant [10].
    [Show full text]
  • Using a Small Algebraic Manipulation System to Solve Differential and Integral Equations by Variational and Approximation Techniques
    J. Symbolic Computation (1987) 3, 291-301 Using a Small Algebraic Manipulation System to Solve Differential and Integral Equations by Variational and Approximation Techniques R. D. MILLS Computing Science Department. University of Glasgow, Glasgow, UK (Received 2 December 1985) The microcomputer algebraic manipulation system MUMATH is used to implement the classical variational, Galerkin and least-squares techniques for solving boundary-value problems in differential equations and also for solving Fredhohn integral equations. Examples are given which extend the precision of known results. The technique is presented as a general algorithm which can readily be implemented on other algebraic manipulation systems. 1. Introduction Computer programs have been in existence since the fifties to manipulate polynomials, differentiate functions and solve equations. By the late sixties and early seventies programs were written which could integrate functions analytically. The late seventies saw the development of programs for the symbolic solution of differential and integral equations (see Golden, 1977; Stoutemyer, 1977; Bogen, 1979). Large and complex algebraic manipulation systems were devised to implement the algorithms which effect these processes, the best known being FORMAC, REDUCE2, MACSYMA and SCRATCHPAD. There then opened up the exciting possibility of tackling many problems in applied mathematics and engineering which could be solved approximately by analytical methods but which require very large amounts of algebraic manipulation. The Rayleigh-Ritz, Galerkin and least-squares methods for solving boundary-value problems in differential equations are typical examples. For early work using computer algebra in these methods, see Miola (1974) and Andersen & Noor (1977). This application area involves the interaction of numerical and algebraic computation (see Ng, 1979).
    [Show full text]
  • Symbolic Software for Lie Symmetry Computations
    Invited Lecture 1 Symbolic Software for Lie Symmetry Computations Willy Hereman Dept. Mathematical and Computer Sciences Colorado School of Mines Golden, CO 80401-1887 U.S.A. ISLC Workshop Nordfjordeid, Norway Tuesday, June 18, 1996 16:00 I. INTRODUCTION Symbolic Software • Solitons via Hirota’s method (Macsyma & Mathematica) • Painlev´etest for ODEs or PDEs (Macsyma & Mathematica) • Conservation laws of PDEs (Mathematica) • Lie symmetries for ODEs and PDEs (Macsyma) Purpose of the programs • Study of integrability of nonlinear PDEs • Exact solutions as bench mark for numerical algorithms • Classification of nonlinear PDEs • Lie symmetries −→ solutions via reductions • Work in collaboration with Unal¨ G¨okta¸s Chris Elmer Wuning Zhuang Ameina Nuseir Mark Coffey Erik van den Bulck Tony Miller Tracy Otto Symbolic Software by Willy Hereman and Collaborators Software is freely available from anonymous FTP site: mines.edu Change to subdirectory: pub/papers/math cs dept/software Subdirectory Structure: – symmetry (Macsyma) systems of ODEs and PDEs systems of difference-differential equations – hirota (Macsyma) – painleve (Macsyma) single system – condens (Mathematica) – painmath (Mathematica) single system – hiromath (Mathematica) Computation of Lie-point Symmetries – System of m differential equations of order k ∆i(x, u(k)) = 0, i = 1, 2, ..., m with p independent and q dependent variables p x = (x1, x2, ..., xp) ∈ IR u = (u1, u2, ..., uq) ∈ IRq – The group transformations have the form x˜ = Λgroup(x, u), u˜ = Ωgroup(x, u) where the functions Λgroup
    [Show full text]