ITPI20110105A1 - METHOD FOR THE OPTIMIZATION OF PROGRAM DEVELOPMENT PROCESSES BY PROCESSOR - Google Patents

METHOD FOR THE OPTIMIZATION OF PROGRAM DEVELOPMENT PROCESSES BY PROCESSOR Download PDF

Info

Publication number
ITPI20110105A1
ITPI20110105A1 IT000105A ITPI20110105A ITPI20110105A1 IT PI20110105 A1 ITPI20110105 A1 IT PI20110105A1 IT 000105 A IT000105 A IT 000105A IT PI20110105 A ITPI20110105 A IT PI20110105A IT PI20110105 A1 ITPI20110105 A1 IT PI20110105A1
Authority
IT
Italy
Prior art keywords
source code
routines
instructions
log file
error
Prior art date
Application number
IT000105A
Other languages
Italian (it)
Inventor
Roberto Montelatici
Original Assignee
Roboing S R L
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Roboing S R L filed Critical Roboing S R L
Priority to IT000105A priority Critical patent/ITPI20110105A1/en
Publication of ITPI20110105A1 publication Critical patent/ITPI20110105A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • G06F11/3624Debugging of software by performing operations on the source code, e.g. via a compiler
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • G06F11/3636Debugging of software by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Description

TITOLO TITLE

METODO PER L’OTTIMIZZAZIONE DEI PROCESSI DI METHOD FOR THE OPTIMIZATION OF THE PROCESSES OF

SVILUPPO DI PROGRAMMI PER ELABORATORE DEVELOPMENT OF COMPUTER PROGRAMS

SETTORE TECNICO TECHNICAL FIELD

La presente invenzione concerne un metodo per ottimizzare i processi di sviluppo di programmi per elaboratori, in particolare relativamente alla semplificazione delle modalità di rintracciamento degli errori e all’attendibilità del collaudo. The present invention relates to a method for optimizing the development processes of computer programs, in particular with regard to the simplification of the error tracing methods and the reliability of testing.

STATO DELL’ARTE STATE OF THE ART

I modelli di sviluppo di programmi per elaboratore, vale a dire i metodi da seguire nel progettare e nello scrivere programmi per elaboratore, sono molteplici ed hanno come scopo quello di fornire delle linee guida per arrivare nel minor tempo possibile a produrre un programma per elaboratore che sia correttamente funzionante, che contenga il minor numero possibile di errori e che risponda al meglio alle specifiche ed alle esigenze sia dell’utilizzatore finale che di futuri manutentori. Qualunque sia il modello utilizzato, durante lo sviluppo dovranno necessariamente essere eseguite fasi di analisi delle porzioni di programma create (manuali o tramite strumenti di debugging) e fasi di collaudo (la fase di analisi qui intesa non deve essere confusa con l’analisi delle esigenze del cliente svolta dagli analisti informatici per definire le specifiche di un programma). The development models of computer programs, that is to say the methods to be followed in designing and writing computer programs, are many and have the purpose of providing guidelines to arrive in the shortest possible time to produce a computer program that it works correctly, contains the least possible number of errors and meets the specifications and needs of both the end user and future maintenance technicians in the best possible way. Whatever the model used, during the development phases of analysis of the portions of the program created (manual or using debugging tools) and testing phases must necessarily be carried out (the analysis phase intended here must not be confused with the analysis of the customer needs carried out by IT analysts to define the specifications of a program).

L’analisi manuale di programmi per elaboratore o porzioni di essi avviene sempre durante la scrittura del programma, alla ricerca di errori o altre mancanze, un po’ come avviene per uno scrittore che rilegge più volte il proprio testo prima di proseguirne la stesura. Tuttavia un programma per elaboratore, soprattutto quando non à ̈ in codice sorgente ma à ̈ già almeno parzialmente compilato contiene moltissime informazioni e righe di testo di scarso interesse per il programmatore e che quindi gli rallentano inutilmente il lavoro di rilettura e controllo. The manual analysis of computer programs or portions of them always takes place during the writing of the program, looking for errors or other deficiencies, a bit like a writer who rereads his text several times before continuing to write it. . However, a computer program, especially when it is not in source code but is already at least partially compiled, contains a lot of information and lines of text that are of little interest to the programmer and which therefore unnecessarily slow down the work of rereading and checking.

Anche quando si esegue il debugging di un programma alla ricerca di errori la riduzione dei tempi di lavoro à ̈ fondamentale: una rapida risoluzione dell’errore permette di ridurre i tempi di sviluppo del programma per elaboratore nel caso che si stia progettando un nuovo applicativo e di mettere di nuovo il cliente in grado di lavorare nel caso che si stia facendo manutenzione su un applicativo già in uso. Even when debugging a program in search of errors, the reduction of working times is essential: a rapid resolution of the error allows to reduce the development time of the computer program in the event that a new application is being designed. and to put the customer in a position to work again if maintenance is being carried out on an application already in use.

I moderni ambienti di sviluppo di programmi per elaboratore sono essi stessi programmi che comprendono al loro interno tre applicazioni fondamentali: un editor di testi per la scrittura di codice sorgente, un compilatore che traduce le serie di istruzioni scritte nel linguaggio di programmazione (codice sorgente) in istruzioni di un altro linguaggio (linguaggio macchina), ed un debugger che à ̈ un programma specificatamente progettato per l'analisi e l'eliminazione degli errori di programmazione presenti in altri programmi. Modern computer program development environments are themselves programs that include three basic applications: a text editor for writing source code, a compiler that translates the sets of instructions written in the programming language (source code) in instructions of another language (machine language), and a debugger which is a program specifically designed for the analysis and elimination of programming errors present in other programs.

Il compito principale del debugger à ̈ quello di mostrare il frammento di codice che genera il problema. Il codice può essere mostrato nella sua forma nativa, tradotto in linguaggio assembly o, molto più proficuamente, sotto forma di codice sorgente nel linguaggio in cui il programma analizzato à ̈ stato scritto. The main task of the debugger is to show the code snippet that is generating the problem. The code can be displayed in its native form, translated into assembly language or, much more profitably, as source code in the language in which the analyzed program was written.

Quasi tutti i debugger consentono l'esecuzione del programma analizzato a piccoli passi, mostrando nelle interruzioni il codice relativo all'istruzione sorgente corrente e lo stato attuale della CPU e delle variabili. L'interruzione dell'esecuzione può avvenire ad ogni singola istruzione oppure in punti esplicitamente assegnati dall'utente (breakpoint o watchpoint). Almost all debuggers allow the execution of the analyzed program in small steps, showing in the interruptions the code related to the current source instruction and the current state of the CPU and of the variables. The interruption of the execution can happen to every single instruction or in points explicitly assigned by the user (breakpoint or watchpoint).

Solitamente il debugging avviene con avanzamenti rapidi tra un breakpoint e l’altro fino a che non si ritiene di essere in prossimità dell’errore. Quando si ritiene di essere in prossimità dell’errore si preferisce un avanzamento circospetto istruzione per istruzione. Nonostante questo, molto spesso accade di finire ugualmente una o più volte nell’errore prima di riuscire ad individuarlo. Debugging usually takes place with rapid advances between one breakpoint and another until it is believed to be close to the error. When one feels that one is nearing the error, one prefers a circumspect advancement, education by education. Despite this, very often it happens that one or more times ends up in the error before being able to identify it.

Fase importante del debugging à ̈ la gestione dell’errore. Se l’errore non à ̈ gestito non à ̈ possibile prevedere il comportamento del programma quando si incappa nell’istruzione che determina l’errore. Diversamente l’errore può essere gestito inserendo nel programma specifiche routines chiamate “gestori degli errori†o “trappole degli errori†nelle quali si indica al programma di saltare quando si verifica un errore. Tuttavia, anche se l’errore à ̈ gestito, e si individua quindi quale à ̈ stata la routine nella quale si à ̈ generato l’errore, nonostante ciò vengono perse tutte le informazioni precedenti all’errore, per cui à ̈ necessario, quando si riparte con il debug, inserire nuovamente le informazioni necessarie. Questo ovviamente porta ad un notevole spreco di tempo da parte del programmatore. Alcuni ambienti di sviluppo, quale Visual Studio Ultimate 2010 di Microsoft, sono in grado di memorizzare le informazioni di alcuni punti importanti del programma, agevolando le ripartenze del debug. Questo non elimina comunque del tutto gli sprechi di tempo in quanto nessun debugger à ̈ in grado di memorizzare e quindi ripristinare le condizioni presenti all’ingresso della routine in cui si à ̈ generato l’errore. An important phase of debugging is error handling. If the error is not handled, it is not possible to predict the behavior of the program when it stumbles upon the instruction that causes the error. Otherwise, the error can be handled by inserting specific routines into the program called "error handlers" or "error traps" in which the program is instructed to jump when an error occurs. However, even if the error is handled, and therefore it is identified which was the routine in which the error was generated, in spite of this all the information prior to the error is lost, so it is necessary, when starting with debugging, re-enter the necessary information. This obviously leads to a considerable waste of time on the part of the programmer. Some development environments, such as Microsoft's Visual Studio Ultimate 2010, are able to store the information of some important points of the program, facilitating debugging restarts. However, this does not completely eliminate the waste of time as no debugger is able to memorize and then restore the conditions present at the entry of the routine in which the error was generated.

Infine, anche la fase di collaudo del software presenta delle criticità che à ̈ necessario cercare di superare. Lo scopo del collaudo à ̈ di rilevare i difetti tramite i malfunzionamenti, al fine di minimizzare la probabilità che il software rilasciato abbia dei malfunzionamenti nella normale operatività. Nessun collaudo può ridurre a zero tale probabilità, in quanto le possibili combinazioni di valori di input validi sono enormi, e non possono essere riprodotte in un tempo ragionevole; tuttavia un buon collaudo può rendere la probabilità di malfunzionamenti abbastanza bassa da essere accettabile dall'utente. Per rilevare il maggior numero possibile di difetti, nel collaudo si sollecita il software in modo che sia eseguita la maggior quantità possibile di codice con svariati dati di input. Risulta quindi particolarmente sentita l’esigenza di verificare quanto accuratamente e scrupolosamente il codice sia stato collaudato tramite utilità che permettano di conoscere quali e quante volte le singole istruzioni siano state testate. Finally, even the software testing phase presents some critical points that it is necessary to try to overcome. The purpose of testing is to detect defects through malfunctions, in order to minimize the likelihood that the released software will malfunction in normal operation. No testing can reduce this probability to zero, as the possible combinations of valid input values are enormous, and cannot be reproduced in a reasonable time; however good testing can make the probability of failure low enough to be acceptable to the user. To detect as many defects as possible, the software is urged in testing to execute as much code as possible with a variety of input data. The need is therefore particularly felt to verify how accurately and scrupulously the code has been tested by means of utilities that make it possible to know which and how many times the individual instructions have been tested.

SINTESI DELL’INVENZIONE SUMMARY OF THE INVENTION

Scopo della presente invenzione à ̈ allora quello di proporre un metodo per la gestione del processo di creazione di programmi per elaboratore che consenta di ridurre i tempi complessivi necessari per lo sviluppo di programmi per elaboratore aumentandone al contempo l’affidabilità. The aim of the present invention is therefore to propose a method for managing the process of creating computer programs which allows to reduce the overall time required for the development of computer programs while increasing their reliability.

Secondo un aspetto della presente invenzione gli scopi suddetti sono raggiunti per mezzo di un metodo per ottimizzare i processi di sviluppo di programmi per elaboratori comprendente fasi di: According to an aspect of the present invention, the above objects are achieved by means of a method for optimizing the development processes of computer programs comprising steps of:

- apertura/lettura di un codice sorgente; - opening / reading of a source code;

- modifica automatica del codice sorgente con inserimento di istruzioni di registrazione in successione delle righe di codice sorgente che vengono eseguite durante l’esecuzione del programma, in cui le suddette istruzioni essendo tali da non alterare le funzionalità del codice sorgente ed in cui la registrazione delle righe di codice può avvenire mediante aggiornamento di una determinata variabile, inserimento in un determinato vettore o inserimento in un determinato file di log; - salvataggio del codice sorgente modificato “P†. - automatic modification of the source code with the insertion of registration instructions in succession of the lines of source code that are executed during the execution of the program, in which the aforementioned instructions being such as not to alter the functionality of the source code and in which the registration some lines of code can be done by updating a specific variable, inserting it in a specific vector or inserting it in a specific log file; - saving of the modified source code â € œPâ €.

Vantaggiosamente, nella suddetta fase di modifica sono comprese ulteriori fasi di: Advantageously, in the aforementioned modification step further steps are included:

- inserimento, dopo istruzioni di richiamo di determinate routines comprese nel codice sorgente, di istruzioni di salvataggio dei parametri di richiamo di tali routines; - insertion, after recall instructions of certain routines included in the source code, of instructions for saving the recall parameters of these routines;

- inserimento in routines di gestione dell’errore associate alle suddette routines di istruzioni di lettura della variabile, vettore o file di log di registrazione; - insertion in error management routines associated with the aforementioned routines of instructions for reading the variable, vector or registration log file;

- inserimento nelle routines di gestione dell’errore di istruzioni di richiamo delle relative routines con i parametri di apertura salvati per mezzo delle suddette istruzioni di salvataggio. - insertion in the error management routines of recall instructions of the relative routines with the opening parameters saved by means of the aforementioned save instructions.

Ancora vantaggiosamente, allorché il codice sorgente modificato “P†viene eseguito in un debugger, vengono inseriti break points nelle suddette routines di gestione degli errore. Again advantageously, when the modified source code â € œPâ € is executed in a debugger, break points are inserted in the aforementioned error handling routines.

Ancora vantaggiosamente, la fase di modifica automatica del codice sorgente comprende anche una fase di verifica della presenza di routines di gestione dell’errore realizzata per mezzo di fasi di: identificazione di routines nel codice sorgente; ricerca in tali routines identificate di parole chiave di rivelazione della presenza di routines di gestione dell’errore; segnalazione dell’assenza di dette parole chiave in determinate routines. Still advantageously, the step of automatic modification of the source code also includes a step of checking the presence of error management routines carried out by means of steps of: identification of routines in the source code; search in these identified routines for keywords that reveal the presence of error management routines; reporting of the absence of these keywords in certain routines.

Inoltre, nel caso che vengano identificate routines mancanti della relativa routine di gestione dell’errore il metodo comprende anche vantaggiosamente una fase di inserimento automatico di una routine di gestione dell’errore associata ad ogni routine per cui à ̈ stata segnalata l’assenza di una relativa routine di gestione dell’errore, detta routine di gestione dell’errore comprendendo istruzioni di lettura della variabile, vettore o file di log registrazione e le istruzioni di richiamo della routine ad essa associata con i parametri di apertura salvati. Furthermore, in the event that missing routines of the relative error management routine are identified, the method also advantageously includes an automatic insertion phase of an error management routine associated with each routine for which the error has been reported. absence of a relative error handling routine, called error handling routine including read instructions of the variable, vector or log file and the instructions to call the routine associated with it with the saved opening parameters.

Quando un codice sorgente à ̈ stato automaticamente modificato secondo le modalità sopra descritte il programma per elaboratore da analizzare può essere lanciato in un comune debugger. Il programma può essere lanciato in avanzamento veloce e si fermerà solo in presenza di un errore al break point della relativa routine di gestione dell’errore. A questo punto il programmatore individuerà esattamente l’istruzione che ha provocato l’errore e potrà inserire un break point a monte di essa. Dopo di questo, continuando a far avanzare il programma dal punto di fermata nella routine di gestione dell’errore il programma salterà di nuovo alla routine in cui si à ̈ generato l’errore con i parametri di richiamo nella routine salvati e si fermerà automaticamente al breakpoint precedentemente inserito dal programmatore consentendogli di correggere l’errore. When a source code has been automatically modified in the manner described above, the computer program to be analyzed can be launched in a common debugger. The program can be run in fast forward and will stop only in the presence of an error at the break point of the related error handling routine. At this point the programmer will identify exactly the instruction that caused the error and will be able to insert a break point upstream of it. After this, continuing to advance the program from the stop point in the error handling routine the program will jump back to the routine where the error was generated with the recall parameters in the saved routine and will stop automatically to the breakpoint previously entered by the programmer allowing him to correct the error.

In una diversa forma realizzativa, il metodo dell’invenzione prevede che la fase di modifica automatica comprenda una fase di inserimento di istruzioni di numerazione automatica progressiva di ogni riga del codice sorgente, e che la registrazione avvenga tramite inserimento in un determinato file di log, ed in cui, a seguito di n esecuzioni del programma per elaboratore, gli n files di log generati “logP1†, “logP2, …†logPn†vengono processati come segue: In a different embodiment, the method of the invention provides that the automatic modification step comprises a step of inserting instructions for the progressive automatic numbering of each line of the source code, and that the recording takes place through insertion in a specific log file , and in which, following n executions of the computer program, the n generated log files â € œlogP1â €, â € œlogP2, â € ¦â € logPnâ € are processed as follows:

- unione degli n files di log “logP1†, “logP2, …†logPn†in un unico file di log mediante accodamento delle relative righe di codice in essi trascritte; - union of the n log files â € œlogP1â €, â € œlogP2, â € ¦â € logPnâ € in a single log file by appending the relative lines of code transcribed in them;

- manipolazione del file di log unione eseguendo: il raggruppamento delle righe identiche, l’eliminazione delle ripetizioni con conteggio del numero di ripetizioni e l’ordinamento delle righe per numero di riga, in modo da ottenere un file di log “logP†; - manipulation of the merge log file by executing: grouping of identical lines, elimination of repetitions with counting of the number of repetitions and sorting of lines by line number, in order to obtain a log file â € œlogPâ €;

- Confronto, tramite un applicativo di confronto di documenti testuali, del file di log “logP†con il codice sorgente modificato “P†. - Comparison, through a textual document comparison application, of the log file â € œlogPâ € with the modified source code â € œPâ €.

Il risultato del suddetto confronto mostra in modo chiaro ed immediato quali sono le righe di codice sorgente che non sono mai state eseguite durante l’attività di collaudo e quante volte sono state eseguite le rimanenti righe di codice fornendo un’informazione chiara sulla completezza ed efficienza dell’attività di collaudo. The result of the aforementioned comparison clearly and immediately shows which lines of source code have never been executed during the testing activity and how many times the remaining lines of code have been executed, providing clear information on completeness and efficiency of the testing activity.

In un'altra forma realizzativa il metodo dell’invenzione prevede che la fase di modifica comprenda una fase di inserimento di istruzioni di numerazione automatica progressiva di ogni riga del codice sorgente, che la registrazione avvenga tramite inserimento in un determinato file di log, ed in cui il file di log generato a seguito di una esecuzione di detto codice sorgente venga manipolato eseguendo il raggruppamento delle righe identiche e l’eliminazione delle ripetizioni con conteggio del numero di ripetizioni. In another embodiment, the method of the invention provides that the modification step includes a step of inserting instructions for the progressive automatic numbering of each line of the source code, that the recording takes place by inserting it in a specific log file, and in which the log file generated following an execution of said source code is manipulated by grouping identical lines and eliminating repetitions with counting the number of repetitions.

Il file di log così manipolato risulta particolarmente idoneo per un’analisi visiva manuale dei flussi di funzionamento del programma a seguito dell’inserimento di determinati parametri di ingresso. The log file manipulated in this way is particularly suitable for a manual visual analysis of the operating flows of the program following the insertion of certain input parameters.

BREVE DESCRIZIONE DEI DISEGNI BRIEF DESCRIPTION OF THE DRAWINGS

Queste ed altre caratteristiche dell’invenzione risulteranno più facilmente comprensibili dalla seguente descrizione di forme realizzative dell’invenzione, fornite come esempi non limitativi, con riferimento alle figure allegate nelle quali: These and other characteristics of the invention will be easier to understand from the following description of embodiments of the invention, provided as non-limiting examples, with reference to the attached figures in which:

- la figura 1 mostra uno schematico diagramma di flusso di un metodo secondo la presente invenzione e delle relative possibili modalità di utilizzo; - figure 1 shows a schematic flow diagram of a method according to the present invention and of the relative possible ways of use;

- la figura 2 mostra un diagramma di flusso che rappresenta un processo di debugging di tipo convenzionale; Figure 2 shows a flow diagram representing a conventional debugging process;

- la figura 3 mostra un diagramma di flusso che rappresenta un processo di debugging in applicazione del metodo della presente invenzione; figure 3 shows a flow diagram which represents a debugging process in application of the method of the present invention;

- la figura 4 mostra un diagramma di flusso che rappresenta un processo di analisi visiva manuale dei flussi di funzionamento di un codice sorgente in cui à ̈ applicato il metodo della presente invenzione; - figure 4 shows a flow diagram which represents a process of manual visual analysis of the operating flows of a source code in which the method of the present invention is applied;

- la figura 5 mostra un diagramma di flusso che rappresenta un processo di valutazione dell’attività di collaudo di un programma per elaboratore in cui à ̈ applicato il metodo della presente invenzione. - figure 5 shows a flow diagram which represents an evaluation process of the testing activity of a computer program in which the method of the present invention is applied.

DESCRIZIONE DELLE FORME REALIZZATIVE PREFERITE DESCRIPTION OF THE PREFERRED MANUFACTURING FORMS

Con riferimento alla figura 1 à ̈ indicato complessivamente con 100 un diagramma di flusso che illustra le fasi fondamentali di un metodo secondo la presente invenzione ed i relativi possibili campi di applicazione. Durante una fase di sviluppo di un programma per elaboratore, il relativo codice sorgente viene aperto, 110, e quindi modificato, 120, in modo automatico secondo determinati criteri che permettono in seguito di eseguire in modo più veloce ed efficace varie operazioni quali il debug, l’analisi visiva manuale del codice del programma ed il collaudo dello stesso. L’operazione fondamentale della fase di modifica à ̈ quella di inserimento, 130, tra le righe di codice sorgente di istruzioni che comandino al programma la registrazione in successione delle istruzioni di programma che vengono eseguite durante una esecuzione dello stesso. La registrazione delle istruzioni può avvenire tramite valorizzazione di una determinata variabile che ad ogni riga di codice eseguita viene aggiornata con il valore della riga appena eseguita, oppure può avvenire tramite scrittura in successione delle righe di codice eseguite in un vettore, o ancora può avvenire tramite scrittura delle righe di codice eseguite su un file di log. Ad esempio, nel caso di scrittura su vettore, questo può rimanere temporaneamente nella memoria RAM, o altra memoria temporanea dell’elaboratore, la quale consente operazioni di accesso e scrittura molto più rapide, ed il relativo contenuto può essere trasferito periodicamente in un file di log. Ovviamente, le istruzioni inserite nel codice sorgente del programma devono essere tali da non alterare le funzionalità ed i normali flussi logici del programma stesso. In pratica, dopo ogni riga del codice sorgente originario viene inserita una istruzione di registrazione del contenuto della riga precedente, facendo comunque in modo che la riga di registrazione inserita non alteri il flusso del programma definito nel codice sorgente originario. Per ottenere la suddetta non interferenza con il flusso del programma sarà necessario, in alcuni casi e per alcuni linguaggi di programmazione, modificare la sintassi del codice sorgente originario. With reference to Figure 1, 100 indicates a flow chart which illustrates the fundamental steps of a method according to the present invention and the related possible fields of application. During a development phase of a computer program, the relative source code is opened, 110, and then modified, 120, automatically according to certain criteria which subsequently allow various operations such as debugging, to be performed more quickly and effectively. the manual visual analysis of the program code and its testing. The fundamental operation of the modification phase is that of inserting, 130, between the lines of source code of instructions that command the program to register in succession the program instructions that are executed during its execution. The recording of the instructions can take place through the enhancement of a certain variable which at each executed line of code is updated with the value of the line just executed, or it can take place by writing in succession the lines of code executed in a vector, or it can take place through writing the lines of code performed to a log file. For example, in the case of writing on a vector, this can remain temporarily in the RAM memory, or other temporary memory of the computer, which allows much faster access and write operations, and its contents can be periodically transferred to a file. of log. Obviously, the instructions inserted in the source code of the program must be such as not to alter the functionality and the normal logical flows of the program itself. In practice, after each line of the original source code is inserted a registration instruction of the contents of the previous line, however making sure that the inserted registration line does not alter the flow of the program defined in the original source code. To obtain the aforementioned non-interference with the program flow it will be necessary, in some cases and for some programming languages, to modify the syntax of the original source code.

Ulteriori modifiche al codice sorgente possono essere apportate in questa fase e sono dedicate ad ottimizzare lo svolgimento di determinate attività, dopodiché il codice sorgente viene salvato nella sua forma modificata, 140. Further changes to the source code can be made at this stage and are dedicated to optimizing the performance of certain activities, after which the source code is saved in its modified form, 140.

Il codice sorgente modificato può essere utilizzato per eseguire in modo più efficiente e con notevoli risparmi di tempo varie attività tipiche del processo di creazione di un programma per elaboratore. Se l’esecuzione del programma, 150, avviene in un debugger, 160, vale a dire in un programma specificatamente progettato per l'analisi e l'eliminazione dei bug (ovvero errori di programmazione interni al programma) presenti in altri programmi, grazie alle modifiche apportate al programma il processo di rilevamento e risoluzione degli errori si svolge molto più rapidamente di un processo di debugging, 200, convenzionale. Nel caso invece che l’esecuzione 150 del programma non avvenga in un debugger, ed avvenga, eventualmente a seguito di una fase di compilazione, 160, e con l’inserimento di determinati parametri di ingresso, 170, grazie alle modifiche 120 precedentemente introdotte si ha la generazione di un file di log, 180, nel quale risultano registrate tutte le righe di codice sorgente eseguite. Il suddetto file di log può essere vantaggiosamente utilizzato per almeno due tipologie di attività: l’analisi manuale e visiva dei flussi di funzionamento, 300, del programma, e la valutazione delle attività di collaudo, 400, del programma stesso. Modified source code can be used to perform various tasks associated with the process of creating a computer program more efficiently and with significant time savings. If the execution of the program, 150, takes place in a debugger, 160, that is to say in a program specifically designed for the analysis and elimination of bugs (i.e. programming errors inside the program) present in other programs, thanks With changes made to the program, the error detection and resolution process is much faster than a conventional debugging process. If, on the other hand, the execution of the program 150 does not take place in a debugger, and occurs, possibly following a compilation phase, 160, and with the insertion of certain input parameters, 170, thanks to the modifications 120 previously introduced, a log file is generated, 180, in which all the lines of source code executed are recorded. The aforementioned log file can be advantageously used for at least two types of activities: the manual and visual analysis of the operating flows, 300, of the program, and the evaluation of the testing activities, 400, of the program itself.

I processi di debugging 200, di analisi manuale e visiva dei flussi di funzionamento, 300 e di valutazione dell’attività di collaudo 400 eseguibili grazie ad i vantaggi della presente invenzione ed eseguiti secondo il metodo della presente invenzione verranno descritti di seguito. The processes of debugging 200, of manual and visual analysis of the operating flows, 300 and of evaluation of the testing activity 400 which can be carried out thanks to the advantages of the present invention and carried out according to the method of the present invention will be described below.

In fig. 2 Ã ̈ rappresentato un diagramma di flusso di un processo di debugging di tipo convenzionale, mentre in fig. 3 Ã ̈ rappresentato un diagramma di flusso di un processo di debugging secondo la presente invenzione. In fig. 2 shows a flow diagram of a conventional debugging process, while in fig. 3 a flow diagram of a debugging process according to the present invention is shown.

Con riferimento alla fig. 2, convenzionalmente un codice sorgente viene aperto in un debugger, al fine di rintracciare e risolvere possibili errori di programmazione. Una volta aperto il programma, il programmatore provvede ad inserire manualmente dei BPs (break points), vale a dire dei punti di arresto dell’esecuzione del programma, nelle routines (metodi, sub-routines, funzioni, procedure, blocchi di programma, sottoprogrammi) nei quali sospetta che possa trovarsi un errore. Una volta inseriti i BPs à ̈ necessario inserire una serie di parametri di ingresso con i quali l’esaminatore vuole testare il programma o i quali crede che possano provocare un errore di esecuzione. Molto spesso la fase di inserimento dei parametri di ingresso à ̈ piuttosto lunga in quanto può risultare necessario inserire manualmente una elevata mole di dati. Terminata la suddetta operazione il programmatore lancia il programma in modalità di avanzamento rapido ed il programma potrà o cadere in errore o fermarsi in corrispondenza di un BP precedentemente inserito. Nel primo caso à ̈ necessario ripartire dalla fase di inserimento dei BPs, mentre nel secondo caso il programmatore procede ad un avanzamento circospetto dell’esecuzione, riga per riga, analizzando le righe di codice ed apportando le correzioni che ritiene necessarie. Anche durante l’avanzamento circospetto à ̈ molto probabile che il programmatore non si accorga della presenza dell’errore e che quindi vi finisca dentro. In questo caso à ̈ necessario ripartire dalla fase di inserimento dei parametri di ingresso (molto lunga), modificando eventualmente la posizione dei BPs e ripetendo quindi l’intero iter con maggiore circospezione nella speranza di individuare l’errore prima di finirvi di nuovo dentro. Come risulterà facilmente intuibile la suddetta procedura iterativa può essere anche molto lunga, soprattutto nel caso in cui sia temporalmente dispendiosa la fase di inserimento dei parametri di ingresso e dipende, ovviamente, molto dalla capacità del programmatore. With reference to fig. 2, conventionally a source code is opened in a debugger, in order to track down and solve possible programming errors. Once the program has been opened, the programmer manually inserts BPs (break points), that is, the stopping points of the program execution, in the routines (methods, sub-routines, functions, procedures, program blocks, subroutines) in which it suspects that an error may be found. Once the BPs have been entered, it is necessary to enter a series of input parameters with which the examiner wants to test the program or which he believes may cause an execution error. Very often the phase of entering the input parameters is quite long as it may be necessary to manually enter a large amount of data. Once the above operation has been completed, the programmer launches the program in fast forward mode and the program may either fall into an error or stop at a previously entered BP. In the first case it is necessary to restart from the BPs insertion phase, while in the second case the programmer proceeds to a circumspect progress of the execution, line by line, analyzing the lines of code and making the corrections he deems necessary. Even during circumspect progress it is very likely that the programmer does not notice the presence of the error and therefore ends up in it. In this case it is necessary to restart from the phase of entering the input parameters (very long), possibly modifying the position of the BPs and then repeating the entire process with greater caution in the hope of identifying the error before ending up again inside. As it will be easy to understand, the aforementioned iterative procedure can also be very long, especially if the phase of entering the input parameters is time consuming and obviously depends a lot on the ability of the programmer.

Con riferimento alla fig. 3 secondo il metodo della presente invenzione il codice sorgente di un programma per elaboratore viene aperto, 110, e modificato, 120a, come di seguito descritto. Innanzitutto, viene eseguito un controllo della presenza di r.g.e. (routines di gestione dell’errore), 121a, associate alle varie routines presenti nel codice sorgente. Il suddetto controllo 121a avviene secondo una serie di fasi che comprendono l’identificazione di routines nel codice sorgente, la ricerca all’interno di ogni routines identificata di parole chiave di rivelazione della presenza di una associata r.g.e, la segnalazione dell’assenza della r.g.e. nel caso che non vengano rintracciate le suddette parole chiave, e l’eventuale inserimento di determinate r.g.e laddove siano risultate mancanti dal suddetto controllo. Le suddette parole chiave saranno verosimilmente parole di richiamo della r.g.e. che variano in funzione del linguaggio di programmazione del codice sorgente. Ad esempio, “try†o “On Error GoTo†sono esempi delle suddette parole chiave. Terminata la suddetta fase di controllo 121a si ha la fase di inserimento, 130a, tra le righe di codice sorgente di istruzioni che comandino al programma la registrazione in successione delle istruzioni di programma che vengono eseguite durante una esecuzione dello stesso. In questo esempio realizzativo del metodo dell’invenzione, dedicato ad ottimizzare la procedura di debugging, la registrazione avviene vantaggiosamente tramite valorizzazione ed aggiornamento di una opportuna variabile “A†in quanto non à ̈ necessario conservare un file di log di tutte le righe di codice eseguite ma à ̈ sufficiente, ed appesantisce molto meno l’esecuzione del programma, conservare l’informazione relativa all’ultima riga di codice eseguita. Altra operazione che viene eseguita nella fase di modifica 120a à ̈ l’inserimento, dopo la riga di richiamo di ogni routine, di una istruzione di memorizzazione, 122a, dei parametri di apertura della routine stessa. Ulteriori operazioni eseguite in questa fase consistono nel modificare opportunamente le r.g.e. associate alle singole routines. Una prima modifica consiste nell’inserimento, in ogni r.g.e. di una istruzione di lettura della suddetta variabile “A†, 123a, in cui à ̈ memorizzata l’ultima riga di codice eseguita, ed un'altra modifica consiste nell’inserimento in ogni r.g.e. di una istruzione di richiamo, 124a, della routine che la richiama con i parametri di richiamo uguali ai parametri precedentemente salvati grazie alla fase di memorizzazione 122a. In questo modo si crea un richiamo ricorsivo di ogni routine con la relativa r.g.e. in modo tale che avvenendo un errore in una routine si finisca da prima nella relativa r.g.e. e quindi si torni automaticamente alla routine con i parametri di richiamo della routine salvati (e senza dover quindi inserire di nuovo tutti i parametri di ingresso dell’intera esecuzione del programma). Infine il codice sorgente modificato viene salvato, 140. With reference to fig. 3 according to the method of the present invention, the source code of a computer program is opened, 110, and modified, 120a, as described below. First, a check for the presence of r.g.e. (error handling routines), 121a, associated with the various routines present in the source code. The aforementioned control 121a takes place according to a series of phases which include the identification of routines in the source code, the search within each identified routines for keywords to reveal the presence of an associated r.g and, the signaling of the absence of the r.g.e. in the event that the aforementioned keywords are not found, and the possible inclusion of certain r.g and where they are missing from the aforementioned control. The aforementioned keywords will likely be reminder words of the r.g.e. which vary according to the programming language of the source code. For example, â € œtryâ € or â € œOn Error GoToâ € are examples of the above keywords. At the end of the aforesaid control step 121a there is the step of inserting, 130a, between the lines of source code of instructions which command the program to register in succession the program instructions which are executed during its execution. In this example of the invention method, dedicated to optimizing the debugging procedure, the recording takes place advantageously by enhancing and updating an appropriate variable â € œAâ € as it is not necessary to keep a log file of all the lines of code you execute but it is sufficient, and makes program execution much less burdensome, to keep the information relating to the last line of code executed. Another operation that is performed in the modification phase 120a is the insertion, after the call line of each routine, of a storage instruction, 122a, of the opening parameters of the routine itself. Further operations carried out in this phase consist in appropriately modifying the r.g.e. associated with the individual routines. A first modification consists in the insertion, in each r.g.e. of a reading instruction of the aforementioned variable â € œAâ €, 123a, in which the last executed line of code is stored, and another modification consists in the insertion in each r.g.e. of a recall instruction, 124a, of the routine that recalls it with the recall parameters equal to the parameters previously saved thanks to the storage step 122a. In this way, a recursive call of each routine is created with the relative r.g.e. in such a way that when an error occurs in a routine, it ends up first in the relative r.g.e. and then you automatically return to the routine with the saved routine recall parameters (and therefore without having to re-enter all the input parameters of the entire program execution). Finally the modified source code is saved, 140.

Il codice sorgente così modificato può essere aperto in un comune debugger, 201, in modo da avviare un processo di ricerca e risoluzione degli errori ottimizzato. Una volta aperto il codice sorgente, vengono inseriti opportuni BPs, 202, direttamente all’interno delle r.g.e. associate alle routine che si sospetta possano contenere errori. In seguito vengono immessi i parametri di ingresso dell’intera esecuzione del programma, 203, analogamente a come avviene nelle procedure di debugging di tipo convenzionale. Una volta inseriti i parametri di ingresso il debugging può essere fatto avanzare in avanzamento rapido, 204. Dal momento che i BPs sono inseriti all’interno delle r.g.e. il programma avanzerà fino a cadere in errore e si fermerà in corrispondenza del BP presente nella r.g.e. associata alla routine in cui si trova l’istruzione che ha provocato l’errore. Nella r.g.e di interruzione il programmatore potrà leggere il contenuto della variabile “A†, 205, in cui sarà riportata l’ultima riga di codice eseguita prima della caduta in errore. A questo punto il programmatore potrà agevolmente inserire un opportuno BP immediatamente al di sopra della istruzione memorizzata nella variabile “A†, 206. Dopo, il debugging viene ripreso dal punto di interruzione in modalità di avanzamento rapido, 207. La ripresa del debugging dal punto di precedente interruzione, vale a dire dall’interno della r.g.e. implica l’esecuzione dell’istruzione di richiamo della routine con i parametri di richiamo della routine salvati inserita nel codice nella precedente fase 124a, e quindi il programma ritorna alla routine in cui si trova l’errore con i parametri di richiamo della routine precedenti e si ferma al BP inserito dal programmatore. The modified source code can be opened in a common debugger, 201, in order to start an optimized troubleshooting process. Once the source code has been opened, appropriate BPs, 202, are inserted directly into the r.g.e. associated with routines that you suspect may contain errors. Then the input parameters of the entire execution of the program are entered, 203, similar to what happens in conventional debugging procedures. Once the input parameters have been entered, debugging can be advanced in rapid advance, 204. Since the BPs are inserted inside the r.g.e. the program will advance until it falls into error and will stop at the BP present in the r.g.e. associated with the routine in which the instruction that caused the error is located. In the r.g. and interruption, the programmer will be able to read the content of the variable â € œAâ €, 205, which will show the last line of code executed before the error occurred. At this point the programmer can easily insert an appropriate BP immediately above the instruction stored in the variable â € œAâ €, 206. Then, debugging is resumed from the breakpoint in fast forward mode, 207. The resume debugging from point of previous interruption, that is to say from inside the r.g.e. involves executing the routine recall instruction with the saved routine recall parameters inserted in the code in the previous step 124a, and then the program returns to the routine where the error is found with the recall parameters of the previous routines and stops at the BP entered by the programmer.

A questo punto al programmatore non resta che analizzare l’istruzione che ha provocato l’errore e risolvere l’errore stesso, 208. At this point the programmer just has to analyze the instruction that caused the error and solve the error, 208.

Come facilmente intuibile, la procedura di debugging sopra descritta à ̈ molto più rapida ed efficace rispetto alla procedura convenzionale. Infatti, l’ultima riga di codice correttamente eseguita rimane memorizzata nella variabile “A†e viene posta immediatamente all’attenzione del programmatore grazie alla istruzione di lettura della variabile “A†stessa posta nella r.g.e.. Inoltre, i parametri di richiamo della routine vengono salvati e la routine viene richiamata direttamente nella r.g.e. associata con i suddetti parametri salvati. Questo salvataggio à ̈ utile in quanto i parametri di richiamo della routine potrebbero essere stati alterati durante l’esecuzione della routine stessa. Tutto questo permette di non dover inserire più volte i parametri di ingresso nel programma allorché si cade nell’errore e di ritornare rapidamente ed automaticamente alla routine in cui si trova l’errore fermandosi immediatamente prima dell’errore per poterlo analizzare e correggere. Tutta la procedura può avvenire in modalità di avanzamento rapido senza dover perdere tempo con gli avanzamenti circospetti riga per riga. As can be easily understood, the debugging procedure described above is much faster and more effective than the conventional procedure. In fact, the last line of code correctly executed remains stored in the variable â € œAâ € and is immediately brought to the attention of the programmer thanks to the reading instruction of the variable â € œAâ € itself placed in the r.g.e .. call of the routine are saved and the routine is called directly in the r.g.e. associated with the above saved parameters. This saving is useful as the call-up parameters of the routine may have been altered during the execution of the routine itself. All this allows you not to have to enter the input parameters in the program several times when you fall into the error and to return quickly and automatically to the routine in which the error is found, stopping immediately before the error in order to analyze it and correct. The whole procedure can be done in fast forward mode without having to waste time with circumspect line-by-line feeds.

In fig. 4 à ̈ mostrato un diagramma di flusso che rappresenta una forma realizzativa del metodo dell’invenzione attuata per ottimizzare i processi di analisi manuale e visiva dei flussi di funzionamento di un programma 300. In fig. 4 A flow chart is shown which represents an embodiment of the method of the invention implemented to optimize the processes of manual and visual analysis of the operating flows of a program 300.

Secondo la presente invenzione il codice sorgente viene aperto, 110, modificato, 120b e quindi salvato nella sua forma modificata, 140. In questa forma realizzativa le modifiche comprendono l’inserimento di una numerazione di riga progressiva, 125b, per ogni riga di codice sorgente, e quindi l’inserimento delle istruzioni di registrazione su file di log delle righe di codice che vengono eseguite, 130b. Bisogna osservare che le suddette istruzioni di memorizzazione delle righe di codice eseguite non necessariamente devono essere tali da comandare la trascrizione puntuale di tutte le righe di codice attraversate durante l’esecuzione del programma. Ad esempio, per alcuni tipi di esigenze può risultare utile la memorizzazione in sequenza delle sole istruzioni di richiamo delle routines presenti nel codice, o altre tipologie di istruzioni. Si comprenderà anche che risulta piuttosto semplice per un tecnico del settore studiare procedure che automatizzino l’inserimento delle istruzioni di memorizzazione in modalità condizionata, per esempio, alla presenza di determinate parole chiave. According to the present invention the source code is opened, 110, modified, 120b and then saved in its modified form, 140. In this embodiment the modifications include the insertion of a progressive line numbering, 125b, for each line of code source, and then the insertion of the instructions for recording the lines of code that are executed on the log file, 130b. It should be noted that the above-mentioned memorization instructions for the executed lines of code do not necessarily have to be such as to command the punctual transcription of all the lines of code crossed during the execution of the program. For example, for some types of needs it may be useful to store in sequence only the instructions for recalling the routines present in the code, or other types of instructions. It will also be understood that it is quite simple for a person skilled in the art to study procedures that automate the insertion of memorization instructions in a conditional manner, for example, in the presence of certain keywords.

Una volta che il programma modificato à ̈ stato salvato viene compilato, 160 ed eseguito, 150, con determinati parametri di ingresso, 170. In seguito all’esecuzione verrà generato un file di log, 180, in accordo con quanto stabilito dalle istruzioni inserite nella fase di modifica 120b. A questo punto, il file di log generato può essere visualizzato ed analizzato manualmente, 300. L’analisi visiva manuale può essere un’operazione eccessivamente dispersiva nel caso che il file di log comprenda un numero molto elevato di righe di codice trascritte, in cui alcune di esse possono verosimilmente essere le stesse righe eseguite una molteplicità di volte. In questo caso, prima della analisi manuale, secondo la presente invenzione il file di log viene vantaggiosamente manipolato, 301, eseguendo un raggruppamento delle righe identiche ed una eliminazione delle ripetizioni con conteggio del numero di ripetizioni, ed infine un ordinamento delle righe. In questo modo il programmatore si troverà di fronte ad una lista di istruzioni molto ridotta in cui tutte le istruzioni sono una diversa dall’altra. Il programmatore a questo punto potrà eseguire una selezione manuale, 302, di righe di interesse per l’analisi che deve compiere (o vice-versa di quelle di non interesse), dopodiché verrà ripristinato il file di log nella sequenza originaria ma senza tutte le righe (e le relative ripetizioni) precedentemente selezionate come “non di interesse†, 303. A questo punto il programmatore, tramite il file di log semplificato, potrà eseguire l’analisi manuale del flusso di funzionamento delle porzioni e righe di codice del programma di suo interesse. Once the modified program has been saved, it is compiled, 160 and executed, 150, with certain input parameters, 170. Following the execution, a log file will be generated, 180, in accordance with what is established by the inserted instructions in the modification phase 120b. At this point, the generated log file can be viewed and analyzed manually, 300. The manual visual analysis can be an excessively wasteful operation in the event that the log file includes a very large number of transcribed lines of code, in which some of them can probably be the same lines executed a multiplicity of times. In this case, before the manual analysis, according to the present invention, the log file is advantageously manipulated, 301, by carrying out a grouping of the identical rows and an elimination of the repetitions with counting of the number of repetitions, and finally a sorting of the rows. In this way the programmer will be faced with a very reduced list of instructions in which all instructions are different from each other. At this point, the programmer can perform a manual selection, 302, of lines of interest for the analysis to be performed (or vice-versa of those of no interest), after which the log file will be restored in the original sequence but without all the lines (and the relative repetitions) previously selected as â € œnot of interestâ €, 303. At this point the programmer, through the simplified log file, will be able to carry out the manual analysis of the working flow of the portions and lines of code of the program of your interest.

In fig. 5 à ̈ mostrato un diagramma di flusso che rappresenta una forma realizzativa del metodo dell’invenzione attuata per ottimizzare i processi di valutazione dell’attività di collaudo, 400, del programma per elaboratore. In fig. 5 A flowchart is shown which represents an embodiment of the method of the invention implemented to optimize the evaluation processes of the testing activity, 400, of the computer program.

Secondo la presente invenzione il codice sorgente viene aperto, 110, modificato, 120c e quindi salvato nella sua forma modificata “P†, 140. In questa forma realizzativa le modifiche comprendono l’inserimento di una numerazione di riga progressiva, 125c, per ogni riga di codice sorgente, e quindi l’inserimento delle istruzioni di registrazione su file di log delle righe di codice che vengono eseguite, 130c. Una volta che il programma modificato “P†à ̈ stato salvato viene compilato, 160. Come già accennato nelle procedure di collaudo il programma viene eseguito, 150, con numerose combinazioni di parametri di ingresso, 170, in modo da sollecitare il più possibile il programma passando possibilmente attraverso tutte le righe di codice con un numero il più elevato possibile di valori diversi delle relative variabili. Ad ogni esecuzione del programma, grazie alle modifiche precedentemente apportate al codice sorgente, si genera un file di log 180 contenente la successione di righe di codice sorgente eseguite nell’esecuzione del programma. Dopo un numero n di esecuzioni del programma con n combinazioni diverse di parametri di ingresso avremo generato una serie n di files di log “logP1†, “logP2†, …, “logPn†. Al termine di tutte le prove previste i files di log “logP1†, “logP2†, …, “logPn†vengono uniti in un unico file di log , 401, semplicemente accodando in un unico file di testo le righe di “logP1†le righe di “logP2†e così via fino alle righe di “logPn†. Il file di log unione così ottenuto viene manipolato, 402, eseguendo un raggruppamento delle righe identiche ed una eliminazione delle ripetizioni con conteggio del numero di ripetizioni, ed infine un ordinamento delle righe per numero di riga. Il file di log “logP†così ottenuto conterrà una serie di righe di codice ordinate per numero di riga e ad ognuna sarà associato un ulteriore numero che indica il numero di volte che quella determinata riga di codice sorgente à ̈ stata eseguita durante le n esecuzioni di prova del programma. A questo punto, il file di log “logP†può essere confrontato, tramite un’utilità di confronto di documenti testuali, 403, con il codice sorgente modificato “P†, in modo da evidenziare anche le righe di codice sorgente con non sono mai state eseguite nelle n esecuzioni di prova del programma, 404. L’utilità di confronto di documenti testuali deve garantire l’assenza di falsi positivi, ovvero di righe mostrate come cancellate o inserite nel testo confrontato che in realtà non sono modificate. Il metodo della presente invenzione, nella forma realizzativa sopra descritta, fornisce uno strumento per avere in modo semplice ed immediato, importanti informazioni circa la completezza e la validità dell’attività di collaudo del programma eseguita. According to the present invention the source code is opened, 110, modified, 120c and then saved in its modified form â € œPâ €, 140. In this embodiment the modifications include the insertion of a progressive line numbering, 125c, for each line of source code, and then the insertion of the instructions to log the lines of code that are executed, 130c. Once the modified program â € œPâ € has been saved, it is compiled, 160. As already mentioned in the testing procedures, the program is executed, 150, with numerous combinations of input parameters, 170, in order to stimulate as much as possible the program, possibly passing through all the lines of code with the highest possible number of different values of the related variables. At each execution of the program, thanks to the modifications previously made to the source code, a log file 180 is generated containing the succession of source code lines executed in the execution of the program. After a number n of program executions with n different combinations of input parameters we will have generated a series n of log files â € œlogP1â €, â € œlogP2â €, â € ¦, â € œlogPnâ €. At the end of all the tests provided, the log files â € œlogP1â €, â € œlogP2â €, â € ¦, â € œlogPnâ € are merged into a single log file, 401, simply by appending the lines in a single text file of â € œlogP1â € the lines of â € œlogP2â € and so on up to the lines of â € œlogPnâ €. The log file thus obtained is manipulated, 402, by performing a grouping of identical lines and an elimination of the repetitions with counting the number of repetitions, and finally a sorting of the lines by line number. The log file â € œlogPâ € thus obtained will contain a series of lines of code ordered by line number and each will be associated with an additional number indicating the number of times that particular line of source code has been executed during the n trial runs of the program. At this point, the log file â € œlogPâ € can be compared, by means of a textual document comparison utility, 403, with the modified source code â € œPâ €, in order to also highlight the source code lines with have never been performed in the n test runs of the program, 404. The utility for comparing text documents must guarantee the absence of false positives, i.e. lines shown as deleted or inserted in the compared text that are not actually modified. The method of the present invention, in the embodiment described above, provides a tool for obtaining, in a simple and immediate way, important information about the completeness and validity of the testing activity of the executed program.

Sulla base del metodo della presente invenzione potrebbero essere sviluppate ulteriori applicazioni utili nel processo di sviluppo di programmi per elaboratore, senza per questo uscire dal concetto inventivo delineato. On the basis of the method of the present invention, further applications useful in the process of developing computer programs could be developed, without thereby departing from the inventive concept outlined.

Ovviamente varianti e modifiche possono essere apportate al metodo dell’invenzione ed alle procedure sopra descritte di implementazione dello stesso in attività di debugging, di analisi manuale dei flussi di funzionamento di un programma e di valutazione delle attività di collaudo del programma stesso, pur sempre rimanendo all’interno dell’ambito di protezione definito dalle rivendicazioni seguenti. Obviously, variations and modifications can be made to the method of the invention and to the procedures described above for its implementation in debugging activities, manual analysis of the operating flows of a program and evaluation of the testing activities of the program itself, always remaining within the scope of protection defined by the following claims.

Claims (8)

RIVENDICAZIONI 1. Metodo per ottimizzare i processi di sviluppo di programmi per elaboratori caratterizzato dal fatto di comprendere fasi di: - apertura/lettura (110) di un codice sorgente; - modifica automatica (120) di detto codice sorgente con inserimento di istruzioni di registrazione (130) in successione delle righe di codice sorgente che vengono eseguite durante l’esecuzione del programma per elaboratore, dette istruzioni essendo tali da non alterare le funzionalità di detto codice sorgente, detta registrazione potendo avvenire secondo una o più delle seguenti modalità: aggiornamento di una determinata variabile, inserimento in un determinato vettore, inserimento in un determinato file di log; - salvataggio (140) di detto codice sorgente modificato “P†. CLAIMS 1. Method for optimizing the development processes of computer programs characterized by the fact of including phases of: - opening / reading (110) of a source code; - automatic modification (120) of said source code with insertion of registration instructions (130) in succession of the lines of source code that are executed during the execution of the computer program, said instructions being such as not to alter the functionality of said source code, said registration being able to take place according to one or more of the following modalities: updating of a determined variable, insertion in a determined vector, insertion in a determined log file; - saving (140) of said modified source code â € œPâ €. 2. Metodo secondo la rivendicazione 1 caratterizzato dal fatto che detta fase di modifica (120a) comprende fasi di: - Inserimento (122a), dopo istruzioni di richiamo di determinate routines comprese in detto codice sorgente, di istruzioni di salvataggio dei parametri di richiamo di dette routines; - inserimento (123a), in routines di gestione dell’errore associate a dette routines, di istruzioni di lettura di detta variabile, vettore o file di log; - inserimento (124a) in dette routines di gestione dell’errore di istruzioni di richiamo di dette routines con i parametri di apertura salvati per mezzo di dette istruzioni di salvataggio. 2. Method according to claim 1 characterized in that said modification step (120a) comprises steps of: - Insertion (122a), after recall instructions of certain routines included in said source code, of instructions for saving the recall parameters of said routines; - insertion (123a), in error management routines associated with said routines, of instructions for reading said variable, vector or log file; - insertion (124a) in said routines for managing the error of recall instructions of said routines with the opening parameters saved by means of said save instructions. 3. Metodo secondo la rivendicazione precedente caratterizzato dal fatto che allorché detto codice sorgente modificato viene eseguito in un debugger, vengono inseriti break points (202) in dette routines di gestione degli errore. 3. Method according to the preceding claim characterized in that when said modified source code is executed in a debugger, break points (202) are inserted in said error handling routines. 4. Metodo secondo la rivendicazione 2 o 3 caratterizzato dal fatto che detta fase di modifica automatica (120) comprende una fase di verifica (121a) della presenza in detto codice sorgente di routines di gestione dell’errore. 4. Method according to claim 2 or 3, characterized in that said automatic modification step (120) comprises a step for verifying (121a) the presence in said source code of error management routines. 5. Metodo secondo la rivendicazione precedente caratterizzato dal fatto che detta fase di verifica comprende fasi di: identificazione di routines in detto codice sorgente; ricerca in dette routines identificate di parole chiave di rivelazione della presenza di routines di gestione dell’errore; segnalazione dell’assenza di dette parole chiave in determinate routines. 5. Method according to the preceding claim characterized in that said verification step comprises steps of: identification of routines in said source code; search in said identified routines for keywords to reveal the presence of error management routines; reporting of the absence of these keywords in certain routines. 6. Metodo secondo la rivendicazione precedente caratterizzato dal fatto di comprendere una fase di inserimento automatico (121a) di una routine di gestione dell’errore associata ad ogni routine per cui à ̈ stata segnalata l’assenza di dette parole chiave, detta routine di gestione dell’errore comprendendo istruzioni di lettura di detta variabile, vettore o file di log e dette istruzioni di richiamo di dette routines con detti parametri di apertura salvati. 6. Method according to the previous claim characterized by the fact of comprising an automatic insertion step (121a) of an error management routine associated with each routine for which the absence of said keywords has been signaled, said routine error management including instructions for reading said variable, vector or log file and said instructions for recalling said routines with said saved opening parameters. 7. Metodo secondo la rivendicazione 1 caratterizzato dal fatto che detta fase di modifica automatica (120c) comprende una fase di inserimento di istruzioni di numerazione automatica progressiva (125c) di ogni riga di detto codice sorgente, detta registrazione avvenendo tramite inserimento in un determinato file di log, ed in cui, a seguito di n esecuzioni (150) di detto programma per elaboratore, gli n files di log generati “logP1†, “logP2, …, †logPn†(180) vengono processati come segue: - unione (401) degli n files di log “logP1†, “logP2, …†logPn†in un unico file di log mediante accodamento delle relative righe di codice in essi trascritte; - manipolazione (402) del file di log unione eseguendo: il raggruppamento delle righe identiche, l’eliminazione delle ripetizioni con conteggio del numero di ripetizioni e l’ordinamento delle righe per numero di riga, in modo da ottenere un file di log “logP†; - Confronto (403), tramite un applicativo di confronto di documenti testuali, del file di log “logP†con il codice sorgente modificato “P†. 7. Method according to claim 1 characterized in that said automatic modification step (120c) comprises a step for inserting progressive automatic numbering instructions (125c) of each line of said source code, said registration taking place through insertion in a specific file of log, and in which, following n executions (150) of said computer program, the n log files generated â € œlogP1â €, â € œlogP2, â € ¦, â € logPnâ € (180) are processed as follows: - union (401) of the n log files â € œlogP1â €, â € œlogP2, â € ¦â € logPn into a single log file by appending the relative lines of code transcribed in them; - manipulation (402) of the merge log file by performing: grouping of identical lines, elimination of repetitions with counting of the number of repetitions and sorting of lines by line number, in order to obtain a log file â € œlogPâ €; - Comparison (403), through a textual document comparison application, of the log file â € œlogPâ € with the modified source code â € œPâ €. 8. Metodo secondo la rivendicazione 1 caratterizzato dal fatto che detta fase di modifica automatica (120b) comprende una fase di inserimento di istruzioni di numerazione automatica progressiva (125b) di ogni riga di detto codice sorgente, detta registrazione avvenendo tramite inserimento in un determinato file di log, ed in cui detto file di log generato (180) a seguito di una esecuzione (150) di detto codice sorgente viene manipolato (301) eseguendo il raggruppamento delle righe identiche e l’eliminazione delle ripetizioni con conteggio del numero di ripetizioni.8. Method according to claim 1 characterized by the fact that said automatic modification step (120b) comprises a step for inserting progressive automatic numbering instructions (125b) of each line of said source code, said registration taking place by inserting it in a specific file of log, and in which said log file generated (180) following an execution (150) of said source code is manipulated (301) by grouping identical lines and eliminating repetitions with counting the number of repetitions .
IT000105A 2011-09-28 2011-09-28 METHOD FOR THE OPTIMIZATION OF PROGRAM DEVELOPMENT PROCESSES BY PROCESSOR ITPI20110105A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
IT000105A ITPI20110105A1 (en) 2011-09-28 2011-09-28 METHOD FOR THE OPTIMIZATION OF PROGRAM DEVELOPMENT PROCESSES BY PROCESSOR

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
IT000105A ITPI20110105A1 (en) 2011-09-28 2011-09-28 METHOD FOR THE OPTIMIZATION OF PROGRAM DEVELOPMENT PROCESSES BY PROCESSOR

Publications (1)

Publication Number Publication Date
ITPI20110105A1 true ITPI20110105A1 (en) 2013-03-29

Family

ID=44907993

Family Applications (1)

Application Number Title Priority Date Filing Date
IT000105A ITPI20110105A1 (en) 2011-09-28 2011-09-28 METHOD FOR THE OPTIMIZATION OF PROGRAM DEVELOPMENT PROCESSES BY PROCESSOR

Country Status (1)

Country Link
IT (1) ITPI20110105A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5526485A (en) * 1994-10-13 1996-06-11 Microsoft Corporation Just-in-time debugging system and methods under the windows 3.0 and windows 3.1 operating systems
US6738778B1 (en) * 1998-12-11 2004-05-18 International Business Machines Corporation Method and apparatus for monitoring the execution of a program
US20050015751A1 (en) * 2003-07-15 2005-01-20 Leonardus Grassens Automated program debugging tool
US20080126873A1 (en) * 2006-11-23 2008-05-29 International Business Machines Corporation Resource efficient software tracing for problem diagnosis

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5526485A (en) * 1994-10-13 1996-06-11 Microsoft Corporation Just-in-time debugging system and methods under the windows 3.0 and windows 3.1 operating systems
US6738778B1 (en) * 1998-12-11 2004-05-18 International Business Machines Corporation Method and apparatus for monitoring the execution of a program
US20050015751A1 (en) * 2003-07-15 2005-01-20 Leonardus Grassens Automated program debugging tool
US20080126873A1 (en) * 2006-11-23 2008-05-29 International Business Machines Corporation Resource efficient software tracing for problem diagnosis

Similar Documents

Publication Publication Date Title
CN101739339B (en) Program dynamic dependency relation-based software fault positioning method
US7231633B2 (en) Debugging with set verbosity level during read and analysis of executable code and associated comments while logging according to set verbosity level
Rival Understanding the origin of alarms in Astrée
US8132156B2 (en) Methods and systems for testing tool with comparative testing
Marinescu et al. KATCH: High-coverage testing of software patches
Aftandilian et al. Building useful program analysis tools using an extensible java compiler
US8589882B2 (en) Analyzing computer code development actions and process
Zhang et al. Pensieve: Non-intrusive failure reproduction for distributed systems using the event chaining approach
Ganea et al. Continuous quality assessment with inCode
Jeanneret et al. Estimating footprints of model operations
US9304893B1 (en) Integrated software development and test case management system
CN102567164A (en) Instruction set batch testing device and method for processor
Just et al. Using conditional mutation to increase the efficiency of mutation analysis
CN105260312B (en) A kind of adjustment method of multinuclear real time system application data contention mistake
CN112131122A (en) Method and device for source code defect detection tool misinformation evaluation
Licker et al. Detecting incorrect build rules
Ramanathan et al. Sieve: A tool for automatically detecting variations across program versions
Neukirchen et al. Utilising code smells to detect quality problems in TTCN-3 test suites
Harman et al. Dependence clusters in source code
CN110321130B (en) Non-repeatable compiling and positioning method based on system call log
Li et al. Change‐aware model checking for evolving concurrent programs based on Program Dependence Net
Singhal et al. A critical review of various testing techniques in aspect-oriented software systems
CN106095663A (en) Program based on hierarchical model returns location of mistake method
Hordijk et al. Harmfulness of code duplication-a structured review of the evidence
ITPI20110105A1 (en) METHOD FOR THE OPTIMIZATION OF PROGRAM DEVELOPMENT PROCESSES BY PROCESSOR