130 likes | 805 Views
DCSPM : Develop and Compile Subset of PASCAL Language to MSIL. Master Project Proposal Abdullah Sheneamer MSCS Graduate Candidate Committee members: Dr. Albert Glock Dr. Edward Chow Albert brouillette Spring 2012. Outline. Introduction to MSIL Why PASCAL to MSIL PASCAL Compiler
E N D
DCSPM: Develop and Compile Subset of PASCAL Language to MSIL Master Project Proposal Abdullah Sheneamer MSCS Graduate Candidate Committee members: Dr. Albert Glock Dr. Edward Chow Albert brouillette Spring 2012 Abdullah Sheneamer Master project proposal
Outline Introduction to MSIL Why PASCAL to MSIL PASCAL Compiler Project Plan Verify Compilation Results Tasks References Abdullah Sheneamer Master project proposal
Introduction to MSIL Microsoft intermediate language(MSIL) is the lowest-level human readable programming language defined by the Common Language Infrastructure (CLI) specification and .NET Framework (MSIL) includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations. Abdullah Sheneamer Master project proposal
Why PASCAL to MSIL - Allow PASCAL to run on .NET platform - Study how compiler in .NET environment work - PASCAL can now be run on modern machines - MSIL is platform independent - JIT compilers can be optimized for specific machines and architectures Abdullah Sheneamer Master project proposal
PSCAL Compiler Compilation process: takes a PASCAL source code and produce (MSIL) Microsoft intermediate language. Execution process: MSIL must be converted to CPU-specific code, usually by a just-in-time(JIT) Compiler . Native code is computer programming (code) that is compiled to run with a particular processor (such as an Intel x86- class processor) and its set of instructions. Abdullah Sheneamer Master project proposal
Compilation Process Symbol Table PASCAL Source Code Lexical Analysis Error Handler Parser MSIL Abdullah Sheneamer Master project proposal
Project Plan • Design and Implement subset of PASCAL language Lexical analysis, Parser. ( 3Weeks) . Lexical is done. Parser almost is done • Design and Compile Assignment statement to MSIL such as “ a:=b+c/d-e “ or “ a:=5; “ ( 2 Weeks) • Writeln Statement and Readln Statement such as “ writeln('This writeln is compiled into MSIL '); “ ( 2 Weeks) . Writeln statement is done • , If statement such as “If variable1 > , < ,= ,>=,<= variable2 Then Begin variable3 := variable1*variable2; End; “ (3 weeks) • Design and Compile If/Else Statement to MSIL such as “If variable1 > / < / = / >=/<= Number Then Begin variable3 := variable1+,-,*,/ variable2; End Else Begin Writeln(‘ Condtitional statement’); End “ ( 1 week) Abdullah Sheneamer Master project proposal
Project Plan • Design and Compile While Statement to MSIL such as “While Variable1 >,<.,=,<=,>= Number Do Begin Writeln(‘ While Statement’); Variable1:= Variable1 + 1; End;” (3 Weeks) • Design and Compile For Statement to MSIL such as “For I:= Number To Number Do Begin If variable1 > , < ,= ,>=,<= variable2 Then Begin Writeln(‘ Conditional statement ‘) End; ( 3 Weeks) * Design and Compile Switch statement to MSIL such as “Case Variable of Value1 Writeln(‘A’); Case Variable of Value2 Writeln(‘B’); Case Variable of Value3 Writeln(‘C’); Else Writeln(‘D’); End “ ( 4 Weeks) Abdullah Sheneamer Master project proposal
Project Plan Improve subset of PASCAL Compiler and MSIL by observing the performance. Evaluate the compiler design and Test the compiler results by comparing. Abdullah Sheneamer Master project proposal
Verify Compilation Results • ildasm.EXE: Converts IL to human readable code • C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin • ILASM.EXE: Converts human readable code to IL C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 • Or C:\Windows\Microsoft.NET\Framework\v2.0.50727 Abdullah Sheneamer Master project proposal
Tasks 1- A working c# based PASCAL compiler. 2- A master report documenting the design and implementation of the subset of PASCAL compiler. Additionally, improvements in the compilation process will be demonstrated and documented. Abdullah Sheneamer Master project proposal
References • 1- http://msdn.microsoft.com/en-us/library/c5tkafs1(v=vs.71).aspx • 2- C# To Program By H.M Deitel & P.J.Deitel& J.Listfield & T.R. Nieto & C.Yaeger & M.Zlatkina. • 3- Compiler Construction principles and practice by KennthC.louden • 4- Data Structure using Java By D.S.Malik & P.S.Nair. • 5- An introduction to formal languages and automata. Fourth Edition. Peter Linz • 6- Compilers Principles, Techniques and Tools by Alfred V.Aho, Ravi Sethi and Jeffrey D. Ullman. 1985 • 7- Develop a Compiler in Java for a Compiler Design Course Abdul Sattar and TorbenLorenzen • 8- Guide to assembly language [electronic resource] : a concise introduction / James T. Streib.Streib, James T. London ; New York : Springer, c2011. • 9- Using a Stack Assembler Language in a Compiler Course by Dr. Gerald Wildenberg St . John Fisher College, Rochester, NY Bristol Polytechnic, England (1989-1990 ) • 10- Expert .NET 2. IL assembler/ Serge Lidin. Lidin, Serge. 1956- Berkeley, CA • 11- http://www.codeproject.com/Articles/3778/Introduction-to-IL-Assembly-Language Abdullah Sheneamer Master project proposal