P-RIO: Graphic and Modular Programming on PVM

Total Page:16

File Type:pdf, Size:1020Kb

P-RIO: Graphic and Modular Programming on PVM P-RIO: Graphic and Modular Programming on PVM Enrique Vinicio Carrera E. Dpto. Eng. Eletrica´ - PUC/Rio Cx. Postal 38063 - CEP 22453-900, Rio de Janeiro - RJ [email protected] Orlando Loques and Julius Leite CAA - Applied Computing and Automation Group Dpto. de Eng. Eletrica´ - UFF Rua Passo da Patria,´ 156 - CEP 24210-240, Niteroi-RJ´ floques, [email protected] Abstract This paper describes P-RIO (Parallel Reconfigurable Interconnectable Ob- jects), an object-based software construction methodology, that provides high- level abstractions to build modular concurrent programs, facilitating software reuse and system development. It is also shown the graphic interface integrated to the P-RIO support environment, that provides facilities for configuration, de- bugging and management of parallel applications. 1 Introduction The P-RIO[1,2] environment includes a model, tools and mechanisms to build software for distributed and parallel programming. The software construction method- ology embedded in the environment makes a distinction between the building of indi- vidual system modules and system construction from these modules. As in other pro- posals, for example [3,4], the concept of interconnectable modules is adopted. System elements are called modules, being a module composed of code and data, and one or more communication points called connectors. Modules are building blocks and there is no restriction on the number of modules used to implement a composed module, Connectors Code ¤¡¤¢¤ Internal ¤¡¤¢¤ £¡£¢£ £¡£¢£ Data ¡ ¢ ¡ ¢ Pins Figure 1: Basic Module nor in the number of nesting levels. A specialized configuration language is used to specify the module composition and the intercommunication structure of an applica- tion. The methodology itself neither imposes restrictions on the language used in the building of components nor on the physical allocation of the modules of the applica- tion. For configuration and reusing purposes, modules can be programmed and stored in a library. Beside improving modularity and reuse, the methodology includes a set of simple interconnection mechanisms that allow the design of complex intermodule communication structures. On the other hand, PVM (Parallel Virtual Machine)[5] does not discriminate be- tween component-implementation and component-interaction, making it harder to at- tain modularity and software reuse. Yet, the PVM creation philosophy was to support a core set of low-level primitives to which high-level layers can be added. P-RIO uses the existing PVM calls to build an easier to use communication interface and to supply a distributed and parallel programming methodology with high portability. In addition, our proposal includes a graphic interface for construction and management of parallel and distributed systems (see section 3). 2 P-RIO Concepts & Programming The concept of module (Figure 1) has two facets: (i) a type or class if it is used as a template to create operational units; (ii) an operational unit, called an instance. Primitive classes define only one thread of control, and instances created from them can execute concurrently. Composition caters for module reuse and encapsulation, that is to say, existing (primitive and composite) classes can be used to compose new classes (Figure 2). Configuration comprises the selection of instances and the def- inition of their interconnections. The points of interaction and interconnection be- tween instances are defined through connectors, which are associated with their par- ent classes. Connectors are themselves classes that can be reused in different module classes. The external interface of a composite class is formed by the connectors that were explicitly exported by its internal classes. This helps to hide the internal compo- sition of a class making visible only the connectors useful for external configuration. The connectors concentrate communication activities, and are fundamental for con- figuration, since they serve as a ”glue” between modules. M5 ¡ ¡ ¢ ¢ M2 ¡ ¡ ¢ ¢ ¡ ¡ ¢ £¢£¡£¡£ ¢ M4 £¡£ ¡ ¡ ¢ £¢£¡£¡£ ¢ M1 £¡£ ¡ ¡ ¢ £¢£¡£¡£ ¢ £¡£ ¡ ¡ ¢ £¢£¡£¡£ ¢ £¡£ ¡ ¡ ¢ £¢£¡£¡£ ¢ G £¡£ ¡ ¡ ¢ ¤¡¤¡¤¢¤ £¢£¡£¡£ ¤¢¤¡¤¡¤ ¢ £¡£ ¤¡¤¡¤¢¤ £¢£¡£¡£ ¤¢¤¡¤¡¤ £¡£ ¤¡¤¡¤¢¤ £¢£¡£¡£ ¤¢¤¡¤¡¤ £¡£ ¤¡¤¡¤¢¤ ¤¢¤¡¤¡¤ M3 Figure 2: Module Composition & Group Communication Each connector contains one or more connection pins, that define the basic points for external communication. Associated with each pin are a transaction type and typed data structures (messages); bi-directional synchronous (RPC) and unidirectional asyn- chronous (datagram) are among the basic transaction types. The protocol to be used is an additional feature of the transaction, that can be selected in the configuration domain. At the moment, it is permitted to use UDP or TCP protocols, besides multi- cast dissemination that is optionally associated to barrier synchronization. A small set of send and receive primitives are available for communication. Additionally, select- with-guard communication constructs, based on logic expressions, auxiliary time-out functions and a mechanism for propagation of exceptions between communicating modules are also available. A group communication abstraction is supported (a group named G appears in figure 2). Making a connection to a group implies making the connection to all the members of the group. A message sent by a group member is received by every mem- ber of that group. This specialized connection may be used in various applications that require communication by message dissemination (broadcast or multicast), syn- chronization by means of barriers or rendez-vous, etc. As an example, we present the use of the configuration language to define an experimental system for image recognition[6], shown in figure 3. The module Edges is the basic unit of parallelization. It is interesting to note that the number of instances of Edges is specified by the parameter N Instances. This provides a convenient means to tune the performance of the system. connector Image_Type { pin Image out pin_output; }; connector Matrix_Type { pin Matrix out pin_output; pin Control in pin_input; }; connector Coef_Type { pin Coefficient out pin_output; }; Figure 3: Image Recognition System class Vision_Module { class Image { code C "image"; connector Image_Type channel_out; } mod_i; class Preprocessing { code "preprocessing"; pair connector Image_Type channel_in; connector Matrix_Type channel_out[N_Instances]; connector Coef_Type channel_sol; } mod_p; class Edges { code C "edges"; pair connector Matrix_Type channel_in; } mod_e[N_Instances]; class Classifier { code C "classifier"; pair connector Coef_Type channel_in; } mod_c; link mod_i.channel_out mod_p.channel_in; for ( i = 0 ; i < N_Instances ; i++ ) link mod_p.channel_out[i] mod_e[i].channel_in; link mod_p.channel_sol mod_c.channel_in; } application( int N_Instances ); Figure 4: Snapshot of P-RIO Graphic Interface 3 Graphic Interface P-RIO includes a graphic interface (figure 4) that provides visualization features that help to configure, monitor and debug applications. This tool allows the compo- sition of systems graphically through selection of components and definition of their interconnection. Class compression and decompression features allow the designer to inspect the internals of composed classes and simplifies the visual exposition of complex systems. With this tool, it is also possible with simple mouse commands, to control the physical allocation, instantiation, execution and removal of modules. Dynamic reconfiguration is supported, allowing to change system composition or to reallocate modules of a running program. The graphical interface, implemented using the Tcl/Tk toolkit[7], borrows many features from the XPVM tool. Thus, it supports debugging primitives for displaying messages sent and print-like outputs. 4 Conclusion The P-RIO to PVM symbiosis strategy is intended to fuse the high-level abstrac- tions and mechanisms offered by the methodology embedded in the environment with the portability between hardware architectures provided by PVM. Performance eval- uation tests have shown that P-RIO does not introduce measurable overheads to mes- sage communication when compared to a pure PVM system. The original PVM vi- sualization and debugging tools can also be used with P-RIO systems. In addition, P-RIO provides a graphics interface that supports class composition and the descrip- tion of application configurations. Prototypes of parallel systems can be quickly assembled using the P-RIO environ- ment, and its graphical tool. This facilitates experimenting with different solutions for a particular scientific problem. We believe that engineers and scientists, with very lit- tle training, can build relatively complex concurrent systems using P-RIO. The system and the graphical interface are fully operational and have been used to build several experimental applications. A PVM style manual is being finished and shortly P-RIO should be available to the academic community. 5 Bibliography [1] Carrera E., Loques O., Leite J., P-RIO: The RIO Methodology on PVM, Fifth Biannual Int. Conf. on Parallel Computing, Gent - Belgium, September 1995 (ac- cepted for presentation). [2] Carrera E., Loques O., Leite J., P-RIO: The RIO Methodology on PVM, Thirteenth Brazilian Symposium of Computer Networks, Belo Horizonte - Brazil, May 1995 (in portuguese). [3] Kramer J., et al., Configuring Object-Based Distributed Programs in REX, Soft- ware Engineering Journal, V. 7 (2), March 92. [4] Allen R., Garlan D., Beyond Definition/Use: Architectural Interconnection, Work- shop on Interface Definition Languages, Portland - USA, January 1994. [5] Geist A., The PVM Concurrent Computing System: Evolution, Experiences, and Trends, J. Parallel Computing, April 1993. [6] Carrera E., Perelmuter G., Vellasco M., Pacheco M., Image Classification Using Artificial Neural Networks, Int. Conf. on Education, Practice, and Promotion on Computational Methods in Engineering Using Small Computers, Macao, July 1995. [7] Ousterhout J., Tcl and the Tk Toolkit, Addison-Wesley, 1994..
Recommended publications
  • Object-Oriented Programming in Scheme with First-Class Modules
    Ob jectOriented Programming in Scheme with FirstClass Mo dules and Op eratorBased Inheritance Guruduth Banavar Gary Lindstrom Department of Computer Science University of Utah Salt LakeCityUT Abstract Wecharacterize ob jectoriented programming as structuring and manipulating a uniform space of rstclass values representing modules a distillation of the notion of classes Op erators over mo dules individually achieve eects such as encapsulation sharing and static binding A variety of idioms of OO programming nd convenient expression within this mo del including several forms of single and multiple inheritance abstract classes class variables inheritance hierarchy combination and reection Weshow that this programming style simplies OO programming via enhanced uniformity and supp orts a exible mo del of ob jectorientation that provides an attractive alternative to metaprogramming Finallyweshow that these notions of OO programming are language indep endent by implementing a Mo dular Scheme prototyp e as a completion of a generic OO framework for mo dularity Pap er Category Research Topic Area Language design and implementation Intro duction Classbased ob jectoriented programming is usually thought of as creating a graph structured inher itance hierarchy of classes instantiating some of these classes and computing with these instances Instances are typically rstclass values in the language ie they can b e created stored accessed and passed into and out of functions Classes on the other hand are usually not rstclass values and inheritance is
    [Show full text]
  • Modular Programming with Functions
    CHAPTER 4 MODULAR PROGRAMMING WITH FUNCTIONS Copyright © 2013 Pearson Education, Inc. Modularity •A program may also contain other functions, and it may refer to functions in another file or in a library. These functions , or modules , are sets of statements that perform an operation or compute a value •To maintain simplicity and readability in long and complex programs, we use a short main, and other functions instead of using one long main function. •By separating a solution into a group of modules, each module is easier to understand, thus adhering to the basic guidelines of structured programming Copyright © 2013 Pearson Education, Inc. Modularity •Braking a problem into a set of modules has many advantages: 1. Every module can be written and tested separately from the rest of the program 2. A module is smaller than a complete program, so testing is easier 3. Once a module has been tested, it can be used in new program without having to retest it ( reusability ) 4. Use of modules ( modularity ) usually reduces the overall length of programs 5. Several programmers can work on the same project if it is separated into modules Copyright © 2013 Pearson Education, Inc. Modularity Main Modules Copyright © 2013 Pearson Education, Inc. Function Definition •A function consists of a definition statement followed by declarations and statements. The general form of a function is: return_type function_name(parameter_declarations) { declarations; statements; return expression; } •The parameter declarations represent the information passed to the function •Additional variables used by the function are defined in declarations statement •All functions should include a return statement Copyright © 2013 Pearson Education, Inc.
    [Show full text]
  • Scope in Fortran 90
    Scope in Fortran 90 The scope of objects (variables, named constants, subprograms) within a program is the portion of the program in which the object is visible (can be use and, if it is a variable, modified). It is important to understand the scope of objects not only so that we know where to define an object we wish to use, but also what portion of a program unit is effected when, for example, a variable is changed, and, what errors might occur when using identifiers declared in other program sections. Objects declared in a program unit (a main program section, module, or external subprogram) are visible throughout that program unit, including any internal subprograms it hosts. Such objects are said to be global. Objects are not visible between program units. This is illustrated in Figure 1. Figure 1: The figure shows three program units. Main program unit Main is a host to the internal function F1. The module program unit Mod is a host to internal function F2. The external subroutine Sub hosts internal function F3. Objects declared inside a program unit are global; they are visible anywhere in the program unit including in any internal subprograms that it hosts. Objects in one program unit are not visible in another program unit, for example variable X and function F3 are not visible to the module program unit Mod. Objects in the module Mod can be imported to the main program section via the USE statement, see later in this section. Data declared in an internal subprogram is only visible to that subprogram; i.e.
    [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]
  • The Best of Both Worlds?
    The Best of Both Worlds? Reimplementing an Object-Oriented System with Functional Programming on the .NET Platform and Comparing the Two Paradigms Erik Bugge Thesis submitted for the degree of Master in Informatics: Programming and Networks 60 credits Department of Informatics Faculty of mathematics and natural sciences UNIVERSITY OF OSLO Autumn 2019 The Best of Both Worlds? Reimplementing an Object-Oriented System with Functional Programming on the .NET Platform and Comparing the Two Paradigms Erik Bugge © 2019 Erik Bugge The Best of Both Worlds? http://www.duo.uio.no/ Printed: Reprosentralen, University of Oslo Abstract Programming paradigms are categories that classify languages based on their features. Each paradigm category contains rules about how the program is built. Comparing programming paradigms and languages is important, because it lets developers make more informed decisions when it comes to choosing the right technology for a system. Making meaningful comparisons between paradigms and languages is challenging, because the subjects of comparison are often so dissimilar that the process is not always straightforward, or does not always yield particularly valuable results. Therefore, multiple avenues of comparison must be explored in order to get meaningful information about the pros and cons of these technologies. This thesis looks at the difference between the object-oriented and functional programming paradigms on a higher level, before delving in detail into a development process that consisted of reimplementing parts of an object- oriented system into functional code. Using results from major comparative studies, exploring high-level differences between the two paradigms’ tools for modular programming and general program decompositions, and looking at the development process described in detail in this thesis in light of the aforementioned findings, a comparison on multiple levels was done.
    [Show full text]
  • Software Quality / Modularity
    Software quality EXTERNAL AND INTERNAL FACTORS External quality factors are properties such as speed or ease of use, whose presence or absence in a software product may be detected by its users. Other qualities applicable to a software product, such as being modular, or readable, are internal factors, perceptible only to computer professionals who have access to the actual software text. In the end, only external factors matter, but the key to achieving these external factors is in the internal ones: for the users to enjoy the visible qualities, the designers and implementers must have applied internal techniques that will ensure the hidden qualities. EXTERNAL FACTORS Correctness: The ability of software products to perform their tasks, as defined by their specification. Correctness is the prime quality. If a system does not do what it is supposed to do, everything else about it — whether it is fast, has a nice user interface¼ — matters little. But this is easier said than done. Even the first step to correctness is already difficult: we must be able to specify the system requirements in a precise form, by itself quite a challenging task. Robustness: The ability of software systems to react appropriately to abnormal conditions. Robustness complements correctness. Correctness addresses the behavior of a system in cases covered by its specification; robustness characterizes what happens outside of that specification. There will always be cases that the specification does not explicitly address. The role of the robustness requirement is to make sure that if such cases do arise, the system does not cause catastrophic events; it should produce appropriate error messages, terminate its execution cleanly, or enter a so-called “graceful degradation” mode.
    [Show full text]
  • Chapter-2 Object Oriented Programming Very Short/ Short Answer Questions 1
    CHAPTER-2 OBJECT ORIENTED PROGRAMMING VERY SHORT/ SHORT ANSWER QUESTIONS 1. Discuss major OOP concepts briefly. Ans. Following are the general OOP concepts: 1. Data Abstraction: Data abstraction means, providing only essential information to the outside word and hiding their background details i.e. to represent the needed information in program without presenting the details. 2. Data Encapsulation: The wrapping up of data and operations/functions (that operate o the data) into a single unit (called class) is known as Encapsulation. 3. Modularity: Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules. 4. Inheritance: Inheritance is the capability of one class of things to inherit capabilities or properties from another class. 5. Polymorphism: Polymorphism is the ability for a message or data to be processed in more than one form. 2. What are programming paradigms? Give names of some popular programming paradigms. Ans. Programming Paradigm: A Programming Paradigm defines the methodology of designing and implementing programs using the key features and building blocks of a programming language. Following are the different programming paradigms: (i) Procedural Programming (ii) Object Based Programming (iii) Object Oriented Programming 3. What are the shortcomings of procedural and modular programming approaches? Ans. Following are the various shortcomings of procedural and modular programming approaches: Procedural Programming is susceptible to design changes. Procedural Programming leads to increased time and cost overheads during design changes. Procedural and Modular programming both are unable to represent real world relationship that exists among objects. In modular programming, the arrangement of the data can’t be changed without modifying all the functions that access it.
    [Show full text]
  • Modular Programming
    Modular Programming Prof. Clarkson Fall 2016 Today’s music: "Giorgio By Moroder" by Daft Punk Te Moog modular synthesizer Review Previously in 3110: • Functions, data • lots of language features • how to build small programs Today: • language features for building large programs: structures, signatures, modules Question What’s the largest program you’ve ever worked on, by yourself or as part of a team? A. 10-100 LoC B. 100-1,000 LoC C. 1,000-10,000 LoC D. 10,000-100,000 LoC E. 100,000 LoC or bigger Scale • My solution to A1: 100 LoC • My solution to A2: 300 LoC • OCaml: 200,000 LoC • Unreal engine 3: 2,000,000 LoC • Windows Vista: 50,000,000 LoC http://www.informationisbeautiful.net/visualizations/million-lines-of-code/ ...can’t be done by one person ...no individual programmer can understand all the details ...too complex to build with subset of OCaml we’ve seen so far Modularity Modular programming: code comprises independent modules – developed separately – understand behavior of module in isolation – reason locally, not globally Java features for modularity • classes, packages: organize identifiers (classes, methods, fields, etc.) into namespaces • interfaces: describe related classes • public, protected, private: control what is visible outside a namespace • subtyping, inheritance: enables code reuse OCaml features for modularity • structures: organize identifiers (functions, values, etc.) into namespaces • signatures: describe related modules • abstract types: control what is visible outside a namespace • functors, includes: enable
    [Show full text]
  • Modularity and Reuse of Domain-Specific Languages
    Modularity and reuse of domain-specific languages Citation for published version (APA): Sutii, A. M. (2017). Modularity and reuse of domain-specific languages: an exploration with MetaMod. Technische Universiteit Eindhoven. Document status and date: Published: 07/11/2017 Document Version: Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers) Please check the document version of this publication: • A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website. • The final author version and the galley proof are versions of the publication after peer review. • The final published version features the final layout of the paper including the volume, issue and page numbers. Link to publication General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain • You may freely distribute the URL identifying the publication in the public portal. If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, please follow below link for the End User Agreement: www.tue.nl/taverne Take down policy If you believe that this document breaches copyright please contact us at: [email protected] providing details and we will investigate your claim.
    [Show full text]
  • A Module System for C++ (Revision 2)
    Document number: N4214 Date: 2014-10-13 Working group: Modules SG Reply to: [email protected] A Module System for C++ (Revision 2) Gabriel Dos Reis Mark Hall Gor Nishanov Abstract We present a design of and a specification of module system for C++. The proposal focuses on programmer’s view of modules (both production and consumption) and how to better support modular programming in the large, componentization, scalable compilation, and semantics-aware devel- oper tools. Contents 1 Introduction ......... 1 5 Tools Support ......... 20 2 The Problems ......... 2 6 Build Systems ........ 21 3 Goals and Principles ..... 4 7 Migration ........... 21 4 Design Choices ........ 7 A Standardese ......... 21 1 Introduction The lack of direct language support for componentization of C++ libraries and programs, combined with increasing use of templates, has led to serious impedi- ments to compile-time scalability, and programmer productivity. It is the source of lackluster build performance and poor integration with cloud and distributed build systems. Furthermore, the heavy-reliance on header file inclusion (i.e. copy-and- paste from compilers’ perspective) and macros stifle flowering of C++ developer tools in increasingly semantics-aware development environments. Responding to mounting requests from application programmers, library de- velopers, tool builders alike, this report proposes a module system for C++ with a handful of clearly articulated goals. The proposal is informed by the current state of the art regarding module systems in contemporary programming languages, past 1 suggestions [4, 6] and experiments such as Clang’s [2, 5], and practical constraints specific to C++ ecosystem, deployment, and use. The design is minimalist; yet, it aims for a handful of fundamental goals 1.
    [Show full text]
  • 006-31: Modular Programming Using SAS/AF® and SAS®
    SUGI 31 Applications Development Paper 006-31 Modular Programming using AF/SCL Kevin Graham, Montura, San Francisco, California ABSTRACT Build modular SAS Frame applications using advanced programming techniques and features available in SAS SCL. Easily separate critical logic and business rules from your code base without creating tangled source code. Isolate and integrate decision-logic from task-logic without separating your brain from your sanity. INTRODUCTION Object programming is the science of program structure and organization. The goal in object programming is to produce modular and reusable code. The problem is that applications can be object-oriented but not modular. Rules are added, removed, or modified frequently and some changes can affect multiple sections of the application. The implementation of rules is what usually kills program modularity. This tutorial shows how to make a modular business rule. WHAT IS OBJECT PROGRAMMING? Objects and SAS/Macro actually have something in common – they both serve as a structure for the source code that is a SAS program. Thinking of the object, and macro, as simple structures used to encapsulate a SAS program will make this tutorial easier to understand. The two most important aspects in object programming are “separation of concerns” and “integration of concerns”. During the separation phase, the logic programmers call “decision logic” and “task logic” are physically separated into different programs. During the integration phase, business rule programs are dynamically attached to the other modules. This allows a rule to perform complex operations on the application without adding complexity. STRUCTURES A structure is composed of statements that mark the beginning and ending of a program.
    [Show full text]
  • The Circumstances in Which Modular Programming Becomes the Favor Choice by Novice Programmers
    I.J. Modern Education and Computer Science, 2018, 7, 1-12 Published Online July 2018 in MECS (http://www.mecs-press.org/) DOI: 10.5815/ijmecs.2018.07.01 The Circumstances in which Modular Programming becomes the Favor Choice by Novice Programmers Ilana Lavy Department of Information Systems, Yezreel Valley College, Israel Email: [email protected] Rashkovits Rami Department of Information Systems, Yezreel Valley College, Israel Email: [email protected] Received: 16 May 2018; Accepted: 04 June 2018; Published: 08 July 2018 Abstract—One of the key indicators for testing code quality is the level of modularity. Nevertheless, novice I. INTRODUCTION programmers do not always stick to writing modular code. In this study, we aim to examine the circumstances in The principle of modular design is defined [1] as which novice programmers decide to do so. To address splitting up large computation into a collection of small, this aim, two student groups, twenty each, were given a nearly independent, specialized sub-processes. In other programming assignment, each in a different set-up. The words, modular programming is a design principle that first group was given the assignment in several stages, divides the functionality of a program into modules each each add complexity to the previous one, while the responsible to one aspect of the desired functionality. The second group was given the entire assignment at once. modules are independent and can be easily replaced or The students' solutions were analyzed using the dual- extended with minimal changes in other modules [2]. process theory, cognitive dissonance theory and content Modularity hence supports gradual development, easy analysis methods to examine the extent of modularity.
    [Show full text]