The Zonnon Project: a Language and Compiler Experiment

Total Page:16

File Type:pdf, Size:1020Kb

The Zonnon Project: a Language and Compiler Experiment The Zonnon Project: A Language and Compiler Experiment Евгений Зуев, ETH Zürich Нижегородский гоcударственный университет 27 сентября 2005 План История проекта, предшественники Язык Zonnon Компилятор Zonnon CCI & Модель компиляции Zonnon Интеграция в Visual Studio Zonnon Builder Инфо, Выводы, Участники 2 История проекта 1999, Oberon.NET Projects 7 & 7+, инициированные Microsoft Research 2001, Active Oberon ETH Zürich; понятие active object 2004, Active C# ETH Zürich; механизм взаимодействия процессов, основанный на понятии синтаксически-ориентированных протоколов 3 Особенности языка Zonnon Младший член семейства Pascal,Modula-2, Oberon: компактный, легкий для изучения и использования Поддерживает модульность (импорт прогр. единиц и экспорт членов прогр.единиц) Поддерживает ООП на основе концепции интерфейс/реализация и механизма уточнения (refinement) интерфейсов Поддерживает параллельность на основе понятия активных объектов и синтакси- ческих протоколов 4 Архитектура Zonnon-программ 1 Module Definition System managed object: - encapsulates resources Unified unit of abstraction: - implements definitions - represents abstract interface - aggregates implementations - refines another definition Object Implementation Program managed actor/resource: - def.implementation of a definition - implements definitions - standalone aggregation unit - aggregates implementations - specifies concurrent behaviour 5 Архитектура Zonnon-программ 2 Definition D1 Definition D2 Definition D3 Definition D11 (refines D1) Implementation D3 (default for Def D3) Implementation D11 (default for Def D11) Object B (implements D2, reuses default implem for D3, and aggregates I) Object A (implements D1 & D11 without reusing def implem) Implementation I (standalone resource) 6 Definitions (* Common interface for all kind of vehicles *) definition Vehicle; var { get } Speed : integer; (* read-only *) procedure SpeedUp ( d:integer ); procedure SlowDown ( d:integer ); end Vehicle. definition Truck refines Vehicle; (* Inherits interface from Vehicle *) const SpeedLimit = 90; end Truck. 7 Definition & Implementation (* Common interface for random numbers generators *) definition Random; var { get } Next : integer; (* read-only *) procedure Flush; (* reset *) end Random. (* A default implementation of the generator *) implementation Random; var { private } z : real; procedure { public, get } Next : integer; const a = 16807; m = 2147483647; q = m div a; r = m mod a; var g : integer; begin g := a*(z mod q) – r*(z div q); if g>0 then z := g else z := g+m end; return z*(1.0/m) end Next; procedure Flush; begin z := 3.1459 end Flush; begin Flush end Random. 8 Definitions & Objects (* Common interface for the random numbers generator *) definition Random; var { get } Next : integer; (* read-only *) procedure Flush; (* reset *) end Random. (* A custom implementation of the generator *) object myRandom implements Random; (* Procedure Next is reused from default implementation *) (* Procedure Flush is customized *) procedure Flush implements Random.Flush; begin z := 2.7189 end Flush; begin Flush end myRandom. 9 Modules & Objects module Test; import Random, (* both definition and implem are imported *) myRandom; var x : object { Random }; (* x’s actual type is either Random or any type implementing Random *) object R2 implements Random; (* Another implementation of Random definition *) . end R2; begin x := new Random; . x := new myRandom; . x := new R2; end Test. 10 Taken from a talk of JG, BK, and DL : 1 Пример активности A Pipeline with Active Objects AWAIT Stage Stage Activity Buffer Get Get Put Put AWAIT Active Object Active Object 11 System-wide activity is scheduled by evaluating the set of all AWAIT preconditions Ta ken from o a talk f JG, BK Activity Example: , and DL A Pipeline with Active Objects 2 object Stage (next: Stage); var { private } n, in, out: integer; buf: array N of object; (*used as a circular buffer*) procedure { private } Get (var x: object); Wait whilst begin { locked } (*mutual exclusion*) the buffer await (n # 0); (* precondition to continue*) is empty dec(n); x := buf[out]; out := (out+1) mod N end Get; procedure { public } Put (x: object); begin { locked } await (n # N); (*mutual exclusion*) inc(n); buf[in] := x; in := (in+1) mod N end Put; Wait whilst the buffer activity Processing; var x: OBJECT; is full begin loop Get(x); (*process x;*) next.Put(x) end end Processing; begin (*initialise this new object instance*) each activity n := 0; in := 0; out := 0; new Processing; has a separate end Stage; thread 12 Activities & Protocols definition D; protocol P = (a, b, c); (* declaration of a protocol *) end D. object O; import D; activity A implements D.P; (* declaration of an activity *) begin ... return u, v, w; (* activity returns tokens *) … x, y := await; (* activity receives tokens *) end A; var p: P; (* declaration of an activity variable *) begin p := new A; (* create an activity *) (* Continued dialog between caller and callee *) p(x, y); (* caller sendstokensx, y to activityp*) u, v, w := await p; (* caller receives tokens from p *) if u = P.a then ... end; (* using the token received from p *) r := p(s, t); (* same as a(s, t); r := await p *) await p; (* wait for activity to terminate *) end O. 13 Синтаксические протоколы definition Fighter; (* See full example in the Zonnon Language Report *) (* The protocol is used to create Fighter.Karate activities *) protocol (* syntax of the dialog*) { fight = { attack ( { defense attack } | RUNAWAY [ ?CHASE] | KO | fight ) }. attack = ATTACK strike. defense = DEFENSE strike. strike = bodypart [ strength ]. bodypart = LEG | NECK | HEAD. strength = integer. } (*enumeration of the dialog elements to be exchanged*) Karate = ( RUNAWAY, CHASE, KO, ATTACK, DEFENSE, LEG, NECK, HEAD ); end Fighter. 14 Outline История проекта Язык Zonnon Zonnon-компилятор CCI & Модель компиляции Zonnon Интеграция в Visual Studio Zonnon Builder Инфо, Выводы, Участники 15 Zonnon-компилятор Front-end реализован на C# с использо- ванием традиционных методов (recursive descent parser с полным семантическим контролем) Генерация кода и интеграция: на основе CCI framework Реализованы три варианта компилятора (все используют одно и то же ядро): - компилятор командной строки - компилятор,интегрир. в Visual Studio - компилятор,интегрир в Zonnon Builder 16 Zonnon-компилятор в Visual Studio Демонстрация: Двоичный поиск 17 План История проекта Язык Zonnon Zonnon-компилятор CCI & Модель компиляции Zonnon Интеграция в Visual Studio Zonnon Builder Инфо, Выводы, Участники 18 Common Compiler Infrastructure Универсальный framework разработки компиляторов для .NET и их интеграции в Visual Studio Реализует CLR-ориентиров. сем.анализ, построение дерева программы и его преобразования, разрешение имен, обработку ошибок и генерацию IL+MD; не поддерживает лексич.& синт.анализ Также может использоватиься как более эффективная альтернатива System.Reflection Не требуется COM-программирование: только C# Реализован в Microsoft; используется в компиля- торах Cω & Spec# (а также в нескольких других внутренних проектах Microsoft) 19 Архитектура CCI Compiler Front End Compiler Back End Семантическое Сервис для представле-- генерации ние сборок Сервис для интеграции Visual Studio .NET.NET 20 Основные компоненты CCI Intermediate Representation (IR) – A rich hierarchy of C# classes representing most common and typical notions of modern programming languages. System.Compiler.dll Transformers (“Visitors”) – A set of classes performing consecutive transformations IR MSIL System.Compiler.Framework.dll Integration Service – Variety of classes and methods providing integration to Visual Studio environment (additional functionality required for editing, debugging, background compilation, project management etc.) 21 Использование CCI: Общие принципы All CCI services are represented as classes. In order to make use of them the compiler writer should define classes derived from CCI ones. (The same approach is taken for Scanner, Parser, IR, Transformers, and for Integration Service) Derived classes should implement some abstract or virtual methods declared in the base classes (they compose a “unified interface” with the environment) Derived classes may (and typically do) implement some language-specific functionality. 22 Использование CCI: Синтаксический анализатор using System.Compiler; Prototype parser: abstract class from CCI namespace ZLanguageCompiler { public sealed class ZParser : System.Compiler.Parser { public override ... ParseCompilationUnit(...) { l l . a } C private ... ParseZModule(...) { . } Parser’s “unified interface”: } implementation of the } interface between Z parser’s own logic Z compiler and environment 23 Модель компиляции CCI 1 IL/MD Writer OutputOutput Source MSIL+MD Source IR AssemblyAssembly (AST) IL/MD Scanner Visitors & Reader Parser ImportedImported AssembliesAssemblies Source Language Part: CCI Part: Language specific Common to all languages 24 Модель компиляции CCI 2 CCI IR Hierarchy CCI Base Transformers Visitor 1 Visitor 2 MSIL+MD … Visitor N X Language IR Hierarchy X Language Transformers Visitor 1 Visitor 2 MSIL+MD Visitor 3+ … Visitor M 25 Модель компиляции CCI: пример Extending the IR Hierarchy Ada exit statement: exit when <Condition>; 1 Extend existing Exit node public class If : Statement public class AdaExit : Exit { { Expression condition; Expression condition; } Block falseBlockfalseBlock;; Block trueBlocktrueBlock;; 2 Add new statement to the hierarchy } public class AdaExit : Statement { Expression condition; } 3 Use semantic
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]
  • Liste Von Programmiersprachen
    www.sf-ag.com Liste von Programmiersprachen A (1) A (21) AMOS BASIC (2) A# (22) AMPL (3) A+ (23) Angel Script (4) ABAP (24) ANSYS Parametric Design Language (5) Action (25) APL (6) Action Script (26) App Inventor (7) Action Oberon (27) Applied Type System (8) ACUCOBOL (28) Apple Script (9) Ada (29) Arden-Syntax (10) ADbasic (30) ARLA (11) Adenine (31) ASIC (12) Agilent VEE (32) Atlas Transformatikon Language (13) AIMMS (33) Autocoder (14) Aldor (34) Auto Hotkey (15) Alef (35) Autolt (16) Aleph (36) AutoLISP (17) ALGOL (ALGOL 60, ALGOL W, ALGOL 68) (37) Automatically Programmed Tools (APT) (18) Alice (38) Avenue (19) AML (39) awk (awk, gawk, mawk, nawk) (20) Amiga BASIC B (1) B (9) Bean Shell (2) B-0 (10) Befunge (3) BANCStar (11) Beta (Programmiersprache) (4) BASIC, siehe auch Liste der BASIC-Dialekte (12) BLISS (Programmiersprache) (5) Basic Calculator (13) Blitz Basic (6) Batch (14) Boo (7) Bash (15) Brainfuck, Branfuck2D (8) Basic Combined Programming Language (BCPL) Stichworte: Hochsprachenliste Letzte Änderung: 27.07.2016 / TS C:\Users\Goose\Downloads\Softwareentwicklung\Hochsprachenliste.doc Seite 1 von 7 www.sf-ag.com C (1) C (20) Cluster (2) C++ (21) Co-array Fortran (3) C-- (22) COBOL (4) C# (23) Cobra (5) C/AL (24) Coffee Script (6) Caml, siehe Objective CAML (25) COMAL (7) Ceylon (26) Cω (8) C for graphics (27) COMIT (9) Chef (28) Common Lisp (10) CHILL (29) Component Pascal (11) Chuck (Programmiersprache) (30) Comskee (12) CL (31) CONZEPT 16 (13) Clarion (32) CPL (14) Clean (33) CURL (15) Clipper (34) Curry (16) CLIPS (35)
    [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]
  • 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]
  • Languages and Compilers (Sprog Og Oversættere)
    Languages and Compilers (SProg og Oversættere) Bent Thomsen Department of Computer Science Aalborg University With acknowledgement to Microsoft, especially Nick Benton,whose slides this lecture is based on. 1 The common intermediate format nirvana • If we have n number of languages and need to have them running on m number of machines we need m*n compilers! •Ifwehave onecommon intermediate format we only need n front-ends and m back-ends, i.e. m+n • Why haven’t you taught us about the common intermediate language? 2 Strong et al. “The Problem of Programming Communication with Changing Machines: A Proposed Solution” C.ACM. 1958 3 Quote This concept is not particularly new or original. It has been discussed by many independent persons as long ago as 1954. It might not be difficult to prove that “this was well-known to Babbage,” so no effort has been made to give credit to the originator, if indeed there was a unique originator. 4 “Everybody knows that UNCOL was a failure” • Subsequent attempts: – Janus (1978) • Pascal, Algol68 – Amsterdam Compiler Kit (1983) • Modula-2, C, Fortran, Pascal, Basic, Occam – Pcode -> Ucode -> HPcode (1977-?) • FORTRAN, Ada, Pascal, COBOL, C++ – Ten15 -> TenDRA -> ANDF (1987-1996) • Ada, C, C++, Fortran – .... 5 Sharing parts of compiler pipelines is common • Compiling to textual assembly language • Retargetable code-generation libraries – VPO, MLRISC • Compiling via C – Cedar, Fortran, Modula 2, Ada, Scheme, Standard ML, Haskell, Prolog, Mercury,... • x86 is a pretty convincing UNCOL – pure software translation
    [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]
  • Using Powershell and Reflection API to Invoke Methods from .NET
    Using Powershell and Reflection API to invoke methods from .NET Assemblies written by Khai Tran | October 14, 2013 During application assessments, I have stumbled upon several cases when I need to call out a specific function embedded in a .NET assembly (be it .exe or .dll extension). For example, an encrypted database password is found in a configuration file. Using .NET Decompiler, I am able to see and identify the function used to encrypt the database password. The encryption key appears to be static, so if I could call the corresponding decrypt function, I would be able to recover that password. Classic solution: using Visual Studio to create new project, import encryption library, call out that function if it’s public or use .NET Reflection API if it’s private (or just copy the class to the new workspace, change method accessibility modifier to public and call out the function too if it is self-contained). Alternative (and hopeful less-time consuming) solution: Powershell could be used in conjunction with .NET Reflection API to invoke methods directly from the imported assemblies, bypassing the need of an IDE and the grueling process of compiling source code. Requirements Powershell and .NET framework, available at http://www.microsoft.com/en-us/download/details.aspx?id=34595 Note that Powershell version 3 is used in the below examples, and the assembly is developed in C#. Walkthrough First, identify the fully qualified class name (typically in the form of Namespace.Classname ), method name, accessibility level, member modifier and method arguments. This can easily be done with any available .NET Decompiler (dotPeek, JustDecompile, Reflector) Scenario 1: Public static class – Call public static method namespace AesSample { public class AesLibStatic { ..
    [Show full text]
  • NET Reverse Engineering
    .NET.NET ReverseReverse EngineeringEngineering Erez Metula, CISSP Application Security Department Manager Security Software Engineer 2B Secure ErezMetula @2bsecure.co.il Agenda • The problem of reversing & decompilation • Server DLL hijacking • Introduction to MSIL & the CLR • Advanced techniques • Debugging • Patching • Unpacking • Reversing the framework • Exposing .NET CLR vulnerabilities • Revealing Hidden functionality • Tools! The problem of reversing & decompilation • Code exposure • Business logic • Secrets in code – passwords – connection strings – Encryption keys • Intellectual proprietary (IP) & software piracy • Code modification • Add backdoors to original code • Change the application logic • Enable functionality (example: “only for registered user ”) • Disable functionality (example: security checks) Example – simple reversing • Let ’s peak into the code with reflector Example – reversing server DLL • Intro • Problem description (code) • Topology • The target application • What we ’ll see Steps – tweaking with the logic • Exploiting ANY server / application vulnerability to execute commands • Information gathering • Download an assembly • Reverse engineer the assembly • Change the assembly internal logic • Upload the modified assembly, overwrite the old one. • Wait for some new action • Collect the data … Exploiting ANY server / application vulnerability to execute commands • Example application has a vulnerability that let us to access th e file system • Sql injection • Configuration problem (Open share, IIS permissions,
    [Show full text]
  • Introduction to .NET, C#, and Visual Studio
    Introduction to .NET, C#, and Visual Studio C# Programming January 8 Part I Administrivia Administrivia • When: Wednesdays 10–11am (and a few Mondays as needed) • Where: Moore 100B • This lab has Windows machines, but feel free to bring laptops • Office Hours: to be announced • Course webpage: http://www.seas.upenn.edu/~cse39905 Course Structure • No quizzes, no exams • Roughly 6 projects • Roughly 2 weeks per project • The final project will be slightly longer and more open-ended • Projects will be due at midnight on the night of the deadline • All assignments should be submitted through the Blackboard Digital Dropbox • Late policy: 15% off each day, up to 3 days late Final Project • Your chance to choose your own project • Brainstorming and planning will begin after spring break • Top projects will be entered into the Xtreme.NET Challenge – hopefully there will be 20 top projects :-) • First prize: Xbox 360! • Judges will include someone from Microsoft recruiting, maybe someone from the C# team • More details to come at http://www.seas.upenn.edu/~cse39905/xtreme Part II What is .NET? The Microsoft .NET Framework • .NET is a development platform that launched in 2000 • Goals include language independence, language integration, web services • Technologies to promote rapid development of secure, connected applications • .NET components include: • Languages (C#, VB, Visual C++, Visual J#, ...) • Common Language Runtime (CLR) • Framework Class Library (FCL) Common Language Runtime • A single runtime environment to execute programs written in any .NET language • Includes a virtual machine • Activates objects, manages memory, performs security checks, collects garbage • To run on the CLR, a language must adhere to a Common Language Specification (CLS) • A language must also build upon base types specified in the Common Type System (CTS) Languages • Language compilers translate source into Microsoft Intermediate Language (MSIL).
    [Show full text]
  • Diploma Thesis
    Faculty of Computer Science Chair for Real Time Systems Diploma Thesis Porting DotGNU to Embedded Linux Author: Alexander Stein Supervisor: Jun.-Prof. Dr.-Ing. Robert Baumgartl Dipl.-Ing. Ronald Sieber Date of Submission: May 15, 2008 Alexander Stein Porting DotGNU to Embedded Linux Diploma Thesis, Chemnitz University of Technology, 2008 Abstract Programming PLC systems is limited by the provided libraries. In contrary, hardware-near programming needs bigger eorts in e. g. initializing the hardware. This work oers a foundation to combine advantages of both development sides. Therefore, Portable.NET from the DotGNU project has been used, which is an im- plementation of CLI, better known as .NET. The target system is the PLCcore- 5484 microcontroller board, developed by SYS TEC electronic GmbH. Built upon the porting, two variants to use interrupt routines withing the Portabe.NET runtime environment have been analyzed. Finally, the reaction times to occuring interrupt events have been examined and compared. Die Programmierung für SPS-Systeme ist durch die gegebenen Bibliotheken beschränkt, während hardwarenahe Programmierung einen gröÿeren Aufwand durch z.B. Initialisierungen hat. Diese Arbeit bietet eine Grundlage, um die Vorteile bei- der Entwicklungsseiten zu kombinieren. Dafür wurde Portable.NET des DotGNU- Projekts, eine Implementierung des CLI, bekannter unter dem Namen .NET, be- nutzt. Das Zielsystem ist das PLCcore-5484 Mikrocontrollerboard der SYS TEC electronic GmbH. Aufbauend auf der Portierung wurden zwei Varianten zur Ein- bindung von Interrupt-Routinen in die Portable.NET Laufzeitumgebung untersucht. Abschlieÿend wurden die Reaktionszeiten zu eintretenden Interrupts analysiert und verglichen. Acknowledgements I would like to thank some persons who had inuence and supported me in my work.
    [Show full text]