Exceptions modelling in imperative programs in terms of Petri nets

Author(s):  
Д.В. Леонтьев ◽  
Д.С. Одякова ◽  
В. Парахин ◽  
Д.И. Харитонов

Предложен подход к моделированию обработки исключительных ситуаций в императивных программах. Рассмотрены проблематика использования исключительных ситуаций в программах, общий подход к автоматическому построению моделей программ, описан минимальный набор шаблонов семантических конструкций, необходимый для построения моделей императивных программ. В качестве примера описан процесс моделирования небольшой программы и приведена ее результирующая модель в композициональном виде. The purpose of the article is to propose an approach to the automatic generation of models of imperative programs with exceptions from the source code. Methodology. The approach defines consecutive transformations of the program beginning from the source code to the parsing tree of the program, then to an abstract semantic graph and finally to a compositional model in terms of Petri nets. Transformations are based on a set of formal principles and relations and can be performed without human intervention purely algorithmically. To build a model from the program abstract semantic graph, templates and composition rules are used. Templates describe in terms of Petri net the basic constructions of imperative programming languages: expressions, branching, loops, choice and function call. Findings. A set of templates for modelling the exception handling mechanism is described. This set includes templates for the try and catch blocks describing the processing of the exception in local places of the program, the throw operator to signal the exception, and the operator of the function call with exceptions. Оriginality/value. The article demonstrates that the proposed set of templates allows building a complete model of the program with exceptions, consisting of several functions. The resulting program model makes it possible to analyze the program behavior by standard for Petri nets formal methods. In particular, a possibility of an abnormal termination due to an exceptional situation can be validated and where each particular exception is handled as well as what exceptions are handled in a particular catch block.

e-xacta ◽  
2016 ◽  
Vol 9 (1) ◽  
pp. 37
Author(s):  
Cristiano Martins Monteiro ◽  
Flavianne Braga Campos de Lima ◽  
Carlos Renato Storck

<p>A geração automática de código-fonte é uma prática adotada no desenvolvimento de softwares para agilizar, facilitar e padronizar a implementação dos projetos. Embora seja uma prática comum nas fábricas de software, não se conhece uma ferramenta que permita escolher o padrão de projeto a ser usado. O objetivo principal deste trabalho é apresentar um gerador de códigos para o desenvolvimento de sistemas Web a partir de uma modelagem entidade-relacionamento, uma linguagem de programação e um padrão de projeto determinados pelo usuário. Os objetivos específicos são propor uma arquitetura do sistema capaz de adequar e reaproveitar diferentes padrões de projeto, linguagens de programação e projetos cadastrados; permitir que o usuário cadastre, altere, exclua, importe e exporte um projeto; e gerar automaticamente o seu código-fonte e scripts de banco de dados. Este trabalho se justifica pela importância de reduzir erros de codificação; e evitar perca tempo ao realizar atividades rotineiras de implementação de padrões de projeto. Possibilitando assim, maior dedicação no planejamento das regras de negócios e redução de custos. A ferramenta proposta (GCER) foi desenvolvida em linguagem Java com o uso banco de dados Oracle 11g, e seguindo os padrões DAO e MVC. Os resultados foram avaliados através da geração e compilação de códigos de um projeto para cadastro de veículos. A geração com êxito evidencia a viabilidade da ferramenta proposta para a geração automática de códigos no processo de desenvolvimento de software.</p><p>Abstract</p><p>The automatic generation of source code is a practice adopted in the development of software to streamline, facilitate and standardize the implementation of projects. Although it be a common practice in software factories, it is not known a tool able to choose the design pattern to be used. The main objective of this paper is to present a code generator for the development of Web systems from an entity-relationship modeling, a programming language and a design pattern determined by the user. The specific objectives are to propose a system architecture able to suit and reuse different design patterns, programming languages and saved projects; allow the user to insert, update, delete, import and export a project; and automatically generate the source code and database scripts. This work is justified by the importance to reduce errors of coding; and to avoid waste of time in the development of Web systems performing routine tasks. Allowing, then, a greater dedication in the planning of business rules and the reduction of costs. The tool proposed (GCER) was developed in Java with the database using Oracle 11g, and following the DAO and MVC patterns. The results were evaluated by generating and compiling codes of a project for vehicle registration. The successful code generation demonstrate the feasibility of the proposed tool for the automatic generation of code in the software development process.</p>


CCIT Journal ◽  
2015 ◽  
Vol 8 (3) ◽  
pp. 174-190
Author(s):  
Diah Aryani ◽  
Ade Setiadi ◽  
Fifit Alfiah

The development of the rapidly evolving technology in this era, especially in the telecommunications, media, and information (telecommunications) received positive feedback and negative in society. The technology used by the right target will be very useful in supporting the activities of either the agency or agencies. penyampaikan for information processing and information so that the information presented is fast, precise, and lack of errors, thus making the job more effectively and efficiently. Short Message Service (SMS) is the delivery of messages or information that is already being replaced by chat applications such as fuel and whatsapp. SMS has experienced growth in terms of the use and function as Polling SMS, SMS Banking, and SMS Gateway. Gammu SMS Engine Engine is used for SMS Gateway application. Gammu can be implemented in a variety of programming languages such as PHP and can be used functions as needed. Gammu SMS messaging engine is processing applications that do not perform bulk SMS delivery on most SMS gateway. The method used for Gammu SMS engines do not get hung up on a theory but a configuration setting through some source code and also through the device manager to check the port that is connected to the computer. To use the database files in a manner that is available on the database import gammu folder on the server mysql which we use to connect to the modem and mysql. To run the service engine gammu must use the command prompt by way mengetikm "gammu-smsd smsconf -i -s -c" to the process of running the engine at a command prompt first entry in the directory "bin". Knowing gammu runs aktive with the presence of link to stop and restart the service by running aktivenya gammu we can directly use gammu engine SMS to send and receive SMS..


1994 ◽  
pp. 15-26
Author(s):  
Badri Abu Bakar

In designing sequential control systems, the programming language plays an important role for the success of system implementation. A Programmable Logic Controller (PLC) is normally equipped with several languages like Relay Ladder Logic, Statement List and others. Petri nets, Rule-based and State Transition methods are the language of future PLCs. The paper evaluates the performance of these languages especially for a system which exhibits a pattern in its operation. This is done on a case study based on a trainset problem with multiple-engine on the same track. It will demonstrate the strengths and weaknesses of each technique and it will serve as a basis of favouring one or the other for certain applications in a sequential control system. Through this paper, we can see various techniques on the problem to show that each technique has its own strengths and weaknesses. In a complex operation with a pattern, the rule-based technique is the well-suited technique. Similarly, if the system uses complementaries and needs exception handling rule-based is the best technique to be employed. Unlike Petri nets, State Transition Matrix (STM), ladder logic and others, the rule-based technique does not relate to dimensionality of the problem and therefore system growth and modification is easily coped with. The Petri net technique is very good at parallel subsequences but falls down when much branching and inverse places of action are needed in the system. STM on the other hand is good at much branching and giving system options clearly and unambiguously so long as the matrix is manageable. The STM technique becomes less helpful when the matrix grows. Although both Petri nets and STM are easily understood and readily communicable, their solutions are implementation specific; system changes and annexation would mean reprogramming almost from scratch. Various functions have certain peculiarities that make them unsuitable to be programmed in a particular method. Therefore, the choice of a technique suitable for a particular problem is still the best method of designing sequential control applications. Failure to program these operations with the most suitable technique will result in a difficult and awkward solution with the consequent penalty associated with undue complexity in terms of error-checking and implementation.


Author(s):  
Tran Thanh Luong ◽  
Le My Canh

JavaScript has become more and more popular in recent years because its wealthy features as being dynamic, interpreted and object-oriented with first-class functions. Furthermore, JavaScript is designed with event-driven and I/O non-blocking model that boosts the performance of overall application especially in the case of Node.js. To take advantage of these characteristics, many design patterns that implement asynchronous programming for JavaScript were proposed. However, choosing a right pattern and implementing a good asynchronous source code is a challenge and thus easily lead into less robust application and low quality source code. Extended from our previous works on exception handling code smells in JavaScript and exception handling code smells in JavaScript asynchronous programming with promise, this research aims at studying the impact of three JavaScript asynchronous programming patterns on quality of source code and application.


2020 ◽  
Author(s):  
Cut Nabilah Damni

AbstrakSoftware komputer atau perangkat lunak komputer merupakan kumpulan instruksi (program atau prosedur) untuk dapat melaksanakan pekerjaan secara otomatis dengan cara mengolah atau memproses kumpulan intruksi (data) yang diberikan. (Yahfizham, 2019 : 19) Sebagian besar dari software komputer dibuat oleh (programmer) dengan menggunakan bahasa pemprograman. Orang yang membuat bahasa pemprograman menuliskan perintah dalam bahasa pemprograman seperti layaknya bahasa yang digunakan oleh orang pada umumnya dalam melakukan perbincangan. Perintah-perintah tersebut dinamakan (source code). Program komputer lainnya dinamakan (compiler) yang digunakan pada (source code) dan kemudian mengubah perintah tersebut kedalam bahasa yang dimengerti oleh komputer lalu hasilnya dinamakan program executable (EXE). Pada dasarnya, komputer selalu memiliki perangkat lunak komputer atau software yang terdiri dari sistem operasi, sistem aplikasi dan bahasa pemograman.AbstractComputer software or computer software is a collection of instructions (programs or procedures) to be able to carry out work automatically by processing or processing the collection of instructions (data) provided. (Yahfizham, 2019: 19) Most of the computer software is made by (programmers) using the programming language. People who make programming languages write commands in the programming language like the language used by people in general in conducting conversation. The commands are called (source code). Other computer programs called (compilers) are used in (source code) and then change the command into a language understood by the computer and the results are called executable programs (EXE). Basically, computers always have computer software or software consisting of operating systems, application systems and programming languages.


2011 ◽  
Vol 121-126 ◽  
pp. 4350-4356
Author(s):  
Yan Pei Liu ◽  
Jun Hui Fu ◽  
Hong Yu Feng

With the larger and more complex of the size and function of software products,choosing an efficient modeling technique for analyzing complicated and ever-changing system plays a vital role.Object-Oriented Petri nets for its unique characteristics which are simple and laconic modeling method and strong mathematical analysis capacity becomes a hot research.In this paper,it explain that the object-oriented technology how to combine with Petri nets.The typical Object-Oriented Petri net modeling steps and analysis methods are expounded. Up-to-date research about OOPN and its main improved models OOCPN, OOAPN and OOTPN are summarized, the pros and cons of each modeling are analyzed.The interrelated topics and the future development about OOPN are also mentioned.


Sign in / Sign up

Export Citation Format

Share Document