{"id":34086870,"url":"https://github.com/chaturv3di/absynthe","last_synced_at":"2026-04-09T04:04:12.144Z","repository":{"id":34925186,"uuid":"181335535","full_name":"chaturv3di/absynthe","owner":"chaturv3di","description":"A (branching) Behaviour Synthesiser -- Simulates the generation of application or process logs, where multiple modules (or processes) can execute simultaneously, in a distributed deployment, and dump the log messages in an interleaved manner in a single log file. ","archived":false,"fork":false,"pushed_at":"2023-07-06T21:35:24.000Z","size":1435,"stargazers_count":8,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-16T16:26:10.310Z","etag":null,"topics":["control-flow-graph","data-generation","gitflow-workflow","labelled-data","log-analysis","log-generator","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaturv3di.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-14T16:14:22.000Z","updated_at":"2024-03-19T20:18:23.000Z","dependencies_parsed_at":"2022-09-26T16:20:22.864Z","dependency_job_id":null,"html_url":"https://github.com/chaturv3di/absynthe","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/chaturv3di/absynthe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaturv3di%2Fabsynthe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaturv3di%2Fabsynthe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaturv3di%2Fabsynthe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaturv3di%2Fabsynthe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaturv3di","download_url":"https://codeload.github.com/chaturv3di/absynthe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaturv3di%2Fabsynthe/sbom","scorecard":{"id":274967,"data":{"date":"2025-08-11","repo":{"name":"github.com/chaturv3di/absynthe","commit":"e2dcc97747ca6f17c4d39ae2cf16808751742d03"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T14:12:09.754Z","repository_id":34925186,"created_at":"2025-08-17T14:12:09.754Z","updated_at":"2025-08-17T14:12:09.754Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31584820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["control-flow-graph","data-generation","gitflow-workflow","labelled-data","log-analysis","log-generator","python3"],"created_at":"2025-12-14T13:34:15.717Z","updated_at":"2026-04-09T04:04:12.139Z","avatar_url":"https://github.com/chaturv3di.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://www.travis-ci.org/chaturv3di/absynthe.svg?branch=master)](https://www.travis-ci.org/chaturv3di/absynthe)\n\n# Absynthe: A (branching) Behavior Synthesizer\n\n## Motivation\n\nAbsynthe came about in response to the need for test data for analysizing the\nperformance and accuracy of log analysis algorithms. Even though plenty of real\nlife logs are available, e.g. `/var/log/` in unix-based laptops, they do not\nserve the purpose of test data. For that, we need to understand the core\napplication logic that is generating these logs.\n\nA more interesting situation arises while trying to test log analytic (and\nanomaly detection) solutions for distributed applications where multiple\nsources or modules emit their respective log messages in a single log queue or\nstream. This means that consecutive log lines could have originated from\ndifferent, unrelated application components. Absynthe provides _ground truth_\nmodels to simulate such situations.\n\nYou need Absynthe if you wish to simulate the behavior of any well defined \nprocess -- whether it's a computer application or a business process flow.\n\n## Overview\n\nEach business process or compuater application is modelled as a _control flow\ngraph_ (or _CFG_), which typically has one or more roots (i.e. entry) nodes and\nmultiple leaf (i.e. end) nodes.\n\n### Tree-like CFG\n\nAn example of a simple, tree-like CFG generated using Absynthe is shown below.\nThis is like a tree since nodes are laid out in levels, and nodes at level `i`\nhave outgoing edges only to nodes at level `i + 1`.\n\n\u003cimg src=\"imgs/02_exampleCFG.png\" width=\"1000\" align=\"middle\" /\u003e\n\nEach _behavior_ is the sequence of nodes encountered while traversing this CFG \nfrom a root to a leaf. Of course, a CFG might contain loops which could be\ntraversed multiple times before arriving at the leaf. Moreover, if there are\nmultiple CFGs, then Absynthe can synthesize _interleaved_ behaviors. This means\nthat a single sequence of nodes might contain nodes from multiple CFGs. We are \nultimately interested in this interleaving behavior, which is produced by\nmultiple CFGs.\n\n\u003cimg src=\"imgs/01_exampleBehavior.png\" width=\"750\" align=\"middle\" /\u003e\n\nThe above screenshot shows logs generated by Absynthe. Each log line starts\nwith a time stamp, followed by a session ID, CFG ID, and a log message. At\npresent, the log message is simply a random concatenation of the node ID to\nwhich the log message corresponds. A single CFG might participate in multiple\nsessions, where each session is a different traversal of the CFG. Therefore, we\nmaintain both session ID and CFG ID in the log line.\n\n### Directed Cyclic CFG\n\nAn example of a more complex CFG, a directed cyclic graph, is shown in the\nfigure below. It expands the tree-like graph illustrated above by:\n\n1. attaching loops on some of the nodes,\n2. constructing skip-level edges, i.e. edges from a node at level `i` to a\nnode at level \u0026ge;`(i + 2)`, and\n3. optionally, upward edges (not shown here), i.e. edges from a node at\nlevel `i` to a node at level \u0026le;`(i - 1)`.\n\n\u003cimg src=\"imgs/03_exampleDCG.png\" width=\"1000\" align=\"middle\" /\u003e\n\nThe identifiers of nodes appearing loops are helpfully prefixed with the\nidentifiers of nodes where these loops start and finish. Moreover, loops could\nbe traversed multiple times in a single behavior, as illustrated in the figure\nbelow.\n\n\u003cimg src=\"imgs/03_exampleLoop.png\" width=\"1000\" align=\"middle\" /\u003e\n\n## Installation\n\nThis package has been developed with `Python 3.6.*` and depends on `scipy 1.2.1`.\nThings might not work with `Python 3.7.*` or `scipy 1.3.*`. Therefore, consider\ncreating a virtual environment if your default configuration differs.\n\nThe latest release is available on PyPi, simply `pip install absynthe`. The\n`master` branch of this repository will always provide the latest release.\n\nFor the latest features not yet released, clone or download the `develop` branch\nand then:\n\n```bash\n# Change dir to absynthe\ncd /path/to/absynthe\n\n# Install dependencies\npip install -r requirements.txt\n\n# Install absynthe\npip install .\n```\n\n## Usage\n\nIt is possible to start using Absynthe with two classes:\n\n1. any concrete implementation of the abstract `GraphBuilder` class, which\ngenerates CFGs, and\n2. any concrete implementation of the abstract `Behavior` class, which\ntraverses the CFGs generated above and emits log messages.\n\nFor instance, consider the `basicLogGeneration` method in\n`./examples/01_generateSimpleBehavior.py`:\n\n```python3\nfrom absynthe.graph_builder import TreeBuilder\nfrom absynthe.behavior import MonospaceInterleaving\n\n\ndef basicLogGeneration(numRoots: int = 2, numLeaves: int = 4,\n                       branching: int = 2, numInnerNodes: int = 16,\n                       loggerNodeTypes: str = \"SimpleLoggerNode\"):\n    # Capture all the arguments required by GraphBuilder class\n    tree_kwargs = {TreeBuilder.KW_NUM_ROOTS: str(numRoots),\n                   TreeBuilder.KW_NUM_LEAVES: str(numLeaves),\n                   TreeBuilder.KW_BRANCHING_DEGREE: str(branching),\n                   TreeBuilder.KW_NUM_INNER_NODES: str(numInnerNodes),\n                   TreeBuilder.KW_SUPPORTED_NODE_TYPES: loggerNodeTypes}\n\n    # Instantiate a concrete GraphBuilder. Note that the\n    # generateNewGraph() method of this class returns a\n    # new, randomly generated graph that (more or less)\n    # satisfies all the parameters provided to the\n    # constructor, viz. tree_kwargs in the present case.\n    simpleTreeBuilder = TreeBuilder(**tree_kwargs)\n\n    # Instantiate a concrete behavior generator. Some\n    # behavior generators do not print unique session ID\n    # for each run, but it's nice to have those.\n    wSessionID: bool = True\n    exBehavior = MonospaceInterleaving(wSessionID)\n\n    # Add multiple graphs to this behavior generator. The\n    # behaviors that it will synthesize would essentially\n    # be interleavings of simultaneous traversals of all\n    # these graphs.\n    exBehavior.addGraph(simpleTreeBuilder.generateNewGraph())\n    exBehavior.addGraph(simpleTreeBuilder.generateNewGraph())\n    exBehavior.addGraph(simpleTreeBuilder.generateNewGraph())\n    exBehavior.addGraph(simpleTreeBuilder.generateNewGraph())\n\n    # Specify how many behaviors are to be synthesized,\n    # and get going.\n    numTraversalsOfEachGraph: int = 2\n    for logLine in exBehavior.synthesize(numTraversalsOfEachGraph):\n        print(logLine)\n    return\n```\n\nIn order to generate behaviors from a directed cyclic CFG, create a DCG as shown\nin `./examples/03_generateControlFlowDCG.py` and then generate behaviors after\nadding the DCG to a behavior object as shown in the code snippet above.\n\n**Note:** When generating a behavior, i.e. when traversing a graph, successors\nof nodes are chosen based on the probability distributions associated with those\nnodes. Different nodes rely on different distributions and these nodes are\nrandomly assigned in the graphs that are constructed by `generateNewGraph()`\nmethods, resulting in graphs with a mix of nodes.\n\n## Release Notes\n\n**Note:** This tool is still in alpha stage, so backward compatibility is not\nguaranteed between releases. However, inasmuch as users stick to graph builders'\n`generateNewGraph()` methods, they will stay away from compatibility problems.\n\n### Major changes in v0.0.2\n\n1. Added new graph builders, viz. `DAGBuilder` and  `DCGBuilder`, which build\nCFGs with skip-level edges and loops respectively.\n2. Added new node, viz. `BinomialNode`, which exploits the binomial distribution\nin order to select its successors at the time of graph traversal.\n3. Added a separate utility class called `Utils` in `absynthe.cfg.utils.py` to\ncreate a new `Node` object from any of the concrete implementations of `Node` at\nrandom. All concrete implementations of `Node` therefore transparently available\nto graph builders (and everyone else) through this utility.\n\n### Coming up in future releases\n\n1. Sophisticated interleaving behaviors\n2. Logger nodes that emit more _life like_ log messages\n3. *Anomalous* behaviors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaturv3di%2Fabsynthe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaturv3di%2Fabsynthe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaturv3di%2Fabsynthe/lists"}