Assignment 1: Submitted by

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

System Programming(BTCS- 1

405A)Session :Jan-May,2018

Assignment 1
I. Brief Study on System Programming Languages
II. The Compiler: A Literature Review
I. Future Trends on Assembler

Submitted By:
HIMANSHU PATEL,160280644
A , A2
Submitted To:
Mr. Malkeet Singh
Assistant Professor, CSE Dept.

SHAHEED BHAGAT SINGH STATE TECHNICAL CAMPUS


Moga Road (NH-95), Ferozepur-152004
March-2018

1
System Programming(BTCS- 2
405A)Session :Jan-May,2018

➢ Brief Study On System Programming Language

• System programming language

A system programming language usually refers to a programming language used for system
programming; such languages are designed for writing system software, which usually requires
different development approaches when compared with application software.
System software is computer software designed to operate and control the computer hardware,
and to provide a platform for running application software. System software includes software
categories such as operating systems, utility software, device drivers, compilers, and linkers.

• Features
In contrast with application languages, system programming languages typically offer more-
direct access to the physical hardware of the machine: an archetypical system programming
language in this sense was BCPL. System programming languages often lack built-in
input/output (I/O) facilities because a system-software project usually develops its own I/O
mechanisms or builds on top of basic monitor I/O or screen management facilities. The
distinction between languages used for system programming and application programming
became blurred over time with the widespread popularity of PL/I, C and Pascal.

• History

o Mid-level languages
Mid-level languages have much of the syntax and facilities of a higher level language, but also
provide direct access in the language (as well as providing assembly language) to machine
features. ESPOL on Burroughs mainframes in about 1960, followed by Niklaus Wirth's PL360.

o Higher-level language
Languages such as C/C++ were developed, where the combination of features was sufficient to write system
software, and a compiler could be developed that generated efficient object programs on modest hardware.
Such a language generally omits features that cannot be implemented efficiently, and adds a small number of
machine-dependent features needed to access specific hardware capabilities; inline assembly code, such as C's
asm statement, is often used for this purpose.

2
System Programming(BTCS- 3
405A)Session :Jan-May,2018

o Lower level language


Languages such as assembly level language are lower level languages. System programs written in these
languages are too bulky but more easy to execute and faster than any other type of languages.

 Evolution of system programming languages

Language Originator Birth date Influenced by Used for


ESPOL Burroughs Corp. 1961 Algol 60 MCP
PL/I IBM, SHARE 1964 Algol, FORTRAN Multics
PL360 Niklaus Wirth 1968 Algol 60 Algol W
C Dennis Ritchie 1969 BCPL kernels, Windows
Unix
PL/S IBM 196x PL/I OS/360
BLISS Carnegie Mellon 1970 Algol-PL/I[5] VMS (portions)
PL-6 Honeywell, Inc. 197x PL/I CP-6
C++ Bjarne Stroustrup 1979 C, Simula C++ Applications
Ada Jean Ichbiah, S. 1983 Algol 68, Pascal, OS kernels,
Tucker Taft C++, Java, Eiffel compilers, games,
simulations.
D Digital Mars 2001 C++ Multiple domains
Nim Andreas Rumpf 2008 Ada, Modula-3, OS kernels,
Lisp, C++, Object compilers, games
Pascal.
Rust Mozilla Research 2010 C++, Haskell, Servo layout
Erlang, Ruby engine, Redox O
Swift Apple Inc. 2014 C, Objective-C, macOS, iOS app
Rust development

3
System Programming(BTCS- 4
405A)Session :Jan-May,2018

 Future of system programming languages


Keeping in mind the current scenario and trends in system programming languages we can
predict some programming languages the play a crucial role in the enhancement of future
software technologies. These languages will also be use largely for development of system
programs.

Top 5 languages that have bright future are give below


▫ Elm is becoming popular within the JavaScript community, primarily among those who
prefer functional programming, which is on the rise. Like Babel, TypeScript, and Dart,
Elm transpires to JavaScript.
▫ Rust is a systems programming language meant to replace a lot of C and C++
development—which is why it's surprising to see this language's popularity growing the
fastest among web developers. It makes a little more sense when you find out that the
language was created at Mozilla.
▫ Kotlin has been around for about five years, but it finally reached the production-ready
version 1.0 this year. Although it hasn't achieved the popularity of Scala, Groovy, or
Clojure—the three most popular and mature (non-Java) JVM languages—it has separated
itself from the myriad other JVM languages . Another major reason Kotlin has a bright
future—you can easily build Android apps with it.
▫ Crystal is another language that hopes to bring C-like performance into the highly
abstracted world of web developers. Crystal is aimed at the Ruby community, with a
syntax that is similar to and, at times, identical to Ruby's. As the already large number of
Ruby-based startups continues to grow, Crystal could play a key role in helping take
those applications' performance to the next level.
▫ Elixir also takes a lot of inspiration from the Ruby ecosystem, but instead of trying to
bring C-like benefits, it's focused on creating high-availability, low-latency systems—
something Rails has had trouble with, according to critics. The Phoenix application
framework for Elixir—more than any piece of this blooming ecosystem—has given this
language legs.

4
System Programming(BTCS- 5
405A)Session :Jan-May,2018

➢ The Compiler : A Literature Review.


Definition : A Compiler is a system program which is used to convert a program written in
high level language to a low level language code .Then this low language code is given to
assembler as a input and then we get a object code from assembler as a output code .

• O LEVEL DIAGRAM OF COMPILER

• History of compiler
The first real multi-purpose, the ENIAC, was programmed by flipping switches and moving
wires. Computers have come a long way since then. They can now read programs directly off
of a hard disk or other media and those programs can be written and compiled on the
machine itself. Much of this is thanks to the work of Eckert, Mauchley, and von Neumann.
This idea of writing an extremely general computer and simply storing the program in
memory is called the von Neumann architecture.
Compiler technology evolved from the need for a strictly defined transformation of the high-
level source program into a low-level target program for the digital computer. The compiler
could be viewed as a front end to deal with analysis of the source code and a back end to
synthesize the analysis into the target code.
Some early milestones in the development of compiler technology:
➢ 1952 – An Autocode compiler developed by Alick Glennie for the Manchester Mark I computer
at the University of Manchester is considered by some to be the first compiled programming
language.
➢ 1952 – Grace Hopper's team at Remington Rand wrote the compiler for the A-0 programming
language
➢ 1954-1957 – A team led by John Backus at IBM developed FORTRAN which is usually
considered the first high-level language. In 1957, they completed a FORTRAN compiler that is
generally credited as having introduced the first unambiguously complete compiler.
➢ 1959 – The Conference on Data Systems Language (CODASYL) initiated development of
COBOL. The COBOL design drew on A-0 and FLOW-MATIC.

5
System Programming(BTCS- 6
405A)Session :Jan-May,2018

 What is compiler today


In current growing world compiler have lots of uses and applications. There are various types
of compliers currently some main uses are listed below

Uses of Compilers
o Code generation: To translate a program in a high-level language to machine code for a
particular processor
o Optimization: Improve program performance for a given target machine Text formatters:
translate Text to dvi, dvi to postscript, etc.
o Interpreters: “on-the-fly” translation of code, e.g., Java, Perl, csh, Postscript Automatic
parallelization or vectorization
o Debugging aids: e.g., purify for debugging memory access errors Performance
instrumentation: e.g., -pg option of cc or gcc for profiling
o Security: JavaVM uses compiler analysis to prove safety of Java code
o Many more cool uses! Power management, code compression, fast simulation of
architectures, transparent fault-tolerance, global distributed computing
Types of compilers
1. Cross Compiler :A cross compiler gives you the advantage of creating code that could be
run on machines other than the one on which source is compiled .
Almost all the compilers we use today are cross compilers .

2. Source to source compiler :As the name suggests such compilers convert the source code
written in one programming language into another programming language that operates at
almost same level of abstraction .
3. Decompiler:Now they are interesting , these compilers decompile the code , that is convert
machine language to source code but at a relatively low level of abstraction . They are an
important tool in software reverse engineering .

Compiler challenges
• The growing complexity of machines and software, introduction of multicores, and
concern over security are among the more serious problems that a compiler faces
• Program optimization. We live in the era of multicore processors; from now on, clock
frequencies will rise slowly if at all, but the number of cores on processor chips is likely
to double every couple of years. Therefore, by 2020, microprocessors are likely to have
hundreds or even thousands of cores, heterogeneous and possibly specialized for different
functionalities. Exploiting large-scale parallel hardware will be essential for improving an
application’s performance or its capabilities in terms of execution speed and power

6
System Programming(BTCS- 7
405A)Session :Jan-May,2018

consumption. The challenge for compiler research is how to enable the exploitation of the
power of the target machine, including its parallelismArchitectural complexity (unhand
multicore) grows to support performance, and compiler optimization must bridge this
widening gap. Compiler fundamentals are well understood now, but where to apply what
optimization has become increasingly difficult over the past few decades. Compilers
today are set to operate with a fixed strategy

Future of compilers
1. No Explicit Types: First, there will be no syntactic difference between statically and
dynamically typed languages. You will not have to specify type for any variable
explicitly. A simple language implementation will use dynamic typing, and a more
complex one will statically infer the types to generate better code.
2. Choosing Optimal Data Structure: Compilers will be able to statically analyze the code and
choose the most appropriate data structure. For example, if an array is only used as stack ,
a linked list may be better than a hash table or an array.
3. Background Incremental Compilation: This incremental compiler will have to do more
work than the current compilers, because the previous versions of compiled functions will
be often thrown away. However, it will compile the code while it is edited, so the
programmer will not have to wait for the compilation.

Advanced compiler technologies


The Advanced Compiler Technologies group focuses on advancing the state of the art in
exploitation of multi-core parallelism, performing better parallelization via polyhedral compiler
technologies.
Parallelism exploitation is not limited to homogenous multi-cores, as demonstrated with our prior
work on the Cell processor. Our ongoing project on OpenCL program optimization now aims at
bringing the full range of loop optimizations available in IBM compilers to a wide range of
applications.
In the presence of high memory latencies in a thread-rich environment, we have developed an
assist thread technology that prefetches delinquent loads using self-throttling assist threads.
IBM is also working on a rapid prototyping compiler platform that provides a single common
Java/Eclipse interface to all of our optimizing compiler components. A single Java transform can
be applied to both high-level optimizations as well as low level compiler back.
OpenCL:OpenCL is emerging as a standard for programming accelerators, and more generally,
heterogeneous many-core architectures of future compilers. IBM research work spans two

7
System Programming(BTCS- 8
405A)Session :Jan-May,2018

complementary aspects related to OpenCL. The first is on using the Polyhedral Loop Optimization
techniques to provide portable high performance for OpenCL code. The second is on automatic
generation of OpenCL kernels from high-level parallel programs such as OpenMP

OpenXL :The OpenXL Framework is an Eclipse plugin that allows users to interface with the
IBM XL compiler. The framework defines a set of invocation points that correspond to specific
intermediate points in the XL compilation process. At each invocation point, OpenXL enables
users to inspect and modify the intermediate compiled code. Code is always presented to the user
using a single, common interface, irrespective of the different internal code representations used
by sub-components of the XL compiler.

Multi-core optimizations:IBM have developed a new loop transformation and automatic


parallelization framework based on the polyhedral model in IBM's XL compilers.

SIMD:IBM are continuing to refine our automatic SIMD code generation technology, as well as
investigating hardware and compiler techniques that can extend the applicability of SIMD to a
wider range of applications.
Melting ice technology of compiler
Types of compilation provided by Melting Ice
EiffelStudio relies on Melting Ice Technology, the proprietary compilation mechanism of Eiffel
Software, which offers three forms of compilation: melting, freezing, and finalizing.
Melting
Melting is used for making a few changes during typical development activity. The fastest of the
mechanisms, typically taking a few seconds after small changes. Melting time is proportional to
the size of the changed parts and affected classes, while the time needed to freeze or finalize is
partly proportional to the size of the whole system. As long as you do not include new external
C/C++ code, a C/C++ compiler is not required. However, execution speed is not optimal. The
generated executable is debuggable.
Freezing
Freezing generates C code from the active system, and then compiles it into machine code; you
must have a C/C++ compiler installed. You need to use this option if you add new agents or
external C/C++ calls. Unless you add external code, you can re-freeze every couple of days. The
rest of the time, you can melt your software to receive immediate feedback. The speed is still
slower than when finalizing, but the generated executable is still debuggable.
Finalizing

8
System Programming(BTCS- 9
405A)Session :Jan-May,2018

Finalizing delivers a production version (intermediate or final) of your software. It can be used to
measure its performance in operational conditions. Finalization performs extensive time and
space optimizations that enable Eiffel to match the efficiency of C/C++; it also creates a stand-
alone C package that you can use for cross-platform development. Because of all the
optimizations involved, finalizing takes the most time, and the generated executable is not
debuggable.
Precompiling
Precompilation allows you to create a library in which the classes are already compiled, so when
it is used, compile times are decreased. EiffelStudio comes with optional precompiled forms of
commonly used libraries. For example, in the Microsoft Windows distribution you can opt for
precompiled EiffelBase, or WEL + EiffelBase, or EiffelVision 2 + WEL + EiffelBase. As
indicated by these options, the precompilation of a library must also include any other library
upon which the target library depends. In other words, it would not be pos
SOME POPULAR COMPILERS:
1.PASCAL Compiler : In Pascal compiler,the lexical analyser marks the possible errors and
produces a stream of tokens of the next phase. The next phase uses the predictive translator and
type checker.
2. C Compiler: A C Compiler accepts source code written in C programming language and then
perform a lexical syntax analysis tasks. After that, it produces intermediate Code in assembly
language as well as in postfix or prefix forms for expressions . A code generator accepts this
intermediate Code and produces another program in assembly language.
3. FORTAN Compiler : The first phase of compiler accepts the source program .It include
lexical analysis comprising COMMON EQUIVALENCE etc. The output includes operand
operand pairs. The next phase performs the syntax analysis ,data flow analysis, and assignment
of address to names on the output of the first phase.

9
System Programming(BTCS- 10
405A)Session :Jan-May,2018

➢ Future trends in assemblers


Definition : Assembler is system program the converts a source code written in assembly
language to object code.

Molecular assembler
A molecular assembler is a molecular machine capable of assembling other molecules given
instructions, energy, and a supply of smaller "building block" molecules to work from. They can
work individually as tiny stand-alone systems, or potentially be organized in large numbers to form
a desktop-scale nanofactory able to build macroscopic products. Distinction is sometimes made
between synthetic and naturally occurring molecular assemblers.
In cellular biology, the ribosome demonstrates the essential principles of a molecular assembler.
Working within a cell's environment, it reads strands of mRNA as its instructions and assembles
specific large protein molecules out of more fundamental parts.

Synthetic assembler

10
System Programming(BTCS- 11
405A)Session :Jan-May,2018

Synthetic assemblers have not yet been constructed, and some controversy exists as to whether
they are possible or what their ecological impact might be. The potential uses of synthetic
assemblers could be more general, and are thought to be especially applicable to materials scienc
There are two entwined controversies surrounding the creation of artificial or synthetic molecular
assemblers. The first is whether they can be built or even exist. Secondarily, if they can be built,
then what is the potential ecological impact and the what are the appropriate political or regulatory
responses.

Micro assembler
A micro assembler is a computer program that helps prepare a microprogram, called firmware,
to control the low level operation of a computer in much the same way an assembler helps prepare
higher level code for a processor. The difference is that the microprogram is usually only
developed by the processor manufacturer and works intimately with the computer hardware. On a
microprogrammed computer the microprogram implements the operations of the instruction set in
which any normal program (including both application programs and operating systems) is written.
The use of a microprogram allows the manufacturer to fix certain mistakes, including working
around hardware design errors, without modifying the hardware. Another means of employing
micro assembler-generated microprograms is in allowing the same hardware to run different
instruction sets. After it is assembled, the microprogram is then loaded to a control store to become
part of the logic of a CPU's control unit.

11

You might also like