VM Optimizations for Language Designers

Total Page:16

File Type:pdf, Size:1020Kb

VM Optimizations for Language Designers !John Pampuch –Director, VM Technology –Client Software Group – VM Optimizations for Language Designers Exact File Name 9/24/08 Page 1 There once was a time... Java Copyright Sun Microsystems, Inc 2008: 2 / 32 Exact File Name 9/24/08 Page 2 Oh wait... JavaTM Copyright Sun Microsystems, Inc 2008: 3 / 32 Exact File Name 9/24/08 Page 3 But really, what we meant was... JavaTM Copyright Sun Microsystems, Inc 2008: 4 / 32 Exact File Name 9/24/08 Page 4 Fortunately, clearer minds prevail Bex Script WebL Funnel JESS Jickle iScript Modula-2 Lisp Zigzag Simkin CAL JavaScript Correlate Nice JudoScript Simkin Drools Basic Eiffel Luck Icon Groovy v-language Tea Prolog Mini Pascal Scala Tcl PLAN Hojo Rexx JavaFX Script foo FScript Tiger Anvil Java Oberon E Smalltalk JHCR Logo Yassl Tiger JRuby Ada G Clojure Scheme Sather Phobos Processing Dawn TermWare Sleep LLP Pnuts BeanShell Forth C# PHP Piccola SALSA Jython Yoix ObjectScript Copyright Sun Microsystems, Inc 2008: 5 / 32 Exact File Name 9/24/08 Page 5 So what good is it? • Java Performance – Isn't that an oxymoron? • A little history > 1996 > desktop systems: 60-100 MHz > Workstations: 120-167MHz (I don't have a clue on servers) > Java: no JIT! > Vs. Today > Desktop systems: 2-core 1.0-3.0 Ghz (roughly 30-90 times) > Servers systems: 4-socket, 8-core, 8 HW threads/core, 1+GHz per core (easily 100 times improvement) > Java: JIT and more... 10 to 30 times improvement Copyright Sun Microsystems, Inc 2008: 6 / 32 Exact File Name 9/24/08 Page 6 Which means... • Java as we perceive it is 300 to 3000 times faster than when it started • Today, Java is also measured to be 50% to 100+% the speed of C and C++ * • Sometimes, it is 50 to 250 times faster than your favorite scripting language * • Or more! * • Pace of improvement remains high • But, we demand a lot more too * Source: http://shootout.alioth.debian.org Copyright Sun Microsystems, Inc 2008: 7 / 32 Exact File Name 9/24/08 Page 7 To be fair... • There is that footprint and startup time issue • But, we're working on that! • Near-term tactical effort to reduce internal class coupling • Longer term strategies for further improvement Now, let's change topics a bit Copyright Sun Microsystems, Inc 2008: 8 / 32 Exact File Name 9/24/08 Page 8 So what is it like to be part of the HotSpot Team? Copyright Sun Microsystems, Inc 2008: 9 / 32 Exact File Name 9/24/08 Page 9 The Rules of the Road • Rules are simple: > Make it better (faster, smaller, etc.) > Anything you want to do, as long as no one can tell > You can't break working applications! > And, don't forget: > 100s of thousands of tests > Millions of applications > 100s of millions of users > Kind of like doing taxes > PRT/JPRT etc. > Security, Compatibility, Compliance Copyright Sun Microsystems, Inc 2008: 10 / 32 Exact File Name 9/24/08 Page 10 Results are extraordinary • Thanks to the hard work of many engineers > At least 500 man years at Sun, so far > Plus some close collaboration with Intel, and others • And some friendly competition between Sun, IBM HP, SAP, Azul, and BEA/Oracle, to name a few • Improvements range from VM to core libraries to GUI components • Benefits can reach beyond the Java language > At least from the VM > But sometimes from the library work as well Copyright Sun Microsystems, Inc 2008: 11 / 32 Exact File Name 9/24/08 Page 11 A Primer on Optimization • Two basic strategies: > Do more faster – Run, don't walk > Do less – procrastinator's creed! > Don't do today what you can put off to tomorrow > Don't do tomorrow what you can put off all together • Is this free? > Overhead > Degenerate cases > Response time > Footprint > Startup time Copyright Sun Microsystems, Inc 2008: 12 / 32 Exact File Name 9/24/08 Page 12 HotSpot: Some of the Optimization Samples • Inlining • Loop unrolling • Constant folding • Escape analysis • String/Memory optimizations • Vectorization • Library improvements • Processor specific optimizations Copyright Sun Microsystems, Inc 2008: 13 / 32 Exact File Name 9/24/08 Page 13 •Java gets faster by a whole range of approaches. • •The biggest gains, as usual, come from improvements in the fundamental algorithms both in the libraries and the VM. • •Better register allocation •Smarter numerics •Better collection class implementations Key here: Use the core classes when you can... they keep getting better, and so will your app! But another subtle message: If you are implementing a new language: Consider using the JVM as your foundation... and again, when you can use its core classes. You'll reap benefits. Practical Examples of Optimization • Start with Java language source example • But instead of compiling to bytecodes, etc. • I'll show the impact of optimization as if it were done directly on the source. • The same principles would apply to any language that is compiled to byte codes • And, to be fair, many of these techniques are used in static compilers as well, but some can't! Copyright Sun Microsystems, Inc 2008: 14 / 32 Exact File Name 9/24/08 Page 14 Inlining • Simple case: bring the implementation of small methods (and sometimes not so small) into a containing method • Do more faster! • The Java Language (and others) encourages small methods like accessors • With a good JIT, there is no penalty • But wait, there's more: > HotSpot will try to inline virtual methods (type profiling) > Inlining will enhance other optimizations (coming up!) Copyright Sun Microsystems, Inc 2008: 15 / 32 Exact File Name 9/24/08 Page 15 Virtual methods seem quite difficult. But like many optimizations that occur, HotSpot can determine the specific use case, and determine that a generalization done in a library isn't required in the actual usage For example, a class might use a virtual method to reach back into the application using the class. In the general case, there might be many different choices, and inlining won't work. But in the common case, there might be just a single class, and thus a single implementation, which does permit inlining. But... hey, what about a case where you don't know? Class not loaded (yet) for example. That's OK, HotSpot will detect that case, and 'uncompile' (and then recompile) to get it right. Inlining example (excerpts) Before After private final int count [] = private final int count [] = { 12, -5, 19, 22, -6 }; { 12, -5, 19, 22, -6 }; /* inline, this goes away private int count (int n) { private int count (int n) { return count [n]; return count [n]; } } */ private int sum () { private int sum () { int sum = 0; int sum = 0; for (int n = 0; n < // subtle change count.length; n++) { for (int n = 0; n < sum += count(n); count.length; n++) { } sum += count[n]; return sum; } } return sum; } Copyright Sun Microsystems, Inc 2008: 16 / 32 Exact File Name 9/24/08 Page 16 Loop unrolling • Some loops aren't worth implementing as a loop • Not much fun writing that out though • And, again, who knows, when you are writing a general purpose library? • Another case of do more faster! • Similar example as before Copyright Sun Microsystems, Inc 2008: 17 / 32 Exact File Name 9/24/08 Page 17 Loop unrolling example (excerpts) Before After private final int count [] = private final int count [] = { 12, -5, 19, 22, -6 }; { 12, -5, 19, 22, -6 }; private int sum () { int sum = 0; private int sum () { int sum = 0; // subtle change int n = 0; for (int n = 0; n < sum += count[n++]; count.length; n++) { sum += count[n++]; sum += count[n]; sum += count[n++]; } sum += count[n++]; return sum; sum += count[n++]; } } return sum; } Copyright Sun Microsystems, Inc 2008: 18 / 32 Exact File Name 9/24/08 Page 18 This is a bit of an over simplification, most cases don't look like this. But in this case, since the loop bounds are constant, it is easly to flatten it out completely. But what might occur is that the loop might be flattened a bit... instead of doing one add per loop, we might do 4 or 8. It's a bit more complicated then, because the last, and maybe the first iteration need to be specialized. But, Hotspot handles all of that automatically. Constant folding • This is a pretty well known optimization • Ancient even, by code generation standards • But, a JIT has edge: there are more constants to work with! Copyright Sun Microsystems, Inc 2008: 19 / 32 Exact File Name 9/24/08 Page 19 Constant folding example Before private final int count [] = { 12, -5, 19, 22, -6 }; private int sum () { int sum = 0; int i = 0; sum += count[i++]; sum += count[i++]; sum += count[i++]; sum += count[i++]; sum += count[i++]; return sum; } Copyright Sun Microsystems, Inc 2008: 20 / 32 Exact File Name 9/24/08 Page 20 This is another bit of an over simplification, most cases don't look like this. Now that we have flattened out the loop, a lot of things start to look like constants. First, the array indexes are effectively constant. How much would you pay for this code? After private int sum () { return 42; } OK, so this is probably a bit of an over simplification. Not a very realistic example! Copyright Sun Microsystems, Inc 2008: 21 / 32 Exact File Name 9/24/08 Page 21 Here, we're just folding together the whole result. What's left? Not much. A real example would rarely be this simple. But with escape analysis, inlining and a host of other methods, run-time constants are all over the place, and lots of the code can be substantially simplified.
Recommended publications
  • This Article Appeared in a Journal Published by Elsevier. the Attached Copy Is Furnished to the Author for Internal Non-Commerci
    This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and education use, including for instruction at the authors institution and sharing with colleagues. Other uses, including reproduction and distribution, or selling or licensing copies, or posting to personal, institutional or third party websites are prohibited. In most cases authors are permitted to post their version of the article (e.g. in Word or Tex form) to their personal website or institutional repository. Authors requiring further information regarding Elsevier’s archiving and manuscript policies are encouraged to visit: http://www.elsevier.com/copyright Author's personal copy Computer Languages, Systems & Structures 37 (2011) 132–150 Contents lists available at ScienceDirect Computer Languages, Systems & Structures journal homepage: www.elsevier.com/locate/cl Reconciling method overloading and dynamically typed scripting languages Alexandre Bergel à Pleiad Group, Computer Science Department (DCC), University of Chile, Santiago, Chile article info abstract Article history: The Java virtual machine (JVM) has been adopted as the executing platform by a large Received 13 July 2010 number of dynamically typed programming languages. For example, Scheme, Ruby, Received in revised form Javascript, Lisp, and Basic have been successfully implemented on the JVM and each is 28 February 2011 supported by a large community. Interoperability with Java is one important require- Accepted 15 March 2011 ment shared by all these languages. We claim that the lack of type annotation in interpreted dynamic languages makes Keywords: this interoperability either flawed or incomplete in the presence of method overloading. Multi-language system We studied 17 popular dynamically typed languages for JVM and .Net, none of them Interoperability were able to properly handle the complexity of method overloading.
    [Show full text]
  • Java Programming Language Family Godiva Scala Processing Aspectj Groovy Javafx Script Einstein J Sharp Judoscript Jasmin Beanshell
    JAVA PROGRAMMING LANGUAGE FAMILY GODIVA SCALA PROCESSING ASPECTJ GROOVY JAVAFX SCRIPT EINSTEIN J SHARP JUDOSCRIPT JASMIN BEANSHELL PDF-33JPLFGSPAGJSEJSJJB16 | Page: 133 File Size 5,909 KB | 10 Oct, 2020 PDF File: Java Programming Language Family Godiva Scala Processing Aspectj Groovy Javafx Script 1/3 Einstein J Sharp Judoscript Jasmin Beanshell - PDF-33JPLFGSPAGJSEJSJJB16 TABLE OF CONTENT Introduction Brief Description Main Topic Technical Note Appendix Glossary PDF File: Java Programming Language Family Godiva Scala Processing Aspectj Groovy Javafx Script 2/3 Einstein J Sharp Judoscript Jasmin Beanshell - PDF-33JPLFGSPAGJSEJSJJB16 Java Programming Language Family Godiva Scala Processing Aspectj Groovy Javafx Script Einstein J Sharp Judoscript Jasmin Beanshell e-Book Name : Java Programming Language Family Godiva Scala Processing Aspectj Groovy Javafx Script Einstein J Sharp Judoscript Jasmin Beanshell - Read Java Programming Language Family Godiva Scala Processing Aspectj Groovy Javafx Script Einstein J Sharp Judoscript Jasmin Beanshell PDF on your Android, iPhone, iPad or PC directly, the following PDF file is submitted in 10 Oct, 2020, Ebook ID PDF-33JPLFGSPAGJSEJSJJB16. Download full version PDF for Java Programming Language Family Godiva Scala Processing Aspectj Groovy Javafx Script Einstein J Sharp Judoscript Jasmin Beanshell using the link below: Download: JAVA PROGRAMMING LANGUAGE FAMILY GODIVA SCALA PROCESSING ASPECTJ GROOVY JAVAFX SCRIPT EINSTEIN J SHARP JUDOSCRIPT JASMIN BEANSHELL PDF The writers of Java Programming Language Family Godiva Scala Processing Aspectj Groovy Javafx Script Einstein J Sharp Judoscript Jasmin Beanshell have made all reasonable attempts to offer latest and precise information and facts for the readers of this publication. The creators will not be held accountable for any unintentional flaws or omissions that may be found.
    [Show full text]
  • Design and Implementation of a Behaviorally Typed Programming System for Web Services
    Universidade Nova de Lisboa Faculdade de Cienciasˆ e Tecnologia Departamento de Informatica´ Dissertac¸ao˜ de Mestrado Mestrado em Engenharia Informatica´ Design and Implementation of a Behaviorally Typed Programming System for Web Services Filipe David Oliveira Militao˜ (26948) Lisboa (2008) Universidade Nova de Lisboa Faculdade de Cienciasˆ e Tecnologia Departamento de Informatica´ Dissertac¸ao˜ de Mestrado Design and Implementation of a Behaviorally Typed Programming System for Web Services Filipe David Oliveira Militao˜ (26948) Orientador: Prof. Doutor Lu´ıs Caires J ´uri Presidente: • Doutor Jos´eAlberto Cardoso e Cunha, Professor Catedratico,´ Departamento de Informatica´ da Faculdade de Cienciasˆ e Tecnologia, Universidade Nova de Lisboa. Vogais: • Doutor Francisco Martins, Professor Auxiliar, Departamento de Informatica´ da Faculdade de Ciencias,ˆ Universidade de Lisboa. • Doutor Lu´ısManuel Marques da Costa Caires, Professor Associado, Departa- mento de Informatica´ da Faculdade de Cienciasˆ e Tecnologia, Universidade Nova de Lisboa. Disserta¸c˜aoapresentada na Faculdade de Ciˆenciase Tecnologia da Uni- versidade Nova de Lisboa para a obten¸c˜aodo Grau de Mestre em En- genharia Inform´atica. Lisboa (2008) Acknowledgements This work was partially supported by a CITI/PLM/1001/2007 research grant. v Summary The growing use of the Internet as a global infrastructure for communication between dis- tributed applications is leading to the development of a considerable amount of technologies to ease the deployment, description and data exchange among services and thus improve their in- teroperability. There is also a growing interest in the use of the “software as a service” business model where a software vendor develops and hosts applications to be used by its clients over the Internet.
    [Show full text]
  • Red5 Documentation Daniel Rossi Red5 Documentation Daniel Rossi Copyright © 2007 Daniel Rossi
    Red5 Documentation Daniel Rossi Red5 Documentation Daniel Rossi Copyright © 2007 Daniel Rossi Abstract Table of Contents .................................................................................................................................. 1 .................................................................................................................................. 2 Frequently Asked Questions ................................................................................... 2 Project Management ...................................................................................... 6 Server Side Development ............................................................................... 6 Codecs/Media integration ............................................................................... 7 Client Side/API Testing ................................................................................. 7 Branding/Logo/Website .................................................................................. 7 Documentation ............................................................................................. 7 .................................................................................................................................. 9 How to build with eclipse ...................................................................................... 9 ................................................................................................................................ 10 ...............................................................................................................................
    [Show full text]
  • Apache Ant User Manual Guide – Version 1.6.0 12/29/2003 9:39 AM
    Apache Ant User Manual Guide – Version 1.6.0 12/29/2003 9:39 AM Apache Ant User Manual Guide Version 1.6.0 Compiled by: Abdul Habra (www.tek271.com) From: http://ant.apache.org/ 12/2003 Copyright © 2000-2003 Apache Software Foundation. All rights Reserved. 1 of 130 Apache Ant User Manual Guide – Version 1.6.0 12/29/2003 9:39 AM 2 of 130 Apache Ant User Manual Guide – Version 1.6.0 12/29/2003 9:39 AM Contents At A Glance 1 Apache Ant User Manual Authors ............................................................................................................9 2 Feedback and Troubleshooting .............................................................................................................10 3 Introduction.........................................................................................................................................11 4 Installing Ant .......................................................................................................................................12 5 Running Ant ........................................................................................................................................18 6 Using Ant ............................................................................................................................................23 7 Concepts .............................................................................................................................................30 8 Listeners & Loggers..............................................................................................................................86
    [Show full text]
  • Accessing Application Context Listing
    19_1936_index.qxd 7/11/07 12:14 AM Page 503 INDEX A Ant BSF Support Example Accessing Application Context listing listing (7.12), 314 (10.2), 463 Ant task, Groovy, 132-133 Active File Example listing (8.20), 376 Ant Task That Compiles All Scripts Inside Active File Generator listing (8.22), 380 the Project listing (8.10), 357 active file pattern, 375 AntBuilder Example listing (7.14), 317 consequences, 375 any( ) method, Groovy, 175-177 problem, 375 any( ) Method listing (4.30), 175 sample code, 376-380 Apache Web servers, 62 solution, 375 BSF (Bean Scripting Framework), 94 Active File Template listing (8.21), 379 APIs (application programming ADD keyword, 5 interfaces), 49 addClassPath( ) method, 324 Java, 80-82 administration append( ) method, Groovy, 181-182 scripting, 328-334 append( ) Method listing (4.39), 182 scripting languages, 55-58 application scope, Web environments, 449 Administration Script Example application variable (Groovlet), 215 listing (7.17), 329 applications Advanced Ant BSF Support Example BSF (Bean Scripting Framework), 275 listing (7.13), 315 JSP (JavaServer Pages), 275-280 Advanced AntBuilder Example Xalan-J (XSLT), 280-287 listing (7.15), 320 Java, 79 Advanced Binding Example—Java web applications, 59, 61-67 Application listing (9.13), 408 ASP (Active Server Pages), 64 Advanced Groovy Programming Example games, 68-69 listing (5.22), 225 JavaScript, 65-67 AJAX (Asynchronous JavaScript And Perl, 61-62 XML), 66 PHP, 62-64 Ant build tools, 309-322 UNIX, 68 19_1936_index.qxd 7/11/07 12:14 AM Page 504 504 INDEX apply(
    [Show full text]
  • Apache Ant User Manual
    Table of Contents Introduction Installing Ant Using Ant Running Ant Apache Ant 1.8.1 Manual Ant Tasks Concepts and Types This is the manual for version 1.8.1 of Apache Ant. If your version of Ant (as verified Loggers & Listeners with ant -version) is older or newer than this version then this is not the correct Editor/IDE Integration manual set. Please use the documentation appropriate to your current version. Also, if Developing with Ant you are using a version older than the most recent release, we recommend an upgrade Tutorials to fix bugs as well as provide new functionality. Ant API License Feedback and Troubleshooting Authors Introduction Apache Ant is a Java-based build tool. In theory, it is kind of like make, without make's wrinkles. Why? Why another build tool when there is already make, gnumake, nmake, jam, and others? Because all those tools have limitations that Ant's original author couldn't live with when developing software across multiple platforms. Make-like tools are inherently shell-based: they evaluate a set of dependencies, then execute commands not unlike what you would issue on a shell. This means that you can easily extend these tools by using or writing any program for the OS that you are working on; however, this also means that you limit yourself to the OS, or at least the OS type, such as Unix, that you are working on. Makefiles are inherently evil as well. Anybody who has worked on them for any time has run into the dreaded tab problem.
    [Show full text]
  • Version : 2009K Vendor: Centos Release : 1.El5 Build Date
    Name : tzdata Relocations: (not relocatable) Version : 2009k Vendor: CentOS Release : 1.el5 Build Date: Mon 17 Aug 2009 06:43:09 PM EDT Install Date: Mon 19 Dec 2011 12:32:58 PM EST Build Host: builder16.centos.org Group : System Environment/Base Source RPM: tzdata-2009k- 1.el5.src.rpm Size : 1855860 License: GPL Signature : DSA/SHA1, Mon 17 Aug 2009 06:48:07 PM EDT, Key ID a8a447dce8562897 Summary : Timezone data Description : This package contains data files with rules for various timezones around the world. Name : nash Relocations: (not relocatable) Version : 5.1.19.6 Vendor: CentOS Release : 54 Build Date: Thu 03 Sep 2009 07:58:31 PM EDT Install Date: Mon 19 Dec 2011 12:33:05 PM EST Build Host: builder16.centos.org Group : System Environment/Base Source RPM: mkinitrd-5.1.19.6- 54.src.rpm Size : 2400549 License: GPL Signature : DSA/SHA1, Sat 19 Sep 2009 11:53:57 PM EDT, Key ID a8a447dce8562897 Summary : nash shell Description : nash shell used by initrd Name : kudzu-devel Relocations: (not relocatable) Version : 1.2.57.1.21 Vendor: CentOS Release : 1.el5.centos Build Date: Thu 22 Jan 2009 05:36:39 AM EST Install Date: Mon 19 Dec 2011 12:33:06 PM EST Build Host: builder10.centos.org Group : Development/Libraries Source RPM: kudzu-1.2.57.1.21- 1.el5.centos.src.rpm Size : 268256 License: GPL Signature : DSA/SHA1, Sun 08 Mar 2009 09:46:41 PM EDT, Key ID a8a447dce8562897 URL : http://fedora.redhat.com/projects/additional-projects/kudzu/ Summary : Development files needed for hardware probing using kudzu.
    [Show full text]
  • Scripting in Java by Dojan Bosanac.Pdf
    Scripting in Java™ Languages, Frameworks, and Patterns This page intentionally left blank Scripting in Java™ Languages, Frameworks, and Patterns Dejan Bosanac Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Cape Town • Sydney • Tokyo • Singapore • Mexico City Many of the designations used by manufacturers and sellers to distinguish their products EDITOR-IN-CHIEF are claimed as trademarks. Where those designations appear in this book, and the pub- Mark Taub lisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. ACQUISITIONS The author and publisher have taken care in the preparation of this book, but make no EDITOR expressed or implied warranty of any kind and assume no responsibility for errors or Greg Doench omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. DEVELOPMENT EDITOR The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers Audrey Doyle and content particular to your business, training goals, marketing focus, and branding MANAGING EDITOR interests. For more information, please contact: Gina Kanouse U.S. Corporate and Government Sales (800) 382-3419 PROJECT EDITOR [email protected] Anne Goebel For sales outside the United States, please contact: COPY EDITOR International Sales [email protected] Geneil Breeze INDEXER Brad Herriman PROOFREADER Water Crest Publishing, Inc. PUBLISHING COORDINATOR Michelle Housley COVER DESIGNER Chuti Prasertsith COMPOSITION Bumpy Design Visit us on the Web: www.awprofessional.com Library of Congress Cataloging-in-Publication Data Bosanac, Dejan.
    [Show full text]
  • Les Outils De Développement Pour Java Didier Donsez
    http://membres-liglab.imag.fr/donsez/cours Les Outils de Développement pour Java Didier Donsez Université Joseph Fourier - Grenoble 1 PolyTech’ Grenoble - LIG / ADELE [email protected] [email protected] 31/12/2009 Licence Cette présentation est couverte par le contrat Creative Commons By NC ND http://creativecommons.org/licenses/by-nc-nd/2.0/fr/ 009 Didier Donsez, Outils deDonsez,Outils Java,développement Didier 1997-2 2 31/12/2009 Objectifs Documentation Organiser Deboggage Observer 009 Précompilateur Retro-Compilation Ofuscateur Analyseur de Performance Test de Compatibilité Didier Donsez, Outils deDonsez,Outils Java,développement Didier 1997-2 3 31/12/2009 Documentation Javadoc (JDK) Génération automatique de la documentation HTML à partir des commentaires présents dans les .java Commentaires et Tags /** * This is a <b>doc</b> comment. * @see java.lang.Object Tags non * @todo fix {@underline this !} standards 009 */ Documentation Standard (HTML avec/sans frame) hiérarchie des classes et des interfaces, liste des packages résumé et détail d ’une classe, interface, méthode, propriété,… Documentation Customisée (RTF, XML, MIF, HTML, …) Doclet : classe Java chargée par Javadoc pour personnaliser le résultat de la génération de la documentation Taglet : classe Java personnalisant la sortie HTML lié à un tag (bloc ou inline) Remarque Didier Donsez, Outils deDonsez,Outils Java,développement Didier 1997-2 N ’oubliez pas d’ajouter la génération au Makefile/Build/POM file 4 31/12/2009 Normes de programmation (i) Facilite la lecture des sources (lecture croisée) Normes SUN, autres extensions (template) public int MyMethod (……) throws … { /** int attribute=…. * Description of the method 009 for (int i = 0; i < attribute; i++) * @param What is it ? { * @return What the function return …} */ if (……) { public int myMethod (……) throws … { throw new Exception intint attribute=….
    [Show full text]
  • Tag Libraries As Fifth Generation Languages Mark Cyzyk*
    The Open Information Systems Journal, 2008, 2, 11-16 11 Tag Libraries as Fifth Generation Languages Mark Cyzyk* Scholarly Communication Architect, Library Digital Programs Group, The Sheridan Libraries, Milton S. Eisenhower Library, Johns Hopkins University, 3400 North Charles Street, Baltimore, MD 21218, USA Abstract: This essay weighs the notion that Web-based tag libraries represent the fifth generation of computer languages. A brief survey of the history of computer languages is provided as is an indication of why it is useful to conventionally categorize computer languages into “generations”. The essay argues that the current conventional ascription of genera- tions is incorrect and that it should be replaced with one based on what the author terms “the principle of abstraction”. Keywords: Web-based tag libraries, generations of computer languages, scripting languages, history of computer languages, fifth generation languages. TAG LIBRARIES AS FIFTH GENERATION LAN- <h3>#thisDate#</h3> GUAGES </cfif> Web-based tag libraries represent the fifth generation of </cfoutput> computer languages. This code supplements the HTML and adds intelligence In this essay I will explain what tag libraries are, what the to it while retaining the simplicity and elegance of a tag- generations of computer languages are and why they are based language. The code first sets a variable, “thisDate”, important, how our conventional list of generations of com- equal to the mm/dd/yyyy-formatted value of the current sys- puter languages has gotten off-track and is incorrect, and tem date. It then compares that date with April 15, 2008. If why tag libraries should properly be construed as falling into the two are equal, or if thisDate is greater than April 15, a fifth generation of computer programming languages.
    [Show full text]
  • Java SE and Javafx: the Road Ahead
    <Insert Picture Here> Java SE and JavaFX: The Road Ahead Danny Coward June 2010 Java is 15 – Happy Birthday ! Java's evolution Java ME, SE, JavaCard EE open Java EE sourced JDK 1.0 1995 2000 2005 2010 Java JavaFX Community Process created Java ME Before 1995... Java SE 7 and JDK 7 © 2008 Oracle Corporation – Proprietary and Confidential Java modularity • Java's growing waistline • Modularity – JSR 294: Language Support for Modular Programming – Project Jigsaw: A low-level module system, applied to the JDK • Size, Scalability, Speed Many modules, many dependencies Less modules, less dependencies Parallelism • To get traffic flowing faster on roads, planners don't raise the speed limit, they build more lanes ! • Systems have turned to multiple cores and multiple processors to fullfil Moore's Law Parallelism in Java • Garbage First Collector – Parallel – Generational – Compacting – Predictable • Fork/Join Framework APIs – Break big task into lots of independent small ones – Reassemble results Multiple Languages Sleep Funnel Bex Script WebL Tea Zigzag JESS iScript Modula-2 CAL Lisp Jickle Simkin Nice JavaScript Correlate Drools JudoScript Simkin Basic Groovy Eiffel v-language Icon Luck Prolog Mini Pascal Tcl PLAN Hojo Scala Tiger Rexx JavaFX Script Yassl Anvil foo Oberon FScript E Smalltalk Logo Tiger JRuby Clojure JHCR Pnuts G Dawn Phobos Processing Sather Jython LLP TermWare Ada Scheme Piccola BeanShell Forth C# PHP ObjectScript Yoix SALSA DaVinci Project • Allows JVM to optimize non-Java language features – Method handles – Invokedynamic
    [Show full text]