-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes: #3869 Please let me know if I missed something. This will be added to every -kompiled dir.
- Loading branch information
1 parent
a4e9877
commit 5c7ea35
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
kernel/src/main/resources/org/kframework/utils/file/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. | ||
--- | ||
|
||
Description of files contained in the `-kompiled` directory. | ||
While most files are binaries, some are user readable and contain useful debugging information. | ||
Most notably `parsed.txt` and `compiled.txt`. | ||
|
||
Some temporary files can also be inspected by running the tools with `--debug`, `--temp-dir <dir>` | ||
or `--save-temps`. Users are encouraged to use the PYK library to efficiently interact with these | ||
files. | ||
|
||
List of files: | ||
- `parsed.txt` - user readable definition as seen by kompile immediately after parsing. | ||
- `compiled.txt` - user readable definition after all the kompile steps have been applied. Variable | ||
renaming, configuration concretization, macro expansion, extra sorts and rules... This is | ||
what the backend will take as input. | ||
- `parsed.json`, `compiled.json` - same as above but as JSON. Useful for loading into pyk. | ||
Generated when `--emit-json` is provided. | ||
- `definition.kore` - the actual input for the backends - a close reflection of compiled.txt | ||
- helper files for the scripts: | ||
- `backend.txt` - the backend used to kompile: haskell|llvm | ||
- `mainModule.txt` - main module name | ||
- `mainSyntaxModule.txt` - main syntax module name | ||
- `allRules.txt` - a hash list for all the rules | ||
- `configVars.sh` - the list of configuration variables, used by krun to initialize the config | ||
- `macros.kore` - macros to apply after parsing | ||
- `cache.bin` - parsing cache. A mapping from bubble to the AST returned by the parser. On | ||
subsequent kompile calls only the newly modified rules will be parsed. This is the main file | ||
used by the KLSP to find occurrences and go to definition. | ||
- `compiled.bin` - the entire definition as a binary dump from Java. Used by `kprove`. | ||
- `scanner` - the tokenizer used by the parser. | ||
- `timestamp` - used by make to determine if it needs to rekompile. | ||
- `haskellDefintion.bin` - haskell backend only. Binary format of definition.kore for efficient | ||
loading in the backend. | ||
- `interpreter` - llvm backend only. Executable called by krun for concrete execution. | ||
- `dt` folder - llvm temporary files to calculate the decision tree fast matching algorithm. | ||
- `kore-exec.tar.gz` - archive with the input of the haskell backend in case it crashes. Useful | ||
for submitting bug reports. | ||
|
||
Note 1: right now, we need to kompile the definition separately for each backend because the | ||
compilation pipeline is very rigid. The differences between the backends start right from the very | ||
first step, choosing what modules to include. That affects the syntax/functions/hooks available | ||
in your definition, and mixing those can cause the backends to crash or, worse, give unsound | ||
results. | ||
|
||
Note 2: the content and the format of these files are subject to change without warning and they | ||
should not be relied on for automation outside of what is already tested on CI. |