Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Introduction to the Shared Source Common Language Infrastructure (SSCLI) Damien Watkins Copyright Watkins 2002.

Similar presentations


Presentation on theme: "An Introduction to the Shared Source Common Language Infrastructure (SSCLI) Damien Watkins Copyright Watkins 2002."— Presentation transcript:

1 An Introduction to the Shared Source Common Language Infrastructure (SSCLI)
Damien Watkins Copyright Watkins 2002

2 Introduction Damien Watkins damien@project42.net damien@dstc.edu.au
MSR invited Monash University to joined Project 7 in 1998 Co-author of “Programming in the .NET Environment”, Addison Wesley Copyright Watkins 2002

3 Agenda What is the SSCLI? Understanding the CLI Directory Structure
Development Tools Summary Questions Copyright Watkins 2002

4 SSCLI (a.k.a. Rotor) Shared Source: Is a license
You should read and agree with the license before using Rotor (I am not a lawyer!) Common Language Infrastructure Component-Based Software Architecture Similar in parts to COM, CORBA, Java Copyright Watkins 2002

5 SSCLI (a.k.a. Rotor) CLI Implementation of the ECMA standards 334 and 335 335 Common Language Infrastructure Component based Software Architecture 334 C# Language Specification Component based Language Copyright Watkins 2002

6 SSCLI (a.k.a. Rotor) Distributed as 2 tar files from msdn.microsoft.com/net/sscli 12 megabyte tar file of source code 4 megabyte tar file of documentation Compile and run on FreeBSD and Windows XP Start with the readfirst.html file Copyright Watkins 2002

7 SSCLI - Tar file 1 1.9 million lines of source code
1.1 million lines of C++ 600k lines of C# 125k IL Assembler Assembler 5,900 source files 9700 files in total Copyright Watkins 2002

8 SSCLI - Tar 2 Documentation
In the root directory there is ClassLibrary.html There are a number of subdirectories, one for each namespace with an index page System And then pages for each type, System.Object Copyright Watkins 2002

9 SSCLI – When built Tar 1: 550 Mb 11,000 files Tar 2: 40 Mb 1,100 files
Copyright Watkins 2002

10 Understanding the CLI The CLI provides a number of abstractions and facilities In this section we look at the major architectural elements of the CLI, this is a top-down approach In the Tools section we look from the tools that manipulate the CLI, a bottom-up approach Copyright Watkins 2002

11 Commercial Version System.Web System.Windows Languages System.Data
C#, VB, Managed C++, IL, JScript System.Data System.Xml XSLT, XPath, Serialization System Collections, Configuration, Diagnostics, Globalization, IO, Net, Reflection, Resources, Security, Service Process, Text, Threading, Interop, Remoting, Serialization Tools cordbg, ilasm, ildasm, peverify, VS.NET Common Language Runtime Type, Metadata and Execution Systems Windows Copyright Watkins 2002

12 EMCA System.Web System.Windows Languages System.Data System.Xml System
C#, VB, Managed C++, IL, JScript System.Data System.Xml XSLT, XPath, Serialization System Collections, Configuration, Diagnostics, Globalization, IO, Net, Reflection, Resources, Security, Service Process, Text, Threading, Interop, Remoting, Serialization Tools cordbg, ilasm, ildasm, peverify, VS.NET Common Language Runtime Type, Metadata and Execution Systems Operating System Copyright Watkins 2002

13 Rotor System.Web System.Windows Languages System.Data System.Xml
C#, VB, Managed C++, IL, JScript System.Data System.Xml XSLT, XPath, Serialization System Collections, Configuration, Diagnostics, Globalization, IO, Net, Reflection, Resources, Security, Service Process, Text, Threading, Interop, Remoting, Serialization Tools cordbg, ilasm, ildasm, peverify, VS.NET Common Language Runtime Type, Metadata and Execution Systems Platform Adaptation Layer Copyright Watkins 2002

14 SSCLI - Execution Architecture
Development Deployment Source Code Compiler Assembly GAC Execution Security Assembly Assembly Loader GAC Class Loader JIT & Verifier Execution Copyright Watkins 2002

15 SSCLI - Execution Architecture
Hosting Environment Common Language Runtime Assembly Assembly Security System Policy Levels Evidence Permission Set Enterprise Machine Security Settings User Application Domain Copyright Watkins 2002

16 Common Language Infrastructure
Comprised of two major elements Common Language Runtime A shared execution architecture that multiple languages can target Framework Class Libraries Facilities and services need to create non-trivial applications Copyright Watkins 2002

17 Common Language Runtime
CLR includes Type System Metadata System Execution System Similar to the facilities/functionality provided by an IDL in COM or CORBA Copyright Watkins 2002

18 Type System Two basic types Value types Copy semantics
Stack allocated (normally) Boxing Reference types Reference semantics GC heap allocation Copyright Watkins 2002

19 Type System Built-in value types can be found in cortypeinfo.h *
Base Class System.Object Found in object.h and in object.cpp Copyright Watkins 2002

20 Metadata Major structures found in corhdr.h Tokens Macros (IsTDClass)
and metadata.h Copyright Watkins 2002

21 JIT Compiler Converts Intermediate Language to native code
Verifies IL stream Produces tables for garbage collector Produces tables for exception handling Copyright Watkins 2002

22 JIT Compiler The major file for the JIT compiler is fjit.h
Interface between execution engine and JIT compiler in corjit.h Jit compiler interface in jitinterface.h GC and EH tables in eetwain.h The compileMethod method is found in fjitcompiler.h and fjitcompiler.cpp Copyright Watkins 2002

23 JIT Compiler Verifier component is in fjitverfier.h fitverifier.cpp
Copyright Watkins 2002

24 Framework Class Libraries
Base Class Library System.Collections System.IO System.Security Sytem.Text System.Threading Copyright Watkins 2002

25 PAL Platform Adaptation Layer
Provides a standard interface the execution engine Translates method calls to the operating system and vice versa Copyright Watkins 2002

26 Directories sscli, the root directory Has files such as Readfirst.html
License.txt Env.bat Buildall Copyright Watkins 2002

27 sscli\build Many of the executables and DLLs are placed in this directory or its subdirectories al.exe clix.exe csc.exe gacutil.exe mscorlib.dll Copyright Watkins 2002

28 sscli\build\v1…\assembly
GAC System System.Runtime.Remoting System.Serialization.Formatters.Soap System.Xml Microsoft.JScript Copyright Watkins 2002

29 sscli\build\v1…\sdk\bin
cordbg.exe - debugger ilasm.exe – IL Assembler ildasm.exe – IL Disassembler peverify.exe – PE Verifier resgen.exe – Resource Generator sn.exe – Strong Name Copyright Watkins 2002

30 sscli\pal Platform Adaptation Layer
The abstract interface is in rotor_pal.h Two subdirectories Unix Win32 Copyright Watkins 2002

31 Development Tools C# Compiler JScript compiler written in C#
Alink, Assembly linker GacUtil, GAC Utility tool Copyright Watkins 2002

32 Development Tools ILASM – IL Assembler ILDASM – IL Disassembler
PEVerify – A File Format and Metadata Verifier Cordbg – Debugger CLIX – Program Loader Copyright Watkins 2002

33 Summary Rotor is an interesting implementation of a component based software architecture The source code allows you to dig in as deep as you want Idea to use in research, you do not have to build the infrastructure Useful in teaching: compilers, security, … Copyright Watkins 2002

34 Questions Copyright Watkins 2002


Download ppt "An Introduction to the Shared Source Common Language Infrastructure (SSCLI) Damien Watkins Copyright Watkins 2002."

Similar presentations


Ads by Google