{"id":22306181,"url":"https://github.com/renatahodovan/picireny","last_synced_at":"2025-07-13T01:05:44.972Z","repository":{"id":46319219,"uuid":"63473842","full_name":"renatahodovan/picireny","owner":"renatahodovan","description":"Hierarchical Delta Debugging Framework","archived":false,"fork":false,"pushed_at":"2024-12-20T09:06:08.000Z","size":358,"stargazers_count":59,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T16:03:32.860Z","etag":null,"topics":["antlr4","delta-debugging","hacktoberfest","test-automation","test-reduction"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renatahodovan.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.rst","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-16T08:41:56.000Z","updated_at":"2025-03-10T12:32:36.000Z","dependencies_parsed_at":"2023-02-10T08:31:46.424Z","dependency_job_id":"cea0565f-fc5d-4c7b-97b6-b107ee6a11d2","html_url":"https://github.com/renatahodovan/picireny","commit_stats":{"total_commits":209,"total_committers":5,"mean_commits":41.8,"dds":"0.32057416267942584","last_synced_commit":"896b308313ce1684c962ee9f423df19b3d1828cc"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatahodovan%2Fpicireny","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatahodovan%2Fpicireny/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatahodovan%2Fpicireny/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renatahodovan%2Fpicireny/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renatahodovan","download_url":"https://codeload.github.com/renatahodovan/picireny/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369953,"owners_count":20927928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antlr4","delta-debugging","hacktoberfest","test-automation","test-reduction"],"created_at":"2024-12-03T19:14:52.215Z","updated_at":"2025-04-05T17:03:41.708Z","avatar_url":"https://github.com/renatahodovan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"========\nPicireny\n========\n*Hierarchical Delta Debugging Framework*\n\n.. image:: https://img.shields.io/pypi/v/picireny?logo=python\u0026logoColor=white\n   :target: https://pypi.org/project/picireny/\n.. image:: https://img.shields.io/pypi/l/picireny?logo=open-source-initiative\u0026logoColor=white\n   :target: https://pypi.org/project/picireny/\n.. image:: https://img.shields.io/github/actions/workflow/status/renatahodovan/picireny/main.yml?branch=master\u0026logo=github\u0026logoColor=white\n   :target: https://github.com/renatahodovan/picireny/actions\n.. image:: https://img.shields.io/coveralls/github/renatahodovan/picireny/master?logo=coveralls\u0026logoColor=white\n   :target: https://coveralls.io/github/renatahodovan/picireny\n\n*Picireny* is a Python implementation of the Hierarchical Delta Debugging\n(HDD in short) algorithm adapted to use ANTLR_ v4 for parsing both the input\nand the grammar(s) describing the format of the input. It relies on Picire_\nto provide the implementation of the core Delta Debugging algorithm along\nwith various tweaks like parallelization. Just like the *Picire* framework,\n*Picireny* can also be used either as a command line tool or as a library.\n\nBoth Hierarchical Delta Debugging and Delta Debugging automatically reduce\n\"interesting\" tests while keeping their \"interesting\" behaviour. (E.g.,\n\"interestingness\" may mean failure-inducing input to a system-under-test.)\nHowever, HDD is an improvement that tries to investigate less test cases during\nthe reduction process by making use of knowledge on the structure of the input.\n\nThe tool (and the algorithm) works iteratively in several ways. As a first\nstep, it splits up the input into tokens and organizes them in a tree structure\nas defined by a grammar. Then, iteratively, it invokes Delta Debugging on each\nlevel of the tree from top to bottom, and DD is an iterative process itself,\ntoo. Finally, the nodes kept in the tree are \"unparsed\" to yield a reduced but\nstill \"interesting\" output.\n\n.. _ANTLR: http://www.antlr.org\n.. _Picire: https://github.com/renatahodovan/picire\n\n\nRequirements\n============\n\n* Python_ \u003e= 3.8\n* Java_ SE \u003e= 11 JRE or JDK (the latter is optional, only needed if Java is used\n  as the parser language)\n\n.. _Python: https://www.python.org\n.. _Java: https://www.oracle.com/java/\n\n\nInstall\n=======\n\nTo use *Picireny* in another project, it can be added to ``setup.cfg`` as an\ninstall requirement (if using setuptools_ with declarative config):\n\n.. code-block:: ini\n\n    [options]\n    install_requires =\n        picireny\n\nTo install *Picireny* manually, e.g., into a virtual environment, use pip_::\n\n    pip install picireny\n\nThe above approaches install the latest release of *Picireny* from PyPI_.\nAlternatively, for the development version, clone the project and perform a\nlocal install::\n\n    pip install .\n\n.. _setuptools: https://github.com/pypa/setuptools\n.. _pip: https://pip.pypa.io\n.. _PyPI: https://pypi.org/\n\n\nUsage\n=====\n\n*Picireny* uses the same CLI as *Picire* and hence accepts the same\noptions_.\nOn top of the inherited ones, *Picireny* accepts several further arguments:\n\n* ``--grammar`` (optional): List of grammars describing the input format. (You\n  can write them by hand or simply download them from the\n  `ANTLR v4 grammars repository`_.)\n* ``--start`` (optional): Name of the start rule (optionally prefixed with a\n  grammar name) as ``[grammarname:]rulename``.\n* ``--replacements`` (optional): Json file containing rule names and minimal\n  replacement strings (otherwise these are calculated automatically) (see\n  schema__).\n* ``--format`` (optional): Json file describing the input format (see schema__\n  and example_). This descriptor can incorporate all the above (``--grammar``,\n  ``--start`` and ``--replacements``) properties, along with the possibility of\n  island grammar definitions. If both ``--format`` and the aforementioned\n  arguments are present, then the latter will override the appropriate values of\n  the format file.\n* ``--antlr`` (optional): Path to the ANTLR tool jar.\n* ``--parser`` (optional): Language of the generated parser. Currently 'python'\n  (default) and 'java' targets (faster, but needs JDK) are supported.\n\nNote: although, all the arguments are optional, the grammar files and the start\nrule of the top-level parser must be defined with an arbitrary combination of the\n``--format``, ``--grammars``, and ``--start`` arguments.\n\n.. _options: https://github.com/renatahodovan/picire/tree/master/README.rst#usage\n.. _`ANTLR v4 grammars repository`: https://github.com/antlr/grammars-v4\n.. __: schemas/replacements.json\n.. __: schemas/format.json\n.. _example: tests/resources/inijson.json\n\nExample usage to reduce an HTML file::\n\n    picireny --input=\u003cpath/to/the/input.html\u003e --test=\u003cpath/to/the/tester\u003e \\\n             --grammar HTMLLexer.g4 HTMLParser.g4 --start htmlDocument \\\n             --parallel --subset-iterator=skip --complement-iterator=backward\n\n\nCompatibility\n=============\n\n*Picireny* was tested on:\n\n* Linux (Ubuntu 14.04 / 16.04 / 18.04 / 20.04)\n* OS X / macOS (10.11 / 10.12 / 10.13 / 10.14 / 10.15 / 11)\n* Windows (Server 2012 R2 / Server version 1809 / Windows 10)\n\n\nAcknowledgement and Citations\n=============================\n\n*Picireny* is motivated by the idea of Hierarchical Delta Debugging:\n\n* Ghassan Misherghi and Zhendong Su. HDD: Hierarchical Delta Debugging.\n  In Proceedings of the 28th International Conference on Software Engineering\n  (ICSE '06), pages 142-151, Shanghai, China, May 2006. ACM.\n  https://doi.org/10.1145/1134285.1134307\n\nThe details of the modernized re-implementation and further improvements are\npublished in:\n\n* Renata Hodovan and Akos Kiss. Modernizing Hierarchical Delta Debugging.\n  In Proceedings of the 7th International Workshop on Automating Test Case\n  Design, Selection, and Evaluation (A-TEST 2016), pages 31-37, Seattle,\n  Washington, USA, November 2016. ACM.\n  https://doi.org/10.1145/2994291.2994296\n* Renata Hodovan, Akos Kiss, and Tibor Gyimothy. Tree Preprocessing and Test\n  Outcome Caching for Efficient Hierarchical Delta Debugging.\n  In Proceedings of the 12th IEEE/ACM International Workshop on Automation of\n  Software Testing (AST 2017), pages 23-29, Buenos Aires, Argentina, May 2017.\n  IEEE.\n  https://doi.org/10.1109/AST.2017.4\n* Renata Hodovan, Akos Kiss, and Tibor Gyimothy. Coarse Hierarchical Delta\n  Debugging.\n  In Proceedings of the 33rd IEEE International Conference on Software\n  Maintenance and Evolution (ICSME 2017), pages 194-203, Shanghai, China,\n  September 2017. IEEE.\n  https://doi.org/10.1109/ICSME.2017.26\n* Akos Kiss, Renata Hodovan, and Tibor Gyimothy. HDDr: A Recursive Variant of\n  the Hierarchical Delta Debugging Algorithm.\n  In Proceedings of the 9th ACM SIGSOFT International Workshop on Automating\n  Test Case Design, Selection, and Evaluation (A-TEST 2018), pages 16-22, Lake\n  Buena Vista, Florida, USA, November 2018. ACM.\n  https://doi.org/10.1145/3278186.3278189\n* Daniel Vince, Renata Hodovan, Daniella Barsony, and Akos Kiss. Extending\n  Hierarchical Delta Debugging with Hoisting.\n  In Proceedings of the 2nd ACM/IEEE International Conference on Automation of\n  Software Test (AST 2021), pages 60-69, Madrid, Spain (Virtual), May 2021.\n  IEEE.\n  https://doi.org/10.1109/AST52587.2021.00015\n* Daniel Vince, Renata Hodovan, Daniella Barsony, and Akos Kiss. The effect of\n  hoisting on variants of Hierarchical Delta Debugging.\n  Journal of Software: Evolution and Process, 34(11):e2483,1-26, November 2022.\n  Wiley.\n  https://doi.org/10.1002/smr.2483\n\n\nCopyright and Licensing\n=======================\n\nLicensed under the BSD 3-Clause License_.\n\n.. _License: LICENSE.rst\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenatahodovan%2Fpicireny","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenatahodovan%2Fpicireny","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenatahodovan%2Fpicireny/lists"}