Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable booster backend #40

Merged
merged 7 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.35
0.1.36
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "komet"
version = "0.1.35"
version = "0.1.36"
description = "K tooling for the Soroban platform"
authors = [
"Runtime Verification, Inc. <[email protected]>",
Expand Down
13 changes: 12 additions & 1 deletion src/komet/kdist/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from pyk.kbuild.utils import k_version
from pyk.kdist.api import Target
from pyk.ktool.kompile import kompile
from pyk.ktool.kompile import LLVMKompileType, kompile

if TYPE_CHECKING:
from collections.abc import Callable, Mapping
Expand Down Expand Up @@ -56,6 +56,17 @@ def deps(self) -> tuple[str]:
'warnings_to_errors': True,
},
),
'llvm-library': KompileTarget(
lambda src_dir: {
'backend': 'llvm',
'llvm_kompile_type': LLVMKompileType.C,
'main_file': src_dir / 'soroban-semantics/kasmer.md',
'syntax_module': 'KASMER-SYNTAX',
'include_dirs': [src_dir],
'md_selector': 'k',
'warnings_to_errors': True,
},
),
'haskell': KompileTarget(
lambda src_dir: {
'backend': 'haskell',
Expand Down
3 changes: 2 additions & 1 deletion src/komet/proof.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pyk.kcfg.semantics import DefaultSemantics
from pyk.proof import APRProof, APRProver

from .utils import symbolic_definition
from .utils import library_definition, symbolic_definition

if TYPE_CHECKING:
from collections.abc import Iterator
Expand All @@ -23,6 +23,7 @@ def _explore_context(id: str, bug_report: BugReport | None) -> Iterator[KCFGExpl
with cterm_symbolic(
definition=symbolic_definition.kdefinition,
definition_dir=symbolic_definition.path,
llvm_definition_dir=library_definition.path,
id=id if bug_report else None,
bug_report=bug_report,
) as cts:
Expand Down
1 change: 1 addition & 0 deletions src/komet/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ def krun_with_kast(self, pgm: KInner, sort: KSort | None = None, **kwargs: Any)


concrete_definition = SorobanDefinition(kdist.get('soroban-semantics.llvm'))
library_definition = SorobanDefinition(kdist.get('soroban-semantics.llvm-library'))
symbolic_definition = SorobanDefinition(kdist.get('soroban-semantics.haskell'))
Loading