A Parlog Object Oriented Language

Total Page:16

File Type:pdf, Size:1020Kb

A Parlog Object Oriented Language Polka : A Parlog Object Oriented Language. Andrew Davison A thesis submitted to the University of London for the degree of Doctor of Philosophy Department of Computing Imperial College of Science, Technology and Medicine September 1989 2 Abstract Programming language design is an evolutionary process. For instance, the concurrent Logic Programming (LP) paradigm and its associated languages could not have been developed without the work on LP and on models of concurrency during the last decade. This evolution is clearly visible in Polka which is, first and foremost, a language derived from the fusion of the concurrent LP and Object Oriented Programming (OOP) paradigms. The result is more than a sum of its parts since many of the inadequacies of one programming model are compensated for by features of the other. One of the other design goals behind Polka is its utilisation as a ‘higher level’ concurrent LP language. This is possible because Polka contains abstractions which are well suited to programming typical kinds of concurrent LP problems. The last design goal is the incorporation of meta level programming concepts from LP into Polka, which greatly increase the functionality of the class mechanism. This thesis presents the background to, and motivation for, the design of Polka, and describes the language. The utility of Polka is demonstrated through numerous small examples, and three larger applications concerned with graphics, blackboard problem solving, and simulation. Also, an operational semantics is developed for a subset of the language, called kernel Polka, and a simple and efficient implementation is derived from it 3 Acknowledgments I am, of course, greatly indebted to my supervisor Keith Clark, who has encouraged my work, and dispensed invaluable advice. In addition, his comments on this thesis have been consistently useful and enlightening. Most of all, I thank him for his friendship. I must also thank a number of people who read earlier drafts of the thesis, and supplied extremely informative comments. They are (in no particular order) : Alastair Burt, Melissa Lam, Colin Atkinson, Ian Foster, Gul Agha, and Ken Kahn. The working environment has been excellent, and this must be attributed to my fellow members in the Parlog Group, some of whom have now left for pastures new. Apart from those already mentioned, I must thank (again in no particular order): Steve Gregory, Graem Ringwood, Jim Crammond, Matthew Huntbach, Reem Bahgat, David Gilbert, Bob Kemp, Fukumi Kozato, Priscila Lima, and numerous Parlog Group secretaries. The Parlog Group is only a small part of the larger Logic Programming section, and friends and colleagues in the section have made my time at Imperial very happy. There being too many people to mention, I simply thank Bob Kowalski and Cheryl Anderson. My research has been supported by the Science and Engineering Research Council. Other recent work on Polka at Imperial College has been funded by various research grants. 4 Contents Part 1. Introductory Material. 16 1. Introduction. 17 1.1 The Context of the Research : Language Design. 17 1.2 Contributions of the Thesis. 18 1.3 Assumptions about the Readership. 19 1.4 Preview of the Contents. 19 2. Logic Programming Overview. 21 2.1 Logic Programming. 21 2.2 Concurrent Logic Programming. 22 2.3 Parlog..................................................................................................... 23 2.3.1 The Process Interpretation in Parlog. 25 2.3.2 The Control Metacall. 29 2.3.3 Semantics of Parlog. 29 3. Design Issues for LP-based Object Oriented Languages. 31 3.1 Motivation for combining OOP and LP. 32 3.1.1 The reasons for adding OOP to LP. 32 3.1.2 The reasons for adding LP to OOP......................................33 3.1.3 Applications. 33 3.2 Object and Class Representation. 34 3.2.1 The ADT View of Objects and Classes...............................35 3.2.2 The Theory View of Objects and Classes. 37 3.2.3 The Process View of Objects and Classes. 37 3.2.3.1 The Committed Choice Process View ..................... 37 3.2.3.2 The Backtracking Process View. 40 3.3 Message Passing. 41 3.3.1 Message Passing in the ADT View.................................. 42 3.3.2 Message Passing in the Theory View. 44 3.3.3 Message Passing in the Process View. 44 3.3.3.1 Message Passing in the CCPV ................................... 44 3.3.3.2 Message Passing in the Backtracking Process View.47 3.3.3.2.1 Wait Declarations. 47 3.3.3.2.2 Events. 48 3.3.3.2.3 D-clauses. 49 3.4 State. 51 3.4.1 State in the ADT View ........................................................ 51 3.4.2 State in the Theory View. 52 3.4.3 State in the Process View. 52 3.4.3.1 State in the Committed Choice Process View ...........53 3.4.3.2 State in the Backtracking Process View. 53 3.5 Inheritance. 54 3.5.1 Inheritance in the ADT View..............................................55 3.5.2 Inheritance in the Theory View. 59 3.5.3 Inheritance in the Process View. 59 3.5.3.1 Inheritance in the Committed Choice Process View. 59 3.5.3.2 Inheritance in the Backtracking Process View. 61 3.6 Other Paradigms. 62 3.6.1 Other Paradigms in the ADT View....................................62 3.6.2 Other Paradigms in the Theory View. 63 3.6.3 Other Paradigms in the Process View. 63 3.7 Summary of the Views ............................................... V 7 '. ............. 63 3.7.1 Summary of the ADT View. 63 3.7.2 Summary of the Theory View. .. 64 3.7.3 Summary of the Process View.............................................64 3.7.3.1 Summary of the Committed Choice Process View. 64 3.7.3.2 Summary of the Backtracking Process View. 65 4. An Overview of Polka. 66 4.1 Polka Features. 66 4.2 The Advantages of Polka. 68 4.3 The Disadvantages of Polka. 68 Part 2. Language and Applications. 71 5. The Language. 7 2 5.1 Class Structure. 72 5.1.1 A 'receiver' Class. 73 5.1.2 A'filestore'Class. 74 5.2 Default Polka Clauses. 77 6 5.3 Variables. 78 5.4 The initial Section. 79 5.5 Clauses................................................................................................... 80 5.6 Input Messages. 81 5.7 Becomes. 83 5.8 Output Messages.................................................................................. 84 5.9 I_am. 85 5.10 The code Section. 87 5.11 Inheritance...........................................................................................88 5.12 Self Communication. 99 5.13 ‘Higher level’ Parlog. 101 6. Meta Level Programming. 104 6.1 What is Meta Level Programming? 104 6.2 The Uses of Meta Level Programming. 107 6.3 Program Transformation...................................................................108 6.4 Load Balancing. 112 6.5 Parametrised Classes. 114 6.6 Extensible Classes..............................................................................117 6.6.1 Computer. 119 6.6.2 Square. 119 6.6.3 Circle.................................................................................... 120 6.6.4 Window. 121 6.6.5 Support Classes. 122 7. Three Examples. 127 7.1 Graphics. 127 7.1.1 Overview of the Classes. 127 7.1.2 Screen................................................................................. 128 7.1.3 Shape. 131 7.1.4 Turtle. 134 7.1.5 The Parlog Approach ........................................................... 137 7.1.6 Possible Changes to the Programs. 140 7.2 Blackboard Systems. 142 7.2.1 Background to Blackboard Systems ..................................142 7.2.1.1 The Blackboard. 143 7.2.1.2 Knowledge Sources (KSs). 143 7 7.2.1.3 Control. 143 7.2.1.4 Parallelism Issues. 144 7.2.1.5 Manipulation Issues .................................................... 145 7.2.2 Polka Blackboard Systems. 146 7.2.2.1 Polka Blackboards. 146 1.2.2.2 Polka KSs.....................................................................150 7.2.3 A Version of Hearsay H. 155 7.2.4 Summary of the Blackboard Example. 157 7.3 Simulation .......................................................................................... 158 7.3.1 Overview of Simulation. 158 7.3.1.1 Simulation in Logic Programming Languages. 158 7.3.2 Distributed Time ................................................................... 160 7.3.2.1 Distributed Time in Polka. 161 7.3.3 Polka Simulation Classes. 164 7.3.3.1 Random Number Generators .................................... 165 7.3.3.1.1 Uniform. 166 7.3.3.1.2 Randint. 166 13.3.2 Resources........................................................ 167 7.3.33 Report Generation. 170 7.3.4 Two Simulation Examples. / 171 7.3.4.1 A Car Wash..................................................................171 7.3.4.2 An Information Retrieval System. 173 7.3.5 Summary of the Simulation Example. 175 8. Concurrency. 176 8.1 What is Concurrency? 176 8.2 Synchronisation. 177 8.3 Rendezvous-like Synchronisation ................................................... 180 8.4 Liveness. 189 8.5 Arrival, Selection and Completion. 191 8.6 Separation of Synchronisation from Functionality........................192 8.6.1 The Readers-Writers Problem. 193 8.6.2 Readers Priority. 195 8.7 The Actor Model. 197 8 Part 3. Semantics and Implementation. 203 9. Kernel Polka. 204 9.1 Default Clauses. 204 9.2 Variables. 205 9.3 Input Messages.................................................................................205 9.4 Clauses. 205 9.5 Becomes. 205 9.6 Output Messages..............................................................................206 9.7 Inheritance. 207 9.8 The Parlog Component. 207 10. Semantics. 208 10.1 Transition Systems. 209 10.2 The Configuration. 210 10.2.1
Recommended publications
  • Scala Tutorial
    Scala Tutorial SCALA TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Scala Tutorial Scala is a modern multi-paradigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way. Scala has been created by Martin Odersky and he released the first version in 2003. Scala smoothly integrates features of object-oriented and functional languages. This tutorial gives a great understanding on Scala. Audience This tutorial has been prepared for the beginners to help them understand programming Language Scala in simple and easy steps. After completing this tutorial, you will find yourself at a moderate level of expertise in using Scala from where you can take yourself to next levels. Prerequisites Scala Programming is based on Java, so if you are aware of Java syntax, then it's pretty easy to learn Scala. Further if you do not have expertise in Java but you know any other programming language like C, C++ or Python, then it will also help in grasping Scala concepts very quickly. Copyright & Disclaimer Notice All the content and graphics on this tutorial are the property of tutorialspoint.com. Any content from tutorialspoint.com or this tutorial may not be redistributed or reproduced in any way, shape, or form without the written permission of tutorialspoint.com. Failure to do so is a violation of copyright laws. This tutorial may contain inaccuracies or errors and tutorialspoint provides no guarantee regarding the accuracy of the site or its contents including this tutorial. If you discover that the tutorialspoint.com site or this tutorial content contains some errors, please contact us at [email protected] TUTORIALS POINT Simply Easy Learning Table of Content Scala Tutorial ..........................................................................
    [Show full text]
  • 1 Aliasing and Immutability
    Vocabulary: Accessors & Mutators Computer Science and Engineering The Ohio State University Accessor: A method that reads, but never changes, the Aliasing and Immutability (abstract) state of an object Computer Science and Engineering College of Engineering The Ohio State University Concrete representation may change, so long as change is not visible to client eg Lazy initialization Examples: getter methods, toString Lecture 8 Formally: restores “this” Mutator method: A method that may change the (abstract) state of an object Examples: setter methods Formally: updates “this” Constructors not considered mutators A Fixed Epoch Interface A Broken Time Period Class Computer Science and Engineering The Ohio State University Computer Science and Engineering The Ohio State University // Interface cover story goes here public class Period implements FixedEpoch { // Mathematical modeling … private Date start; // constructor private Date end; // requires start date < end date // initializes start and end dates // operations have specifications based on the model public Period(Date start, Date end) { // exercises … this.start = start; this.e nd = e nd; public interface FixedEpoch { } public Date getStart(); public Date getEnd(); } public Date getStart() { return start; } public Date getEnd() { return end; } } Problem: Aliasing A Better Period Class Computer Science and Engineering The Ohio State University Computer Science and Engineering The Ohio State University Assignment in constructor creates an alias public class Period
    [Show full text]
  • Functional Programming Inside OOP?
    Functional Programming inside OOP? It’s possible with Python >>>whoami() Carlos Villavicencio ● Ecuadorian θ ● Currently: Python & TypeScript ● Community leader ● Martial arts: 剣道、居合道 ● Nature photography enthusiast po5i Cayambe Volcano, 2021. >>>why_functional_programming ● Easier and efficient ● Divide and conquer ● Ease debugging ● Makes code simpler and readable ● Also easier to test >>>history() ● Functions were first-class objects from design. ● Users wanted more functional solutions. ● 1994: map, filter, reduce and lambdas were included. ● In Python 2.2, lambdas have access to the outer scope. “Not having the choice streamlines the thought process.” - Guido van Rossum. The fate of reduce() in Python 3000 https://python-history.blogspot.com/2009/04/origins-of-pythons-functional-features.html >>>has_django_fp() https://github.com/django/django/blob/46786b4193e04d398532bbfc3dcf63c03c1793cb/django/forms/formsets.py#L201-L213 https://github.com/django/django/blob/ca9872905559026af82000e46cde6f7dedc897b6/django/forms/formsets.py#L316-L328 Immutability An immutable object is an object whose state cannot be modified after it is created. Booleans, strings, and integers are immutable objects. List and dictionaries are mutable objects. Thread safety >>>immutability def update_list(value: list) -> None: def update_number(value: int) -> None: value += [10] value += 10 >>> foo = [1, 2, 3] >>> foo = 10 >>> id(foo) >>> update_number(foo) 4479599424 >>> foo >>> update_list(foo) 10 >>> foo 樂 [1, 2, 3, 10] >>> id(foo) 4479599424 >>>immutability def update_number(value: int) -> None: print(value, id(value)) value += 10 print(value, id(value)) >>> foo = 10 >>> update_number(foo) 10 4478220880 ڃ 4478221200 20 >>> foo 10 https://medium.com/@meghamohan/mutable-and-immutable-side-of-python-c2145cf72747 Decorators They are functions which modify the functionality of other functions. Higher order functions.
    [Show full text]
  • Enforcing Abstract Immutability
    Enforcing Abstract Immutability by Jonathan Eyolfson A thesis presented to the University of Waterloo in fulfillment of the thesis requirement for the degree of Doctor of Philosophy in Electrical and Computer Engineering Waterloo, Ontario, Canada, 2018 © Jonathan Eyolfson 2018 Examining Committee Membership The following served on the Examining Committee for this thesis. The decision of the Examining Committee is by majority vote. External Examiner Ana Milanova Associate Professor Rensselaer Polytechnic Institute Supervisor Patrick Lam Associate Professor University of Waterloo Internal Member Lin Tan Associate Professor University of Waterloo Internal Member Werner Dietl Assistant Professor University of Waterloo Internal-external Member Gregor Richards Assistant Professor University of Waterloo ii I hereby declare that I am the sole author of this thesis. This is a true copy of the thesis, including any required final revisions, as accepted by my examiners. I understand that my thesis may be made electronically available to the public. iii Abstract Researchers have recently proposed a number of systems for expressing, verifying, and inferring immutability declarations. These systems are often rigid, and do not support “abstract immutability”. An abstractly immutable object is an object o which is immutable from the point of view of any external methods. The C++ programming language is not rigid—it allows developers to express intent by adding immutability declarations to methods. Abstract immutability allows for performance improvements such as caching, even in the presence of writes to object fields. This dissertation presents a system to enforce abstract immutability. First, we explore abstract immutability in real-world systems. We found that developers often incorrectly use abstract immutability, perhaps because no programming language helps developers correctly implement abstract immutability.
    [Show full text]
  • Exploring Language Support for Immutability
    Exploring Language Support for Immutability Michael Coblenz∗, Joshua Sunshine∗, Jonathan Aldrich∗, Brad Myers∗, Sam Webery, Forrest Shully May 8, 2016 CMU-ISR-16-106 This is an extended version of a paper that was published at ICSE [11]. Institute for Software Research School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 ∗School of Computer Science, Carnegie Mellon University, Pittsburgh, PA, USA ySoftware Engineering Institute, Carnegie Mellon University, Pittsburgh, PA, USA This material is supported in part by NSA lablet contract #H98230-14-C-0140, by NSF grant CNS-1423054, and by Contract No. FA8721-05-C-0003 with CMU for the operation of the SEI, a federally funded research and development center sponsored by the US DoD. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect those of any of the sponsors. Keywords: Programming language design, Programming language usability, Immutability, Mutability, Program- mer productivity, Empirical studies of programmers Abstract Programming languages can restrict state change by preventing it entirely (immutability) or by restricting which clients may modify state (read-only restrictions). The benefits of immutability and read-only restrictions in software structures have been long-argued by practicing software engineers, researchers, and programming language designers. However, there are many proposals for language mechanisms for restricting state change, with a remarkable diversity of tech- niques and goals, and there is little empirical data regarding what practicing software engineers want in their tools and what would benefit them. We systematized the large collection of techniques used by programming languages to help programmers prevent undesired changes in state.
    [Show full text]
  • 1 Immutable Classes
    A Broken Time Period Class Computer Science and Engineering The Ohio State University public class Period { private Date start; Immutable Classes private Date end; Computer Science and Engineering College of Engineering The Ohio State University public Period(Date start, Date end) { assert (start.compareTo(end) > 0); //start < end this.start = start; this.end = end; Lecture 8 } public Date getStart() { return start; } public Date getEnd() { return end; } } Questions Problem: Aliasing Computer Science and Engineering The Ohio State University Computer Science and Engineering The Ohio State University What is an invariant in general? Assignment in constructor creates an alias Ans: Client and component both have references to the same Date object Class invariant can be undermined via alias What is an invariant for class Period? Date start = new Date(300); Ans: Date end = new Date (500); Period p = new Period (start, end); end.setTime(100); //modifies internals of p Why is this an invariant for this class? Solution: “defensive copying” Ans: Constructor creates a copy of the arguments Copy is used to initialize the private fields Metaphor: ownership A Better Period Class Good Practice: Copy First Computer Science and Engineering The Ohio State University Computer Science and Engineering The Ohio State University public class Period { private Date start; When making a defensive copy of private Date end; constructor arguments: public Period(Date start, Date end) { First copy the arguments assert (start.compareTo(end) >
    [Show full text]
  • Adding Crucial Features to a Typestate-Oriented Language
    João Daniel da Luz Mota Bachelor in Computer Science and Engineering Coping with the reality: adding crucial features to a typestate-oriented language Dissertation submitted in partial fulfillment of the requirements for the degree of Master of Science in Computer Science and Engineering Adviser: António Maria Lobo César Alarcão Ravara, Associate Professor, NOVA School of Science and Technology Co-adviser: Marco Giunti, Researcher, NOVA School of Science and Technology Examination Committee Chair: Hervé Miguel Cordeiro Paulino, Associate Professor, NOVA School of Science and Technology Rapporteur: Ornela Dardha, Lecturer, School of Computing Science, University of Glasgow Members: António Maria Lobo César Alarcão Ravara Marco Giunti February, 2021 Coping with the reality: adding crucial features to a typestate-oriented lan- guage Copyright © João Daniel da Luz Mota, NOVA School of Science and Technology, NOVA University Lisbon. The NOVA School of Science and Technology and the NOVA University Lisbon have the right, perpetual and without geographical boundaries, to file and publish this dissertation through printed copies reproduced on paper or on digital form, or by any other means known or that may be invented, and to disseminate through scientific repositories and admit its copying and distribution for non-commercial, educational or research purposes, as long as credit is given to the author and editor. Acknowledgements Throughout the writing of this thesis I have received a great deal of support and assis- tance. I would first like to thank my adviser, Professor António Ravara, and co-adviser, Re- searcher Marco Giunti, for the guidance and direction provided. Your feedback was crucial and allowed me to organize my work and write this thesis.
    [Show full text]
  • Declare Immutable Variables Javascript
    Declare Immutable Variables Javascript Burgess is thrombolytic and vilifies impulsively while demolished Harland individualise and leafs. Which Wayne sense so strongly that Wain pots her isogonals? Rhombic and biserrate Thorsten bike so unhurriedly that Merill marauds his lamias. These leaky states used inside solidity supports var to declare variables So you have an array, in the form consult a hall of ingredients. First focus on the same operation, this is called? You can both of properties like fields of love record. We declare variables declared and immutability helps us to do this. If that immutability of variable at the same value cannot, but what the redundancy in shape, when the function body of arbitrary objects. But display what bird it that database contain? Tired of immutability. You cannot mutate an immutable object; instead, you must mutate a copy of it, leaving the original intact. What does this actually be created a constructor code includes the code from the contract has finished executing the answer. The outside example shows a simple class A which picture a red field _f. You can even return another function as an output, and pass that to yet another function! But there are now also global variables that are not properties of the global object. One to the many challenges of user interface programming is solving the symbol of change detection. We would disturb that it later not level be assign to array the user to retype. Other variables declared having immutable, immutability disallowed any type inference for object literal or kotlin, though it removes the.
    [Show full text]
  • Functional Programming Patterns in Scala and Clojure Write Lean Programs for the JVM
    Early Praise for Functional Programming Patterns This book is an absolute gem and should be required reading for anybody looking to transition from OO to FP. It is an extremely well-built safety rope for those crossing the bridge between two very different worlds. Consider this mandatory reading. ➤ Colin Yates, technical team leader at QFI Consulting, LLP This book sticks to the meat and potatoes of what functional programming can do for the object-oriented JVM programmer. The functional patterns are sectioned in the back of the book separate from the functional replacements of the object-oriented patterns, making the book handy reference material. As a Scala programmer, I even picked up some new tricks along the read. ➤ Justin James, developer with Full Stack Apps This book is good for those who have dabbled a bit in Clojure or Scala but are not really comfortable with it; the ideal audience is seasoned OO programmers looking to adopt a functional style, as it gives those programmers a guide for transitioning away from the patterns they are comfortable with. ➤ Rod Hilton, Java developer and PhD candidate at the University of Colorado Functional Programming Patterns in Scala and Clojure Write Lean Programs for the JVM Michael Bevilacqua-Linn The Pragmatic Bookshelf Dallas, Texas • Raleigh, North Carolina Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals.
    [Show full text]
  • Declare String Method C
    Declare String Method C Rufe sweat worshipfully while gnathic Lennie dilacerating much or humble fragmentary. Tracie is dodecastyle and toady cold as revolutionist Pincas constipate exorbitantly and parabolizes obstructively. When Sibyl liquidizes his Farnham sprout not sportively enough, is Ender temporary? What is the difference between Mutable and Immutable In Java? NET base types to instances of the corresponding types. This results in a copy of the string object being created. If Comrade Napoleon says it, methods, or use some of the string functions from the C language library. Consider the below code which stores the string while space is encountered. Thank you for registration! Global variables are a bad idea and you should never use them. May sacrifice the null byte if the source is longer than num. White space is also calculated in the length of the string. But we also need to discuss how to get text into R, printed, set to URL of the article. The method also returns an integer to the caller. These values are passed to the method. Registration for Free Trial successful. Java String literal is created by using double quotes. The last function in the example is the clear function which is used to clear the contents of the invoking string object. Initialize with a regular string literal. Enter a string: It will read until the user presses the enter key. The editor will open in a new window. It will return a positive number upon success. The contents of the string buffer are copied; subsequent modification of the string buffer does not affect the newly created string.
    [Show full text]
  • Multiparadigm Programming with Python 3 Chapter 5
    Multiparadigm Programming with Python 3 Chapter 5 H. Conrad Cunningham 7 September 2018 Contents 5 Python 3 Types 2 5.1 Chapter Introduction . .2 5.2 Type System Concepts . .2 5.2.1 Types and subtypes . .2 5.2.2 Constants, variables, and expressions . .2 5.2.3 Static and dynamic . .3 5.2.4 Nominal and structural . .3 5.2.5 Polymorphic operations . .4 5.2.6 Polymorphic variables . .5 5.3 Python 3 Type System . .5 5.3.1 Objects . .6 5.3.2 Types . .7 5.4 Built-in Types . .7 5.4.1 Singleton types . .8 5.4.1.1 None .........................8 5.4.1.2 NotImplemented ..................8 5.4.2 Number types . .8 5.4.2.1 Integers (int)...................8 5.4.2.2 Real numbers (float)...............9 5.4.2.3 Complex numbers (complex)...........9 5.4.2.4 Booleans (bool)..................9 5.4.2.5 Truthy and falsy values . 10 5.4.3 Sequence types . 10 5.4.3.1 Immutable sequences . 10 5.4.3.2 Mutable sequences . 12 5.4.4 Mapping types . 13 5.4.5 Set Types . 14 5.4.5.1 set ......................... 14 5.4.5.2 frozenset ..................... 14 5.4.6 Other object types . 15 1 5.5 What Next? . 15 5.6 Exercises . 15 5.7 Acknowledgements . 15 5.8 References . 16 5.9 Terms and Concepts . 16 Copyright (C) 2018, H. Conrad Cunningham Professor of Computer and Information Science University of Mississippi 211 Weir Hall P.O. Box 1848 University, MS 38677 (662) 915-5358 Browser Advisory: The HTML version of this textbook requires a browser that supports the display of MathML.
    [Show full text]
  • Basics of Python - I
    Outline Introduction Data Types Operators and Expressions Control Flow Problems Computing Laboratory Basics of Python - I Malay Bhattacharyya Assistant Professor Machine Intelligence Unit Indian Statistical Institute, Kolkata December, 2020 Malay Bhattacharyya Computing Laboratory Outline Introduction Data Types Operators and Expressions Control Flow Problems 1 Introduction 2 Data Types 3 Operators and Expressions 4 Control Flow 5 Problems Malay Bhattacharyya Computing Laboratory Python is an interpreted language. Python is not a free-form language. Python is a strongly typed language. Python is an object-oriented language but it also supports procedural oriented programming. Python is a high level language. Python is a portable and cross-platform language. Python is an extensible language. Note: The reference implementation CPython is now available on GitHub (see: https://github.com/python/cpython). This is no more updated. Outline Introduction Data Types Operators and Expressions Control Flow Problems Basic characteristics Python is a free and open source language, first written in C. Malay Bhattacharyya Computing Laboratory Python is not a free-form language. Python is a strongly typed language. Python is an object-oriented language but it also supports procedural oriented programming. Python is a high level language. Python is a portable and cross-platform language. Python is an extensible language. Note: The reference implementation CPython is now available on GitHub (see: https://github.com/python/cpython). This is no more updated. Outline Introduction Data Types Operators and Expressions Control Flow Problems Basic characteristics Python is a free and open source language, first written in C. Python is an interpreted language. Malay Bhattacharyya Computing Laboratory Python is a strongly typed language.
    [Show full text]