Static Optimization in PHP 7

Total Page:16

File Type:pdf, Size:1020Kb

Static Optimization in PHP 7 Static Optimization in PHP 7 Nikita Popov Biagio Cosenza Ben Juurlink Dmitry Stogov Technische Universitat¨ Berlin, Germany Zend Technologies, Russia [email protected], fcosenza, [email protected] [email protected] Abstract In order to support its more dynamic features, PHP, like many PHP is a dynamically typed programming language commonly other scripting languages, has traditionally been implemented using used for the server-side implementation of web applications. Ap- an interpreter. While this provides a relatively simple and portable proachability and ease of deployment have made PHP one of the implementation, interpretation is notoriously slower than the exe- most widely used scripting languages for the web, powering im- cution of native code. For this reason, an increasingly common av- portant web applications such as WordPress, Wikipedia, and Face- enue to improving the performance of dynamic languages is the book. PHP’s highly dynamic nature, while providing useful lan- implementation of just-in-time (JIT) compilers [2], such as the guage features, also makes it hard to optimize statically. HHVM compiler for PHP [3]. On the other hand, JIT compilers This paper reports on the implementation of purely static byte- carry a large cost in terms of implementation complexity. code optimizations for PHP 7, the last major version of PHP. We In this work, we pursue a different approach: purely static, trans- discuss the challenge of integrating classical compiler optimiza- parent, bytecode-level optimization. By this we mean that a) run- tions, which have been developed in the context of statically-typed time feedback is not used in any form, b) no modification to the languages, into a programming language that is dynamically and virtual machine or other runtime components is required and c) op- weakly typed, and supports a plethora of dynamic language fea- timizations occur on the bytecode of the reference PHP implemen- tures. Based on a careful analysis of language semantics, we adapt tation. The latter point implies that, unlike many alternative PHP static single assignment (SSA) form for use in PHP. Combined with implementations, we must support the full scope of the language, type inference, this allows type-based specialization of instructions, including little used and hard to optimize features. as well as the application of various classical SSA-enabled com- This static approach is motivated by the PHP execution model, piler optimizations such as constant propagation or dead code elim- which uses multiple processes to serve short-running requests ination. based on a common shared memory bytecode cache. As this makes We evaluate the impact of the proposed static optimizations on runtime bytecode updates problematic, many dynamic optimization a wide collection of programs, including micro-benchmarks, li- methods become inapplicable or less efficient. We pursue interpre- braries and web frameworks. Despite the dynamic nature of PHP, tative optimizations partly due to the success of PHP 7, whose our approach achieves an average speedup of 50% on micro- optimized interpreter implementation performs within 20% of the benchmarks, 13% on computationally intensive libraries, as well HHVM JIT compiler for many typical web applications [4]. as 1.1% (MediaWiki) and 3.5% (WordPress) on web applications. Our optimization infrastructure is based on static single assign- ment (SSA) form [5] and makes use of type inference, both to en- Categories and Subject Descriptors D.3.4 [Programming Lan- able type-based instruction specialization and to support a range of guages]: Processors—Compilers; D.3.4 [Programming Languages]: classical SSA-based optimizations. Because PHP is dynamically Processors—Optimization typed and supports many dynamic language features such as scope introspection, the application of classical data-flow optimizations, Keywords PHP, static optimization, SSA form which have been developed in the context of statically typed lan- guages, is challenging. This requires a careful analysis of problem- 1. Introduction atic language semantics and some adaptations to SSA form and the In order to keep pace with the rapidly increasing growth of the used optimization algorithms. Web, web application development predominantly favors the use of Parts of the described optimization infrastructure will be part of scripting languages, whose increased productivity due to dynamic PHP 7.1. Our main contributions are: typing and an interactive development workflow is valued over the better performance of compiled languages. 1. A new approach to introducing SSA form into the PHP lan- PHP is one the most popular [1] scripting languages used for the guage, including adaptation for special assignment semantics server-side implementation of web applications. It powers some of and enhancement of type inference using π-nodes. the largest websites such as Facebook, Wikipedia and Yahoo, but 2. The implementation and analysis of a wide range of SSA- also countless small websites like personal blogs. enabled optimizations for a dynamic language. Permission to make digital or hard copies of all or part of this work for personal or 3. An experimental evaluation on a collection of micro-bench- classroom use is granted without fee provided that copies are not made or distributed marks, libraries and applications, including WordPress and for profit or commercial advantage and that copies bear this notice and the full citation MediaWiki. on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a The remainder of the paper is structured as follows: section 2 fee. Request permissions from [email protected]. describes related work on dynamic language optimization. Sec- CC’17, February 5–6, 2017, Austin, TX, USA tion 3 presents relevant PHP language semantics and section 4 dis- c 2017 ACM. 978-1-4503-5233-8/17/02...$15.00 cusses the use of SSA form in PHP. SSA-enabled static optimiza- http://dx.doi.org/10.1145/3033019.3033026 tions investigated in this work are described in section 5. An experi- 65 mental evaluation on micro-benchmarks, libraries and applications representation is used, instead all operations are performed on is presented in section 6. The paper closes with a discussion and the AST level. HPHPc does not support some of PHP’s dynamic conclusion in sections 7 and 8. language features and requires all code to be known in advance. The phc compiler [30] also translates PHP to C. A large focus of 2. Related Work the phc implementation is on accurately modeling the aliasing be- havior of references. To achieve this, flow- and context-sensitive SSA Static single assignment form [5] has become the preferred alias analysis, type inference and constant propagation are per- intermediate representation for program analysis and optimizing formed simultaneously and prior to construction of Hashed SSA code transformations, and is used by many modern optimizing form. In our work we will largely ignore this aspect, because accu- compilers [6–8]. Data-flow algorithms are often simpler to imple- rate handling of references has become much less important after ment, more precise and more performant when implemented on PHP 5.4 removed support for call-time pass-by-reference. Addi- SSA form. Typical examples include sparse conditional constant tionally, issues that will be discussed in section 3.5 effectively pre- propagation [9] and global value numbering [10]. More recently, vent this kind of analysis if PHP’s error handling model is fully SSA form has become of interest for compiler backends as well, supported. because the chordality of the SSA inference graph simplifies regis- A number of alternative PHP implementations leverage existing ter allocation [11]. JIT implementations. Phalanger [31] and its successor Peachpie Specific applications often require or benefit from extensions [32] target the .NET CLR, while Quercus [33] and JPHP [34] target of the basic SSA paradigm. Array SSA form [12] modifies SSA the JVM. HippyVM [35] uses the RPython toolchain. While many to capture precise element-level data-flow information for arrays of these projects report improvements over PHP 5, they cannot for use in parallelization. Hashed SSA form [13] extends SSA to achieve the same level of performance as a special-purpose JIT handle aliasing, by introducing additional µ (may-use) and χ (may- compiler such as HHVM. define) nodes. The ABCD algorithm [14] introduces π-nodes to improve the accuracy of value range inference. In this work, we further extend this idea for use in type inference. 3. Optimization Constraints A focus of recent research has been on the formal verification PHP supports a number of language features that complicate static of SSA-based optimizations [15–17], as well as SSA construction analysis. In the following, we discuss how they affect optimization [18], and destruction [19]. and also justify why we consider certain optimization approaches to be presently impractical. Some of the mentioned issues apply to Dynamic language optimization Many different approaches to many scripting languages (dynamic typing), while others are PHP improving the performance of traditionally interpreted dynamic specific (references). As we operate on the bytecode of the ref- languages have been investigated. The most successful in terms of erence PHP implementation, a few implementation-specific con- raw performance are JIT compilers [2]. straints are also covered. Another avenue is the translation of code to a lower-level lan- While the following discussion primarily deals with features guage. For example, the Starkiller project [20] translates Python that inhibit optimization, there are also two properties of the PHP code to C++, using an augmented Cartesian product algorithm [21] language that make it more amenable to static optimization than for type inference. However, this approach is often not able to sup- many other scripting languages: First, PHP has a strictly separated port all language semantics.
Recommended publications
  • Website Migrate Upgrade SLA Hosting Final
    IMPENDLE LOCAL MUNICIPALITY TENDER NUMBER: ILM/SCM/Quotation/12/2021 WEBSITE MIGRATE Re-DESIGN & 36MONTHS TENTANT HOSTING FOR IMPENDLE LOCAL MUNICIPALITY CLOSING DATE AND TIME: 13 JANUARY 2021 @ 12H00 PM NAME OF ORGANISATION POSTAL ADDRESS CONTACT PERSON TELEPHONE NO. FAX NO. E-MAIL ADDRESS TENDER PRICE TABLE OF CONTENT ITEM NO. DESCRIPTION PAGE NO. 1. Check List 3-4 2. Tender Advert 5-6 3. Tender Specification/ Scope of Work 7-13 4. Form of Offer and Acceptance 14-15 5. Invitation to Bid 16-18 6. Tax Clearance Certificate 19 7. Pricing Schedule 22 8. Declaration of Interest 21-23 9. Preference Points Claim Form 24-28 10. Local Content 29-32 11. Contract form for purchase of goods 33-34 12. Past Supply Chain Practices 36-36 13. Certificate of Independent Bid Declaration 37-39 14. Company Registration 40 15. Proof of municipal rates and taxes 41-43 16. BEE Certificate 44 17. CSD Registration 45 18. General Conditions of Tender 46-50 19. General Conditions of Contract 2010 51-61 Tenderers are advised to check the number of pages and should any be missing or duplicated, or the reproduction indistinct, or any descriptions ambiguous, or this document contain any obvious errors they shall inform the Impendle Municipality at once and have the same rectified. No liability whatsoever will be admitted in respect of errors in any tender due to the tenderers failure to observe this requirement. QUOTATION CHECKLIST PLEASE ENSURE THAT THE FOLLOWING FORMS HAVE BEEN DULY COMPLETED AND SIGNED AND THAT ALL DOCUMENTS AS REQUESTED, ARE ATTACHED TO THE TENDER DOCUMENT: Tenderer to Office Use No Description Tick ( ) Only 1.
    [Show full text]
  • An Execution Model for Serverless Functions at the Edge
    An Execution Model for Serverless Functions at the Edge Adam Hall Umakishore Ramachandran Georgia Institute of Technology Georgia Institute of Technology Atlanta, Georgia Atlanta, Georgia ach@gatech:edu rama@gatech:edu ABSTRACT 1 INTRODUCTION Serverless computing platforms allow developers to host single- Enabling next generation technologies such as self-driving cars or purpose applications that automatically scale with demand. In con- smart cities via edge computing requires us to reconsider the way trast to traditional long-running applications on dedicated, virtu- we characterize and deploy the services supporting those technolo- alized, or container-based platforms, serverless applications are gies. Edge/fog environments consist of many micro data centers intended to be instantiated when called, execute a single function, spread throughout the edge of the network. This is in stark contrast and shut down when finished. State-of-the-art serverless platforms to the cloud, where we assume the notion of unlimited resources achieve these goals by creating a new container instance to host available in a few centralized data centers. These micro data center a function when it is called and destroying the container when it environments must support large numbers of Internet of Things completes. This design allows for cost and resource savings when (IoT) devices on limited hardware resources, processing the mas- hosting simple applications, such as those supporting IoT devices sive amounts of data those devices generate while providing quick at the edge of the network. However, the use of containers intro- decisions to inform their actions [44]. One solution to supporting duces some overhead which may be unsuitable for applications emerging technologies at the edge lies in serverless computing.
    [Show full text]
  • Report on Biodiversity and Tropical Forests in Indonesia
    Report on Biodiversity and Tropical Forests in Indonesia Submitted in accordance with Foreign Assistance Act Sections 118/119 February 20, 2004 Prepared for USAID/Indonesia Jl. Medan Merdeka Selatan No. 3-5 Jakarta 10110 Indonesia Prepared by Steve Rhee, M.E.Sc. Darrell Kitchener, Ph.D. Tim Brown, Ph.D. Reed Merrill, M.Sc. Russ Dilts, Ph.D. Stacey Tighe, Ph.D. Table of Contents Table of Contents............................................................................................................................. i List of Tables .................................................................................................................................. v List of Figures............................................................................................................................... vii Acronyms....................................................................................................................................... ix Executive Summary.................................................................................................................... xvii 1. Introduction............................................................................................................................1- 1 2. Legislative and Institutional Structure Affecting Biological Resources...............................2 - 1 2.1 Government of Indonesia................................................................................................2 - 2 2.1.1 Legislative Basis for Protection and Management of Biodiversity and
    [Show full text]
  • Toward IFVM Virtual Machine: a Model Driven IFML Interpretation
    Toward IFVM Virtual Machine: A Model Driven IFML Interpretation Sara Gotti and Samir Mbarki MISC Laboratory, Faculty of Sciences, Ibn Tofail University, BP 133, Kenitra, Morocco Keywords: Interaction Flow Modelling Language IFML, Model Execution, Unified Modeling Language (UML), IFML Execution, Model Driven Architecture MDA, Bytecode, Virtual Machine, Model Interpretation, Model Compilation, Platform Independent Model PIM, User Interfaces, Front End. Abstract: UML is the first international modeling language standardized since 1997. It aims at providing a standard way to visualize the design of a system, but it can't model the complex design of user interfaces and interactions. However, according to MDA approach, it is necessary to apply the concept of abstract models to user interfaces too. IFML is the OMG adopted (in March 2013) standard Interaction Flow Modeling Language designed for abstractly expressing the content, user interaction and control behaviour of the software applications front-end. IFML is a platform independent language, it has been designed with an executable semantic and it can be mapped easily into executable applications for various platforms and devices. In this article we present an approach to execute the IFML. We introduce a IFVM virtual machine which translate the IFML models into bytecode that will be interpreted by the java virtual machine. 1 INTRODUCTION a fundamental standard fUML (OMG, 2011), which is a subset of UML that contains the most relevant The software development has been affected by the part of class diagrams for modeling the data apparition of the MDA (OMG, 2015) approach. The structure and activity diagrams to specify system trend of the 21st century (BRAMBILLA et al., behavior; it contains all UML elements that are 2014) which has allowed developers to build their helpful for the execution of the models.
    [Show full text]
  • A Brief History of Just-In-Time Compilation
    A Brief History of Just-In-Time JOHN AYCOCK University of Calgary Software systems have been using “just-in-time” compilation (JIT) techniques since the 1960s. Broadly, JIT compilation includes any translation performed dynamically, after a program has started execution. We examine the motivation behind JIT compilation and constraints imposed on JIT compilation systems, and present a classification scheme for such systems. This classification emerges as we survey forty years of JIT work, from 1960–2000. Categories and Subject Descriptors: D.3.4 [Programming Languages]: Processors; K.2 [History of Computing]: Software General Terms: Languages, Performance Additional Key Words and Phrases: Just-in-time compilation, dynamic compilation 1. INTRODUCTION into a form that is executable on a target platform. Those who cannot remember the past are con- What is translated? The scope and na- demned to repeat it. ture of programming languages that re- George Santayana, 1863–1952 [Bartlett 1992] quire translation into executable form covers a wide spectrum. Traditional pro- This oft-quoted line is all too applicable gramming languages like Ada, C, and in computer science. Ideas are generated, Java are included, as well as little lan- explored, set aside—only to be reinvented guages [Bentley 1988] such as regular years later. Such is the case with what expressions. is now called “just-in-time” (JIT) or dy- Traditionally, there are two approaches namic compilation, which refers to trans- to translation: compilation and interpreta- lation that occurs after a program begins tion. Compilation translates one language execution. into another—C to assembly language, for Strictly speaking, JIT compilation sys- example—with the implication that the tems (“JIT systems” for short) are com- translated form will be more amenable pletely unnecessary.
    [Show full text]
  • A Parallel Program Execution Model Supporting Modular Software Construction
    A Parallel Program Execution Model Supporting Modular Software Construction Jack B. Dennis Laboratory for Computer Science Massachusetts Institute of Technology Cambridge, MA 02139 U.S.A. [email protected] Abstract as a guide for computer system design—follows from basic requirements for supporting modular software construction. A watershed is near in the architecture of computer sys- The fundamental theme of this paper is: tems. There is overwhelming demand for systems that sup- port a universal format for computer programs and software The architecture of computer systems should components so users may benefit from their use on a wide reflect the requirements of the structure of pro- variety of computing platforms. At present this demand is grams. The programming interface provided being met by commodity microprocessors together with stan- should address software engineering issues, in dard operating system interfaces. However, current systems particular, the ability to practice the modular do not offer a standard API (application program interface) construction of software. for parallel programming, and the popular interfaces for parallel computing violate essential principles of modular The positions taken in this presentation are contrary to or component-based software construction. Moreover, mi- much conventional wisdom, so I have included a ques- croprocessor architecture is reaching the limit of what can tion/answer dialog at appropriate places to highlight points be done usefully within the framework of superscalar and of debate. We start with a discussion of the nature and VLIW processor models. The next step is to put several purpose of a program execution model. Our Parallelism processors (or the equivalent) on a single chip.
    [Show full text]
  • CNT6008 Network Programming Module - 11 Objectives
    CNT6008 Network Programming Module - 11 Objectives Skills/Concepts/Assignments Objectives ASP.NET Overview • Learn the Framework • Understand the different platforms • Compare to Java Platform Final Project Define your final project requirements Section 21 – Web App Read Sections 21 and 27, pages 649 to 694 and 854 Development and ASP.NET to 878. Section 27 – Web App Development with ASP.NET Overview of ASP.NET Section Goals Goal Course Presentation Understanding Windows Understanding .NET Framework Foundation Project Concepts Creating a ASP.NET Client and Server Application Understanding the Visual Creating a ASP Project Studio Development Environment .NET – What Is It? • Software platform • Language neutral • In other words: • .NET is not a language (Runtime and a library for writing and executing written programs in any compliant language) What Is .NET • .Net is a new framework for developing web-based and windows-based applications within the Microsoft environment. • The framework offers a fundamental shift in Microsoft strategy: it moves application development from client-centric to server- centric. .NET – What Is It? .NET Application .NET Framework Operating System + Hardware Framework, Languages, And Tools VB VC++ VC# JScript … Common Language Specification Visual Studio.NET Visual ASP.NET: Web Services Windows and Web Forms Forms ADO.NET: Data and XML Base Class Library Common Language Runtime The .NET Framework .NET Framework Services • Common Language Runtime • Windows Communication Framework (WCF) • Windows® Forms • ASP.NET (Active Server Pages) • Web Forms • Web Services • ADO.NET, evolution of ADO • Visual Studio.NET Common Language Runtime (CLR) • CLR works like a virtual machine in executing all languages. • All .NET languages must obey the rules and standards imposed by CLR.
    [Show full text]
  • The CLR's Execution Model
    C01621632.fm Page 3 Thursday, January 12, 2006 3:49 PM Chapter 1 The CLR’s Execution Model In this chapter: Compiling Source Code into Managed Modules . 3 Combining Managed Modules into Assemblies . 6 Loading the Common Language Runtime. 8 Executing Your Assembly’s Code. 11 The Native Code Generator Tool: NGen.exe . 19 Introducing the Framework Class Library . 22 The Common Type System. 24 The Common Language Specification . 26 Interoperability with Unmanaged Code. 30 The Microsoft .NET Framework introduces many new concepts, technologies, and terms. My goal in this chapter is to give you an overview of how the .NET Framework is designed, intro- duce you to some of the new technologies the framework includes, and define many of the terms you’ll be seeing when you start using it. I’ll also take you through the process of build- ing your source code into an application or a set of redistributable components (files) that contain types (classes, structures, etc.) and then explain how your application will execute. Compiling Source Code into Managed Modules OK, so you’ve decided to use the .NET Framework as your development platform. Great! Your first step is to determine what type of application or component you intend to build. Let’s just assume that you’ve completed this minor detail; everything is designed, the specifications are written, and you’re ready to start development. Now you must decide which programming language to use. This task is usually difficult because different languages offer different capabilities. For example, in unmanaged C/C++, you have pretty low-level control of the system.
    [Show full text]
  • Kkcbmco 6.90 for 14.2 Million 65, Over
    i ’ WEDNESDAY, FEBRUARY 8, IM l Average Daily Net Prees Run PAGE SIXT EEW The Weather''/^' jKanrt|?jati?r ^wnitts For ta* Weak « a M Faraeaat af V. 8. WaatMe M N De«.<ii, luee Baoontaig partly 13,314 night, not aa eoid. Low iO-M, 9Mt T ^ Church Units }. day paitbr olaady, no* aa^idML'f A bout Tow n MamUer o f tlM Audit Afternoon terapensturee hi IHe’f l ^ Bonan of Oinalatloa Manchester-^A City o f Village Charm >n>* PolUh Ainerlc»n C5ub ■Win To O bserve I .............. .......iiiiiiiiiAiininiiai ,pon«r * pre-L«iten party Satui^ x : ^ «v«niu« at the clubhouse. 106 • Cimtoq S t A buffet will be tprved Day of Prayer VOL. LX X X, NO. 110 (EIGHTEEN PAGESf MANCHESTER, CONN., THURSDAY, FEBRUARY 9, 1961 (Classified Advertising on Page 16) PRICE FIVE CBNtE • a tS p.M.. and there will be dans- MAIN STREET. MANCHESTER FREE PARKING ing until 1 a.m. Church bells wiU ring at noon Rear of oUr store TWdsht'a neetins ot ^ e Italian on Friday, Feb.' 17, calling wor- Your Store of Village Charm .., Inspector Finds American Ladles' Auxiliary has ahippers to the Word Day of Pray­ ■ ' been canceled because of parking er service at 2 p.m. at the Center PUC Chairman Says 40 Dead Swine problems created by the snow. The , Congregational Church. anxillary will meet March 8 at the Theme of fhla year’s ohaerv- In East Hartford cluUiouae on Eldridge S t ance. aponaored by the Manches­ ter Council of Oiurch Women, New Haven Railroad Two Manchester residents and a will be "Forward Through the Samuel and John Lombardo, op­ Coventry resident have been made erators of the Eaatem Meat Peck­ new ciUxens at U S.
    [Show full text]
  • Pfc6168.Pdf (438.8Kb)
    ESCUELA TÉCNICA SUPERIOR DE INGENIERÍA DE TELECOMUNICACIÓN UNIVERSIDAD POLITÉCNICA DE CARTAGENA Proyecto Fin de Carrera TÍTULO: Iphone Bookshelf AUTOR: David Zamora Gutiérrez DIRECTOR: Francesc Burrull i Mestres Febrero / 2015 INDEX IPhone application………………………………………………………………... o Tools……………………………………………………………………… . Iphone…………………………………………………………….. Objective-C……………………………………………………….. o Code………………………………………………………………………. Web site…………………………………………………………………………... o Tools……………………………………………………………………… . Codeigniter……………………………………………………….. Php………………………………………………………………... Http……………………………………………………………….. Html………………………………………………………………. Mysql……………………………………………………………... Apache……………………………………………………………. CSS……………………………………………………………….. E-books…………………………………………………………… o Code………………………………………………………………………. References……………………………………………………………………....... IPHONE APPLICATION TOOLS IPHONE The iPhone is a line of Internet- and multimedia-enabled smartphones designed and marketed by Apple Inc. The first iPhone was unveiled by Apple CEO Steve Jobs on January 9, 2007, and released on June 29, 2007. An iPhone can function as a video camera (video recording was not a standard feature until the iPhone 3GS was released), a camera phone, can send texts and receive visual voicemail, a portable media player, and an Internet client with email and web browsing capabilities, and both Wi-Fi and 3G connectivity. The user interface is built around the device's multi-touch screen, including a virtual keyboard rather than a physical one. Third-party as well as Apple application software is available from the App Store, which launched in mid-2008 and now has over 350,000 "apps" approved by Apple. These apps have diverse functionalities, including games, reference, GPS navigation, social networking, e-books... To create applications for this device it’s use the APPLE SDK. APPLE SDK The SDK basically consists of a set of tools that Apple provides to build, debug and test our developments. It contains the following programs: - XCODE: Xcode is a suite of tools, developed by Apple, for developing software for Mac OS X and iOS.
    [Show full text]
  • Executing UML Models
    Executing UML Models Miguel Pinto Luz1, Alberto Rodrigues da Silva1 1Instituto Superior Técnico Av. Rovisco Pais 1049-001 Lisboa – Portugal {miguelluz, alberto.silva}@acm.org Abstract. Software development evolution is a history of permanent seeks for raising the abstraction level to new limits overcoming new frontiers. Executable UML (xUML) comes this way as the expectation to achieve the next level in abstraction, offering the capability of deploying a xUML model in a variety of software environments and platforms without any changes. This paper comes as a first expedition inside xUML, exploring the main aspects of its specification including the action languages support and the fundamental MDA compliance. In this paper is presented a future new xUML tool called XIS-xModels that gives Microsoft Visio new capabilities of running and debugging xUML models. This paper is an outline of the capabilities and main features of the future application. Keywords: UML, executable UML, Model Debugging, Action Language. 1. Introduction In a dictionary we find that an engineer is a person who uses scientific knowledge to solve practical problems, planning and directing, but an information technology engineer is someone that spends is time on implementing lines of code, instead of being focus on planning and projecting. Processes, meetings, models, documents, or even code are superfluous artifacts for organizations: all they need is well design and fast implemented working system, that moves them towards a new software development paradigm, based on high level executable models. According this new paradigm it should be possible to reduce development time and costs, and to bring new product quality warranties, only reachable by executing, debugging and testing early design stages (models).
    [Show full text]
  • Phalanger Compiling PHP for .NET and Silverlight
    Phalanger Compiling PHP for .NET and Silverlight http://php-compiler.net Tomáš Petříček, C# MVP ([email protected]) Formerly by: Tomáš Matoušek, Ladislav Prošek, et al. Agenda Phalanger Introduction What is Phalanger? And what is it good for? Phalanger for Silverlight How (and why) to write Silverlight client apps in PHP .NET and PHP interoperability Calling C# code from PHP Calling PHP code from C# Interesting Compilation Problems Conditional type binding Calling overloaded methods DEMO Let’s look at some cool demo first :-)! http://tomasp.net/files/copter/default.html Introduction . Phalanger: PHP Language Compiler for .NET . Initially targeting .NET Framework 1.1 . Now using .NET 2.0, Mono and Silverlight 2.0 . We’re planning to use (parts of) DLR in the future . What can you do with Phalanger? . Compile various open-source PHP applications for .NET . Use PHP functions & objects from (other) .NET languages . Use .NET classes from PHP programs . Write Silverlight applications in PHP Agenda Phalanger Introduction What is Phalanger? And what is it good for? Phalanger for Silverlight How (and why) to write Silverlight client apps in PHP .NET and PHP interoperability Calling C# code from PHP Calling PHP code from C# Interesting Compilation Problems Conditional type binding Calling overloaded methods Phalanger: PHP for Silverlight . Similar as other Silverlight dynamic languages . XAML file is loaded by Silverlight plugin in the browser . PHP source code referenced using XAML element: <php:PhalangerLoader Source="script.phpx" /> . Downloaded, compiled and executed on the client . “Loader” element, compiler and runtime in one DLL file <Canvas xmlns="http://schemas.microsoft.com/client/2007" xmlns:php="clr-namespace:PHP.Silverlight; assembly=Bin/PhpNetCore.dll" Width="800" Height="600" Background="White"> <php:PhalangerLoader Source="simpledemo_php.phpx" /> </Canvas> Phalanger: PHP for Silverlight .
    [Show full text]