Postsharp 3.0 Documentation

Total Page:16

File Type:pdf, Size:1020Kb

Postsharp 3.0 Documentation PostSharp 3.0 Reference Documentation Copyright SharpCrafters s.r.o. 2013. All rights reserved. Generated on 2013-10-09T22:03:38+02:00 PostSharp 3.0 Documentation 2 PostSharp 3.0 Documentation Table of Contents What's New in PostSharp? 7 Deploying and Configuring PostSharp 13 Requirements 13 Installing PostSharp 14 Deploying License Keys 17 Configuring PostSharp 25 Using PostSharp on a Build Server 32 Restoring packages at build time 33 Upgrading from PostSharp 2 34 Installing PostSharp Unattended 36 Incompatibilities with Other Products 38 Working with Ready-Made Aspects 41 Working with the Diagnostics Pattern Library 41 Working with the Threading Pattern Library 55 Working with the Model Pattern Library 90 Adding Aspects to Code 113 Adding Aspects Declaratively Using Attributes 114 Adding Aspects Using XML 136 Adding Aspects Programmatically using IAspectProvider 137 Developing Custom Aspects 141 Developing Simple Aspects 141 Understanding Aspect Lifetime and Scope 178 Validating Aspect Usage 180 Initializing Aspects 184 Developing Composite Aspects 185 Coping with Several Aspects on the Same Target 201 Targeting Windows Phone, Windows Store or Silverlight 205 Understanding Interception Aspects 206 Understanding Aspect Serialization 208 Testing and Debugging Aspects 210 Advanced 232 Examples 235 Enforcing Design Rules 253 Restricting Interface Implementation 253 Controlling Component Visibility Beyond Private and Internal 258 Developing Custom Architectural Constraints 270 Working with Errors, Warnings, and Messages 281 Ignoring and Escalating Warnings 281 3 PostSharp 3.0 Documentation Emitting Errors, Warnings, and Messages 282 Combining with Other Technologies 285 ASP.NET 285 ILMerge 285 Obfuscation Tools 286 Microsoft Code Analysis (FxCop) 286 4 PostSharp 3.0 Documentation Conceptual Documentation PostSharp is a tool that allows development teams to achieve more with less code in Microsoft .NET: 1. Software developers will write clean, stable, efficient, and concise code. Fewer lines of code mean less time and fewer defects. 2. Software architects will be able to deliver partially or fully executable patterns, not just coding guidelines. After having carefully identified and selected design patterns, architects can code, in C# or Visual Basic, how the pattern should be implemented. Depending on the complexity of the pattern, PostSharp will automatically implement the pattern and/or will automatically validate that its manual implementation respects predefined validity rules. This topic contains the following sections. • About Design Pattern Automation at page 5 • PostSharp components at page 6 • How does PostSharp work? at page 6 About Design Pattern Automation PostSharp can be categorized as a Design Pattern Automation tool. Design Pattern Automation is the use of tools to optimize productivity of development teams implementing software based on patterns. Software patterns are general reusable solutions to a commonly occurring problem. Software design patterns are patterns in the context of software design. Typically, the architecture team would identify and select design patterns in an early phase of a project. Architects would then create designs that implement the design patterns. These designs typically include class diagrams, and instructions specifying how developers should implement the design. Design specifications are usually expressed in natural language. Design Pattern Automation refers to the ability to express designs in a formal language and use tools to help implementing the design. Tools can help developers and architects in implementing designs derived from patterns in two ways: • Tools can automatically implement some of the artefacts and behaviors required by the design, which then don't appear in source code. Design Pattern Automation therefore raises the level of abstraction of the source code, and makes the design intent more apparent in source code. 5 PostSharp 3.0 Documentation • Tools can validate hand-written code against design rules, from simple naming conventions to complex rules involving analysis of source code. Without tools, this activity would have only relied on code review. Design Pattern Automation can extend to patterns that are not strictly considered design patterns: • Design Pattern Automation extends to application-specific patterns (also named custom patterns), which are specific to the language, framework, and problem domain of an application. Althought these patterns are not general to the whole software engineering industry, their implementation can also be automatically generated and/or validated. • Design Pattern Automation extends to implementation patterns, which are mere repetitions of code. Logging and exception handling belong to that category. PostSharp components PostSharp is composed of the following frameworks and libraries: • PostSharp Pattern Libraries provide ready-made, commoditized implementations of some of the most common patterns in .NET. For more information, see section Working with Ready- Made Aspects at page 41. • PostSharp Aspect Framework allows you to automate the implementation of other code patterns and address code repetitions that are specific to your own applications, or simply that are not available off-the-shelf in a pattern library. PostSharp Aspect Framework is built on the principle of Aspect-Oriented Programming (AOP), a well-established programming paradigm, orthogonal to (and non-competing with) object-oriented programming or functional programming, that allows to modularize the implementation of some features that would otherwise cross-cut a large number of classes and methods. PostSharp contains the most advanced AOP framework for Microsoft .NET. For more information, see sections Developing Custom Aspects at page 141 and Adding Aspects to Code at page 113. • PostSharp Architecture Framework is a static analysis tool that allows you to automate the validation of design pattern implementations, to enforce design intend, or simply to verify coding guidelines. The framework allows you to create constraint classes that encapsulate the validation logic and that can be applied to code artefacts. The framework provides tools to analyze the relationships between code artefacts and have access to the AST of method bodies. For more information, see section Enforcing Design Rules at page 253. How does PostSharp work? PostSharp inserts itself in the build process and enhances or validates the output of the C# or VB compiler. Although this might sound magic or dangerous, PostSharp's MSIL technology is stable and mature, and has been used by tens of thousands of projects since 2004. Other .NET products relying on MSIL transformation or analysis include Microsoft Code Contracts, Microsoft Code Analysis, and Microsoft Code Coverage. 6 PostSharp 3.0 Documentation CHAPTER 1 What's New in PostSharp? PostSharp has been around since the early days of .NET 2.0 in 2004. Since the first version, many features have been added to make PostSharp the most popular and by far the most powerful tool for aspect-oriented programming and design pattern automation in .NET. What's New in PostSharp 3.0? The focus in PostSharp 3.0 was to deliver more value to customers with less initial learning. Instead of having to learn the product before being able to build aspects, customers can now choose from a set of ready-made implementations of some of the most popular design pattern, and apply them to their application from the Visual Studio code editor, using smart tags and wizards. We also improved support for Windows Phone, Silverlight, Windows Store and Portable Class Library. Model Pattern Library The NotifyPropertyChangedAttribute aspect is a ready-made implementation of the NotifyProperty- Changed design pattern. The PostSharp.Patterns.Contracts namespace provides code contracts that can validate, at runtime, the value of a parameter, a property, or a field. Diagnostics Pattern Library The LogAttribute and LogExceptionAttribute aspects provide a ready-made and high-performance implementation of a tracing aspect. They are compatible with the most popular logging framework, including log4net, nlog, and Enterprise Library. Threading Pattern Library PostSharp Threading Pattern Library invites you to raise the level of abstraction in which multithreading is being addressed. It provides three threading models: actors (Actor), reader-writer synchronized (ReaderWriterSynchronizedAttribute) and thread unsafe (ThreadUnsafeAttribute). Additionally, BackgroundAttribute and DispatchedAttribute allow you to easily dispatch a thread back and forth between a background and the UI thread. Smart Tags and Wizards in Visual Studio Smart tags allow for better discoverability of ready-made aspects and pattern implementations. When the aspect requires configuration, a wizard user interface collects the parameters and then generates the proper code. Better platform support through Portable Class Libraries Windows Phone, Windows Store and Silverlight are now first-class citizens. All features that are available for the .NET Framework now also work with these platforms. All platforms are supported 7 PostSharp 3.0 Documentation transparently through the portable class library. To provide this feature, we had to develop the PortableFormatter, a portable serializer similar in function to the BinaryFormatter. All you have to do is to replace [Serializable] with [PSerializable]. Unified deployment through NuGet and Visual Studio Gallery Installation of PostSharp is now unified and built on top
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]
  • Introducing Visual Studio 2010
    INTRODUCING VISUAL STUDIO 2010 DAVID CHAPPELL MAY 2010 SPONSORED BY MICROSOFT CONTENTS Tools and Modern Software Development ............................................................................................ 3 Understanding Visual Studio 2010 ........................................................................................................ 3 The Components of Visual Studio 2010 ................................................................................................... 4 A Closer Look at Team Foundation Server............................................................................................... 5 Work Item Tracking ............................................................................................................................. 7 Version Control .................................................................................................................................... 8 Build Management: Team Foundation Build ...................................................................................... 9 Reporting and Dashboards.................................................................................................................. 9 Using Visual Studio 2010 ..................................................................................................................... 12 Managing Requirements ....................................................................................................................... 12 Architecting a Solution .........................................................................................................................
    [Show full text]
  • Compile-Time Safety and Runtime Performance in Programming Frameworks for Distributed Systems
    Compile-time Safety and Runtime Performance in Programming Frameworks for Distributed Systems lars kroll Doctoral Thesis in Information and Communication Technology School of Electrical Engineering and Computer Science KTH Royal Institute of Technology Stockholm, Sweden 2020 School of Electrical Engineering and Computer Science KTH Royal Institute of Technology TRITA-EECS-AVL-2020:13 SE-164 40 Kista ISBN: 978-91-7873-445-0 SWEDEN Akademisk avhandling som med tillstånd av Kungliga Tekniska Högskolan fram- lägges till offentlig granskning för avläggande av teknologie doktorsexamen i informations- och kommunikationsteknik på fredagen den 6 mars 2020 kl. 13:00 i Sal C, Electrum, Kungliga Tekniska Högskolan, Kistagången 16, Kista. © Lars Kroll, February 2020 Printed by Universitetsservice US-AB IV Abstract Distributed Systems, that is systems that must tolerate partial failures while exploiting parallelism, are a fundamental part of the software landscape today. Yet, their development and design still pose many challenges to developers when it comes to reliability and performance, and these challenges often have a negative impact on developer productivity. Distributed programming frameworks and languages attempt to provide solutions to common challenges, so that application developers can focus on business logic. However, the choice of programming model as provided by a such a framework or language will have significant impact both on the runtime performance of applications, as well as their reliability. In this thesis, we argue for programming models that are statically typed, both for reliability and performance reasons, and that provide powerful abstractions, giving developers the tools to implement fast algorithms without being constrained by the choice of the programming model.
    [Show full text]
  • Q# Introduction
    Introduction to Q# Q# (Q-sharp) is a domain-specific and open-sourced programming language, part of Microsoft's Quantum Development Kit (QDK), used for expressing quantum algorithms. It is to be used for writing subroutines that execute on an adjunct quantum processing unit (QPU), under the control of a classical host program and computer. Q# can be installed on Windows 10, OSX and Linux. The instructions to install Q# can be found in the online documentation here. If you prefer not to install Q# on your local computer, you can use one of the machines in CSE’s Virtual Lab found here. The Windows 10 machines already have .Net Core SDK, Visual Studio and VS Code installed to get your started, you should still install the Q# extension to get syntax- highlighting, code complete, etc. To get help with Q# and the QDK, feel free to ask questions on our messages board, come to office hours as posted on the calendar, or ask in stackoverflow. The Q# team is constantly monitoring any questions posted there with the "q#" tag. Writing Q# programs. Operations and functions are the basic unit of execution in Q#. They are roughly equivalent to a function in C or C++ or Python, or a static method in C# or Java. A Q# operation is a quantum subroutine. That is, it is a callable routine that contains quantum operations. A Q# function is a classical subroutine used within a quantum algorithm. It may contain classical code but no quantum operations. Specifically, functions may not allocate or borrow qubits, nor may they call operations.
    [Show full text]
  • Pyrevit Documentation Release 4.7.0-Beta
    pyRevit Documentation Release 4.7.0-beta eirannejad May 15, 2019 Getting Started 1 How To Use This Documents3 2 Create Your First Command5 3 Anatomy of a pyRevit Script 7 3.1 Script Metadata Variables........................................7 3.2 pyrevit.script Module...........................................9 3.3 Appendix A: Builtin Parameters Provided by pyRevit Engine..................... 12 3.4 Appendix B: System Category Names.................................. 13 4 Effective Output/Input 19 4.1 Clickable Element Links......................................... 19 4.2 Tables................................................... 20 4.3 Code Output............................................... 21 4.4 Progress bars............................................... 21 4.5 Standard Prompts............................................. 22 4.6 Standard Dialogs............................................. 26 4.7 Base Forms................................................ 35 4.8 Graphs.................................................. 37 5 Keyboard Shortcuts 45 5.1 Shift-Click: Alternate/Config Script................................... 45 5.2 Ctrl-Click: Debug Mode......................................... 45 5.3 Alt-Click: Show Script file in Explorer................................. 46 5.4 Ctrl-Shift-Alt-Click: Reload Engine................................... 46 5.5 Shift-Win-Click: pyRevit Button Context Menu............................. 46 6 Extensions and Commmands 47 6.1 Why do I need an Extension....................................... 47 6.2 Extensions...............................................
    [Show full text]
  • 2009 Door County Folk Festival Syllabus.Pdf
    30th Annual Door County Folk Festival Get Your Foot in the Door! Wednesday – Sunday, July 8 – 12, 2009 Sister Bay, Ephraim and Baileys Harbor, Wisconsin http://www.dcff.net/[email protected]/(773-463-2288) DCFF Home Dance Syllabus Advance Regular Discount Price On Paper $19.00 $22.00 OnCD $8.00 $11.00 2009 Door County Folk Festival (DCFF), Wisconsin 2009 Door County Folk Festival Schedule v11 (Subject to Change - Changes Marked with +) Get Your Foot in the Door! Wednesday - Sunday, July 8-12, 2009 - Sister Bay, Ephraim and Baileys Harbor, Wisconsin DCFF Home Phone: (773)-463-2288 or (773)-634-9381 [email protected] Wednesday Start End Where Event Who Afternoon 12:00pm SBVH Staff Arrives Staff & Volunteers 1:00pm SBVH Setup Begins Staff & Volunteers Evening 6:00pm SBVH Registration Begins Staff & Volunteers 6:30pm 9:00pm BHTH TCE Program - Session 1 - Grades K-5 Sanna Longden 8:00pm 1:00am SBVH 8th of July Party with Recorded Music Forrest Johnson & Other Regional Leaders 1:00am 2:30am SBVH Late Night Party Paul Collins & Company Thursday Start End Where Event Who Morning 9:00am SBVH Setup & Registration Continues Staff & Volunteers 9:00am 12:00pm BHTH TCE Program - Session 2 - Grades K-5 Sanna Longden 10:00am 11:45am SBVH Vintage American Round Dances Paul Collins Afternoon 11:45am 1:15pm Lunch Break 12:00pm 1:00pm SBVH Zumba Latin Dance Workout Session Diane Garvey 1:15pm 3:00pm SBVH Swing Dance - Lindy Hop Workshop Maureen Majeski: Lindy Hop 1:15pm 3:00pm BHTH Regional Greek Folk Dance Workshop Rick King, Dit Olshan, Paul Collins Rick: Vlaha
    [Show full text]
  • Teamcity 7.1 Documentation.Pdf
    1. TeamCity Documentation . 4 1.1 What's New in TeamCity 7.1 . 5 1.2 What's New in TeamCity 7.0 . 14 1.3 Getting Started . 26 1.4 Concepts . 30 1.4.1 Agent Home Directory . 31 1.4.2 Agent Requirements . 32 1.4.3 Agent Work Directory . 32 1.4.4 Authentication Scheme . 33 1.4.5 Build Agent . 33 1.4.6 Build Artifact . 34 1.4.7 Build Chain . 35 1.4.8 Build Checkout Directory . 36 1.4.9 Build Configuration . 37 1.4.10 Build Configuration Template . 38 1.4.11 Build Grid . 39 1.4.12 Build History . 40 1.4.13 Build Log . 40 1.4.14 Build Number . 40 1.4.15 Build Queue . 40 1.4.16 Build Runner . 41 1.4.17 Build State . 41 1.4.18 Build Tag . 42 1.4.19 Build Working Directory . 43 1.4.20 Change . 43 1.4.21 Change State . 43 1.4.22 Clean Checkout . 44 1.4.23 Clean-Up . 45 1.4.24 Code Coverage . 46 1.4.25 Code Duplicates . 47 1.4.26 Code Inspection . 47 1.4.27 Continuous Integration . 47 1.4.28 Dependent Build . 47 1.4.29 Difference Viewer . 49 1.4.30 Guest User . 50 1.4.31 History Build . 51 1.4.32 Notifier . 51 1.4.33 Personal Build . 52 1.4.34 Pinned Build . 52 1.4.35 Pre-Tested (Delayed) Commit . 52 1.4.36 Project . 53 1.4.37 Remote Run . ..
    [Show full text]
  • Mixed-Signal and Dsp Design Techniques
    MIXED-SIGNAL AND DSP DESIGN TECHNIQUES INTRODUCTION SECTION 1 SAMPLED DATA SYSTEMS SECTION 2 ADCs FOR DSP APPLICATIONS SECTION 3 DACs FOR DSP APPLICATIONS SECTION 4 FAST FOURIER TRANSFORMS SECTION 5 DIGITAL FILTERS SECTION 6 DSP HARDWARE SECTION 7 INTERFACING TO DSPs SECTION 8 DSP APPLICATIONS SECTION 9 HARDWARE DESIGN SECTION 10 TECHNIQUES INDEX ANALOG DEVICES TECHNICAL REFERENCE BOOKS PUBLISHED BY PRENTICE HALL Analog-Digital Conversion Handbook Digital Signal Processing Applications Using the ADSP-2100 Family (Volume 1:1992, Volume 2:1994) Digital Signal Processing in VLSI DSP Laboratory Experiments Using the ADSP-2101 ADSP-2100 Family User's Manual PUBLISHED BY ANALOG DEVICES Practical Design Techniques for Sensor Signal Conditioning Practical Design Techniques for Power and Thermal Management High Speed Design Techniques Practical Analog Design Techniques Linear Design Seminar ADSP-21000 Family Applications Handbook System Applications Guide Amplifier Applications Guide Nonlinear Circuits Handbook Transducer Interfacing Handbook Synchro & Resolver Conversion THE BEST OF Analog Dialogue, 1967-1991 HOW TO GET INFORMATION FROM ANALOG DEVICES Analog Devices publishes data sheets and a host of other technical literature supporting our products and technologies. Follow the instructions below for worldwide access to this information. FOR DATA SHEETS U.S.A. and Canada I Fax Retrieval. Telephone number 800-446-6212. Call this number and use a faxcode corresponding to the data sheet of your choice for a fax-on-demand through our automated AnalogFax™ system. Data sheets are available 7 days a week, 24 hours a day. Product/faxcode cross reference listings are available by calling the above number and following the prompts.
    [Show full text]
  • Q1 Where Do You Use C++? (Select All That Apply)
    2021 Annual C++ Developer Survey "Lite" Q1 Where do you use C++? (select all that apply) Answered: 1,870 Skipped: 3 At work At school In personal time, for ho... 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% ANSWER CHOICES RESPONSES At work 88.29% 1,651 At school 9.79% 183 In personal time, for hobby projects or to try new things 73.74% 1,379 Total Respondents: 1,870 1 / 35 2021 Annual C++ Developer Survey "Lite" Q2 How many years of programming experience do you have in C++ specifically? Answered: 1,869 Skipped: 4 1-2 years 3-5 years 6-10 years 10-20 years >20 years 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% ANSWER CHOICES RESPONSES 1-2 years 7.60% 142 3-5 years 20.60% 385 6-10 years 20.71% 387 10-20 years 30.02% 561 >20 years 21.08% 394 TOTAL 1,869 2 / 35 2021 Annual C++ Developer Survey "Lite" Q3 How many years of programming experience do you have overall (all languages)? Answered: 1,865 Skipped: 8 1-2 years 3-5 years 6-10 years 10-20 years >20 years 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% ANSWER CHOICES RESPONSES 1-2 years 1.02% 19 3-5 years 12.17% 227 6-10 years 22.68% 423 10-20 years 29.71% 554 >20 years 34.42% 642 TOTAL 1,865 3 / 35 2021 Annual C++ Developer Survey "Lite" Q4 What types of projects do you work on? (select all that apply) Answered: 1,861 Skipped: 12 Gaming (e.g., console and..
    [Show full text]
  • Programming with Windows Forms
    A P P E N D I X A ■ ■ ■ Programming with Windows Forms Since the release of the .NET platform (circa 2001), the base class libraries have included a particular API named Windows Forms, represented primarily by the System.Windows.Forms.dll assembly. The Windows Forms toolkit provides the types necessary to build desktop graphical user interfaces (GUIs), create custom controls, manage resources (e.g., string tables and icons), and perform other desktop- centric programming tasks. In addition, a separate API named GDI+ (represented by the System.Drawing.dll assembly) provides additional types that allow programmers to generate 2D graphics, interact with networked printers, and manipulate image data. The Windows Forms (and GDI+) APIs remain alive and well within the .NET 4.0 platform, and they will exist within the base class library for quite some time (arguably forever). However, Microsoft has shipped a brand new GUI toolkit called Windows Presentation Foundation (WPF) since the release of .NET 3.0. As you saw in Chapters 27-31, WPF provides a massive amount of horsepower that you can use to build bleeding-edge user interfaces, and it has become the preferred desktop API for today’s .NET graphical user interfaces. The point of this appendix, however, is to provide a tour of the traditional Windows Forms API. One reason it is helpful to understand the original programming model: you can find many existing Windows Forms applications out there that will need to be maintained for some time to come. Also, many desktop GUIs simply might not require the horsepower offered by WPF.
    [Show full text]
  • ASP.NET SQL Server
    CYAN YELLOW MAGENTA BLACK PANTONE 123 C BOOKS FOR PROFESSIONALS BY PROFESSIONALS® THE EXPERT’S VOICE® IN SQL SERVER Companion eBook Available Pro ASP.NET for SQL Server: High Performance Data Access for Web Developers Pro Dear Reader, ASP.NET ASP.NET As web developers, we work with ASP.NET and SQL Server by using a rich toolkit of databound controls and database functionality that promises great Pro performance and productivity gains after we know how to use it properly. Unfortunately, that toolkit is cluttered with a wide spectrum of features—some ideal for the one-man shop building a tiny application, and others aimed at large developer teams producing websites used by thousands of people. This book carves out a path for the senior developer who needs to produce a professional website that will perform well under high load. I focus on what a senior developer should know and use daily while also for explaining which features to avoid and why. There are several, little-known features ASP.NET in ASP.NET and SQL Server that work very well together without requiring much effort. These features get detailed coverage. Each chapter includes a full sample project, to help you learn by digging into some good code. These projects are for designed to keep you engaged while using them to understand the chapter topics in greater detail. What you will learn from this book are techniques that allow you to leverage SQL Server the many performance and productivity improvements that have been provided ASP.NET and SQL Server. These improvements will help you produce better SQL Server websites with the desired results right from the start.
    [Show full text]
  • Porting an Interpreter and Just-In-Time Compiler to the Xscale Architecture
    Porting an Interpreter and Just-In-Time Compiler to the XScale Architecture Malte Hildingson Dept. of Informatics and Mathematics University of Trollhättan / Uddevalla, Sweden E-mail: [email protected] Abstract code conformed to the targeted environment, the makefiles had to be adjusted accordingly. This task was hugely sim- This exploratory study covers the work of porting an in- plified by tools such as autoconf and automake which per- termediate language interpreter to the ARM-based XScale formed the necessary routines for the target platform given architecture. The interpreter is part of the Mono project, an required input parameters, and created makefiles which en- open source effort to create a .NET-compatible development sured that the code was compiled properly. framework. We cover trampolines together with the proce- dure call standard, discuss memory protection and present a 2. Background complete implementation of atomic operations for the ARM architecture. The Mono [11] project, launched in July 2001 by Ximian Inc. [12], is an effort to create an open source imple- mentation of the .NET [13] development framework. The 1. Introduction project includes the Common Language Infrastucture (CLI) [14] virtual machine, a class library for any programming The biggest problem with porting software is finding language conforming to the Common Language Runtime which parts of the software reflect architectural features of (CLR) [15] and compilers that target the CLR. The virtual the hardware that it runs on [1]. The open source movement machine consists of a class loader, garbage collector and has been a benefactor in the sense that standards for porting an interpreter or a just-in-time (JIT) compiler, depending open software have been in demand and developed.
    [Show full text]