Skip to content

Commit

Permalink
Merge branch 'develop' into _update-deps/runtimeverification/llvm-bac…
Browse files Browse the repository at this point in the history
…kend
  • Loading branch information
Baltoli authored Jun 24, 2024
2 parents 68a99e5 + 78a82dc commit 3f52466
Show file tree
Hide file tree
Showing 35 changed files with 627 additions and 448 deletions.
2 changes: 1 addition & 1 deletion deps/haskell-backend_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.14
v0.1.19
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
description = "K Framework";
inputs = {
haskell-backend.url = "github:runtimeverification/haskell-backend/v0.1.14";
haskell-backend.url = "github:runtimeverification/haskell-backend/v0.1.19";
nixpkgs.follows = "llvm-backend/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
llvm-backend = {
Expand Down
2 changes: 1 addition & 1 deletion haskell-backend/src/main/native/haskell-backend
Submodule haskell-backend updated 36 files
+59 −1 .github/workflows/release.yml
+4 −1 .github/workflows/test.yml
+2 −2 booster/library/Booster/CLOptions.hs
+22 −22 booster/library/Booster/JsonRpc.hs
+121 −68 booster/library/Booster/Log.hs
+37 −39 booster/library/Booster/Pattern/ApplyEquations.hs
+18 −28 booster/library/Booster/Pattern/Rewrite.hs
+9 −9 booster/library/Booster/SMT/Interface.hs
+1 −1 booster/package.yaml
+30 −0 booster/test/rpc-integration/test-log-simplify-json/simplify-log.txt.golden
+1 −1 booster/test/rpc-integration/test-log-simplify-json/test.sh
+52 −56 booster/tools/booster/Proxy.hs
+22 −19 booster/tools/booster/Server.hs
+21 −4 booster/tools/booster/Stats.hs
+2 −2 dev-tools/booster-dev/Server.hs
+35 −2 dev-tools/count-aborts/Main.hs
+4 −4 dev-tools/kore-rpc-dev/Server.hs
+2 −1 dev-tools/package.yaml
+4 −1 kore-rpc-types/kore-rpc-types.cabal
+179 −0 kore-rpc-types/src/Kore/JsonRpc/Types/ContextLog.hs
+2 −1 kore/kore.cabal
+2 −1 kore/src/Kore/Log/DebugAppliedRewriteRules.hs
+122 −0 kore/src/Kore/Log/DebugRewriteRulesRemainder.hs
+4 −0 kore/src/Kore/Log/Registry.hs
+2 −0 kore/src/Kore/Rewrite/RewriteStep.hs
+1 −1 kore/src/Log/Entry.hs
+21 −0 package/debian/build-package
+5 −0 package/debian/changelog
+1 −0 package/debian/compat.jammy
+16 −0 package/debian/control.jammy
+34 −0 package/debian/copyright
+0 −0 package/debian/k-haskell-backend-docs.docs
+17 −0 package/debian/rules.jammy
+1 −0 package/debian/source/format
+1 −1 package/version
+1 −0 package/version.sh
5 changes: 4 additions & 1 deletion pyk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ profile: poetry-install
# Checks and formatting

format: autoflake isort black
check: check-flake8 check-mypy check-autoflake check-isort check-black
check: check-flake8 check-mypy check-autoflake check-isort check-pydocstyle check-black

check-flake8: poetry-install
$(POETRY_RUN) flake8 src
Expand All @@ -87,6 +87,9 @@ isort: poetry-install
check-isort: poetry-install
$(POETRY_RUN) isort --check src

check-pydocstyle:
$(POETRY_RUN) pydocstyle src

black: poetry-install
$(POETRY_RUN) black src

Expand Down
3 changes: 2 additions & 1 deletion pyk/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx_rtd_theme',
]
templates_path = ['_templates']
exclude_patterns = []
Expand All @@ -34,5 +35,5 @@
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
2 changes: 1 addition & 1 deletion pyk/docs/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ source $VENV_DIR/bin/activate

pip install --upgrade pip
pip install --editable $PYK_DIR
pip install sphinx==$SPHINX_VERSION
pip install sphinx==$SPHINX_VERSION sphinx_rtd_theme

# Generate and install _kllvm
PYTHON_LIB=$(find $VENV_DIR -name 'site-packages' -type d)
Expand Down
37 changes: 30 additions & 7 deletions pyk/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pyk/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
description = "Application packaged using poetry2nix";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
rv-utils.url = "github:runtimeverification/rv-nix-tools";
nixpkgs.follows = "rv-utils/nixpkgs";
poetry2nix = {
url =
"github:nix-community/poetry2nix/626111646fe236cb1ddc8191a48c75e072a82b7c";
Expand All @@ -11,7 +12,7 @@
flake-utils.follows = "poetry2nix/flake-utils";
};

outputs = { self, nixpkgs, flake-utils, poetry2nix }:
outputs = { self, nixpkgs, flake-utils, rv-utils, poetry2nix }:
{
# Nixpkgs overlay providing the application
overlay = final: prev:
Expand Down
30 changes: 29 additions & 1 deletion pyk/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions pyk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ flake8-type-checking = "*"
isort = "*"
mypy = "*"
pep8-naming = "*"
pydocstyle = "*"
pytest = "*"
pytest-cov = "*"
pytest-mock = "*"
Expand All @@ -58,6 +59,11 @@ kore-exec-covr = "pyk.kore_exec_covr.__main__:main"
[tool.poetry.plugins.pytest11]
pytest-pyk = "pyk.testing.plugin"

[tool.pydocstyle]
convention = "google"
add-select = "D204,D401,D404"
add-ignore = "D1"

[tool.isort]
profile = "black"
line_length = 120
Expand Down
6 changes: 3 additions & 3 deletions pyk/src/pyk/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ def pretty_print_execute_response(execute_result: ExecuteResult) -> list[str]:


def exec_rpc_kast(options: RPCKastOptions) -> None:
"""
Convert an 'execute' JSON RPC response to a new 'execute' or 'simplify' request,
copying parameters from a reference request.
"""Convert an 'execute' JSON RPC response to a new 'execute' or 'simplify' request.
Copies parameters from a reference request.
"""
reference_request = json.loads(options.reference_request_file.read())
input_dict = json.loads(options.response_file.read())
Expand Down
38 changes: 18 additions & 20 deletions pyk/src/pyk/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
def get_rule_by_id(definition: KDefinition, rule_id: str) -> KRule:
"""Get a rule from the definition by coverage rule id.
Input:
Args:
definition: JSON-encoded definition.
rule_id: String of unique rule identifier generated by `kompile --coverage`.
- definition: json encoded definition.
- rule_id: string of unique rule identifier generated by `kompile --coverage`.
Output: json encoded rule which has identifier rule_id.
Returns:
JSON encoded rule which has identifier `rule_id`.
"""

for module in definition.modules:
for sentence in module.sentences:
if type(sentence) is KRule:
Expand Down Expand Up @@ -52,16 +51,15 @@ def translate_coverage(
) -> list[str]:
"""Translate the coverage data from one kompiled definition to another.
Input:
- src_all_rules: contents of allRules.txt for definition which coverage was generated for.
- dst_all_rules: contents of allRules.txt for definition which you desire coverage for.
- dst_definition: JSON encoded definition of dst kompiled definition.
- src_rules_list: Actual coverage data produced.
Args:
src_all_rules: Contents of allRules.txt for definition which coverage was generated for.
dst_all_rules: Contents of allRules.txt for definition which you desire coverage for.
dst_definition: JSON encoded definition of dst kompiled definition.
src_rules_list: Actual coverage data produced.
Output: list of non-functional rules applied in dst definition translated from src definition.
Returns:
List of non-functional rules applied in dst definition translated from src definition.
"""

# Load the src_rule_id -> src_source_location rule map from the src kompiled directory
src_rule_map = {}
for line in src_all_rules:
Expand Down Expand Up @@ -110,13 +108,13 @@ def translate_coverage(
def translate_coverage_from_paths(src_kompiled_dir: str, dst_kompiled_dir: str, src_rules_file: PathLike) -> list[str]:
"""Translate coverage information given paths to needed files.
Input:
- src_kompiled_dir: Path to kompiled directory of source.
- dst_kompiled_dir: Path to kompiled directory of destination.
- src_rules_file: Path to generated rules coverage file.
Args:
src_kompiled_dir: Path to kompiled directory of source.
dst_kompiled_dir: Path to kompiled directory of destination.
src_rules_file: Path to generated rules coverage file.
Output: Translated list of rules with non-semantic rules stripped out.
Returns:
Translated list of rules with non-semantic rules stripped out.
"""
src_all_rules = []
with open(src_kompiled_dir + '/allRules.txt') as src_all_rules_file:
Expand Down
Loading

0 comments on commit 3f52466

Please sign in to comment.