Type Inference with Constrained Types

Total Page:16

File Type:pdf, Size:1020Kb

Type Inference with Constrained Types See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/220346751 Type Inference with Constrained Types Article in Theory and Practice of Object Systems · January 1999 DOI: 10.1002/(SICI)1096-9942(199901/03)5:1<35::AID-TAPO4>3.0.CO;2-4 · Source: DBLP CITATIONS READS 199 40 3 authors, including: Martin Sulzmann Karlsruhe University of Applied Sciences 112 PUBLICATIONS 1,341 CITATIONS SEE PROFILE All in-text references underlined in blue are linked to publications on ResearchGate, Available from: Martin Sulzmann letting you access and read them immediately. Retrieved on: 16 August 2016 Typ e Inference with Constrained Typ es Martin Sulzmann Martin Odersky Yale University University of South Australia Department of Computer Science Scho ol of Computer and Information Science New Haven CT The Levels South Australia sulzmanncsyaleedu oderskycisunisaeduau Martin Wehr University of Edinburgh Lab oratory for Foundations of Computer Science wehrdcsedacuk Research Rep ort YALEUDCSRR April typ es can b e found in Jon We discuss Jones ap Abstract proach in more detail in the section ab out related work In this pap er we present a general framework HMX Remy Rem extends the HindleyMilner typ e system for HindleyMilner style typ e systems with constraints with a sorted equational theory His approach is very HMX stays in the tradition of the HindleyMilner close in spirit to ours But he restricts his attention typ e system Typ e systems in HMX are sound un to equality constraints whereas our approach gives a der a standard untyp ed comp ositional semantics that foundation for more general constraint systems Ex guarantees the slogan welltyp ed programs can not go tensions of HindleyMilner with constraints are also in wrong Furthermore we can give a generic typ e infer creasingly p opular in program analysis DHM TJ ence algorithm for HMX Under sucient conditions Palsb erg Pal gave an ecient inference algorithm for on X typ e inference will always compute the principal a calculus of ob jects The main feature of his system typ e of a term An instance of our framework which is that he do es not use the HindleyMilner approach to deals with p olymorphic records is discussed Also we typ e inference It remains to b e seen how his approach give a subtyping extension SHMX of our HMX sys is related to ours tem In particular the typ e inference algorithm for Even though these typ e systems use dierent con subtyp es computes principal typ es Simplication of straint domains they are largely alike in their typ e the constraints inferred by the typ e inference algorithm theoretic asp ects In this pap er we present a general is discussed for HMX and SHMX framework HMX for HindleyMilner style typ e sys tems with constraints analogous to the CLPX frame work in constraint logic programming JM Partic Intro duction ular typ e systems can b e obtained by instantiating the parameter X to a sp ecic constraint system The Hind We study an extension of the HindleyMilner Mil leyMilner system itself is obtained by instantiating X system with constraints CardelliWegner CW gave to the trivial constraint system an early survey ab out general research directions Rey By and large the treatment of constraints in typ e nolds Rey and Mitchell Mit are foundational pa systems has b een syntactic constraints were regarded p ers that develop basic concepts of constraints and sub as sets of formulas often of a sp ecic form On the typing There are examples for extensions of the Hind other hand constraint programming now generally uses leyMilner system with records Oho Rem over a semantic denition of constraint systems taking a loading Jon Kae VHJW NP CHO OWW constraint system as a cylindric algebra with some ad and subtyping CCH BSvG AW ESTb A ditional prop erties HMT Sar Cylindric algebras general extension of the HindleyMilner with qualied dene a pro jection op erator that binds some sub Supp orted by a Yale University Fellowship set of variables in the constraint In the usual case always yields a b est solution if there is a solution at where constraints are b o olean algebras pro jection cor all For those constraint systems meeting this condi resp onds to existential quantication tion we present a generic typ e inference algorithm that Following the lead of constraint programming we will always yield the principal typ e of a term treat a constraint system as a cylindric algebra with a Our work generalizes Milners results to systems with pro jection op erator Pro jection is very useful for our nontrivial constraints and makes it thus p ossible to purp oses for two reasons First pro jection allows us to exp eriment with new constraint domains without hav formulate a logically pleasing and pragmatically useful ing to invent yet another typ e inference algorithm and rule Intro for quantier intro duction without having to rep eat the often tedious pro ofs of soundness and completeness of typ e inference C D e fv C fv We discuss an instance of our HMX framework Intro that deals with p olymorphic records Namely we show C D e D how to enco de the record calculus of Ohori Oho in terms of our system where C and D are constraints over the typ e variables Furthermore we give an extension SHMX of our in the typ e context and the typ e scheme HMX framework that deals with subtyp es The con Second pro jection is an imp ortant source of op cept of subtyping is of great imp ortance in many record p ortunities for simplifying constraints Jon Pot and ob ject calculi We enrich our constraint system ESTa In our framework simplifying means chang with a subtyp e predicate b etween typ es and de ing the syntactic representation of a constraint without noted by In SHMX we additionally have changing its denotation For example the subtyping the subsumption rule We provide an extension of our constraint generic typ e inference algorithm that computes prin cipal typ es for SHMX typ e systems Previous ap can safely b e simplied to proaches towards typ e inference with subtyp es AW ESTb lack this prop erty In case of subtyping simplifying constraints Jon Pot ESTa b ecomes an imp ortant issue Typ e in since the denotation is the same for b oth constraints ference simply accumulates all constraint problems and Without the pro jection op erator the two constraints ends up in a large constraint set One reason is that would b e dierent since one restricts the variable unicationbased approaches to typ e inference with sub while the other do es not typ es do not seem to apply We discuss simplication Two of the main strengths of the HindleyMilner for HMX and SHMX system are a typ e soundness result and the existence of a The rest of this pap er is structured as follows We typ e inference algorithm that computes principal typ es give a characterization of constraint systems in Sec HMX stays in the tradition of the HindleyMilner tion A general framework HMX for HindleyMil typ e system Typ e systems in HMX are sound under a ner style typ e systems with constraints is presented in standard untyp ed comp ositional semantics provided the Section Section establishes conditions on the con underlying constraint system X is sound This result straint system so that typ e inference is feasible and can b e summarized in the slogan welltyp ed programs a principal typ es theorem holds An instance of our can not go wrong One of the key ideas of our pa framework with p olymorphic records is considered in p er is to present sucient conditions on the constraint Section In Section we discuss a general condition domain X so that the principal typ es prop erty carries under which we get instances of our HMX framework over to HMX The conditions are fairly simple and for free We discuss an extension SHMX of HMX natural For those constraint systems meeting the con with subtyp es in section Simplication is discussed ditions we present a generic typ e inference algorithm in Section The relationship to previous approaches is that will always yield the principal typ e of a term considered in Section Section concludes To this purp ose we represent the typing problem it self as a constraint Generally the constraint system X needs to b e rich system to express all constraint prob Constraint systems lems On the left hand side of the turnstyle and in typ e schemes we only admit a subset of constraints in X that We present a characterization of constraint systems along are in socalled solved form The task of typ e inference the lines of Henkin HMT and Saraswat Sar We is then to split a typing problem into a substitution and restate the denitions of a simple and a cylindric con a residual constraint in solved form This we call con straint system Furthermore we intro duce the new no straint normalization We require that normalization tion of a term constraint system The next lemma states that the pro jection op erator do es not inuence the satisability of a constraint Denition Simple Constraint System A simple e Lemma Let C be a constraint Then C is satisable constraint system is a structure where is a i C is satisable nonempty set of tokens or primitive constraints We also refer to such constraints as predicates The relation We now intro duce a much more expressive constraint e p is a decidable entailment relation where p system We want to deal with typ es and substitutions is the set of nite subsets of We cal l C p a con Denition Typ es A typ e is a member of straint set or simply a constraint e T Term where Term
Recommended publications
  • Concepts and Paradigms of Object-Oriented Programming Expansion of Oct 400PSLA-89 Keynote Talk Peter Wegner, Brown University
    Concepts and Paradigms of Object-Oriented Programming Expansion of Oct 400PSLA-89 Keynote Talk Peter Wegner, Brown University 1. What Is It? 8 1.1. Objects 8 1.2. Classes 10 1.3. Inheritance 11 1.4. Object-Oriented Systems 12 2. What Are Its Goals? 13 2.1. Software Components 13 2.2. Object-Oriented Libraries 14 2.3. Reusability and Capital-intensive Software Technology 16 2.4. Object-Oriented Programming in the Very Large 18 3. What Are Its Origins? 19 3.1. Programming Language Evolution 19 3.2. Programming Language Paradigms 21 4. What Are Its Paradigms? 22 4.1. The State Partitioning Paradigm 23 4.2. State Transition, Communication, and Classification Paradigms 24 4.3. Subparadigms of Object-Based Programming 26 5. What Are Its Design Alternatives? 28 5.1. Objects 28 5.2. Types 33 5.3. Inheritance 36 5.4. Strongly Typed Object-Oriented Languages 43 5.5. Interesting Language Classes 45 5.6. Object-Oriented Concept Hierarchies 46 6. what Are Its Models of Concurrency? 49 6.1. Process Structure 50 6.2. Internal Process Concurrency 55 6.3. Design Alternatives for Synchronization 56 6.4. Asynchronous Messages, Futures, and Promises 57 6.5. Inter-Process Communication 58 6.6. Abstraction, Distribution, and Synchronization Boundaries 59 6.7. Persistence and Transactions 60 7. What Are Its Formal Computational Models? 62 7.1. Automata as Models of Object Behavior 62 7.2. Mathematical Models of Types and Classes 65 7.3. The Essence of Inheritance 74 7.4. Reflection in Object-Oriented Systems 78 8.
    [Show full text]
  • The Interactive Nature of Computing: Refuting the Strong Church-Turing Thesis
    TEX source file Click here to download Manuscript: paper.tex The Interactive Nature of Computing: Refuting the Strong Church-Turing Thesis Dina Goldin∗, Peter Wegner Brown University Abstract. The classical view of computing positions computation as a closed-box transformation of inputs (rational numbers or finite strings) to outputs. According to the interactive view of computing, computation is an ongoing interactive process rather than a function-based transformation of an input to an output. Specifi- cally, communication with the outside world happens during the computation, not before or after it. This approach radically changes our understanding of what is computation and how it is modeled. The acceptance of interaction as a new paradigm is hindered by the Strong Church-Turing Thesis (SCT), the widespread belief that Turing Machines (TMs) capture all computation, so models of computation more expressive than TMs are impossible. In this paper, we show that SCT reinterprets the original Church-Turing Thesis (CTT) in a way that Turing never intended; its commonly assumed equiva- lence to the original is a myth. We identify and analyze the historical reasons for the widespread belief in SCT. Only by accepting that it is false can we begin to adopt interaction as an alternative paradigm of computation. We present Persistent Turing Machines (PTMs), that extend TMs to capture sequential interaction. PTMs allow us to formulate the Sequential Interaction Thesis, going beyond the expressiveness of TMs and of the CTT. The paradigm shift to interaction provides an alternative understanding of the nature of computing that better reflects the services provided by today’s computing technology.
    [Show full text]
  • Introduction to the Literature on Programming Language Design Gary T
    Computer Science Technical Reports Computer Science 7-1999 Introduction to the Literature On Programming Language Design Gary T. Leavens Iowa State University Follow this and additional works at: http://lib.dr.iastate.edu/cs_techreports Part of the Programming Languages and Compilers Commons Recommended Citation Leavens, Gary T., "Introduction to the Literature On Programming Language Design" (1999). Computer Science Technical Reports. 59. http://lib.dr.iastate.edu/cs_techreports/59 This Article is brought to you for free and open access by the Computer Science at Iowa State University Digital Repository. It has been accepted for inclusion in Computer Science Technical Reports by an authorized administrator of Iowa State University Digital Repository. For more information, please contact [email protected]. Introduction to the Literature On Programming Language Design Abstract This is an introduction to the literature on programming language design and related topics. It is intended to cite the most important work, and to provide a place for students to start a literature search. Keywords programming languages, semantics, type systems, polymorphism, type theory, data abstraction, functional programming, object-oriented programming, logic programming, declarative programming, parallel and distributed programming languages Disciplines Programming Languages and Compilers This article is available at Iowa State University Digital Repository: http://lib.dr.iastate.edu/cs_techreports/59 Intro duction to the Literature On Programming Language Design Gary T. Leavens TR 93-01c Jan. 1993, revised Jan. 1994, Feb. 1996, and July 1999 Keywords: programming languages, semantics, typ e systems, p olymorphism, typ e theory, data abstrac- tion, functional programming, ob ject-oriented programming, logic programming, declarative programming, parallel and distributed programming languages.
    [Show full text]
  • Dina Goldin · Scott A. Smolka · Peter Wegner (Eds.) Dina Goldin Scott A
    Dina Goldin · Scott A. Smolka · Peter Wegner (Eds.) Dina Goldin Scott A. Smolka Peter Wegner (Eds.) Interactive Computation The New Paradigm With 84 Figures 123 Editors Dina Goldin Scott A. Smolka Brown University State University of New York at Stony Brook Computer Science Department Department of Computer Science Providence, RI 02912 Stony Brook, NY 11794-4400 USA USA [email protected] [email protected] Peter Wegner Brown University Computer Science Department Providence, RI 02912 USA [email protected] Cover illustration: M.C. Escher’s „Whirlpools“ © 2006 The M.C. Escher Company-Holland. All rights reserved. www.mcescher.com Library of Congress Control Number: 2006932390 ACM Computing Classification (1998): F, D.1, H.1, H.5.2 ISBN-10 3-540-34666-X Springer Berlin Heidelberg New York ISBN-13 978-3-540-34666-1 Springer Berlin Heidelberg New York This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broad- casting, reproduction on microfilm or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer. Violations are liable for prosecution under the German Copyright Law. Springer is a part of Springer Science+Business Media springer.com © Springer-Verlag Berlin Heidelberg 2006 The use of general descriptive names, registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant pro- tective laws and regulations and therefore free for general use.
    [Show full text]
  • A Bibliography of Publications of Alan Mathison Turing
    A Bibliography of Publications of Alan Mathison Turing Nelson H. F. Beebe University of Utah Department of Mathematics, 110 LCB 155 S 1400 E RM 233 Salt Lake City, UT 84112-0090 USA Tel: +1 801 581 5254 FAX: +1 801 581 4148 E-mail: [email protected], [email protected], [email protected] (Internet) WWW URL: http://www.math.utah.edu/~beebe/ 24 August 2021 Version 1.227 Abstract This bibliography records publications of Alan Mathison Turing (1912– 1954). Title word cross-reference 0(z) [Fef95]. $1 [Fis15, CAC14b]. 1 [PSS11, WWG12]. $139.99 [Ano20]. $16.95 [Sal12]. $16.96 [Kru05]. $17.95 [Hai16]. $19.99 [Jon17]. 2 [Fai10b]. $21.95 [Sal12]. $22.50 [LH83]. $24.00/$34 [Kru05]. $24.95 [Sal12, Ano04, Kru05]. $25.95 [KP02]. $26.95 [Kru05]. $29.95 [Ano20, CK12b]. 3 [Ano11c]. $54.00 [Kru05]. $69.95 [Kru05]. $75.00 [Jon17, Kru05]. $9.95 [CK02]. H [Wri16]. λ [Tur37a]. λ − K [Tur37c]. M [Wri16]. p [Tur37c]. × [Jon17]. -computably [Fai10b]. -conversion [Tur37c]. -D [WWG12]. -definability [Tur37a]. -function [Tur37c]. 1 2 . [Nic17]. Zycie˙ [Hod02b]. 0-19-825079-7 [Hod06a]. 0-19-825080-0 [Hod06a]. 0-19-853741-7 [Rus89]. 1 [Ano12g]. 1-84046-250-7 [CK02]. 100 [Ano20, FB17, Gin19]. 10011-4211 [Kru05]. 10th [Ano51]. 11th [Ano51]. 12th [Ano51]. 1942 [Tur42b]. 1945 [TDCKW84]. 1947 [CV13b, Tur47, Tur95a]. 1949 [Ano49]. 1950s [Ell19]. 1951 [Ano51]. 1988 [Man90]. 1995 [Fef99]. 2 [DH10]. 2.0 [Wat12o]. 20 [CV13b]. 2001 [Don01a]. 2002 [Wel02]. 2003 [Kov03]. 2004 [Pip04]. 2005 [Bro05]. 2006 [Mai06, Mai07]. 2008 [Wil10]. 2011 [Str11]. 2012 [Gol12]. 20th [Kru05]. 25th [TDCKW84].
    [Show full text]
  • Computer Science
    Computer science PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Sat, 10 Dec 2011 02:24:16 UTC Contents Articles Main article 1 Computer science 1 Supporting article 12 History of computer science 12 References Article Sources and Contributors 18 Image Sources, Licenses and Contributors 19 Article Licenses License 20 1 Main article Computer science Computer science or computing science (abbreviated CS) is the study of the theoretical foundations of information and computation. It also includes practical techniques for their implementation and application in computer systems. Computer scientists invent algorithmic processes that create, describe, and transform information and formulate suitable abstractions to design and model complex systems.[1] [2] Computer science has many sub-fields; some, such as computational complexity theory, study the fundamental properties of computational problems, while others, such as computer graphics, emphasize the computation of specific results. Still others focus on the challenges in implementing computations. For example, programming language theory studies approaches to describe computations, while computer programming applies specific programming languages to solve specific computational problems, and human-computer interaction focuses on the challenges in making computers and computations useful, usable, and universally accessible to humans. The general public sometimes confuses computer scientists with other computer professionals
    [Show full text]
  • Novel Frameworks for Mining Heterogeneous and Dynamic
    Novel Frameworks for Mining Heterogeneous and Dynamic Networks A dissertation submitted to the Graduate School of the University of Cincinnati in partial fulfillment of the requirements for the degree of Doctor of Philosophy in the Department of Electrical and Computer Engineering and Computer Science of the College of Engineering by Chunsheng Fang B.E., Electrical Engineering & Information Science, June 2006 University of Science & Technology of China, Hefei, P.R.China Advisor and Committee Chair: Prof. Anca L. Ralescu November 3, 2011 Abstract Graphs serve as an important tool for discrete data representation. Recently, graph representations have made possible very powerful machine learning algorithms, such as manifold learning, kernel methods, semi-supervised learning. With the advent of large-scale real world networks, such as biological networks (disease network, drug target network, etc.), social networks (DBLP Co- authorship network, Facebook friendship, etc.), machine learning and data mining algorithms have found new application areas and have contributed to advance our understanding of proper- ties, and phenomena governing real world networks. When dealing with real world data represented as networks, two problems arise quite naturally: I) How to integrate and align the knowledge encoded in multiple and heterogeneous networks? For instance, how to find out the similar genes in co-disease and protein-protein inter- action networks? II) How to model and predict the evolution of a dynamic network? A real world exam- ple is, given N years snapshots of an evolving social network, how to build a model that can cap- ture the temporal evolution and make reliable prediction? In this dissertation, we present an innovative graph embedding framework, which identifies the key components of modeling the evolution in time of a dynamic graph.
    [Show full text]
  • On Understanding Types, Data Abstraction, and Polymorphism
    1 Computing Surveys, Vol 17 n. 4, pp 471-522, December 1985 On Understanding Types, Data Abstraction, and Polymorphism Luca Cardelli AT&T Bell Laboratories, Murray Hill, NJ 07974 (current address: DEC SRC, 130 Lytton Ave, Palo Alto CA 94301) Peter Wegner Dept. of Computer Science, Brown University Providence, RI 02912 Abstract Our objective is to understand the notion of type in programming languages, present a model of typed, polymorphic programming languages that reflects recent research in type theory, and examine the relevance of recent research to the design of practical programming languages. Object-oriented languages provide both a framework and a motivation for exploring the interaction adamtoan agb stthraec ctioonnc aenptds soinf ctey ptye,p ed aintha earbitsatrnaccet iiosn a,n a inmdp poortlaynmt oforprmhi somf ,p osliynmceo rtphheyis mex. tWened dtehvee nloopti oa n# o-cfa tlycpuelu tso- based model for type systems that allows us to explore these interactions in a simple setting, unencumbered by complexities of production programming languages. The evolution of languages from untyped universes to monomorphic and then polymorphic type systems is reviewed. Mechanisms for polymorphism such as overloading, coercion, subtyping, and parameterization are examined. A unifying framework for polymorphic type systems is developed in terms of the typed #-calculus augmented to include binding of types by quantification as well as binding of values #-calculus is augmented by universal quantification to model generic functions with type by absTthraec ttiyopne.d parameters, existential quantification and packaging (information hiding) to model abstract data types, and bounded quantification to model subtypes and type inheritance. In this way we obtain a simple and precise characterization of a powerful type system that includes abstract data types, parametric polymorphism, and #m-ucaltlipculelu isn haereri dtaisnccue sisne da.
    [Show full text]
  • GRAPH DRAWING and INFORMATION VISUALIZATION
    conduconduit t! Volume 8, Number 1 Department of Computer Science Spring, 1999 Brown University Traditionally, information visualization GRAPH DRAWING and has focused on the display of quantita- tive information (e.g., bar charts, pie INFORMATION VISUALIZATION charts, function plots) and geographic information (e.g., road and subway Information visualization is maps), where a natural mapping exists an emerging discipline that between the data and their geometric addresses the problem of location in the diagram. A great introduc- communicating the struc- tion to these types of visualizations is ture of information space given in the books by Edward Tufte (The through diagrams. Quot- Visual Display of Quantitative Informa- ing from an article by David tion and Envisioning Information). Harel (Comm. ACM 31(5) 1988): From quantitative to relational “The intricate nature of More recently, researchers have started a variety of computer- addressing the problem of visualizing related systems and sit- relational information, where net- uations can, and in our works (also known as graphs) model opinion should, be rep- collections of objects and connections resented via visual for- between those objects. Examples include: malisms; visual because • Web: site maps, browsing history dia- they are to be gener- grams, presentation and refinement ated, comprehended, of query results, product catalogs. Roberto Tamassia and communicated by humans; and attending a workshop formal, because they are to be manip- • Software engineering: UML class and state-transition diagrams, sub- on graph drawing in ulated, maintained, and analyzed by Barbados computers.” “...in the next decade the use The benefits of informa- tion visualization include of information visualization analysis through visual exploration, discovery of techniques will be essential to patterns and correlations, the success of portals and other and abstraction and sum- marization.
    [Show full text]
  • Subtyping and Parametricity
    Subtyping and Parametricity Gordon Plotkin∗ Mart´ınAbadiy Luca Cardelliy Abstract in previous work [ACC93, PA93]. In this paper we extend the formalization of [PA93] to a programming In this paper we study the interaction of subtyping language with subtyping. and parametricity. We describe a logic for a program- A logic serves as the setting for this study. This ming language with parametric polymorphism and sub- logic can be viewed as an analogue of Scott’s LCF, that typing. The logic supports the formal definition and is, as a fairly general system for proving properties of use of relational parametricity. We give two models programs. Here the programs are those of System F , for it, and compare it with other formal systems for the which is an extension of Girard’s System F [Gir72]≤ same language. In particular, we examine the “Penn with subtyping, abstracted from work of Cardelli and interpretation” of subtyping as implicit coercion. Wegner [CW85] by Curien and Ghelli [CG92, CG94]. Without subtyping, parametricity yields, for exam- Our logic for F is an extension of the logic for F pre- ple, an encoding of abstract types and of initial alge- sented in [PA93].≤ Beyond its possible use in program bras, with the corresponding proof principles of simu- verification, the logic provides a language for stating lation and induction. With subtyping, we obtain par- parametricity assumptions and rules for deriving their tially abstract types and certain initial order-sorted al- consequences, formally and without reference to par- gebras, and may derive proof principles for them. ticular models. While it remains to consider what might be the ap- propriate general form for parametric models of F 1 Introduction and of our logic, we do construct particular models—≤ indeed two such.
    [Show full text]
  • Programming Language 1 Programming Language
    Programming language 1 Programming language A programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication. The earliest programming languages predate the invention of the computer, and were used to direct the behavior of machines such as Jacquard looms and player pianos. Thousands of different programming languages have been created, mainly in the computer field, with many more being created every year. Most programming languages describe computation in an imperative style, i.e., as a sequence of commands, although some languages, such as those that support functional programming or logic programming, use alternative forms of description. A programming language is usually split into the two components of syntax (form) and semantics (meaning) and many programming languages have some kind of written specification of their syntax and/or semantics. Some languages are defined by a specification document, for example, the C programming language is specified by an ISO Standard, while other languages, such as Perl, have a dominant implementation that is used as a reference. Definitions A programming language is a notation for writing programs, which are specifications of a computation or algorithm.[1] Some, but not all, authors restrict the term "programming language" to those languages that can express all possible algorithms.[1] [2] Traits often considered important for what constitutes a programming language include: • Function and target: A computer programming language is a language[3] used to write computer programs, which involve a computer performing some kind of computation[4] or algorithm and possibly control external devices such as printers, disk drives, robots,[5] and so on.
    [Show full text]
  • What Is Computation? the Evolution of Computation by Peter Wegner, Brown University
    Ubiquity, an ACM publication November, 2010 Ubiquity Symposium What is Computation? The Evolution of Computation by Peter Wegner, Brown University Computer science became an evolutionary discipline about 70 years ago, some 2,000 years after the Greeks created mathematics, physics and philosophy. However, the questions “What is Mathematics?” and “What is Physics?” remain unanswered, and it is not surprising that the specification of computation likewise remains unresolved, in spite of the increasing centrality of the computing discipline. Mathematics has evolved from Leibniz in the early 18th century, Gauss in the 19th century, Hilbert in 1900, and Gödel and Church in 1931. Physics has evolved from Newton to Einstein to quantum theory, and is currently enmeshed in string theory. Computing has evolved from Turing machines through object‐oriented programming and the Internet to interactive and biological models. But the evolution of scientific disciplines does not determine their complete specification, which changes as new research proposals establish new modes of thought. Janette Wing in CACM Jan 2008, raises five computational questions that remain unanswered: “Is P=NP?”, “What is computable?”, “What is Intelligence?”, “What is Information?”, and “How can we simplify complex systems?” This suggests that “What?” questions can be worthwhile and technically meaningful; formulating and examining questions is a useful endeavor that contributes to the technical evaluation of disciplines even if we are unable to explain them. Turing’s 1937 paper, “On Computable Numbers with an Application to the Entscheidungs‐ problem,” strengthened Gödel’s rejection of Hilbert’s mathematical assertion that all theorems can be proved true or false by logical arguments, thereby expressing “What is Mathematics?” in terms of logical theorem proving.
    [Show full text]