{"id":18422520,"url":"https://github.com/sri-csl/do-like-javac","last_synced_at":"2026-03-04T16:02:45.460Z","repository":{"id":4897503,"uuid":"52121605","full_name":"SRI-CSL/do-like-javac","owner":"SRI-CSL","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-10T20:27:34.000Z","size":247,"stargazers_count":6,"open_issues_count":1,"forks_count":22,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-07T15:44:17.988Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/SRI-CSL.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":"2016-02-19T22:48:42.000Z","updated_at":"2024-05-13T23:18:43.000Z","dependencies_parsed_at":"2023-01-11T16:37:05.535Z","dependency_job_id":null,"html_url":"https://github.com/SRI-CSL/do-like-javac","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SRI-CSL/do-like-javac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fdo-like-javac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fdo-like-javac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fdo-like-javac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fdo-like-javac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SRI-CSL","download_url":"https://codeload.github.com/SRI-CSL/do-like-javac/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fdo-like-javac/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30085825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-06T04:30:45.040Z","updated_at":"2026-03-04T16:02:45.436Z","avatar_url":"https://github.com/SRI-CSL.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"do-like-javac\n=============\n\n`do-like-javac` (or dljc for short) is a tool for monitoring the build process of\na Java project and recording information about what parameters were passed to `javac`\nfor the purpose of later analysis. It can also automate the running of various\nanalysis tools, including:\n\n* [Randoop](https://randoop.github.io/randoop/)\n* [Bixie](http://sri-csl.github.io/bixie/)\n* the [Checker Framework](https://checkerframework.org/)\n\n`do-like-javac` supports projects built with:\n\n* Apache Ant\n* Apache Maven\n* Gradle\n* Manual invocation of `javac`\n\nIf you have a project that builds through Eclipse that you want to analyze,\nEclipse can generate an Ant-compatible `build.xml` file by right-clicking the\nproject, selecting \"Export\" and choosing the \"Ant Buildfiles\" option.\n\nDependencies\n============\n\n* Python 3\n* The analysis tool(s) you want to run.\n* Any build dependencies of the project you're analyzing.\n\n`do-like-javac` was built and tested on Mac OS X and GNU/Linux. It may also\nwork on Microsoft Windows, but we provide no support.\n\nInstallation\n============\n\n    git clone https://github.com/SRI-CSL/do-like-javac.git\n\nThen symlink the `dljc` executable to somewhere in your $PATH, e.g.\n\n    ln -s /path/to/dljc $HOME/bin/dljc\n\nRunning\n=======\n\nFirst, make sure your project is in a clean state (e.g. via `ant clean`,\n`mvn clean`, etc.). Since `do-like-javac` monitors the build process and build\ntools skip already-built files, if you run `dljc` on an already-built project,\nyou won't get any results.\n\nNext, invoke `dljc` from the directory of the project you want to analyze:\n\n    dljc -o logs -- ant build\n\nWhere \"ant build\" is replaced by whatever command builds your project. Output\nwill be emitted to logs/toplevel.log\n\nYou may also run one or more checking tools on the discovered java files, by\ninvoking with the -t option and a comma separated list of tools to use (e.g.\n\"-t print\", \"-t randoop\" or \"-t print,randoop\").\n\nIf you're running checking tools, there are a couple more flags that may be\nhelpful. `--quiet` suppresses output from tools, and `--timeout \u003cseconds\u003e`\nkills any tool subcommand that runs longer than `\u003cseconds\u003e`.\n\nExtending\n===========\n\nInstructions for adding support for new tools or build systems to DLJC can be\nfound in [Extending.md](./Extending.md).\n\nCaching\n=======\n\n`do-like-javac` can only extract data from a full compile of a project. That means\nif you want to re-run it with new arguments or different analysis tools, you will\nhave to clean and fully re-compile the project. To save time and shortcut this\nprocess, we save a cache of the results in the output directory. If you want `dljc`\nto use this cache, simply add the `--cache` flag and the cache (if available) will\nbe used instead of recompiling the project.\n\n**IMPORTANT NOTE**: We don't do any sort of cache invalidation or freshness checking.\nIf you add new files to your project and want `dljc` to pick up on them, you will have\nto do a full clean and run `dljc` without the `--cache` flag.\n\nSupported Tools\n===============\n\nPrint\n-----\n\nThe print tool (`dljc -t print`) will pretty-print the detected `javac` commands, as well as any generated JAR files, and their entry points if applicable.\n\nBixie\n-----\n\nThe Bixie tool will run your project through [Bixie](http://sri-csl.github.io/bixie/). You will need to provide a library directory containing bixie.jar using the `--lib` option.\n\n    dljc --lib path/to/libs/ -t bixie -- mvn compile\n\nDyntrace\n---------\n\nThe Dyntrace tool will run your project through Randoop to generate tests, then run those tests with Daikon/Chicory to generate likely invariants. You will need to provide a library directory with the following jars using the `--lib` option:\n\n* randoop.jar\n* junit-4.12.jar\n* hamcrest-core-1.3.jar\n\nYou will also need Daikon built and installed somewhere, with the environment variable `DAIKONDIR` pointing to your installation.\n\n    dljc --lib path/to/libs/ -t dyntrace -- mvn compile\n\nChecker Framework whole-program inference\n---------\n\nThe Checker Framework's whole-program inference tool will iteratively type-check your\nprogram using the specified Checker Framework checker until the set of annotations reaches\na fix-point (note that this process may not terminate). You will need the Checker Framework's\n`checker.jar` file. An example of invoking this tool might look like this:\n\n    dljc --lib path/to/checker.jar -t wpi --checker org.checkerframework.checker.nullness.NullnessChecker -- ./gradlew compileJava\n\nThe `--checker` option is usually required. Its argument is the name(s) of the checker you want to run, separated by commas\n(identically to the standard syntax used by the -processor argument to javac). If no `--checker` argument is supplied,\nthen the classpath will be searched for annotation processors using javac's standard annotation processor discovery\nmechanism; from the javac documentation:\n\u003e The search path can be specified with the -processorpath option. If no path is specified, then the user\n\u003e class path is used. Processors are located by means of service provider-configuration files named\n\u003e `META-INF/services/javax.annotation.processing.Processor` on the search path. Such files should\n\u003e contain the names of any annotation processors to be used, listed one per line.\n\nThis tool also supports some other tool-specific optional arguments:\n* `--stubs /path/to/stubs` tells the checker to run with the specified stub files.\n* `--ajava /path/to/ajava` tells the checker to run with the specified ajava files.\n* `--jdkVersion 8/11/17` tells the Checker Framework to run using JDK8, JDK11, or JDK17..\n* `--quals /path/to/qual.jar` tells the Checker Framework where to find qualifiers (annotations) to put on the classpath.\n* `--extraJavacArgs='-AcustomArg1 -AcustomArg2'` passes the given arguments to invocations of `javac` that run\n  a Checker Framework checker as an annotation processor (i.e., the arguments are NOT passed to the `javac` used while\n  building the target project without running the analysis). This option is intended for Checker Framework options,\n  such as `-AassumeSideEffectFree` or\n  [others documented in the Checker Framework manual](https://checkerframework.org/manual/#checker-options), but you\n  can also use it to pass standard `javac` options (e.g. [those documented by Oracle](\n  https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html)).\n\nLICENSE\n=======\n\nParts of the code in this project were taken from the Facebook Infer project.\nFiles containing such code have Facebook copyright notices at the top and are\nlicensed under the terms laid out in LICENSE_Facebook.\n\nThe rest of the project is licensed under the BSD license under the terms laid\nout in LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsri-csl%2Fdo-like-javac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsri-csl%2Fdo-like-javac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsri-csl%2Fdo-like-javac/lists"}