Wednesday, August 15, 2007

Experiments/Program Codes - Final Year Computer Engineering ( 7th Sem )

This section contains some of my programs that I had written during my final year in computer engineering. The program codes are absolutely free and can be copied and redistributed by anyone. I hope this section proves to be helpful for the B.E. Computer Engineering students.

Single Deletion Error Detection and Correction

Aim: To detect and correct single deletion error in the given Assembly Language Program.

Programming Language used: C++

Compiler required: GCC/G++

Written during: Final Year of Engineering (2006)

Subject: Language Translators

Input file: /root/lt/1_sde/alp.txt

START
MRV AREG TEN
MOVM AREG TOTAL
MOVR BREG TWO
MOV BREG EVEN
MOV BREG ZERO
MOVM BREG SUM
MOVR BREG SUM
AD BREG EVEN
MVM BREG SUM
MOR CREG EVEN
AD CREG TWO
MOVM CREG EVEN
MOVR DREG TOTAL
DV DREG ONE
MOVM DREG TOTAL
COP DREG ONE
BC GT BACK
MOR BREG SUM
MUL BREG SUM
MOVM BREG SUM
WITE SUM
STOP
TEN DC '10'
ZERO DC '0'
EVEN DS 2
SUM DS 2
TOTAL DS 2
TWO DC '2'

END

Download Code

Left Recursion Removal

Aim: To read a set of production rules in a context free grammer and to identify and remove left recursions.

Programming Language used: C++

Compiler required: GCC/G++

Written during: Final Year of Engineering (2006)

Subject: Language Translators

Download Code

LEX Specification Program 1

Aim: Write a LEX Specification Program to produce the statistics like number of statements, characters, words, special characters, percentage of vowels and percentage of delimiters.

Written during: Final Year of Engineering (2006)

Subject: Language Translators

Download Code

LEX Specification Program 2

Aim: Write a LEX Specification Program to reverse the given code sample.

Written during: Final Year of Engineering (2006)

Subject: Language Translators

Download Code

Parsing using Predictive Parsing Table

Aim: To parse a string using predictive parsing table.

Programming Language used: C++

Compiler required: GCC/G++

Written during: Final Year of Engineering (2006)

Subject: Language Translators

Download Code

Basic Blocks in a Qquadruple

Aim: To identify the basic blocks in the given quadruple.

Programming Language used: C++

Compiler required: GCC/G++

Written during: Final Year of Engineering (2006)

Subject: Language Translators

Input file: /root/lt/6_quad/input.txt

01: location=-1
02: i=0
03: if(i<100)>
04: goto 13
05: t1=4*i
06: t2=A[t1]
07: if(t2=x) goto 09
08: goto 10
09: location=i
10: t3=i+1
11: i=t3
12: goto 03

13: -

Download Code

Domain Name Server

Aim: To implement Domain Name Server.

Programming Language used: Java

Written during: Final Year of Engineering (2006)

Subject: Distributed Operating System

Download Code

Single Client Single Sever

Aim: To implement Single Client and Single Sever.

Programming Language used: Java

Written during: Final Year of Engineering (2006)

Subject: Distributed Operating System

Download Code

Remote Method Invocation

Aim: To implement Remote Invocation Method.

Programming Language used: Java

Written during: Final Year of Engineering (2006)

Subject: Distributed Operating System

Download Code

Berkeley’s Algorithm

Aim: To implement Berkeley’s Algorithm.

Programming Language used: C++

Compiler required: Turbo C/C++

Written during: Final Year of Engineering (2006)

Subject: Distributed Operating System

Download Code

No comments: