Detecting Invalid Choices in Merged Code and Software Models

Total Page:16

File Type:pdf, Size:1020Kb

Detecting Invalid Choices in Merged Code and Software Models JOHANNES KEPLER UNIVERSITAT¨ LINZ JKU Technisch-Naturwissenschaftliche Fakult¨at Detecting Invalid Choices in Merged Code and Software Models MASTERARBEIT zur Erlangung des akademischen Grades Diplom-Ingenieur im Masterstudium Software Engineering Eingereicht von: Matthias Braun B.Sc. Angefertigt am: Institute for Software Systems Engineering Beurteilung: Univ.-Prof. Dr. Alexander Egyed M.Sc. Linz, August 2015 Contents Zusammenfassung vi 0.1 Ziel ................................. vi 0.2 Methode .............................. vi 0.3 Ergebnisse ............................. vi Abstract viii 0.4 Objective ............................. viii 0.5 Method .............................. viii 0.6 Results and Conclusions ..................... viii 1 Introduction 1 1.1 Terminology ............................ 1 1.2 Motivation and Goals ....................... 2 1.3 Method .............................. 3 1.4 Related Work ........................... 3 1.5 Thesis Structure .......................... 4 2 Background 6 2.1 Code Merging ........................... 6 2.1.1 Two-Way Merging .................... 7 2.1.2 Three-Way Merging .................... 8 2.2 Model Merging .......................... 8 2.3 Invalid Artifacts in Code ..................... 11 2.3.1 Code Clones Cause Invalid Artifacts .......... 11 2.3.2 Invalidity Categorization ................. 12 2.3.3 Detection Approaches .................. 14 2.3.3.1 Code Inspection ................ 14 2.3.3.2 Testing ..................... 15 2.3.3.3 Static Code Analysis .............. 15 2.4 Invalid Artifacts in Models .................... 17 2.4.1 Multiple Views Cause Invalid Artifacts ......... 17 ii CONTENTS iii 2.4.2 Invalidity Categorization ................. 18 2.4.3 Detection Approaches .................. 21 2.5 Software Product Lines ...................... 25 3 Approach 28 3.1 Rules ................................ 28 3.2 Limitations ............................ 30 4 Commonalities Of Code and Model Rules 32 4.1 Common Rule Categories .................... 33 4.1.1 Invalid Artifact Combination .............. 33 4.1.2 Dispensable Artifact ................... 33 4.2 Merging Causes Invalidities ................... 35 5 ECCO Case Study 39 5.1 ECCO Platform Background ................... 39 5.1.1 Functionality ....................... 40 5.1.1.1 Feature to Code Mapping ........... 40 5.1.1.2 Composing New Products ........... 40 5.1.2 Architecture ........................ 41 5.2 Parsing the ECCO Code Tree .................. 43 5.3 Case Study Approach ....................... 44 5.3.1 Related Work ....................... 44 5.4 Case Study Motivation ...................... 45 5.5 Rules ................................ 47 5.5.1 Add Listener Equivalence Rule ............. 50 5.5.2 Multiple Variable Assignment Rule ........... 50 5.5.3 Multiple Setter Call Rule ................. 53 5.5.4 Uninitialized Read Rule ................. 54 5.6 Empirical Results on Rules Performance ............ 55 5.6.1 Effectiveness ........................ 55 5.6.2 Validity .......................... 55 5.6.3 Efficiency ......................... 56 6 ArchStudio Case Study 58 6.1 ArchStudio 3 Platform Background ............... 58 6.1.1 Functionality ....................... 59 6.1.1.1 Model Creation and Editing .......... 59 6.1.1.2 Diffing and Merging .............. 59 6.1.1.3 Detection of Invalid Model Artifacts ..... 60 6.1.2 Architecture ........................ 61 CONTENTS iv 6.2 Architecture Representation and Parsing ............ 61 6.3 Rule Engine for ArchStudio 3 .................. 63 6.3.1 Rule Language ...................... 64 6.4 Case Study Approach ....................... 66 6.4.1 Related Work ....................... 67 6.5 Case Study Motivation ...................... 70 6.6 Rules ................................ 70 6.6.1 Circular Dependency ................... 71 6.6.2 Connector Has Incoming Interface ............ 73 6.6.3 Connector Has Outgoing Interface ............ 74 6.6.4 Mandatory Component Has Mandatory Interface ... 74 6.6.5 Model Has Mandatory Components ........... 75 6.6.6 No Mandatory Link On Optional Interface ....... 77 6.7 Empirical Results ......................... 78 7 Conclusion 81 7.1 Threats to Validity ........................ 82 Bibliography 83 A Source Code 101 A.1 Code for ECCO .......................... 101 A.2 Code for ArchStudio ....................... 151 A.2.1 ArchStudio Parsing and Modeling ............ 151 A.2.2 ArchStudio Rules ..................... 189 B Performance Measurements Raw Data 197 B.1 Efficiency ............................. 197 B.2 Effectiveness ............................ 199 C ArchStudio Model Merge & Repair 206 C.1 First Repair Leads to Cyclic Dependency ............ 207 C.2 First Repair Removes Last Mandatory Interface from Compo- nent ................................ 213 C.3 First Repair Removes Last Incoming Interface from Connec- tor. Second Repair Creates Mandatory Link on Optional In- terface ............................... 219 D Curriculum Vitae 226 E Erklärung 228 für Theresa Zusammenfassung 0.1 Ziel Diese Masterarbeit beschreibt wie im Bereich der Softwareentwicklung das Wählen aus mehreren Wahlmöglichkeiten, die das Resultat einer Softwarezusam- menführung sind, vereinfacht werden kann. Diese Wahlmöglichkeiten entste- hen, da beim Zusammenführen von Software deren Artefakte auf unter- schiedliche Arten kombiniert werden können. Die Software-Artefakte mit denen wir uns in dieser Arbeit beschäftigen sind zum einen Quelltext und zum anderen Softwaremodelle. Unser Ziel ist es die Entscheidung von Softwareingenieuren zu erleichtern, wenn sie aus einer Menge von Wahlmöglichkeiten wählen müssen die aus einer Softwarezusammenführung entstanden sind. 0.2 Methode Um dieses Ziel zu erfüllen, wenden wir Regeln auf die Wahlmöglichkeiten an. Anhand dieser Regeln entfernen wir Wahlmöglichkeiten die ungültig sind. Wir erachten eine Wahlmöglichkeit als ungültig wenn sie entweder einen Fehler beinhalten (zum Beispiel einen Nullzeiger-Zugriff oder eine zyk- lische Abhängigkeit) oder wenn die Wahlmöglichkeit äquivalent zu einer an- deren Wahlmöglichkeit ist. Wir definieren zwei Wahlmöglichkeiten als äquiv- alent wenn sie sich gleich verhalten. Unsere Regeln bestimmen ob eine Wahlmöglichkeit ungültig ist. 0.3 Ergebnisse Wir testen diese Methode indem wir Regeln für Quelltext und Software- modelle entwerfen. Diese Regeln werden in zwei Fallstudien angewandt und evaluiert. Wir zeigen wie wir mit diesen Regeln ungültige Wahlmöglichkeiten vi ZUSAMMENFASSUNG vii in Quelltext und Softwaremodellen identifizieren um so die Anzahl der beste- henden Wahlmöglichkeiten zu reduzieren. Abstract 0.4 Objective The work this master’s thesis describes aims to reduce the effort of selecting one of multiple choices that are the result of a software merge. Such choices occur since a merge can combine software artifacts in different ways. The software artifacts this thesis is concerned with are source code and software architecture models. Our goal is to facilitate decision-making for a software engineer who has to choose from a range of choices that were produced by a software merge. 0.5 Method To meet this objective, we apply rules to the available choices from which a software engineer has to choose. Using these rules we eliminate invalid choices. We consider a choice invalid if it either contains a serious flaw (e.g., a null pointer dereference or a circular dependency) or if the choice is equivalent to another one. We define two choices as equivalent if their behavior is the same. It is our rules’ task to determine whether a choice is invalid. 0.6 Results and Conclusions We test this method by creating rules for source code and software models. The developed rules are tested on two case studies by applying them to code and models, respectively. We demonstrate how we can use these rules to detect invalid choices in source code and models in order to reduce the number of available choices. viii Chapter 1 Introduction In the following chapter we outline our motivation for the work presented in this thesis, as well as its goals and methods. To facilitate discussing the topics of this thesis, we define a few terms used throughout the thesis in the next section. 1.1 Terminology Since we will be working with software models and source code alike in the course of this thesis, we shall introduce the umbrella term artifact. This word shall denote an element of either architecture models (e.g., component, link, and interface) or source code (e.g., code block, method call, and variable assignment). This thesis deals with eliminating and repairing choices. Generally speak- ing, these choices can stem from various sources: A software engineer could create multiple, slightly differing methods to compare their execution time, readability, or memory consumption and then choose the most efficient method. But in this thesis, we concentrate on choices which were created automati- cally through source code and model merges, respectively. As we will see in Chapter 2, artifacts can be combined in different ways during a merge, which creates choices, in the sense we defined above. Similar to the term artifact, the word choice is intended to bridge the areas of source code and architecture models in software engineering. For source code, choices are single methods that vary in some respect (e.g., the order of their statements might differ). Like source code choices, architecture choices vary, too (e.g., in the way their components are linked). Building on the definition of artifacts, we want to make it clear that a choice
Recommended publications
  • Technical Project and Product Manager Solution Architect and Senior Full Stack Developer
    Technical project and product manager Solution architect and senior full stack developer Profile Technical project and product manager, working with R&D software innovation processes, with a background as solution architect and senior full stack developer. Experienced manager of outsourced teams in many different countries, working with team efficiency based on pragmatic Scrum approach. Experience from scaled agile projects with hundreds of people involved. I am used to working with confidential information and have been security cleared several times. Knowledge I have been programming more than 20 different programming, script and database languages the last 36 years. My recent programming skills include NodeJS, JavaScript, Python, C#, Java, React for progressive web apps (PWA) and some courses in React-Native Expo. I have worked mostly with REST API architecture and a little GraphQL. I have specialist knowledge from leading CMS and DMS systems like Sitecore, DOCUMENTUM and Public 360, were I as product manager had to know Danish law on personal data and record management (ESDH). I worked many years on products for the educational sector and non-profit projects like Oligo Academy, that uses virtual worlds in primary schools for teaching environmental issues and other study subjects. Nikolaj Lisberg Hansen Born 1973 and started programming early in 1984. Got first programming job in 1995 and started working as freelance solution architect and technical project manager in 2006. I practice Tai Chi, love music and like to travel the world. Languages Very good Danish, English and German. Availability 10-25 hours per week normally remote or on-site near Copenhagen. Flexible salary between 96€ / hour (600 DKK) for remote work and 144€ / hour (900 DKK) for on-site work on product innovation or as technical project manager, solution architect or senior developer.
    [Show full text]
  • Cloud Computing Synopsis and Recommendations
    Special Publication 800-146 Cloud Computing Synopsis and Recommendations Recommendations of the National Institute of Standards and Technology Lee Badger Tim Grance Robert Patt-Corner Jeff Voas NIST Special Publication 800-146 Cloud Computing Synopsis and Recommendations Recommendations of the National Institute of Standards and Technology Lee Badger Tim Grance Robert Patt-Corner Jeff Voas C O M P U T E R S E C U R I T Y Computer Security Division Information Technology Laboratory National Institute of Standards and Technology Gaithersburg, MD 20899-8930 May 2012 U.S. Department of Commerce John Bryson, Secretary National Institute of Standards and Technology Patrick D. Gallagher, Under Secretary of Commerce for Standards and Technology and Director CLOUD COMPUTING SYNOPSIS AND RECOMMENDATIONS Reports on Computer Systems Technology The Information Technology Laboratory (ITL) at the National Institute of Standards and Technology (NIST) promotes the U.S. economy and public welfare by providing technical leadership for the nation’s measurement and standards infrastructure. ITL develops tests, test methods, reference data, proof of concept implementations, and technical analysis to advance the development and productive use of information technology. ITL’s responsibilities include the development of management, administrative, technical, and physical standards and guidelines for the cost-effective security and privacy of other than national security-related information in Federal information systems. This Special Publication 800-series reports on ITL’s research, guidance, and outreach efforts in computer security and its collaborative activities with industry, government, and academic organizations. National Institute of Standards and Technology Special Publication 800-146 Natl. Inst. Stand. Technol. Spec. Publ.
    [Show full text]
  • Comparative Studies of 10 Programming Languages Within 10 Diverse Criteria
    Department of Computer Science and Software Engineering Comparative Studies of 10 Programming Languages within 10 Diverse Criteria Jiang Li Sleiman Rabah Concordia University Concordia University Montreal, Quebec, Concordia Montreal, Quebec, Concordia [email protected] [email protected] Mingzhi Liu Yuanwei Lai Concordia University Concordia University Montreal, Quebec, Concordia Montreal, Quebec, Concordia [email protected] [email protected] COMP 6411 - A Comparative studies of programming languages 1/139 Sleiman Rabah, Jiang Li, Mingzhi Liu, Yuanwei Lai This page was intentionally left blank COMP 6411 - A Comparative studies of programming languages 2/139 Sleiman Rabah, Jiang Li, Mingzhi Liu, Yuanwei Lai Abstract There are many programming languages in the world today.Each language has their advantage and disavantage. In this paper, we will discuss ten programming languages: C++, C#, Java, Groovy, JavaScript, PHP, Schalar, Scheme, Haskell and AspectJ. We summarize and compare these ten languages on ten different criterion. For example, Default more secure programming practices, Web applications development, OO-based abstraction and etc. At the end, we will give our conclusion that which languages are suitable and which are not for using in some cases. We will also provide evidence and our analysis on why some language are better than other or have advantages over the other on some criterion. 1 Introduction Since there are hundreds of programming languages existing nowadays, it is impossible and inefficient
    [Show full text]
  • Nikolaj Lisberg Hansen Availability: Only for Minor Ongoing Tasks Or Ad Address: Valdemarsgade 41, St
    Personal profile Entrepreneur and Product Manager Experienced Technical project manager Solution architect and senior developer Entrepreneur and Product Manager with experience as technical project manager, solution architect and senior developer. Good knowledge of product development processes in R&D and public-sector domain knowledge for legal requirements in record and document management. Team efficiency based on a pragmatic approach to using SCRUM methods. Keep IT simple is a primary goal for me in all my work. My primary programming skills include NodeJS, C#, Java, PHP, AngularJS, JavaScript and CSS, but I have been programming more than 18 different programming, script and database languages the last 33 years. I have specialist domain knowledge from market leading CMS and DMS systems like Sitecore and Documentum. I know the Danish laws about personal data and record management (ESDH), from working as product manager in Software Innovation. Currently I am working on a non-profit project called Oligo Academy to use virtual worlds in primary and secondary schools as the basis for international school projects. I worked many years with confidential information and have been security cleared by both Danish Police Intelligence Service and the Danish Defense Intelligence Service several times. Personal information: Born 1973 and started programming early in 1984. Got first programming job in 1995 and started working as freelance solution architect and technical project manager in 2006. Practices the martial art Tai Chi Chuan, loves Jazz music and spending time with my family. Languages: Very good Danish, English and German. Contact information Name: Nikolaj Lisberg Hansen Availability: Only for minor ongoing tasks or ad Address: hoc assistance with solution Valdemarsgade 41, st.
    [Show full text]
  • Collaborative Modelling and Co-Simulation in Engineering and Computing Curricula
    Collaborative Modelling and Co-simulation in Engineering and Computing Curricula Peter Gorm Larsen1, Hugo Daniel Macedo1, Claudio Goncalves Gomes1, Lukas Esterle1, Casper Thule1, John Fitzgerald2, and Kenneth Pierce2 1 DIGIT, Department of Engineering, Aarhus University, Aarhus, Denmark, [email protected] [email protected], [email protected], [email protected] 2 School of Computing, Newcastle University, United Kingdom, [email protected] [email protected] Abstract. The successful development of Cyber-Physical Systems (CPSs) re- quires collaborative working across diverse engineering disciplines, notations and tools. However, classical computing curricula rarely provide opportunities for students to look beyond the confines of one set of methods. In this paper, we report approaches to raising students’ awareness of the integrative role of digital technology in future systems development. Building on research in open but in- tegrated tool chains for CPS engineering, we consider how this has been realised in two degree programmes in Denmark and the UK, and give preliminary find- ings. These include the need for ensuring stability of research-quality tools, and observations on how this material is presented in Computing versus Engineering curricula. 1 Introduction Collaboration between diverse disciplines is essential to the successful development of the Cyber-Physical Systems (CPSs) that are key to future innovations [26]. However, many university curricula train professionals within long-established disciplinary silos such as mechanical, electrical, civil or software engineering, with few opportunities for interaction between them. It is therefore critical to include elements within degree programmes to prepare students for the cross-disciplinary work that will likely feature in their subsequent careers [18].
    [Show full text]
  • The TXM Platform: Building Open-Source Textual Analysis Software Compatible with the TEI Encoding Scheme*
    PACLIC 24 Proceedings 389 The TXM Platform: Building Open-Source Textual Analysis Software Compatible with the TEI Encoding Scheme* Serge Heiden ICAR Laboratory, University of Lyon, 15 parvis René Descartes - ENS de Lyon, 69342 Lyon, France [email protected] Abstract. This paper describes the rationale and design of an XML-TEI encoded corpora compatible analysis platform for text mining called TXM. The design of this platform is based on a synthesis of the best available algorithms in existing textometry software. It also relies on identifying the most relevant open-source technologies for processing textual resources encoded in XML and Unicode, for efficient full-text search on annotated corpora and for statistical data analysis. The architecture is based on a Java toolbox articulating a full-text search engine component with a statistical computing environment and with an original import environment able to process a large variety of data sources, including XML-TEI, and to apply embedded NLP tools to them. The platform is distributed as an open-source Eclipse project for developers and in the form of two demonstrator applications for end users: a standard application to install on a workstation and an online web application framework. Keywords: xml-tei corpora, search engine, statistical analysis, textometry, open-source. 1 Introduction Textometry is a textual data analysis methodology born in France in the 80s in relation with the data analysis framework designed by (Benzecri et al., 1973a,b). A first synthesis of the methodology can be found in (Lebart et al, 1997). It somewhat differentiates from text mining by the fact that it tries to always combine various statistical analysis techniques, like factorial correspondence analysis or hierarchical ascendant classification, with full-text search techniques like kwic concordances to be able to always get back to the precise original editorial context of any textual event participating to the analysis.
    [Show full text]
  • Pipenightdreams Osgcal-Doc Mumudvb Mpg123-Alsa Tbb
    pipenightdreams osgcal-doc mumudvb mpg123-alsa tbb-examples libgammu4-dbg gcc-4.1-doc snort-rules-default davical cutmp3 libevolution5.0-cil aspell-am python-gobject-doc openoffice.org-l10n-mn libc6-xen xserver-xorg trophy-data t38modem pioneers-console libnb-platform10-java libgtkglext1-ruby libboost-wave1.39-dev drgenius bfbtester libchromexvmcpro1 isdnutils-xtools ubuntuone-client openoffice.org2-math openoffice.org-l10n-lt lsb-cxx-ia32 kdeartwork-emoticons-kde4 wmpuzzle trafshow python-plplot lx-gdb link-monitor-applet libscm-dev liblog-agent-logger-perl libccrtp-doc libclass-throwable-perl kde-i18n-csb jack-jconv hamradio-menus coinor-libvol-doc msx-emulator bitbake nabi language-pack-gnome-zh libpaperg popularity-contest xracer-tools xfont-nexus opendrim-lmp-baseserver libvorbisfile-ruby liblinebreak-doc libgfcui-2.0-0c2a-dbg libblacs-mpi-dev dict-freedict-spa-eng blender-ogrexml aspell-da x11-apps openoffice.org-l10n-lv openoffice.org-l10n-nl pnmtopng libodbcinstq1 libhsqldb-java-doc libmono-addins-gui0.2-cil sg3-utils linux-backports-modules-alsa-2.6.31-19-generic yorick-yeti-gsl python-pymssql plasma-widget-cpuload mcpp gpsim-lcd cl-csv libhtml-clean-perl asterisk-dbg apt-dater-dbg libgnome-mag1-dev language-pack-gnome-yo python-crypto svn-autoreleasedeb sugar-terminal-activity mii-diag maria-doc libplexus-component-api-java-doc libhugs-hgl-bundled libchipcard-libgwenhywfar47-plugins libghc6-random-dev freefem3d ezmlm cakephp-scripts aspell-ar ara-byte not+sparc openoffice.org-l10n-nn linux-backports-modules-karmic-generic-pae
    [Show full text]
  • School of Computing
    SCHOOL OF COMPUTING The 15th Overture Workshop: New Capabilities and Applications for Model-based Systems Engineering J. S. Fitzgerald, P. W. V. Tran-Jørgensen, and T. Oda (Editors) TECHNICAL REPORT SERIES No. CS-TR- 1513-2017 TECHNICAL REPORT SERIES No. CS-TR- 1513 October, 2017 The 15th Overture Workshop: New Capabilities and Applications for Model-based Systems Engineering J. S. Fitzgerald, P. W. V. Tran-Jørgensen, and T. Oda Abstract The 15th in the “Overture" series”of workshops on the Vienna Development Method (VDM), its associated tools and applications, was held at Newcastle University, UK, on 15th September, 2017. The workshop provided a forum for discussing and advancing the state of the art in formal modelling and analysis using VDM and its family of associated formalisms including extensions for describing distributed, real-time and cyber-physical systems. The workshop reflected the breadth and depth of work supporting and applying VDM. Contributions covered topics as diverse as architectural frameworks of autonomous Cyber-Physical Systems, tool building techniques such as interpreter design, automated code generation, testing and debugging and case studies of formal modelling and tool migration. Keywords: model-based engineering, formal methods, VDM © 2017 Newcastle University. Printed and published by Newcastle University, School of Computing, Urban Sciences Building, Newcastle upon Tyne, NE4 5TG, England. Bibliographical details Title and Authors NEWCASTLE UNIVERSITY School of Computing. Technical Report Series. CS-TR- 1513 Abstract: The 15th in the “Overture" series” of workshops on the Vienna Development Method (VDM), its associated tools and applications, was held at Newcastle University, UK, on 15th September, 2017. The workshop provided a forum for discussing and advancing the state of the art in formal modelling and analysis using VDM and its family of associated formalisms including extensions for describing distributed, real-time and cyber-physical systems.
    [Show full text]
  • Using the Gnustep Appkit a Guide to Using Various Parts of the Gnustep Appkit for Application Development
    Using the GNUstep AppKit A guide to using various parts of the GNUstep AppKit for application development Christopher Armstrong c 2005-2006 Christopher Armstrong. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2, as published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This documentation is provided on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND USEFULNESS OF THE DOC- UMENTATION IS WITH YOU (THE LICENSEE). IN NO EVENT WILL THE COPYRIGHT HOLDERS BE LIABLE FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPE- CIAL, GENERAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENTATION (INCLUDING BUT NOT LIMITED TO LOSS OF DATA, USE, OR PROFITS; PROCUREMENT OF SUBSTITUTE GOODS AND SERVICES; OR BUSINESS INTERUPTION) HOWEVER CAUSED, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Table of Contents 1 Introduction ........................................... 1 1.1 Overview ..................................................................... 1 1.2 Implementation Details ........................................................ 1 1.2.1 Drag and Drop ..........................................................
    [Show full text]
  • 1 Gnustep Frequently Asked Questions with Answers
    1 GNUstep Frequently Asked Questions with Answers Last updated 1 January 2008. Please send corrections to [email protected]. Also look at the user FAQ for more user oriented questions. 1.1 Compatibility 1.1.1 Is it easy to port OPENSTEP programs to GNUstep? It is probably easy for simple programs. There are some portability tools to make this easier, or rewrite the Makefiles yourself. You will also have to translate the NIB files (if there are any) to GNUstep model files using the nib2gmodel program (from ftp://ftp.gnustep.org/pub/gnustep/dev-apps). 1.1.2 How about porting between Cocoa and GNUstep? It’s easier from GNUstep to Cocoa than Cocoa to GNUstep. Cocoa is constantly changing, much faster than GNUstep could hope to keep up. They have added extensions and new classes that aren’t available in GNUstep yet. Plus there are some other issues. If you start with Cocoa: • Use #ifndef GNUSTEP for Apple only code. • Do not use CoreFoundation • Do not use Objective-C++ (except with gcc 4.1 or later) • Do not use Quicktime or other proprietary extension • GNUstep should be able to read Cocoa nib files automatically, so there is no need to port these, although you might want to have GNUstep specific versions of them anyway. See also http://mediawiki.gnustep.org/index.php/Writing_portable_code for more information. 1.1.3 Tools for porting While the programming interface should be almost transparent between systems (expect for the unimplemented parts, of course), there are a variety of other files and tools that are necessary for porting programs.
    [Show full text]
  • The Cross-Platform Developing Skills for Mac Applications
    The Cross-Platform Developing Skills for Mac Applications Xiao Hanyu1 October 17, 2009 1Computer Science and Technology 0706, Zhejiang University Contents 1 Basics of Mac Platform 3 1.1 Mac OS and iPhone .............................. 3 1.1.1 Introduction to Mac OS ....................... 3 1.1.2 Introduction to iPhone OS ...................... 3 1.1.3 iPhone and iPod Touch ........................ 6 1.2 Before Developing .............................. 6 1.2.1 Darwin (operating system) ..................... 6 1.2.2 Cocoa API ................................ 7 1.2.3 POSIX .................................. 7 1.3 Developing Tools ............................... 7 1.3.1 Xcode .................................. 7 1.3.2 Interface Builder ........................... 8 1.4 Objective-C ................................... 8 1.4.1 Introduction to Objective-C ..................... 8 1.4.2 A Short History of Objective-C ................... 9 1.4.3 Syntax Overview ........................... 10 2 The Cross-Platform Solution 11 2.1 Cygwin ..................................... 11 2.2 Cross-compiling ................................ 11 2.3 Makefile .................................... 13 2.4 GNUstep .................................... 15 2.4.1 Introduction to GNUstep ...................... 15 2.4.2 The Correlative OpenStep ...................... 16 1 CONTENTS CONTENTS 2.4.3 Gorm .................................. 16 2.4.4 ProjectCenter ............................. 17 2.4.5 Window Maker ............................. 17 3 Our First "Hello World" Application
    [Show full text]
  • Gorm and Projectcenter, the Gnustep RAD Tools at the Beginning
    LinuxFocus article number 265 http://linuxfocus.org Gorm and ProjectCenter, the GNUstep RAD tools by Georges Tarbouriech Abstract: <georges.t(at)linuxfocus.org> RAD stands for Rapid Application Development. At the end of the 80's, About the author: when NeXTstep was released, it came with an incredible tool, called InterfaceBuilder. Used in conjunction with another tool, named Georges is a long time Unix ProjectBuilder, it allowed to build graphical applications in a flash. user. He loves GNUstep GNUstep offers a free version of these tools, called Gorm.app and and the tools this great ProjectCenter.app. framework provides. _________________ _________________ _________________ At the beginning... From the computers prehistory, software development has been a great challenge. Computers were quite big in size despite their very little power. They were quite expensive, not really numerous and developers were unable to use them as often as they wished since they had to share them with other people. Then, researchers tried to find a way to make computers execute more than one task at a time to improve efficiency. Obviously, they had to design and create programming languages from scratch, taking into account the poor resources of the available machines. Thus, during the 60's various new programming languages appeared: LISP, FORTRAN, BASIC, Algol68, BCPL, etc. Next came the B language derived from the above mentioned BCPL, which soon became the C language. This last changed the world of programming. The Object Oriented (SmallTalk, Objective C, C++, etc) languages appeared later, with the "graphical era". In the 80's some machines were providing graphical OSes (Apple Macintosh, Commodore Amiga, Atari ST, etc) and the X Window System was in the works.
    [Show full text]