Advanced Computer Science Teaching with the Shared Source Common Language Infrastructure.

Slides:



Advertisements
Similar presentations
Common Language Infrastructure (CLI) Introduction and Class Library Factorization Hewlett-Packard Intel Microsoft.
Advertisements

Unit 1: Overview of the Microsoft.NET Platform
1 Unit 1: Introduction To.Net. 2 Introduction to.Net Integrated Development Environment (IDE) Languages in the.NET Framework The Common Language Runtime.
.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
Introduction to .NET Framework
.NET Framework Overview
Tahir Nawaz Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a.
Using.NET Platform Note: Most of the material of these slides have been taken & extended from Nakov’s excellent overview for.NET framework, MSDN and wikipedia.
.NET Framework Overview
SSCLI (Shared Source Common Language Infrastructure) (code name: Rotor)
History of.Net Introduced by Microsoft Earlier technology was VC++ and VB VC++ comes with so many library and VB was so easy to use and not flexible to.
.NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.
SSCLI: The Microsoft Shared Source CLI Implementation Mark Lewin Microsoft Research
.NET Framework Overview Pingping Ma Nov 16 th, 2006.
.NET Technology.
An overview of the SSCLI Distribution Mark Lewin Microsoft Research
Introduction. What is.Net? The hype: “Microsoft.Net is a set of Microsoft software technologies for connecting information, people, systems, and devices.
.Net Overview Giuseppe Attardi Università di Pisa.
Overview of the.NET Framework. What is the.NET Framework A new computing platform designed to simplify application development A consistent object-oriented.
Microsoft.NET Overview.NET Framework Topics Dave Schmitt Principal Technology Specialist Microsoft Corporation
Thursday Evening 6.30VB.NET Introduction 7.30Break for food 8.00VB.NET Migration 8.45Q & A 9.00Done.
Module 1: Overview of the Microsoft.NET Framework.
Introducing the Common Language Runtime for.NET. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution.
Introducing the Common Language Runtime. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution engine.
SQL Server 2005 CLR Integration ADO.NET 2.0 Mike Taulty
Platforms and tools for Web Services and Mobile Applications Introduction to.Net Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
Using.NET Skills To Build Mobile Applications In Compact Framework Punit Shah Technical Lead | Microsoft |
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Overview of Microsoft.Net and Vb.Net ITSE 2349 Spring 2002 Material from Microsoft.Net an Overview for ACC faculty by Stuart Laughton and Introduction.
Introduction to .Net Framework
Visual Studio.NET and.NET Compact Framework Application Development Mike D. Smith Group Program Manager Developer Division Microsoft Corporation.
Introduction to Programming
Microsoft.NET Framework Overview Abidi Mahmoud Seminarium on Component -based Software Engineering.
Session 1 - Introduction and Data Access Layer
C# A 1 CSC 298 Introduction to C#. C# A 2 What to expect in this class  Background: knowledge of an object oriented language of the C++, Java, … family.
Introduction to .NET Framework
Understanding Code Compilation and Deployment Lesson 4.
Windows CE 시스템 개발 개요. 임베디드시스템소프트웨어 -Windows CE 2 Overview  Selecting a Windows Embedded Operating System  The Windows CE Platform Development Cycle.
C# Overview and Features. Content I.History of C# II.Architecture III.How to install IV.Features V.Code Sample VI.Microsoft.NET Platform VII.Why use C#
Overview of System Development. Overview Selecting a Windows Embedded Operating System The Windows CE Platform Development Cycle The Application Development.
Lecture 1 Programming in C# Introducing C# Writing a C# Program.
ISYS 573 Special Topic – VB.Net David Chao. The History of VB Early 1960s:BASIC-Beginner’s All-Purpose Symbolic Instruction Code –Teaching –Simple syntax,
What is.NET? CS 351 Ed Gellenbeck. Today What is.NET? What Problems Does.NET Solve? What are.NET Framework Components?
.Net Framework Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours
.NET Framework Danish Sami UG Lead.NetFoundry
tom perkins1 XML Web Services -.NET FRAMEWORK – Part 1 CHAPTER 1.1 – 1.3.
Windows CE 시스템 개발 개요. 모바일운영체제 - Windows CE 2 Overview  Selecting a Windows Embedded Operating System  The Windows CE Platform Development Cycle  The.
Intro to dot Net Dr. John Abraham UTPA CSCI 3327.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
Microsoft .NET A platform that can be used for building and running windows and web applications such that the software is platform and device-independent.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Common Language Infrastructure
Intro to ASP.NET CS-422 Dick Steflik. What is.NET As applications in the Enterprise become more and more netcentric and less and less standalone.NET is.
Introduction to the Microsoft.NET Framework Chris Wastchak Student Ambassador to Microsoft.
Introduction ITEC 420.
Introducing the Microsoft® .NET Framework
What is .NET.
Introduction to .NET framework
.NET Omid Darroudi.
An Introduction to the Shared Source Common Language Infrastructure (SSCLI) Damien Watkins Copyright Watkins 2002.
Introduction to .NET Framework Ch2 – Deitel’s Book
Application Foundation
Mobile Application Development 2005 By Sam Nasr July 25, 2006
.NET and .NET Core 2. .NET Runtimes Pan Wuming 2017.
Programming in C# CHAPTER 1
CIS16 Application Development – Programming with Visual Basic
Module 10: Implementing Managed Code in the Database
Overview of System Development for Windows CE.NET
.NET Framework Design Goals
Presentation transcript:

Advanced Computer Science Teaching with the Shared Source Common Language Infrastructure

Overview  In this session we will discuss >What is the Shared Source Common Language Infrastructure (SSCLI)? >Key SSCLI components >Differences between SSCLI and.NET >Working with the SSCLI >Using the SSCLI for teaching >Deploying the SSCLI in a teaching lab environment

What is the SSCLI?

ECMA Common Language Infrastructure (CLI)  An international standard for a virtual execution environment >produced by Microsoft  Implementation of this standard is a subset of the.NET framework The specification ( ECMA 335/ISO 23271/2 ) defines  common type system  intermediate language  component model A minimum implementation consists of  a C# compiler  CLI execution engine  component frameworks

SSCLI – A Shared Source CLI  Microsoft’s free, modifiable and redistributable implementation of the CLI, codenamed Rotor  Platform independent >Currently executes on MS Windows, FreeBSD and Mac OS/X >Third party ports to Linux, Windows CE and others  Virtually identical to.NET 1.1 except for >retooled JIT compiler and garbage collector >C# generics support (Gyro)  Source written in C, C++, C#, Perl and assembly language  Other implementations of CLI are Ximian’s Mono and DotGNU’s Portable.NET

Implemented for Learning  Many areas of interest (3 million lines of code!)  Good, real-world example of how software is built  Contains useful component-based frameworks >Standard programming constructs >Web-service oriented networking and remoting  Contains compilers, tools, and utilities >C#, JScript, and IL JIT compilers >Assembler, disassembler, linker, debuggers >Configuration utilities  Extensive tests and build harness

Relationship of SSCLI and.NET Framework  Both SSCLI and.NET implement complete ECMA >SSCLI is a superset of ECMA, subset of commercial.NET Frameworks  Shared source CLI implementation differs in >JIT and garbage collector replaced with more portable, more approachable, implementations >Only supports C# and JScript as development languages >Windows-specific features not included ­COM interop ­Windows Forms ­“It Just Works!”(managed/unmanaged C++ integration) >Commercially competitive features not included ­ADO.NET (database access) ­enterprise services ­NGEN (install-time, JIT-ahead precompilation) ­ASP.NET (web application / web service development)

The.NET Framework VS.NET Common Language Runtime System System.Data (ADO.NET)System.Xml Design ADO Adapters SQL Globalization Diagnostics Configuration Collections Resources Reflection Net IO Threading Text ServiceProcess Security Runtime InteropServices Remoting Serialization XPath XSLT Serialization System.Drawing JIT GC MSIL App Domain Loader Common Type SystemClass Loader System.Web (ASP.NET) Configuration SessionState Caching Security Simple Web Services Description Protocols UI HtmlControls WebControls Discovery C# VC/MC++ Imaging Drawing2D Text Printing JScript VB Windows Platform IIS MSMQCOM+ Networking Active DirectoryFilesystem System.WinForms DesignComponentModel Debugger Designers SDK Tools CorDBG ILAsm ILDbDump SN ILDAsm MetaInfo PEVerify

SSCLI VS.NET Common Language Runtime System System.Data (ADO.NET)System.Xml Design ADO Adapters SQL Globalization Diagnostics Configuration Collections Resources Reflection Net IO Threading Text ServiceProcess Security Runtime InteropServices Remoting Serialization XPath XSLT Serialization System.Drawing JIT GC MSIL App Domain Loader Common Type SystemClass Loader System.Web (ASP.NET) Configuration SessionState Caching Security Simple Web Services Description Protocols UI HtmlControls WebControls Discovery C# VC/MC++ Imaging Drawing2D Text Printing JScript VB Platform Adaptation Layer System.WinForms DesignComponentModel Debugger Designers SDK Tools CorDBG ILAsm ILDbDump SN ILDAsm MetaInfo PEVerify

Platform Adaptation Layer  SSCLI is built on top of a Platform Adaptation Layer (PAL)  The PAL >isolates CLI implementation from the OS and hardware >runs co-operatively with native code >implements security and control, threading and exceptions >offers equivalent functionality to many Win32 OS functions >eases porting to new platforms - a student project?

Working with the SSCLI

demo demo  Building the SSCLI  We’re setting this off now as it takes a while!

The SSCLI Distribution  SSCLI can be freely downloaded from the Web  Packaged as single compressed file archive  1.9 million lines of code in first release (now ~3 million) >1.15M of C and C++ >625K of C# >125K of CIL (intermediate language) >Smattering of assembly code, Perl (test harnesses) and Tcl/Tk (UI)  5900 source files (9700 total) >2900 tests  Build output >1200 defined types >About 20 dynamically loadable libraries >About 22 executable programs

The SSCLI Source Tree  Four major areas in source code 1) Runtime “execution engine” 2) Base class library 3) Compilers and tools 4) Portability layer, tests, and build infrastructure  Other important points of interest >License >Documentation >Samples

SSCLI Execution Engine  Heart of component-oriented infrastructure  Converts metadata, resources, and CIL (on disk as PE/COFF image) into running code  JIT compilation and IL verification  Cross-language exception handling  Language-agnostic, object-capable, type system  Automatic heap and stack management  Dynamic code loading  Evidence-based security (code access security)

Common Intermediate Language  Basis for most managed code execution in the CLI  Simple stack-based machine model – see vm directory  Typeless opcodes, defined in opcode.def >Verifiable subset – see fjit directory for verification >Signed and unsigned via opcode, not type  CIL code is JIT compiled to run under CLI management >Type layout, control, and dispatching ­Typed variable argument lists, dynamically typed pointers ­Tail calls, virtual dispatch, call via function pointer >Rich set of conversion operations, calling conventions >Exception handling >Garbage collection

Frameworks  A “minimal toolkit” for the 21 st century programmer  Base class library is a key feature of the ECMA CLI spec >Collections, arrays, strings, and other compound data types >Globalization and formatting >System services (threads, I/O, synchronization, etc.) >Security  SSCLI augments this with >Floating point and extended arrays libraries >Networking, regular expressions, and XML libraries >Access to runtime infrastructure ­Reflection and custom attributes ­Remoting, unmanaged interop, serialization, and marshaling ­AppDomains, Assemblies, GC, other execution engine features

Compilers and Tools  Full-featured C# compiler >also used in build process  JScript compiler written entirely in C#  Additional developer tools >clix, the shared source CLI program launcher >Assembly tools: resource compiler, assembly linker, metainfo metadata viewer, assembler, disassembler >Debuggers: cordbg managed command line debugger, plus a debug extension for working on managed code from C/C++ via windbg

demo demo  Developing software with the SSCLI  Debugging with cordbg

SSCLI Build Process  Complex build which occurs in two phases and is driven by several build tools >nmake, build, Perl scripts  Initial phase builds >PAL using native toolchain >Build tools (nmake, build) against PAL for portability >resource compiler and PAL runtime using newly compiled build tools  Main phase has complex interdependencies >Unmanaged frameworks, compilers, and tools, are built >Managed portions of runtime and frameworks are built using compilers built previously >Assemblies and runtime are configured  Possible to rebuild individual SSCLI components >Allows teaching activities to focus on smaller parts of the SSCLI and rebuild those only >e.g. Hull JScript compiler modification exercises  Good example of how large software systems are built >Unfamiliar to most students

SSCLI Test Suite  Incredibly handy when modifying code!  Two major areas: managed code and PAL  PAL suites >Test driver script is pvtrun.pl >Used on new PAL implementations to verify compliance with PAL specification  Quality suites >Test driver script is rrun.pl >Tests for three primary aspects of SSCLI functionality ­IL verification ­“BVT” smoke tests – many small programs ­Tests for the BCL

Using the SSCLI for Teaching

Possibilities for Teaching  The SSCLI implementation touches upon many aspects of a standard Computer Science syllabus >Programming languages and skills >Object-oriented development >Framework design >Software testing >Security >Networking >Virtual machine implementation >etc, etc, etc  Many possible uses in the curriculum >Allows students to see the relevance of many of the aspects of the curriculum in the implementation of a large commercially-produced software product

The SSCLI at Hull  Hull University uses both the.NET Framework and the SSCLI for teaching at Master level > MSc in Distributed Systems Development .NET provides >overreaching example of distributed systems concepts, techniques and technologies  SSCLI provides >“down to the metal” implementation details >excellent environment for enhancing testing/ debugging skills  We introduce three ways in which the SSCLI is used at Hull

MSc Distributed Systems Development  Our Masters course aims to >Give advanced coverage of modern distributed computing techniques >Develop an understanding of contemporary managed code environments and how they work >Develop skills in working with large codebases >Develop “active practitioners” >Provide hands-on practical experience underpinned by advanced theoretical concepts

Software Maintenance Exercise  Designed to improve students skills in >Navigating and comprehending unfamiliar code >Maintaining code written by others >Designing and implementing for maintenance  Requires students to make modifications to the JScript compiler >Modify the abstract syntax tree of the compiler >JScript compiler written in C# => easy introduction to SSCLI >JScript compiler can be built and deployed independently

JIT Profiling Exercise  Designed to provide >an introduction to key aspects of the virtual machine and JIT compiler implementation >An appreciation for how JIT compilation works to transform intermediate code to native code >A basis for further, more detailed study  Requires students to >Introduce new data structures >Modify JIT compiler to count CIL instructions >Sort and output profiling statistics on program completion >Code in an unmanaged language (unfamiliar to many)

Debugging Exercise  Optional exercise for students wanting to improve their debugging skills which is designed to >Get the students thinking about all aspects of the compilation and execution cycle >Provide opportunities to develop debugging and testing skills >Familiarise the student with the SSCLI code and the techniques used to implement it >Introduce problem solving and hypothesis testing skills relevant to debugging >Set the “worst case” scenario: ­Deliberate bugs introduced in the underlying language and VM implementation; student’s code is fine, but it still doesn’t work!

Our Experience  Feedback suggests that the students >Find the exercises initially challenging (particularly the JScript exercise) >Value what these exercises have taught them as they reach the latter stages of our Masters programme >Observe an improvement in their own coding, code comprehension and debugging skills as a direct consequence of being exposed to commercially produced code

Deploying the SSCLI

SSCLI in the Teaching Lab  The SSCLI is really designed for a single developer working exclusively on a single machine - i.e. not the normal lab environment >Students use a different machine each session >Modifications made to the SSCLI by one student must not be visible to other students >Complete built installation requires ~1GB disk space >Building on a network drive => high network traffic >Managed code executed from a network drive is less trusted than code run from the local machine and may generate security exceptions

Our Solutions  Provide two local copies of the SSCLI distribution >Students have read/write permissions on one copy, read permissions on the other >Students use local modifiable copy for their work >Read-only copy manually copied over modifiable copy at start of each session and automatically each evening  Use source control system >Students use a source control system to store their changes to SSCLI components (not entire source tree) >Changes checked out over clean local copy at start of session >Changes checked back in at start of sessions >Promotes good development practice but significant overhead in administering source control system  Virtual PC (with Undo Disks) ?

Windows Deployment Issues  SSCLI requires Visual C++ to build under Windows >Will not build against Visual C++ 8 / Visual Studio 2005  Vanilla distribution does not execute correctly on Windows XP Service Pack 2 >Changes made to XP in SP2 break the exception handling mechanism >CD’s issued today have fixed copy of SSCLI source  Build harness attempts to create file association for Perl files >Our configuration does not permit students to create file associations >Easily fixed by removing a line from the build scripts

Summary Summary  In this presentation we have introduced >The SSCLI and its source code distribution >SSCLI organization and operation >Building and using the SSCLI >Opportunities for teaching using the SSCLI >Teaching lab deployment issues

Reading and Resources Reading  Stutz, Neward & Shilling, Shared Source CLI Essentials, O’Reilly & Associates Inc, 2003 Resources  Shared Source CLI  ECMA Specifications  David Stutz’s MSDN announcement of Rotor  Jason Whittington’s MSDN Rotor article