Natural and programming languages 07.01.2008 v0.2 – initial draft, Pikaro Tarmo 11.02.2011 v0.3 – updated, Pikaro Tarmo.

Slides:



Advertisements
Similar presentations
GCSE Computing Lesson 5.
Advertisements

Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Software & Services Group, Developer Products Division Copyright© 2010, Intel Corporation. All rights reserved. *Other brands and names are the property.
Compilers and Language Translation
CIS 101: Computer Programming and Problem Solving Lecture 8 Usman Roshan Department of Computer Science NJIT.
CS 330 Programming Languages 10 / 16 / 2008 Instructor: Michael Eckmann.
A Compiler-Based Approach to Schema-Specific Parsing Kenneth Chiu Grid Computing Research Laboratory SUNY Binghamton Sponsored by NSF ANI
CS 330 Programming Languages 09 / 13 / 2007 Instructor: Michael Eckmann.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
SM3121 Software Technology Mark Green School of Creative Media.
Course Instructor: Aisha Azeem
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
Database Management Systems (DBMS)
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Elements of Computing Systems, Nisan & Schocken, MIT Press, 2005, Chapter 10: Compiler I: Syntax Analysis slide 1www.idc.ac.il/tecs.
Language Evaluation Criteria
PROGRAMMING LANGUAGES The Study of Programming Languages.
CS 355 – Programming Languages
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
ICS611 Introduction to Compilers Set 1. What is a Compiler? A compiler is software (a program) that translates a high-level programming language to machine.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
COP4020 Programming Languages
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Types for Programs and Proofs Lecture 1. What are types? int, float, char, …, arrays types of procedures, functions, references, records, objects,...
Chapter 10: Compilers and Language Translation Invitation to Computer Science, Java Version, Third Edition.
Software Overview. Why review software? Software is the set of instructions that tells hardware what to do The reason for hardware is to execute a program.
Language processors (Chapter 2) 1 Course Overview PART I: overview material 1Introduction 2Language processors (tombstone diagrams, bootstrapping) 3Architecture.
From Code to XLIFF Bridging the Chasm Dr. Stephen Flinter Connect Global Solutions LRC Conference – 19 November 2003.
1 COMP 3438 – Part II-Lecture 1: Overview of Compiler Design Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
SE: CHAPTER 7 Writing The Program
Copyright © Curt Hill Languages and Grammars This is not English Class. But there is a resemblance.
Schematron Tim Bornholtz. Schema languages Many people turn to schema languages when they want to be sure that an XML instance follows certain rules –DTD.
The course. Description Computer systems programming using the C language – And possibly a little C++ Translation of C into assembly language Introduction.
Introduction to Compilers. Related Area Programming languages Machine architecture Language theory Algorithms Data structures Operating systems Software.
Topic #1: Introduction EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
The Software Development Process
Chapter 1 Introduction. Chapter 1 -- Introduction2  Def: Compiler --  a program that translates a program written in a language like Pascal, C, PL/I,
Programming Fundamentals Lecture No. 2. Course Objectives Objectives of this course are three fold 1. To appreciate the need for a programming language.
 Programming - the process of creating computer programs.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Introduction to OOP CPS235: Introduction.
What is a compiler? –A program that reads a program written in one language (source language) and translates it into an equivalent program in another language.
1 Languages and Compilers (SProg og Oversættere) Bent Thomsen Department of Computer Science Aalborg University With acknowledgement to Norm Hutchinson.
Compiler Construction CPCS302 Dr. Manal Abdulaziz.
LECTURE 3 Compiler Phases. COMPILER PHASES Compilation of a program proceeds through a fixed series of phases.  Each phase uses an (intermediate) form.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
ICS312 Introduction to Compilers Set 23. What is a Compiler? A compiler is software (a program) that translates a high-level programming language to machine.
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
Certification of Reusable Software Artifacts
Advanced Computer Systems
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Chapter 1 Introduction.
Introduction to Compiler Construction
Types for Programs and Proofs
PROGRAMMING LANGUAGES
SOFTWARE DESIGN AND ARCHITECTURE
Chapter 1 Introduction.
Want to Write a Compiler?
CS105 Introduction to Computer Concepts Intro to programming
Java Programming Introduction
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Chapter 1 Introduction.
Lecture One: Automata Theory Amjad Ali
Presentation transcript:

Natural and programming languages v0.2 – initial draft, Pikaro Tarmo v0.3 – updated, Pikaro Tarmo

Language categories Natural languageArtificial natural language (Esperanto, Toki Pona, Lojban) Programming language How easy to understandNative – tends to be be simplest to understand. ”communication usually fails, except by accident”-saying. Native language suffers from being non-clear (E.g. politics), and fails as a result communication. Tries to address some problems available in natural language Tends to be more cryptic than native Structured better than natural Has a clear structure (or design/architecture) Tends to follow pattern ”exception from exception”- pattern. No clear structurization. Computer based text parsers are too complex. (E.g. lex, yacc) Clear structure exists, design decisions are not necessarily documented. Natural languages cannot be used as programming language Clear structure exists, however language architecture/design even if exists, is not necessarily documented properly.

Definition: URL: Huge amount of artificially created programming languages: C, C++, perl, python, assembler, java, C# and so on… Software development walks in hand-by-hand with natural language – use of clear, consistent, self-describing terminology improves software quality, simplifies communication between development teams. Reference links: –The Importance Of Terminology URL: –Case study: Good documentation reduces costs and increase sales URL: Programming itself does not involve code writing on programming language – it involves documentation as well, for example GNU coding standards require documentation to be written: URL: If software is not documented properly – the worst case scenario is to end up something analogue to: –The International Obfuscated C Code Contest - URL: (Highly complicated code, which is understood only by compiler, not by people who read it) –Symbian OS Design Faults, URL: Programming language by itself is nothing without natural language. Programming languages and software development

Definition: URL: Lack of clear language structure, mostly bounded to history. Takes time to learn. Can be easily misused and misunderstood - for example ‘politics’ is quite often associated with “does not end up anywhere” kind of discussion. “Communication usually fails except by accident” Synonyms (words with similar meaning) quite often makes it more difficult to identify what is common and what is uncommon for example in software development. (Pollute the language) Natural languages and communication

Definition: URL: Quite often designed with some particular idea in mind, suitable for people & communication. Commonly not-widely used – because each language learning takes it’s time. Language: Lojban –URLs: index.php?page=Home+Page&blhttp://en.wikipedia.org/wiki/Lojbanhttp:// index.php?page=Home+Page&bl –Not used very widely. Designed to simplify computer parsing. Cannot be used as programming language. Language: Toki Pona –URL: –Simplified natural language, which demonstrates how efficiently language can be organized – language itself contains only 118 words. –There already exists an attempt to use this language in psychology. Language: Inform 7 –URL: –Attempts to use English as a basis to be able to write literature. Artificial natural languages (or constructed language)

Learning each language takes time, no matter whether it’s programming language or natural language – it’s time for language to offer more than it’s normally offering – meaning natural language and programming language must be merged together. The desired new language – let’s call it ‘Simple language’ (for time being) should possess features of natural languages (e.g. being native and easily understandable) and features programming language (being able to run on computer). Starting point of new language design is English (natural). If it does not corresponds to language design needs – it needs to be tweaked in right direction. (Modularization and structurization) Conclusion

Every (programming and natural) language has certain lexicon and semantics. Lexicon and semantics of language allows or permits sentence expression flexibility – what you can and cannot express in that language. Natural language typically has more flexible rules over programming language, allowing language to be ”compressed” – you can use fewer words to express more information. This flexibility comes with cost – sentence which is understandable by first person, cannot be understood by another person. Language also reflects to our mindset. We typically think ”in natural language”. Language misuse allows language ”shortcut” to happen – like terrorism. Natural language: More ideas

Being able to use as natural language (native) Being able to use as programming language (understood by machine) As easy to use as possible. Clear, consistent, understandable As simply structured as possible. It should be possible to learn it – for example in parallel with normal natural language – e.g. by having user interface, which would display English and simple language correspondent words in parallel. Simple language must be designed for people from people perspective, not for computer / compiler architectures. All design subjects and decisions needs to be documented from very beginning – in case if language would need to be redesigned/restructured from some point. Simple language requirements

Main data types, will be similar to perl-language: ( Scalar (= String or integer or Array Hash / associative array Generalized into ’Word’ (Same as programming language’s ’variable’) Any more complex data structure will be subset of those three types. (Complex ”type trees” as well) Design: Typically in C we operate on structures – they are hashes, optimized for processor access. C++ libraries provide wide range of data types, like stl::string, stl::vector – however – all of them lacks of structure recursion. (Hash of hashes of arrays of hashes of scalars…) Simple language: “Words” of simple language

Each program should be possible to re-structure into complex type tree using simple language ”words”. Back translation into original language (for example source code generation) should be provided. Simple language compiler will consists of: Bootstrap (in ansi C) – modules responsible for ”bootstrapping” simple language processor / compiler Simple language (in simple language) – main modules responsible for everything else. (Code / source generation) Design: Help to improve existing software development. Simple language: Compiler / generator

… Notes to myself…

Some useful links on data type reflection: Java suffers from its slowness, and reflection is one of the reasons java became so slow in first place. URL: C# type information - see previous pages (on intermediate language) XML is a brand new technology, which heavily suffers from over abstraction and unnecessary complexity. W3C XML Schema provides something similar to type information. XSD links: URL: URL: Relax NG: URL: –RelaxNG compared to W3C XSD specification: Nemerle, a new language born with.NET / C# platform, provides its own type information availability. URL: (Quite good pictures of a type tree) Software: Data type reflection