MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / kernel

Method kernel

lean_py/project.py:138–148  ·  view source on GitHub ↗

Build and return a :class:`Kernel` backed by this project.

(self)

Source from the content-addressed store, hash-verified

136 return LeanLibrary.from_lake(self._dir, "Managed", build=True)
137
138 def kernel(self) -> Kernel:
139 """Build and return a :class:`Kernel` backed by this project."""
140 lib = self.library()
141 k = Kernel(lib)
142 sp = run_command(
143 ["lake", "env", "printenv", "LEAN_PATH"],
144 cwd=str(self._dir),
145 )
146 k.init_search(sp)
147 k.load(["Init", "LeanPy.Z3"])
148 return k
149
150 @property
151 def path(self) -> Path:

Callers 2

_get_kernelFunction · 0.80
setup_kernelFunction · 0.80

Calls 5

libraryMethod · 0.95
init_searchMethod · 0.95
loadMethod · 0.95
KernelClass · 0.90
run_commandFunction · 0.90

Tested by

no test coverage detected