PeerJ Computer Science Preprints: Programming Languageshttps://peerj.com/preprints/index.atom?journal=cs&subject=11920Programming Languages articles published in PeerJ Computer Science PreprintsResolve the cell formation problem in a set of three manufacturing cellshttps://peerj.com/preprints/276922019-04-292019-04-29Boris Almonacid
The problem of cell formation is an NP-Hard problem, which consists of organising a group of machines and pieces in several cells. The machines are arranged in a fixed way inside the cells, and each machine has some manufacturing operation that applies in different pieces or parts. The idea of the problem is to be able to minimise the movements made by the pieces to reach the machines in the cells. For this problem, a data set has been organised using three manufacturing cells. Through the data set an experiment has been carried out that focuses on obtaining the best solution using a global search solution within 6 days for each instance. The experimental results have been able to obtain the general optimum value for a set of test instances.
The problem of cell formation is an NP-Hard problem, which consists of organising a group of machines and pieces in several cells. The machines are arranged in a fixed way inside the cells, and each machine has some manufacturing operation that applies in different pieces or parts. The idea of the problem is to be able to minimise the movements made by the pieces to reach the machines in the cells. For this problem, a data set has been organised using three manufacturing cells. Through the data set an experiment has been carried out that focuses on obtaining the best solution using a global search solution within 6 days for each instance. The experimental results have been able to obtain the general optimum value for a set of test instances.IPOMOEA: Intended package orientation using multi-objective evolutionary algorithm in Rhttps://peerj.com/preprints/276562019-04-162019-04-16M A El-dosuky
Programmers’ lack of familiarity with what is available in packages may prompt them to reinvent the wheel. This is generally the case in any programming language, but it is a matter of madness with a language described as difficult even by professionals supporting it such as R. In R Cookbook, says: “But R can be frustrating. It’s not obvious how to accomplish many tasks, even simple ones.” IPOMOEA is a code that has been written to mitigate this problem. It helps R language developers determine how to perform a specific task, by automating the search in R site for all packages that are likely to contribute to the task implementation. After that, IPOMOEA determines a partial set of results to be the intended package using multi-objective evolutionary algorithm NSGA-II . Not only does it specify the intended package, but also it helps orient programmers and manage packages. Keywords:
Programmers’ lack of familiarity with what is available in packages may prompt them to reinvent the wheel. This is generally the case in any programming language, but it is a matter of madness with a language described as difficult even by professionals supporting it such as R. In R Cookbook, says: “But R can be frustrating. It’s not obvious how to accomplish many tasks, even simple ones.” IPOMOEA is a code that has been written to mitigate this problem. It helps R language developers determine how to perform a specific task, by automating the search in R site for all packages that are likely to contribute to the task implementation. After that, IPOMOEA determines a partial set of results to be the intended package using multi-objective evolutionary algorithm NSGA-II . Not only does it specify the intended package, but also it helps orient programmers and manage packages. Keywords:Component-oriented acausal modeling of the dynamical systems in Python language on the example of the model of the sucker rod stringhttps://peerj.com/preprints/276122019-03-222019-03-22Volodymyr B KopeiOleh R OnyskoVitalii G Panchuk
As a rule, the limitations of specialized modeling languages for acausal modeling of the complex dynamical systems are: limited applicability, poor interoperability with the third party software packages, the high cost of learning, the complexity of the implementation of hybrid modeling and modeling systems with the variable structure, the complexity of the modifications and improvements. In order to solve these problems, it is proposed to develop the easy-to-understand and to modify component-oriented acausal hybrid modeling system that is based on: (1) the general-purpose programming language Python, (2) the description of components by Python classes, (3) the description of components behavior by difference equations using declarative tools SymPy, (4) the event generation using Python imperative constructs, (5) composing and solving the system of algebraic equations in each discrete time point of the simulation. The classes that allow creating the models in Python without the need to study and apply specialized modeling languages are developed. These classes can also be used to automate the construction of the system of difference equations, describing the behavior of the model in a symbolic form. The basic set of mechanical components is developed — 1D translational components "mass", "spring-damper", "force". Using these components, the models of sucker rods string are developed and simulated. These simulation results are compared with the simulation results in Modelica language. The replacement of differential equations by difference equations allow simplifying the implementation of the hybrid modeling and the requirements for the modules for symbolic mathematics and for solving equations.
As a rule, the limitations of specialized modeling languages for acausal modeling of the complex dynamical systems are: limited applicability, poor interoperability with the third party software packages, the high cost of learning, the complexity of the implementation of hybrid modeling and modeling systems with the variable structure, the complexity of the modifications and improvements. In order to solve these problems, it is proposed to develop the easy-to-understand and to modify component-oriented acausal hybrid modeling system that is based on: (1) the general-purpose programming language Python, (2) the description of components by Python classes, (3) the description of components behavior by difference equations using declarative tools SymPy, (4) the event generation using Python imperative constructs, (5) composing and solving the system of algebraic equations in each discrete time point of the simulation. The classes that allow creating the models in Python without the need to study and apply specialized modeling languages are developed. These classes can also be used to automate the construction of the system of difference equations, describing the behavior of the model in a symbolic form. The basic set of mechanical components is developed — 1D translational components "mass", "spring-damper", "force". Using these components, the models of sucker rods string are developed and simulated. These simulation results are compared with the simulation results in Modelica language. The replacement of differential equations by difference equations allow simplifying the implementation of the hybrid modeling and the requirements for the modules for symbolic mathematics and for solving equations.For and against PEGs: Why we need multi-ordered grammarshttps://peerj.com/preprints/273582019-02-182019-02-18Nick Papoulias
Since their introduction in 2004, Parsing Expression Grammars (PEGs for short) have been gaining widespread adoption both in industry and academia. More than 400 subsequent works cite B. Ford's original paper, while a total of 29 implementations in 14 different programming languages are reported in active use. Nevertheless reviewing PEG-related bibliography reveals that the original argumentation in favor of PEGs has actually been weakened by subsequent work, regarding basic parsing features such as (a) recursion handling and (b) associativity support. To this day all proposed enhancements either address these issues in isolation or in implementation specific ways. It is still unclear if there is a single way to parse PEGs without facing these issues or introducing implementation directives external to the formalism. Our subsequent analysis takes us a step further, questioning the very core of the initial PEG proposal: (c) by design unambiguous grammars. We then discuss why a form of ordered choice and conditional operators that PEGs advocate are worth saving, but only within a wider synthesis that could address the aforementioned issues. To this end we present our on-going effort with the Gray algorithm and MOGs (Multi-Ordered Grammars), a possible alternative to the PEG and CFG formalisms.
Since their introduction in 2004, Parsing Expression Grammars (PEGs for short) have been gaining widespread adoption both in industry and academia. More than 400 subsequent works cite B. Ford's original paper, while a total of 29 implementations in 14 different programming languages are reported in active use. Nevertheless reviewing PEG-related bibliography reveals that the original argumentation in favor of PEGs has actually been weakened by subsequent work, regarding basic parsing features such as (a) recursion handling and (b) associativity support. To this day all proposed enhancements either address these issues in isolation or in implementation specific ways. It is still unclear if there is a single way to parse PEGs without facing these issues or introducing implementation directives external to the formalism. Our subsequent analysis takes us a step further, questioning the very core of the initial PEG proposal: (c) by design unambiguous grammars. We then discuss why a form of ordered choice and conditional operators that PEGs advocate are worth saving, but only within a wider synthesis that could address the aforementioned issues. To this end we present our on-going effort with the Gray algorithm and MOGs (Multi-Ordered Grammars), a possible alternative to the PEG and CFG formalisms.Parsing multi-ordered grammars with the Gray algorithmhttps://peerj.com/preprints/274652019-02-182019-02-18Nick Papoulias
Background. Context-free grammars (CFGs) and Parsing-expression Grammars (PEGs) are the two main formalisms used by formal specifications and parsing frameworks to describe programming languages. They mainly differ in the definition of the choice operator, describing language alternatives. CFGs support the use of non-deterministic choice (i.e., unordered choice), where all alternatives are equally explored. PEGs support a deterministic choice (i.e., ordered choice), where alternatives are explored in strict succession. In practice the two formalisms, are used through concrete classes of parsing algorithms (such as Left-to-right, rightmost derivation (LR) for CFGs and Packrat parsing for PEGs), that follow the semantics of the formal operators.
Problem Statement. Neither the two formalisms, nor the accompanying algorithms are sufficient for a complete description of common cases arising in language design. In order to properly handle ambiguity, recursion, precedence or associativity, parsing frameworks either introduce implementation specific directives or ask users to refactor their grammars to fit the needs of the framework/algorithm/formalism combo. This introduces significant complexity even in simple cases and results in incompatible grammar specifications.
Our Proposal. We introduce Multi-Ordered Grammars (MOGs) as an alternative to the CFG and PEG formalisms. MOGs aim for a better exploration of ambiguity, ordering, recursion and associativity during language design. This is achieved by (a) allowing both deterministic and non-deterministic choices to co-exist, and (b) introducing a form of recursive and scoped ordering. The formalism is accompanied by a new parsing algorithm (Gray) that extends chart parsing (normally used for Natural Language Processing) with the proposed MOG operators.
Results. We conduct two case-studies to assess the expressiveness of MOGs, compared to CFGs and PEGs. The first consists of two idealized examples from literature (an expression grammar and a simple procedural language). The second examines a real-world case (the entire Smalltalk grammar and eleven new Smalltalk extensions) probing the complexities of practical needs. We show that in comparison, MOGs are able to reduce complexity and naturally express language constructs, without resorting to implementation specific directives.
Conclusion. We conclude that combining deterministic and non-deterministic choices in a single grammar specification is indeed not only possible but also beneficial. Moreover, augmented by operators for recursive and scoped ordering the resulting multi-ordered formalism presents a viable alternative to both CFGs and PEGs. Concrete implementations of MOGs can be constructed by extending chart parsing with MOG operators for recursive and scoped ordering.
Background. Context-free grammars (CFGs) and Parsing-expression Grammars (PEGs) are the two main formalisms used by formal specifications and parsing frameworks to describe programming languages. They mainly differ in the definition of the choice operator, describing language alternatives. CFGs support the use of non-deterministic choice (i.e., unordered choice), where all alternatives are equally explored. PEGs support a deterministic choice (i.e., ordered choice), where alternatives are explored in strict succession. In practice the two formalisms, are used through concrete classes of parsing algorithms (such as Left-to-right, rightmost derivation (LR) for CFGs and Packrat parsing for PEGs), that follow the semantics of the formal operators.Problem Statement. Neither the two formalisms, nor the accompanying algorithms are sufficient for a complete description of common cases arising in language design. In order to properly handle ambiguity, recursion, precedence or associativity, parsing frameworks either introduce implementation specific directives or ask users to refactor their grammars to fit the needs of the framework/algorithm/formalism combo. This introduces significant complexity even in simple cases and results in incompatible grammar specifications.Our Proposal. We introduce Multi-Ordered Grammars (MOGs) as an alternative to the CFG and PEG formalisms. MOGs aim for a better exploration of ambiguity, ordering, recursion and associativity during language design. This is achieved by (a) allowing both deterministic and non-deterministic choices to co-exist, and (b) introducing a form of recursive and scoped ordering. The formalism is accompanied by a new parsing algorithm (Gray) that extends chart parsing (normally used for Natural Language Processing) with the proposed MOG operators.Results. We conduct two case-studies to assess the expressiveness of MOGs, compared to CFGs and PEGs. The first consists of two idealized examples from literature (an expression grammar and a simple procedural language). The second examines a real-world case (the entire Smalltalk grammar and eleven new Smalltalk extensions) probing the complexities of practical needs. We show that in comparison, MOGs are able to reduce complexity and naturally express language constructs, without resorting to implementation specific directives.Conclusion. We conclude that combining deterministic and non-deterministic choices in a single grammar specification is indeed not only possible but also beneficial. Moreover, augmented by operators for recursive and scoped ordering the resulting multi-ordered formalism presents a viable alternative to both CFGs and PEGs. Concrete implementations of MOGs can be constructed by extending chart parsing with MOG operators for recursive and scoped ordering.Eclipse CDT code analysis and unit testinghttps://peerj.com/preprints/273502018-11-152018-11-15Shaun C. D'Souza
In this paper we look at the Eclipse IDE and its support for CDT (C/C++ Development Tools). Eclipse is an open source IDE and supports a variety of programming languages including plugin functionality. Eclipse supports the standard GNU environment for compiling, building and debugging applications. The CDT is a plugin which enables development of C/C++ applications in eclipse. It enables functionality including code browsing, syntax highlighting and code completion. We verify a 50X improvement in LOC automation for Fake class .cpp / .h and class test .cpp code generation.
In this paper we look at the Eclipse IDE and its support for CDT (C/C++ Development Tools). Eclipse is an open source IDE and supports a variety of programming languages including plugin functionality. Eclipse supports the standard GNU environment for compiling, building and debugging applications. The CDT is a plugin which enables development of C/C++ applications in eclipse. It enables functionality including code browsing, syntax highlighting and code completion. We verify a 50X improvement in LOC automation for Fake class .cpp / .h and class test .cpp code generation.GeoSQL Journey - A gamified learning experience to introduce (or demystify) geospatial SQL querieshttps://peerj.com/preprints/272472018-10-022018-10-02Romain SandozSarah CompostoSandrine DivorneOlivier ErtzJens Ingensand
In a digital world in the making, digital natives develop new learning profiles, interests, and way of working. Simultaneously teachers are facing students with lack of engagement and motivation with quite traditional learning process that has probably to be reframed considering the effects of digital transformation in the education sector. This issue is acute when it comes to complex subject of study, such as SQL geospatial to manipulate the geospatial characteristic of data. Indeed, some common difficulties have been identified by teachers from HEIG-VD university both in Media Engineering and Geomatics fields of study. The user-centered approach aims at creating digital products highly responding to the user’s needs through techniques improving the user experience. Various aspects have to be considered, including emotions. In education, gamification, along with user experience, interface design and usability best practices is one promising approach able to increase the learner's engagement, interest and motivation. It aims to implement game mechanics within non-game context, in order to motivate the learner to accomplish a task and increase the ability to learn new skills. Using a gamification layer within a given context, being digital or not, act as a motivational trigger. It helps giving meaningful, enjoyable and empowering experience. SQL Island is a project from Kaiserslautern University of Technology which illustrates very well a gamified learning experience of the SQL special-purpose programming language. The GeoSQL Journey project goes further, tackling SQL geospatial to learn in a fun way how to manipulate the geospatial characteristic of data. It is a gamified pedagogical application to introduce the students to the practice of SQL geospatial during the first hours or days of the course. Serving as an initiation, it is designed to focus on intrinsic motivation (personal development, quest, challenge and fulfillment) with learning objectives determined and integrated with an engaging and coherent game world and narrative. This paper describes the early work of conceptual design of the GeoSQL Journey project. Game mechanics and game interface has been conceived and brought together according to the literature in the domain and best practices on this matter. The following step for this project is to elaborate a testing method without yet having to develop an application prototype (e.g. organizing a fairly raw tabletop game associated with a classic SQL console) so as to challenge the design with students and teachers to get their feedbacks. Also, it is envisioned to evaluate how existing open source gamification tools and frameworks would be suitable to develop the first prototype planned for the 2019-2020 academic year.
In a digital world in the making, digital natives develop new learning profiles, interests, and way of working. Simultaneously teachers are facing students with lack of engagement and motivation with quite traditional learning process that has probably to be reframed considering the effects of digital transformation in the education sector. This issue is acute when it comes to complex subject of study, such as SQL geospatial to manipulate the geospatial characteristic of data. Indeed, some common difficulties have been identified by teachers from HEIG-VD university both in Media Engineering and Geomatics fields of study. The user-centered approach aims at creating digital products highly responding to the user’s needs through techniques improving the user experience. Various aspects have to be considered, including emotions. In education, gamification, along with user experience, interface design and usability best practices is one promising approach able to increase the learner's engagement, interest and motivation. It aims to implement game mechanics within non-game context, in order to motivate the learner to accomplish a task and increase the ability to learn new skills. Using a gamification layer within a given context, being digital or not, act as a motivational trigger. It helps giving meaningful, enjoyable and empowering experience. SQL Island is a project from Kaiserslautern University of Technology which illustrates very well a gamified learning experience of the SQL special-purpose programming language. The GeoSQL Journey project goes further, tackling SQL geospatial to learn in a fun way how to manipulate the geospatial characteristic of data. It is a gamified pedagogical application to introduce the students to the practice of SQL geospatial during the first hours or days of the course. Serving as an initiation, it is designed to focus on intrinsic motivation (personal development, quest, challenge and fulfillment) with learning objectives determined and integrated with an engaging and coherent game world and narrative. This paper describes the early work of conceptual design of the GeoSQL Journey project. Game mechanics and game interface has been conceived and brought together according to the literature in the domain and best practices on this matter. The following step for this project is to elaborate a testing method without yet having to develop an application prototype (e.g. organizing a fairly raw tabletop game associated with a classic SQL console) so as to challenge the design with students and teachers to get their feedbacks. Also, it is envisioned to evaluate how existing open source gamification tools and frameworks would be suitable to develop the first prototype planned for the 2019-2020 academic year.A procedure to manage open access data for post-processing in GIS environmenthttps://peerj.com/preprints/272272018-09-202018-09-20Lorenzo BenvenutoRoberto MarzocchiIlaria FerrandoBianca FedericiDomenico Sguerso
DataBases (DB) are a widespread source of data, useful for many applications in different scientific fields. The present contribution describes an automatic procedure to access, download and store open access data from different sources, to be processed in a GIS environment. In particular, it refers to the specific need of the authors to manage both meteorological data (pressure and temperature) and GNSS (Global Navigation Satellite System) Zenith Total Delay (ZTD) estimates. Such data allow to produce Precipitable Water Vapor (PWV) maps, thanks to the so called GNSS for Meteorology(G4M) procedure, developed through GRASS GIS software ver. 7.4, for monitoring in time and interpreting severe meteorological events. Actually, the present version of the procedure includes the meteorological pressure and temperature data coming from NOAA’s Integrated Surface Database (ISD), whereas the ZTD data derive from the RENAG DB, that collects ZTD estimates for 181 GNSS Permanent Stations (PSs) from 1998 to 2015 in the French-Italian boundary region. Several Python scripts have been implemented to manage the download of data from NOAA and RENAG DBs, their import on a PostgreSQL/PostGIS geoDB, besides the data elaboration with GRASS GIS to produce PWV maps. The key features of the data management procedure are its scalability and versatility for different sources of data and different contexts. As a future development, a web-interface for the procedure will allow an easier interaction for the users both for post-processing and real-time data. The data management procedure repository is available at https://github.com/gtergeomatica/G4M-data
DataBases (DB) are a widespread source of data, useful for many applications in different scientific fields. The present contribution describes an automatic procedure to access, download and store open access data from different sources, to be processed in a GIS environment. In particular, it refers to the specific need of the authors to manage both meteorological data (pressure and temperature) and GNSS (Global Navigation Satellite System) Zenith Total Delay (ZTD) estimates. Such data allow to produce Precipitable Water Vapor (PWV) maps, thanks to the so called GNSS for Meteorology(G4M) procedure, developed through GRASS GIS software ver. 7.4, for monitoring in time and interpreting severe meteorological events. Actually, the present version of the procedure includes the meteorological pressure and temperature data coming from NOAA’s Integrated Surface Database (ISD), whereas the ZTD data derive from the RENAG DB, that collects ZTD estimates for 181 GNSS Permanent Stations (PSs) from 1998 to 2015 in the French-Italian boundary region. Several Python scripts have been implemented to manage the download of data from NOAA and RENAG DBs, their import on a PostgreSQL/PostGIS geoDB, besides the data elaboration with GRASS GIS to produce PWV maps. The key features of the data management procedure are its scalability and versatility for different sources of data and different contexts. As a future development, a web-interface for the procedure will allow an easier interaction for the users both for post-processing and real-time data. The data management procedure repository is available at https://github.com/gtergeomatica/G4M-dataTen simple rules for writing statistical book reviewshttps://peerj.com/preprints/269242018-05-102018-05-10Christopher J Lortie
Statistical books are an opportunity for accessing relatively deeper insights into statistics and software even outside the introductory classroom setting. There are however many resources available to the practitioner in addition to the traditional text model. Book reviews can thus provide a critical mechanism for the learner to assess whether the commitment to a specific book warrants the allocated time and effort. The ten simple rules format, pioneered in computational biology, was applied here to writing effective book reviews for statistics because of the breadth offerings in this domain including topical introductions, computational solutions, and theory. Learning by doing is a popular paradigm in statistics and computation, but there is still a niche for books in the pedagogy of self-taught and instruction-based learning. Primarily, these rules ensure that book reviews function as a form of short syntheses to inform and guide readers in deciding to use a specific book relative to other options for statistical challenges.
Statistical books are an opportunity for accessing relatively deeper insights into statistics and software even outside the introductory classroom setting. There are however many resources available to the practitioner in addition to the traditional text model. Book reviews can thus provide a critical mechanism for the learner to assess whether the commitment to a specific book warrants the allocated time and effort. The ten simple rules format, pioneered in computational biology, was applied here to writing effective book reviews for statistics because of the breadth offerings in this domain including topical introductions, computational solutions, and theory. Learning by doing is a popular paradigm in statistics and computation, but there is still a niche for books in the pedagogy of self-taught and instruction-based learning. Primarily, these rules ensure that book reviews function as a form of short syntheses to inform and guide readers in deciding to use a specific book relative to other options for statistical challenges.SAS macros for longitudinal IRT modelshttps://peerj.com/preprints/267402018-03-202018-03-20Maja OlsbjergKarl Bang Christensen
IRT models are often applied when observed items are used to measure a unidimensional latent variable. Originally used in educational research, IRT models are now widely used when focus is on physical functioning or psychological well-being. Modern applications often need more general models, typically models for multidimensional latent variables or longitudinal models for repeated measurements. This paper describes a collection of SAS macros that can be used for fitting data to, simulating from, and visualizing longitudinal IRT models. The macros encompass dichotomous as well as polytomous item response formats and are sufficiently flexible to accommodate changes in item parameters across time points and local dependence between responses at different time points.
IRT models are often applied when observed items are used to measure a unidimensional latent variable. Originally used in educational research, IRT models are now widely used when focus is on physical functioning or psychological well-being. Modern applications often need more general models, typically models for multidimensional latent variables or longitudinal models for repeated measurements. This paper describes a collection of SAS macros that can be used for fitting data to, simulating from, and visualizing longitudinal IRT models. The macros encompass dichotomous as well as polytomous item response formats and are sufficiently flexible to accommodate changes in item parameters across time points and local dependence between responses at different time points.