Skip to content

Commit

Permalink
Enable booster backend (#40)
Browse files Browse the repository at this point in the history
* Add `llvm-library` kompile target

* Enable booster

* Set Version: 0.1.34

* format

* Set Version: 0.1.36

---------

Co-authored-by: devops <[email protected]>
  • Loading branch information
bbyalcinkaya and devops authored Oct 22, 2024
1 parent 3b0992b commit c0e6284
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
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'))

0 comments on commit c0e6284

Please sign in to comment.