-
Maximal and minimal dynamic Petri net slicing
Authors:
Marisa Llorens,
Javier Oliver,
Josep Silva,
Salvador Tamarit
Abstract:
Context: Petri net slicing is a technique to reduce the size of a Petri net to ease the analysis or understanding of the original Petri net. Objective: Presenting two new Petri net slicing algorithms to isolate those places and transitions of a Petri net (the slice) that may contribute tokens to one or more places given (the slicing criterion). Method: The two algorithms proposed are formalized. T…
▽ More
Context: Petri net slicing is a technique to reduce the size of a Petri net to ease the analysis or understanding of the original Petri net. Objective: Presenting two new Petri net slicing algorithms to isolate those places and transitions of a Petri net (the slice) that may contribute tokens to one or more places given (the slicing criterion). Method: The two algorithms proposed are formalized. The maximality of the first algorithm and the minimality of the second algorithm are formally proven. Both algorithms, together with three other state-of-the-art algorithms, have been implemented and integrated into a single tool so that we have been able to carry out a fair empirical evaluation. Results: Besides the two new Petri net slicing algorithms, a public, free, and open-source implementation of five algorithms is reported. The results of an empirical evaluation of the new algorithms and the slices they produce are also presented. Conclusions: The first algorithm collects all places and transitions that may contribute tokens (in any computation) to the slicing criterion, while the second algorithm collects the places and transitions needed to fire the shortest transition sequence that contributes tokens to some place in the slicing criterion. Therefore, the net computed by the first algorithm can reproduce any computation that contributes tokens to any place of interest. In contrast, the second algorithm loses this possibility, but it often produces a much more reduced subnet (which still can reproduce some computations that contribute tokens to some places of interest). The first algorithm is proven maximal, and the second one is proven minimal.
△ Less
Submitted 15 May, 2023; v1 submitted 7 April, 2021;
originally announced April 2021.
-
Enhancing POI testing approach through the use of additional information
Authors:
Sergio Pérez,
Salvador Tamarit
Abstract:
Recently, a new approach to perform regression testing has been defined: the point of interest (POI) testing. A POI, in this context, is any expression of a program. The approach receives as input a set of relations between POIs from a version of a program and POIs from another version, and also a sequence of input functions, i.e. test cases. Then, a program instrumentation, an input test case gen…
▽ More
Recently, a new approach to perform regression testing has been defined: the point of interest (POI) testing. A POI, in this context, is any expression of a program. The approach receives as input a set of relations between POIs from a version of a program and POIs from another version, and also a sequence of input functions, i.e. test cases. Then, a program instrumentation, an input test case generation and different comparison functions are used to obtain the final report which indicates whether the alternative version of the program behaves as expected, e.g. it produces the same values or it uses less CPU/memory. In this paper, we explain how we can improve the POI testing approach through the use of common stack traces and a more sophisticated tracing for calls. These enhancements of the approach allow users to identify errors earlier and easier. Additionally, they enable new comparison modes and new categories of reported unexpected behaviours.
△ Less
Submitted 23 August, 2018;
originally announced August 2018.
-
Runtime verification in Erlang by using contracts
Authors:
Lars-Åke Fredlund,
Julio Mariño,
Sergio Pérez,
Salvador Tamarit
Abstract:
During its lifetime, a program suffers several changes that seek to improve or to augment some parts of its functionality. However, these modifications usually also introduce errors that affect the already-working code. There are several approaches and tools that help to spot and find the source of these errors. However, most of these errors could be avoided beforehand by using some of the knowled…
▽ More
During its lifetime, a program suffers several changes that seek to improve or to augment some parts of its functionality. However, these modifications usually also introduce errors that affect the already-working code. There are several approaches and tools that help to spot and find the source of these errors. However, most of these errors could be avoided beforehand by using some of the knowledge that the programmers had when they were writing the code. This is the idea behind the design-by-contract approach, where users can define contracts that can be checked during runtime. In this paper, we apply the principles of this approach to Erlang, enabling, in this way, a runtime verification system in this language. We define two types of contracts. One of them can be used in any Erlang program, while the second type is intended to be used only in concurrent programs. We provide the details of the implementation of both types of contracts. Moreover, we provide an extensive explanation of each contract as well as examples of their usage. All the ideas presented in this paper have been implemented in a contract-based runtime verification system named EDBC. Its source code is available at GitHub as an open-source and free project.
△ Less
Submitted 5 February, 2019; v1 submitted 23 August, 2018;
originally announced August 2018.
-
Erlang Code Evolution Control (Use Cases)
Authors:
David Insa,
Sergio Pérez,
Josep Silva,
Salvador Tamarit
Abstract:
The main goal of this work is to show how SecEr can be used in different scenarios. Concretely, we demonstrate how a user can run SecEr to obtain reports about the behaviour preservation between versions as well as how a user can use SecEr to find the source of a discrepancy. The use cases presented are three: two completely different versions of the same program, an improvement in the performance…
▽ More
The main goal of this work is to show how SecEr can be used in different scenarios. Concretely, we demonstrate how a user can run SecEr to obtain reports about the behaviour preservation between versions as well as how a user can use SecEr to find the source of a discrepancy. The use cases presented are three: two completely different versions of the same program, an improvement in the performance of a function and a program where an error has been introduced. A complete description of the technique and the tool is available at [1] and [2].
△ Less
Submitted 12 February, 2018;
originally announced February 2018.
-
Erlang Code Evolution Control
Authors:
David Insa,
Sergio Pérez,
Josep Silva,
Salvador Tamarit
Abstract:
During the software lifecycle, a program can evolve several times for different reasons such as the optimisation of a bottle-neck, the refactoring of an obscure function, etc. These code changes often involve several functions or modules, so it can be difficult to know whether the correct behaviour of the previous releases has been preserved in the new release. Most developers rely on a previously…
▽ More
During the software lifecycle, a program can evolve several times for different reasons such as the optimisation of a bottle-neck, the refactoring of an obscure function, etc. These code changes often involve several functions or modules, so it can be difficult to know whether the correct behaviour of the previous releases has been preserved in the new release. Most developers rely on a previously defined test suite to check this behaviour preservation. We propose here an alternative approach to automatically obtain a test suite that specifically focusses on comparing the old and new versions of the code. Our test case generation is directed by a sophisticated combination of several already existing tools such as TypEr, CutEr, and PropEr; and other ideas such as allowing the programmer to chose an expression of interest that must preserve the behaviour, or the recording of the sequences of values to which this expression is evaluated. All the presented work has been implemented in an open-source tool that is publicly available on GitHub.
△ Less
Submitted 15 September, 2017;
originally announced September 2017.
-
Towards Automatic Learning of Heuristics for Mechanical Transformations of Procedural Code
Authors:
Guillermo Vigueras,
Manuel Carro,
Salvador Tamarit,
Julio Mariño
Abstract:
The current trends in next-generation exascale systems go towards integrating a wide range of specialized (co-)processors into traditional supercomputers. Due to the efficiency of heterogeneous systems in terms of Watts and FLOPS per surface unit, opening the access of heterogeneous platforms to a wider range of users is an important problem to be tackled. However, heterogeneous platforms limit th…
▽ More
The current trends in next-generation exascale systems go towards integrating a wide range of specialized (co-)processors into traditional supercomputers. Due to the efficiency of heterogeneous systems in terms of Watts and FLOPS per surface unit, opening the access of heterogeneous platforms to a wider range of users is an important problem to be tackled. However, heterogeneous platforms limit the portability of the applications and increase development complexity due to the programming skills required. Program transformation can help make programming heterogeneous systems easier by defining a step-wise transformation process that translates a given initial code into a semantically equivalent final code, but adapted to a specific platform. Program transformation systems require the definition of efficient transformation strategies to tackle the combinatorial problem that emerges due to the large set of transformations applicable at each step of the process. In this paper we propose a machine learning-based approach to learn heuristics to define program transformation strategies. Our approach proposes a novel combination of reinforcement learning and classification methods to efficiently tackle the problems inherent to this type of systems. Preliminary results demonstrate the suitability of this approach.
△ Less
Submitted 24 January, 2017;
originally announced January 2017.
-
Towards a Semantics-Aware Code Transformation Toolchain for Heterogeneous Systems
Authors:
Salvador Tamarit,
Julio Mariño,
Guillermo Vigueras,
Manuel Carro
Abstract:
Obtaining good performance when programming heterogeneous computing platforms poses significant challenges. We present a program transformation environment, implemented in Haskell, where architecture-agnostic scientific C code with semantic annotations is transformed into functionally equivalent code better suited for a given platform. The transformation steps are represented as rules that can…
▽ More
Obtaining good performance when programming heterogeneous computing platforms poses significant challenges. We present a program transformation environment, implemented in Haskell, where architecture-agnostic scientific C code with semantic annotations is transformed into functionally equivalent code better suited for a given platform. The transformation steps are represented as rules that can be fired when certain syntactic and semantic conditions are fulfilled. These rules are not hard-wired into the rewriting engine: they are written in a C-like language and are automatically processed and incorporated into the rewriting engine. That makes it possible for end-users to add their own rules or to provide sets of rules that are adapted to certain specific domains or purposes.
△ Less
Submitted 12 January, 2017;
originally announced January 2017.
-
Proceedings of the First Workshop on Program Transformation for Programmability in Heterogeneous Architectures
Authors:
Salvador Tamarit,
Julio Mariño,
Guillermo Vigueras,
Manuel Carro
Abstract:
This volume contains the proceedings of PROHA 2016, the first workshop on Program Transformation for Programmability in Heterogeneous Architectures, held on March 12, 2016 in Barcelona, Spain, as an affiliated workshop of CGO 2016, the 14th International Symposium on Code Generation and Optimization. Developing and maintaining high-performance applications and libraries for heterogeneous architect…
▽ More
This volume contains the proceedings of PROHA 2016, the first workshop on Program Transformation for Programmability in Heterogeneous Architectures, held on March 12, 2016 in Barcelona, Spain, as an affiliated workshop of CGO 2016, the 14th International Symposium on Code Generation and Optimization. Developing and maintaining high-performance applications and libraries for heterogeneous architectures while preserving its semantics and with a reasonable efficiency is a time-consuming task which is often only possible for experts. It often requires manually adapting sequential, platform-agnostic code to different infrastructures, and keeping the changes in all of these infrastructures in sync. These program modification tasks are costly and error-prone. Tools to assist in and, if possible, automate such transformations are of course of great interest. However, such tools may need significant reasoning and knowledge processing capabilities, including, for example, being able to process machine-understandable descriptions of the semantics of a piece of code is expected to do; to perform program transformations inside a context in which they are applicable; to use strategies to identify the sequence of transformations leading to the best resulting code; and others.
△ Less
Submitted 10 March, 2016;
originally announced March 2016.
-
Towards Automatic Learning of Heuristics for Mechanical Transformations of Procedural Code
Authors:
Guillermo Vigueras,
Manuel Carro,
Salvador Tamarit,
Julio Mariño
Abstract:
The current trend in next-generation exascale systems goes towards integrating a wide range of specialized (co-)processors into traditional supercomputers. However, the integration of different specialized devices increases the degree of heterogeneity and the complexity in programming such type of systems. Due to the efficiency of heterogeneous systems in terms of Watt and FLOPS per surface unit,…
▽ More
The current trend in next-generation exascale systems goes towards integrating a wide range of specialized (co-)processors into traditional supercomputers. However, the integration of different specialized devices increases the degree of heterogeneity and the complexity in programming such type of systems. Due to the efficiency of heterogeneous systems in terms of Watt and FLOPS per surface unit, opening the access of heterogeneous platforms to a wider range of users is an important problem to be tackled. In order to bridge the gap between heterogeneous systems and programmers, in this paper we propose a machine learning-based approach to learn heuristics for defining transformation strategies of a program transformation system. Our approach proposes a novel combination of reinforcement learning and classification methods to efficiently tackle the problems inherent to this type of systems. Preliminary results demonstrate the suitability of the approach for easing the programmability of heterogeneous systems.
△ Less
Submitted 9 March, 2016; v1 submitted 9 March, 2016;
originally announced March 2016.
-
Towards a Semantics-Aware Transformation Toolchain for Heterogeneous Systems
Authors:
Salvador Tamarit,
Julio Mariño,
Guillermo Vigueras,
Manuel Carro
Abstract:
Obtaining good performance when programming heterogeneous computing platforms poses significant challenges for the programmer. We present a program transformation environment, implemented in Haskell, where architecture-agnostic scientific C code with semantic annotations is transformed into functionally equivalent code better suited for a given platform. The transformation steps are formalized (an…
▽ More
Obtaining good performance when programming heterogeneous computing platforms poses significant challenges for the programmer. We present a program transformation environment, implemented in Haskell, where architecture-agnostic scientific C code with semantic annotations is transformed into functionally equivalent code better suited for a given platform. The transformation steps are formalized (and implemented) as rules which can be fired when certain syntactic and semantic conditions are met. These conditions are to be fulfilled by program properties which can be automatically inferred or, alternatively, stated as annotations in the source code. Rule selection can be guided by heuristics derived from a machine learning procedure which tries to capture how run-time characteristics (e.g., resource consumption or performance) are affected by the transformation steps.
△ Less
Submitted 10 March, 2016; v1 submitted 9 March, 2016;
originally announced March 2016.
-
Web Template Extraction Based on Hyperlink Analysis
Authors:
Julián Alarte,
David Insa,
Josep Silva,
Salvador Tamarit
Abstract:
Web templates are one of the main development resources for website engineers. Templates allow them to increase productivity by plugin content into already formatted and prepared pagelets. For the final user templates are also useful, because they provide uniformity and a common look and feel for all webpages. However, from the point of view of crawlers and indexers, templates are an important…
▽ More
Web templates are one of the main development resources for website engineers. Templates allow them to increase productivity by plugin content into already formatted and prepared pagelets. For the final user templates are also useful, because they provide uniformity and a common look and feel for all webpages. However, from the point of view of crawlers and indexers, templates are an important problem, because templates usually contain irrelevant information such as advertisements, menus, and banners. Processing and storing this information is likely to lead to a waste of resources (storage space, bandwidth, etc.). It has been measured that templates represent between 40% and 50% of data on the Web. Therefore, identifying templates is essential for indexing tasks. In this work we propose a novel method for automatic template extraction that is based on similarity analysis between the DOM trees of a collection of webpages that are detected using menus information. Our implementation and experiments demonstrate the usefulness of the technique.
△ Less
Submitted 8 January, 2015;
originally announced January 2015.
-
Automatic Detection of Webpages that Share the Same Web Template
Authors:
Julián Alarte,
David Insa,
Josep Silva,
Salvador Tamarit
Abstract:
Template extraction is the process of isolating the template of a given webpage. It is widely used in several disciplines, including webpages development, content extraction, block detection, and webpages indexing. One of the main goals of template extraction is identifying a set of webpages with the same template without having to load and analyze too many webpages prior to identifying the templa…
▽ More
Template extraction is the process of isolating the template of a given webpage. It is widely used in several disciplines, including webpages development, content extraction, block detection, and webpages indexing. One of the main goals of template extraction is identifying a set of webpages with the same template without having to load and analyze too many webpages prior to identifying the template. This work introduces a new technique to automatically discover a reduced set of webpages in a website that implement the template. This set is computed with an hyperlink analysis that computes a very small set with a high level of confidence.
△ Less
Submitted 9 September, 2014;
originally announced September 2014.
-
Improving Size-Change Analysis in Offline Partial Evaluation
Authors:
Michael Leuschel,
Salvador Tamarit,
German Vidal
Abstract:
Some recent approaches for scalable offline partial evaluation of logic programs include a size-change analysis for ensuring both so called local and global termination. In this work|inspired by experimental evaluation|we introduce several improvements that may increase the accuracy of the analysis and, thus, the quality of the associated specialized programs. We aim to achieve this while mainta…
▽ More
Some recent approaches for scalable offline partial evaluation of logic programs include a size-change analysis for ensuring both so called local and global termination. In this work|inspired by experimental evaluation|we introduce several improvements that may increase the accuracy of the analysis and, thus, the quality of the associated specialized programs. We aim to achieve this while maintaining the same complexity and scalability of the recent works.
△ Less
Submitted 12 March, 2009;
originally announced March 2009.