Visual Programming Language for Tacit Subset of J Programming Language
Total Page:16
File Type:pdf, Size:1020Kb
Visual Programming Language for Tacit Subset of J Programming Language Nouman Tariq Dissertation 2013 Erasmus Mundus MSc in Dependable Software Systems Department of Computer Science National University of Ireland, Maynooth Co. Kildare, Ireland A dissertation submitted in partial fulfilment of the requirements for the Erasmus Mundus MSc Dependable Software Systems Head of Department : Dr Adam Winstanley Supervisor : Professor Ronan Reilly June 30, 2013 Declaration I hereby certify that this material, which I now submit for assessment on the program of study leading to the award of Master of Science in Dependable Software Systems, is entirely my own work and has not been taken from the work of others save and to the extent that such work has been cited and acknowledged within the text of my work. Signed:___________________________ Date:___________________________ Abstract Visual programming is the idea of using graphical icons to create programs. I take a look at available solutions and challenges facing visual languages. Keeping these challenges in mind, I measure the suitability of Blockly and highlight the advantages of using Blockly for creating a visual programming environment for the J programming language. Blockly is an open source general purpose visual programming language designed by Google which provides a wide range of features and is meant to be customized to the user’s needs. I also discuss features of the J programming language that make it suitable for use in visual programming language. The result is a visual programming environment for the tacit subset of the J programming language. Table of Contents Introduction ............................................................................................................................................ 7 Problem Statement ............................................................................................................................. 7 Motivation........................................................................................................................................... 7 Aims and Objectives ............................................................................................................................ 8 Related Work ........................................................................................................................................ 10 Tools and Technologies Used ............................................................................................................ 10 J Programming Language .............................................................................................................. 10 Blockly ........................................................................................................................................... 10 JavaScript ...................................................................................................................................... 11 Visual Programming .......................................................................................................................... 12 Diagrams ....................................................................................................................................... 12 Flowcharts ..................................................................................................................................... 12 Data Flow Diagrams ...................................................................................................................... 12 A Brief History of Visual Programming ............................................................................................. 13 HI-VISUAL ...................................................................................................................................... 13 Visual Logic Programming ............................................................................................................. 14 VLCC .............................................................................................................................................. 15 VisaVis ........................................................................................................................................... 15 Solution ................................................................................................................................................. 16 J Programming Language .................................................................................................................. 16 Background ................................................................................................................................... 16 Array Based Programming in J ...................................................................................................... 17 Structure of J ................................................................................................................................. 17 Nouns ............................................................................................................................................ 17 Verbs ............................................................................................................................................. 18 Adverbs ......................................................................................................................................... 19 Conjunctions ................................................................................................................................. 19 Order of Evaluation ....................................................................................................................... 19 Tacit Programming in J .................................................................................................................. 20 Blockly ............................................................................................................................................... 21 Language Philosophy .................................................................................................................... 21 String and Array Indexes ............................................................................................................... 21 Variable Names ............................................................................................................................. 21 High Level Blocks ........................................................................................................................... 22 Language Dependence .................................................................................................................. 22 Blocks ............................................................................................................................................ 22 Defining Blocks .............................................................................................................................. 23 Defining Block Inputs .................................................................................................................... 27 A Visual Language Based on Blockly ..................................................................................................... 31 Block for Verbs .................................................................................................................................. 31 The Monad Block .......................................................................................................................... 32 The Dyad Block .............................................................................................................................. 32 Blocks for Adverbs ............................................................................................................................ 33 Block for Conjunctions ...................................................................................................................... 34 Code Generation ............................................................................................................................... 34 Code Generation for Monads ....................................................................................................... 35 Code Generation for Dyads ........................................................................................................... 35 Code Generation for Conjunctions ............................................................................................... 35 Evaluation ............................................................................................................................................. 36 Textual Complexity Metrics .............................................................................................................. 36 Character Count ............................................................................................................................ 36 Lines of Codes ............................................................................................................................... 36 Conditional Statements ................................................................................................................ 36 Halstead ........................................................................................................................................ 37 Visual J ..............................................................................................................................................