ENGLISH

Introduction to Programming using SML

Book information

Publisher
Addison-Wesley
Year
1999
ISBN
0201398206
Language
english
Format
PDF
Filesize
10 MB (10620712 bytes)
Pages
372\372
Time added
2021-06-26 05:25:18

Description

Introduction to Programming using SML provides a thorough introduction to the principles of programming and program design using the Standard ML programming language. The emphasis throughout is to p of programming into practice. The examples and exercises teach the student how to apply basic theoretical concepts to produce succinct and elegant programs and program designs. Coverage includes an introduction to fundamental data structures and their applications. The notions of binding, environment, store, closure and evaluation are introduced in order to explain the meaning of programs in an informal but precise way. Thus, the authors provide the reader with a set of durable programming concepts which will exist well into the next generation of programming languages. Features of the book include: Attractive and reader-friendly presentation Clear and careful explanations A rich collection of programming problems and a wide variety of examples Coverage of modelling and abstraction using data structures and the SML module system Overview and statement of objectives at the start of each chapter An introduction to producing technical documentation based on the SML module system Extensive material in the appendices covering the SML language and module system and selected parts of the SML basis library Accompanying Web Site supporting the book, containing all the program code, further teaching material and links to SML systems and other useful resources Cover Title Page Dedication Table of Contents Preface 1 Getting started 1.1 Values, types, identifiers and declarations 1.2 Simple function declarations 1.3 Comments 1.4 Recursion 1.5 The power function 1.6 About types and type checking 1.7 Bindings and environments 1.8 Summary Exercises 2 Basic values and operators 2.1 Integers and reals 2.2 Expressions, precedence, association 2.3 Euclids algorithm 2.4 Evaluations with environments 2.5 Characters and strings 2.6 Truth values 2.7 The if-then-else expression 2.8 Overloaded operators 2.9 Type inference 2.10 Summary Exercises 3 Tuples and records 3.1 Tuples 3.2 Tuple patterns 3.3 Infix functions on pairs 3.4 Records 3.5 Record patterns 3.6 Type declarations 3.7 Locally declared identifiers 3.8 Summary Exercises 4 Problem solving I 4.1 Problem statement: rational numbers 4.2 Solution 1 4.3 Solution 2 4.4 Comparing the solutions 4.5 A solution using records 4.6 Summary Exercises 5 Lists 5.1 Building lists 5.2 The cons operator 5.3 List patterns 5.4 Append and reverse; polymorphic types 5.5 Polymorphic values 5.6 A library of list functions 5.7 Membership; equality types 5.8 Type inference 5.9 Summary Exercises 6 Problem solving 11 6.1 Problem analysis: cash register 6.2 Programming 6.3 Test 6.4 Summary Exercises 7 Tagged values and partial functions 7.1 Datatype declarations 7.2 The case-expression 7.3 Enumeration types 7.4 The order type 7.5 Partial functions: the option datatype 7.6 Exception handling 7.7 The Eight Queens problem 7.8 Summary Exercises 8 Finite trees 8.1 Chinese boxes 8.2 Symbolic differentiation 8.3 Trees of ancestors; traversal of a tree 8.4 Mutual recursion 8.5 Parameterized datatypes 8.6 Electrical circuits 8.7 Abstract types 8.8 Summary Exercises 9 Higher-order functions 9.1 Expressions denoting functions 9.2 Value declarations of recursive functions 9.3 The map function 9.4 Declaring higher order functions 9.5 Higher-order list functions 9.6 Functional composition 9.7 Tree recursion 9.8 Type inference for higher-order functions 9.9 Closures 9.10 Static binding 9.11 Lazy evaluation 9.12 Summary Exercises 10 Finite sets 10.1 A representation of sets 10.2 Operations on sets 10.3 An abstype for sets 1 0.4 Other representations of sets 10.5 Summary Exercises 11 Modules 11.1 Structures 11 .2 Specifkations and signatures 11.3 Signatures and structures 11 .4 Further facilities 11.5 Fixity of identifiers 11 .6 Functors 11 .7 Summary Exercises 12 Tables 12.1 The table concept 12.2 A representation of tables 12.3 Operations on tables 12.4 Summary Exercises 13 Problem solving III 13.1 Problem analysis 13.2 A sample run 13.3 Programming 13.4 Test 13.5 Summary Exercises 14 Input/output in SML 14.1 Input streams 14.2 Output streams 14.3 Simple input and output 14.4 Use of conversions 14.5 Sequential composition 14.6 Input/output of composite data 14.7 Input with prompt and validation 14.8 Summary Exercises 15 Interactive programs 15.1 A quiz program 15.2 Actions 15.3 Action schemas 15.4 Functions for action schemas 15.5 Dialogue automaton 15.6 Dialogue program 15.7 Action refinement 15.8 Summary Exercises 16 Problem solving IV 16.1 Problem analysis 16.2 Programming 16.3 Test 16.4 Summary Exercises 17 Iteration 17.1 Resource measures 17.2 Two problems 17.3 Solutions: accumulating parameters 17.4 Iteration 17.5 Summary Exercises 18 Imperative programming 18.1 The store 18.2 Operations on the SML store 18.3 References and polymorphism 18.4 Arrays 18.5 The while loop 18.6 Imperative data structures 18.7 Summary Exercises Appendices A SML systems B Overview of Standard ML B.1 Lexical conventions B.2 Syntax B.3 Value, environment and store B.4 Types B.5 Semantics C Overview of the SML module system C.1 Lexical conventions C.2 Syntax C.3 Interfaces and environments C.4 Semantics D Selected parts of the SML basis library D.1 General D.2 Numbers D.3 Characters and strings D.4 Lists D.5 Vectors D.6 Arrays D.7 Timers and time D.8 Date D.9 Conversions D.10 Text input D.11 Text output E Modules of sets and tables E.1 Sets E.2 Tables E.3 Signatures E.4 Structures F The ASCII alphabet G Further reading Index

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF