IL Intermediate Language CHAPTER 1.3

Total Page:16

File Type:pdf, Size:1020Kb

IL Intermediate Language CHAPTER 1.3 05 153x ch01_3 8/31/01 1:55 PM Page 31 IL Intermediate Language CHAPTER 1.3 IN THIS CHAPTER • Language Inter-Op 33 • Hello IL 34 • Functions 35 • Classes 38 • ILDASM 40 • Metadata 42 • Reflection API 43 05 153x ch01_3 8/31/01 1:55 PM Page 32 The .NET Framework 32 PART I In the current day and age of software development, developers use high-level languages such as C++, Visual Basic, or Java to implement applications and components. I personally don’t know any working binary developers and few assembly language programmers. So why is IL, Intermediate Language, so important to .NET? To answer this question requires a brief tour of compiler theory 101. The basic task of a compiler is to transform readable source code into native executable code for a given platform. The compilation process includes several phases, which include but are not limited to lexical scanning, parsing, abstract syntax tree creation, intermediate code creation, code emission, assembler, and linking. Figure 1.3.1 shows a basic diagram of this process. Source code abstract syntax tree assembling Lexical scanning intermediate code linking parsing code emission executable code FIGURE 1.3.1 The basic compilation process. The intermediate code creation poses an interesting question: What if it’s possible to translate a given set of languages into some standard intermediate code? This is where IL fits into the scheme of things. The ability to translate high-level language constructs into a standardized format, such as IL, allows for a single underlying compiler or just-in-time (JIT) compiler. This is the approach taken by .NET. With the introduction of Visual Studio .NET, Microsoft is providing Managed C++, C#, Visual Basic, and ASP.NET, each of which produce IL from their respective source code. There are also several third-party language vendors providing .NET versions of their respective lan- guages. Figure 1.3.2 shows the basic .NET compilation process. It is important to note that IL is not interpreted. Rather, the .NET platform makes use of vari- ous types of just-in-time compilers to produce native code from the IL code. Native code runs directly on the hardware and does not require a virtual machine, as is the case with Java and early versions of Visual Basic. By compiling IL to native code, the runtime performance is increased compared to interpreted languages that run on top of a virtual machine. We will be covering the various types of just-in-time compilers later on. (From here on out I will refer to the just-in-time compiler(s) as the jitter). 05 153x ch01_3 8/31/01 1:55 PM Page 33 IL Intermediate Language 33 CHAPTER 1.3 Managed C++ C# VB.NET Language X… 1.3 IL I L NTERMEDIATE ANGUAGE IL JIT Compiler Native Code FIGURE 1.3.2 .NET compilation. IL is a full, stack-based language that you can use to implement .NET components. Although it is definitely not suggested for the sake of productivity, you can use IL to do things that you can’t do with C#. For example, in IL, you can create global functions and call them from within IL. Language Inter-Op Like the quest for the Holy Grail, the ability to seamlessly inter-op between languages has been on the forefront. On the various Windows platforms, the standard for cross language development has been the Component Object Model (COM). An entire industry was born whose sole purpose was developing COM components and ActiveX controls. Because COM is a binary standard, any language capable of consuming COM components is able to use them regardless with which language the COM component was created. Although COM allowed for reusable components, it was far from perfect. Certain languages, such as scripting languages, could only make use of the default interface provided by the COM object. Also, it was not possible to inherit from a COM component to extend its basic function- ality. To extend a binary object, developers were forced to wrap the COM component, not a very OO approach. With the advent of .NET and IL, such barriers no longer exist. Because every language tar- geted at the .NET platform understands IL and the metadata of a .NET component, a new level of interoperability is born. The metadata allows inspection of a .NET component to discover the classes, methods, fields, and interfaces that it contains. The topic of metadata will be cov- ered later in this section. 05 153x ch01_3 8/31/01 1:55 PM Page 34 The .NET Framework 34 PART I Hello IL Using IL to develop .NET applications and components is probably not something you’ll be doing a lot. However, to truly dig into the .NET framework, a basic understanding of the IL structure is important. The .NET SDK does not ship with the underlying source code. This does not mean you can’t dig into the implementation of the various components. However, it does require some knowledge of IL. The traditional, almost required, first step in learning a new language is to display the infa- mous “Hello World” message on the console. Accomplishing this task with only IL is not as painful as it might sound. IL is not a truly low-level, assembly-like language. As with most modern languages, there is a fair amount of abstraction built into the language. Listing 1.3.1 shows the now famous “Hello World” program written in MSIL. LISTING 1.3.1 Hello World 1: //File :Hello.cil 2: //Author :Richard L. Weeks 3: // 4: // 5: 6: //define some basic assembly information 7: .assembly hello 8: { 9: .ver 1:0:0:0 10: } 11: 12: 13: //create an entry point for the exe 14: .method public static void main( ) il managed 15: { 16: 17: .entrypoint 18: .maxstack 1 19: 20: 21: //load string to display 22: ldstr “Hello World IL style\n” 23: 24: //display to console 25: call void [mscorlib]System.Console::WriteLine( class System.String ) 26: 27: ret 28: } 29: 05 153x ch01_3 8/31/01 1:55 PM Page 35 IL Intermediate Language 35 CHAPTER 1.3 To compile Listing 1.3.1, issue the following command line: 1.3 ilasm hello.cil IL I L NTERMEDIATE ANGUAGE The IL assembler will produce a .NET hello.exe. This IL code displays the message “Hello World IL style” by using the static Write method of the System.Console object. The Console class is part of the .NET framework and, as its use implies, its purpose is to write to the standard output. Notice that there is no need to create a class. IL is not an object-oriented language, but it does provide the constructs necessary to describe objects and use them. IL was designed to accom- modate a variety of language constructs and programming paradigms. Such diversity and open- ness in its design will allow for many different languages to be targeted at the .NET runtime. There are a number of directives that have special meanings within IL. These directives are shown in Table 1.3.1. TABLE 1.3.1 IL Directives used in “Hello World” Directive Meaning .assembly Name of the resulting assembly to produce .entrypoint Start of execution for an .exe assembly .maxstack Number of stack slots to reserve for the current method or function Notice that the .entrypoint directive defines the start of execution for any .exe assembly. Although our function has the name main, it could have any name we want. Unlike C, C++, and other high-level languages, IL does not define a function to serve as the beginning of execution. Rather, IL makes use of the .entrypoint directive to serve this purpose. Another directive of interest is the .assembly directive. IL uses this directive to name the output of the assembly. The .assembly directive also contains the version number of the assembly. Functions The Hello World IL example encompasses only one method. If only all software development requirements were that simple! Because IL is a stack based language, function parameters are pushed onto the stack and the function is called. The called function is responsible for remov- ing any parameters from the stack and for pushing any return value back onto the stack for the caller of the function. 05 153x ch01_3 8/31/01 1:55 PM Page 36 The .NET Framework 36 PART I The process of pushing and popping values to and from the call stack can be visualized as shown in Figure 1.3.3. Add function Program Code call stack call stack pop 15 push 10 15 10 push 15 10 call Add pop 10 pop 25 local result push result 25 ret FIGURE 1.3.3 The call stack. Although Figure 1.3.3. depicts a very simplified view of the actual process, enough informa- tion is provide to gain an understanding of the overall steps involved. Translating Figure 1.3.3 into IL produces the source in Listing 1.3.2. LISTING 1.3.2 IL Function Calls 1: //File :function.cil 2: 3: .assembly function_call 4: { 5: .ver 1:0:0:0 6: } 7: 8: 9: //Add method 10: .method public static int32 ‘add’( int32 a, int32 b ) il managed 11: { 12: 13: .maxstack 2 14: .locals (int32 V_0, int32 V_1) 15: 16: //pop the parameters from the call stack 17: ldarg.0 18: ldarg.1 19: 20: add 21: 22: //push the result back on the call stack 05 153x ch01_3 8/31/01 1:55 PM Page 37 IL Intermediate Language 37 CHAPTER 1.3 LISTING 1.3.2 Continued 1.3 23: stloc.0 IL I L NTERMEDIATE 24: ldloc.0 ANGUAGE 25: 26: ret 27: } 28: 29: .method public static void main( ) il managed 30: { 31: .entrypoint 32: .maxstack 2 33: .locals ( int32 V_0 ) 34: 35: //push two parameters onto the call stack 36: ldc.i4.s 10 37: ldc.i4.s 5 38: 39: call int32 ‘add’(int32,int32) 40: 41: stloc.0 //pop the result in the local variable V_0 42: 43: //Display the result 44: ldstr “10 + 5 = {0}” 45: ldloc V_0 46: box [mscorlib]System.Int32 47: call void [mscorlib]System.Console::WriteLine(class System.String, ➥ class System.Object ) 48: 49: ret 50: } 51: The function.cil code in Listing 1.3.2 introduces a new directive: .locals.
Recommended publications
  • Ironpython in Action
    IronPytho IN ACTION Michael J. Foord Christian Muirhead FOREWORD BY JIM HUGUNIN MANNING IronPython in Action Download at Boykma.Com Licensed to Deborah Christiansen <[email protected]> Download at Boykma.Com Licensed to Deborah Christiansen <[email protected]> IronPython in Action MICHAEL J. FOORD CHRISTIAN MUIRHEAD MANNING Greenwich (74° w. long.) Download at Boykma.Com Licensed to Deborah Christiansen <[email protected]> For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. Sound View Court 3B fax: (609) 877-8256 Greenwich, CT 06830 email: [email protected] ©2009 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15% recycled and processed without the use of elemental chlorine.
    [Show full text]
  • Binary and Hexadecimal
    Binary and Hexadecimal Binary and Hexadecimal Introduction This document introduces the binary (base two) and hexadecimal (base sixteen) number systems as a foundation for systems programming tasks and debugging. In this document, if the base of a number might be ambiguous, we use a base subscript to indicate the base of the value. For example: 45310 is a base ten (decimal) value 11012 is a base two (binary) value 821716 is a base sixteen (hexadecimal) value Why do we need binary? The binary number system (also called the base two number system) is the native language of digital computers. No matter how elegantly or naturally we might interact with today’s computers, phones, and other smart devices, all instructions and data are ultimately stored and manipulated in the computer as binary digits (also called bits, where a bit is either a 0 or a 1). CPUs (central processing units) and storage devices can only deal with information in this form. In a computer system, absolutely everything is represented as binary values, whether it’s a program you’re running, an image you’re viewing, a video you’re watching, or a document you’re writing. Everything, including text and images, is represented in binary. In the “old days,” before computer programming languages were available, programmers had to use sequences of binary digits to communicate directly with the computer. Today’s high level languages attempt to shield us from having to deal with binary at all. However, there are a few reasons why it’s important for programmers to understand the binary number system: 1.
    [Show full text]
  • IJIRT | Volume 2 Issue 6 | ISSN: 2349-6002
    © November 2015 | IJIRT | Volume 2 Issue 6 | ISSN: 2349-6002 .Net Surbhi Bhardwaj Dronacharya College of Engineering Khentawas, Haryana INTRODUCTION as smartphones. Additionally, .NET Micro .NET Framework (pronounced dot net) is Framework is targeted at severely resource- a software framework developed by Microsoft that constrained devices. runs primarily on Microsoft Windows. It includes a large class library known as Framework Class Library (FCL) and provides language WHAT IS THE .NET FRAMEWORK? interoperability(each language can use code written The .NET Framework is a new and revolutionary in other languages) across several programming platform created by Microsoft for languages. Programs written for .NET Framework developingapplications. execute in a software environment (as contrasted to hardware environment), known as Common It is a platform for application developers. Language Runtime (CLR), an application virtual It is a Framework that supports Multiple machine that provides services such as Language and Cross language integration. security, memory management, and exception handling. FCL and CLR together constitute .NET IT has IDE (Integrated Development Framework. Environment). FCL provides user interface, data access, database Framework is a set of utilities or can say connectivity, cryptography, web building blocks of your application system. application development, numeric algorithms, .NET Framework provides GUI in a GUI and network communications. Programmers manner. produce software by combining their own source code with .NET Framework and other libraries. .NET is a platform independent but with .NET Framework is intended to be used by most new help of Mono Compilation System (MCS). applications created for the Windows platform. MCS is a middle level interface. Microsoft also produces an integrated development .NET Framework provides interoperability environment largely for .NET software called Visual between languages i.e.
    [Show full text]
  • Wykład IV: Platforma .Net
    ModelowanieModelowanie ii ProgramowanieProgramowanie ObiektoweObiektowe Wykład IV: Platforma .Net 28 październik 2013 Platforma .NET ● Platforma .NET według Microsoft to integralny komponent systemu Windows umożliwiający tworzenie i uruchamianie nowoczesnych aplikacji i usług sieciowych. Cele realizowane w ramach platformy: – Dostarcza kompletne zorientowane obiektowo środowisko niezależnie czy obiekt: przechowywany i uruchamiany lokalnie, wykonywany lokalnie i rozproszony w Internecie czy wykonywany zdalnie – Środowisko wykonawcze minimalizujące konflikty podczas wytwarzania i wersjonowania oprogramowania – Środowisko wykonawcze wspierające bezpieczne i wydajne wykonanie kodu – Zapewnia spójność pomiędzy aplikacjami przeznaczonymi na platformę Windows czy opartymi na technologiach Web'owych Platforma .NET - komponenty ● Wspólne środowisko uruchomieniowe (ang. Common Language runtime) – Agent zarządzający kodem podczas wykonania – Zarządzanie pamięcią – Zarządzanie wątkami – Zdalność (ang. remoting) – Bezpieczeństwo (typowanie – CTS – sprawdzanie typów, dokładność, zarządzanie zasobami, rejestrem itd.) – Łączenie wielu języków w jednym projekcie (język → narzędzie) – Wydajność – kod nie jest interpretowany, a kompilowany podczas wykonania (JIT – just-in- time) Platforma .NET - komponenty ● .NET Framework class library – Kompleksowa, zorientowana obiektowo, re- używalna kolekcja typów zintegrowana z CLR – pozwalająca na łatwe pisanie aplikacji ogólnego przeznaczenia: ● aplikacje konsolowe ● okienkowe (WinForms, WPF) ● Web'owe (ASP.NET)
    [Show full text]
  • Salesforce CLI Plug-In Developer Guide
    Salesforce CLI Plug-In Developer Guide Salesforce, Winter ’22 @salesforcedocs Last updated: July 21, 2021 © Copyright 2000–2021 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc., as are other names and marks. Other marks appearing herein may be trademarks of their respective owners. CONTENTS Salesforce CLI Plug-In Developer Guide . 1 Salesforce CLI Plug-Ins . 1 Salesforce CLI Architecture . 3 Get Started with Salesforce CLI Plug-In Generation . 5 Naming and Messages for Salesforce CLI Plug-Ins . 7 Customize Your Salesforce CLI Plug-In . 13 Test Your Salesforce CLI Plug-In . 32 Debug Your Salesforce CLI Plug-In . 33 Best Practices for Salesforce CLI Plug-In Development . 33 Resources for Salesforce CLI Plug-In Development . 35 SALESFORCE CLI PLUG-IN DEVELOPER GUIDE Discover how to develop your own plug-ins for Salesforce CLI. Explore the Salesforce CLI architecture. Learn how to generate a plug-in using Salesforce Plug-In Generator, use Salesforce’s libraries to add functionality to your plug-in, and debug issues. Learn about our suggested style guidelines for naming and messages and our recommended best practices for plug-ins. Salesforce CLI Plug-Ins A plug-in adds functionality to Salesforce CLI. Some plug-ins are provided by Salesforce and are installed by default when you install the CLI. Some plug-ins, built by Salesforce and others, you install. When you have a requirement that an existing plug-in doesn’t meet, you can build your own using Node.js. Salesforce CLI Architecture Before you get started with adding functionality to Salesforce CLI, let’s take a high-level look at how the CLI and its dependencies and plug-ins work together.
    [Show full text]
  • NET Framework
    Advanced Windows Programming .NET Framework based on: A. Troelsen, Pro C# 2005 and .NET 2.0 Platform, 3rd Ed., 2005, Apress J. Richter, Applied .NET Frameworks Programming, 2002, MS Press D. Watkins et al., Programming in the .NET Environment, 2002, Addison Wesley T. Thai, H. Lam, .NET Framework Essentials, 2001, O’Reilly D. Beyer, C# COM+ Programming, M&T Books, 2001, chapter 1 Krzysztof Mossakowski Faculty of Mathematics and Information Science http://www.mini.pw.edu.pl/~mossakow Advanced Windows Programming .NET Framework - 2 Contents The most important features of .NET Assemblies Metadata Common Type System Common Intermediate Language Common Language Runtime Deploying .NET Runtime Garbage Collection Serialization Krzysztof Mossakowski Faculty of Mathematics and Information Science http://www.mini.pw.edu.pl/~mossakow Advanced Windows Programming .NET Framework - 3 .NET Benefits In comparison with previous Microsoft’s technologies: Consistent programming model – common OO programming model Simplified programming model – no error codes, GUIDs, IUnknown, etc. Run once, run always – no "DLL hell" Simplified deployment – easy to use installation projects Wide platform reach Programming language integration Simplified code reuse Automatic memory management (garbage collection) Type-safe verification Rich debugging support – CLR debugging, language independent Consistent method failure paradigm – exceptions Security – code access security Interoperability – using existing COM components, calling Win32 functions Krzysztof
    [Show full text]
  • Understanding CIL
    Understanding CIL James Crowley Developer Fusion http://www.developerfusion.co.uk/ Overview Generating and understanding CIL De-compiling CIL Protecting against de-compilation Merging assemblies Common Language Runtime (CLR) Core component of the .NET Framework on which everything else is built. A runtime environment which provides A unified type system Metadata Execution engine, that deals with programs written in a Common Intermediate Language (CIL) Common Intermediate Language All compilers targeting the CLR translate their source code into CIL A kind of assembly language for an abstract stack-based machine, but is not specific to any hardware architecture Includes instructions specifically designed to support object-oriented concepts Platform Independence The intermediate language is not interpreted, but is not platform specific. The CLR uses JIT (Just-in-time) compilation to translate the CIL into native code Applications compiled in .NET can be moved to any machine, providing there is a CLR implementation for it (Mono, SSCLI etc) Demo Generating IL using the C# compiler .method private hidebysig static void Main(string[] args) cil managed { .entrypoint // Code size 31 (0x1f) Some familiar keywords with some additions: .maxstack 2 .locals init (int32 V_0, .method – this is a method int32 V_1, hidebysig – the method hides other methods with int32 V_2) the same name and signature. IL_0000: ldc.i4.s 50 cil managed – written in CIL and should be IL_0002: stloc.0 executed by the execution engine (C++ allows IL_0003: ldc.i4.s
    [Show full text]
  • Working with Ironpython and WPF
    Working with IronPython and WPF Douglas Blank Bryn Mawr College Programming Paradigms Spring 2010 With thanks to: http://www.ironpython.info/ http://devhawk.net/ IronPython Demo with WPF >>> import clr >>> clr.AddReference("PresentationFramework") >>> from System.Windows import * >>> window = Window() >>> window.Title = "Hello" >>> window.Show() >>> button = Controls.Button() >>> button.Content = "Push Me" >>> panel = Controls.StackPanel() >>> window.Content = panel >>> panel.Children.Add(button) 0 >>> app = System.Windows.Application() >>> app.Run(window) XAML Example: Main.xaml <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x="http://schemas.microsoft.com/winfx/2006/xaml" Title="TestApp" Width="640" Height="480"> <StackPanel> <Label>Iron Python and WPF</Label> <ListBox Grid.Column="0" x:Name="listbox1" > <ListBox.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Path=title}" /> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </StackPanel> </Window> IronPython + XAML import sys if 'win' in sys.platform: import pythoncom pythoncom.CoInitialize() import clr clr.AddReference("System.Xml") clr.AddReference("PresentationFramework") clr.AddReference("PresentationCore") from System.IO import StringReader from System.Xml import XmlReader from System.Windows.Markup import XamlReader, XamlWriter from System.Windows import Window, Application xaml = """<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Title="XamlReader Example" Width="300" Height="200"> <StackPanel Margin="5"> <Button
    [Show full text]
  • Portable Microsoft Visual Foxpro 9 SP2 Serial Key Keygen
    Portable Microsoft Visual FoxPro 9 SP2 Serial Key Keygen 1 / 4 Portable Microsoft Visual FoxPro 9 SP2 Serial Key Keygen 2 / 4 3 / 4 License · Commercial proprietary software. Website, msdn.microsoft.com/vfoxpro. Visual FoxPro is a discontinued Microsoft data-centric procedural programming language that ... As of March 2008, all xBase components of the VFP 9 SP2 (including Sedna) were ... CLR Profiler · ILAsm · Native Image Generator · XAMLPad .... Download Microsoft Visual FoxPro 9 SP1 Portable Edition . Download ... Visual FoxPro 9 Serial Number Keygen for All Versions. 9. 0. SP2.. Download Full Cracked Programs, license key, serial key, keygen, activator, ... Free download the full version of the Microsoft Visual FoxPro 9 Windows and Mac. ... 9 Portable, Microsoft Visual FoxPro 9 serial number, Microsoft Visual FoxPro 9 .... Download Microsoft Visual FoxPro 9 SP 2 Full. Here I provide two ... Portable and I include file . 2015 Free ... Visual FoxPro 9.0 SP2 provides the latest updates to Visual FoxPro. ... autodesk autocad 2010 keygens only x force 32bits rh.. ... cs5 extended serial number keygen photo dvd slideshow professional 8.23 serial ... canadian foreign policy adobe acrobat 9 standard updates microsoft money ... microsoft visual studio express 2012 for web publish website microsoft office ... illustrator cs5 portable indowebsteradobe illustrator cs6 portable indowebster .... Download Microsoft Visual FoxPro 9 SP 2 Full Intaller maupun Portable. ... serial number Visual FoxPro 9 SP2 Portable, keygen Visual FoxPro 9 SP2 Portable, .... Microsoft Visual FoxPro 9.0 Service Pack 2.0. Important! Selecting a language below will dynamically change the complete page content to that .... Microsoft Visual FoxPro all versions serial number and keygen, Microsoft Visual FoxPro serial number, Microsoft Visual FoxPro keygen, Microsoft Visual FoxPro crack, Microsoft Visual FoxPro activation key, ..
    [Show full text]
  • Exposing Native Device Apis to Web Apps
    Exposing Native Device APIs to Web Apps Arno Puder Nikolai Tillmann Michał Moskal San Francisco State University Microsoft Research Microsoft Research Computer Science One Microsoft Way One Microsoft Way Department Redmond, WA 98052 Redmond, WA 98052 1600 Holloway Avenue [email protected] [email protected] San Francisco, CA 94132 [email protected] ABSTRACT language of the respective platform, HTML5 technologies A recent survey among developers revealed that half plan to gain traction for the development of mobile apps [12, 4]. use HTML5 for mobile apps in the future. An earlier survey A recent survey among developers revealed that more than showed that access to native device APIs is the biggest short- half (52%) are using HTML5 technologies for developing mo- coming of HTML5 compared to native apps. Several dif- bile apps [22]. HTML5 technologies enable the reuse of the ferent approaches exist to overcome this limitation, among presentation layer and high-level logic across multiple plat- them cross-compilation and packaging the HTML5 as a na- forms. However, an earlier survey [21] on cross-platform tive app. In this paper we propose a novel approach by using developer tools revealed that access to native device APIs a device-local service that runs on the smartphone and that is the biggest shortcoming of HTML5 compared to native acts as a gateway to the native layer for HTML5-based apps apps. Several different approaches exist to overcome this running inside the standard browser. WebSockets are used limitation. Besides the development of native apps for spe- for bi-directional communication between the web apps and cific platforms, popular approaches include cross-platform the device-local service.
    [Show full text]
  • The Zonnon Project: a .NET Language and Compiler Experiment
    The Zonnon Project: A .NET Language and Compiler Experiment Jürg Gutknecht Vladimir Romanov Eugene Zueff Swiss Fed Inst of Technology Moscow State University Swiss Fed Inst of Technology (ETH) Computer Science Department (ETH) Zürich, Switzerland Moscow, Russia Zürich, Switzerland [email protected] [email protected] [email protected] ABSTRACT Zonnon is a new programming language that combines the style and the virtues of the Pascal family with a number of novel programming concepts and constructs. It covers a wide range of programming models from algorithms and data structures to interoperating active objects in a distributed system. In contrast to popular object-oriented languages, Zonnon propagates a symmetric compositional inheritance model. In this paper, we first give a brief overview of the language and then focus on the implementation of the compiler and builder on top of .NET, with a particular emphasis on the use of the MS Common Compiler Infrastructure (CCI). The Zonnon compiler is an interesting showcase for the .NET interoperability platform because it implements a non-trivial but still “natural” mapping from the language’s intrinsic object model to the underlying CLR. Keywords Oberon, Zonnon, Compiler, Common Compiler Infrastructure (CCI), Integration. 1. INTRODUCTION: THE BRIEF CCI and b) to experiment with evolutionary language HISTORY OF THE PROJECT concepts. The notion of active object was taken from the Active Oberon language [Gut01]. In addition, two This is a technical paper presenting and describing new concurrency mechanisms have been added: an the current state of the Zonnon project. Zonnon is an accompanying communication mechanism based on evolution of the Pascal, Modula, Oberon language syntax-oriented protocols , borrowed from the Active line [Wir88].
    [Show full text]
  • Visual Studio 2010 Tools for Sharepoint Development
    Visual Studio 2010 for SharePoint Open XML and Content Controls COLUMNS Toolbox Visual Studio 2010 Tools for User Interfaces, Podcasts, Object-Relational Mappings SharePoint Development and More Steve Fox page 44 Scott Mitchell page 9 CLR Inside Out Profi ling the .NET Garbage- Collected Heap Subramanian Ramaswamy & Vance Morrison page 13 Event Tracing Event Tracing for Windows Basic Instincts Collection and Array Initializers in Visual Basic 2010 Generating Documents from SharePoint Using Open XML Adrian Spotty Bowles page 20 Content Controls Data Points Eric White page 52 Data Validation with Silverlight 3 and the DataForm John Papa page 30 Cutting Edge Data Binding in ASP.NET AJAX 4.0 Dino Esposito page 36 Patterns in Practice Functional Programming Core Instrumentation Events in Windows 7, Part 2 for Everyday .NET Developers MSDN Magazine Dr. Insung Park & Alex Bendetov page 60 Jeremy Miller page 68 Service Station Building RESTful Clients THIS MONTH at msdn.microsoft.com/magazine: Jon Flanders page 76 CONTRACT-FIRST WEB SERVICES: Schema-Based Development Foundations with Windows Communication Foundation Routers in the Service Bus Christian Weyer & Buddihke de Silva Juval Lowy page 82 TEST RUN: Partial Anitrandom String Testing Concurrent Affairs James McCaffrey Four Ways to Use the Concurrency TEAM SYSTEM: Customizing Work Items Runtime in Your C++ Projects Rick Molloy page 90 OCTOBER Brian A. Randell USABILITY IN PRACTICE: Getting Inside Your Users’ Heads 2009 Charles B. Kreitzberg & Ambrose Little Vol 24 No 10 Vol OCTOBER 2009 VOL 24 NO 10 OCTOBER 2009 VOLUME 24 NUMBER 10 LUCINDA ROWLEY Director EDITORIAL: [email protected] HOWARD DIERKING Editor-in-Chief WEB SITE MICHAEL RICHTER Webmaster CONTRIBUTING EDITORS Don Box, Keith Brown, Dino Esposito, Juval Lowy, Dr.
    [Show full text]