fix: size_t + Windows DLL path for Layer 1 falsifier
Browse files- include/sovereign_export.h +1 -0
- tests/.pytest_cache/.gitignore +2 -0
- tests/.pytest_cache/CACHEDIR.TAG +4 -0
- tests/.pytest_cache/README.md +8 -0
- tests/.pytest_cache/v/cache/nodeids +18 -0
- tests/.pytest_cache/v/cache/stepwise +1 -0
- tests/__pycache__/__init__.cpython-312.pyc +0 -0
- tests/__pycache__/falsify_properties.cpython-312-pytest-8.3.5.pyc +0 -0
- tests/falsify_properties.py +19 -1
include/sovereign_export.h
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
#pragma once
|
|
|
|
| 2 |
// C export layer — lets Python ctypes / Rust FFI call the C++20 kernels
|
| 3 |
// without name-mangling. Every function here maps to a theorem in ArrayLang/.
|
| 4 |
|
|
|
|
| 1 |
#pragma once
|
| 2 |
+
#include <stddef.h>
|
| 3 |
// C export layer — lets Python ctypes / Rust FFI call the C++20 kernels
|
| 4 |
// without name-mangling. Every function here maps to a theorem in ArrayLang/.
|
| 5 |
|
tests/.pytest_cache/.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Created by pytest automatically.
|
| 2 |
+
*
|
tests/.pytest_cache/CACHEDIR.TAG
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Signature: 8a477f597d28d172789f06886806bc55
|
| 2 |
+
# This file is a cache directory tag created by pytest.
|
| 3 |
+
# For information about cache directory tags, see:
|
| 4 |
+
# https://bford.info/cachedir/spec.html
|
tests/.pytest_cache/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# pytest cache directory #
|
| 2 |
+
|
| 3 |
+
This directory contains data from the pytest's cache plugin,
|
| 4 |
+
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.
|
| 5 |
+
|
| 6 |
+
**Do not** commit this to version control.
|
| 7 |
+
|
| 8 |
+
See [the docs](https://docs.pytest.org/en/stable/how-to/cache.html) for more information.
|
tests/.pytest_cache/v/cache/nodeids
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
"falsify_properties.py::TestBroadcast::test_broadcast_1d_pointwise",
|
| 3 |
+
"falsify_properties.py::TestPaperIII_Attention::test_attention_matches_reference",
|
| 4 |
+
"falsify_properties.py::TestPaperIII_Attention::test_attention_output_size",
|
| 5 |
+
"falsify_properties.py::TestPaperIII_Attention::test_attention_uniform_k_is_constant",
|
| 6 |
+
"falsify_properties.py::TestPaperII_Simplex::test_face_centroid_sums_to_one",
|
| 7 |
+
"falsify_properties.py::TestPaperII_Simplex::test_face_centroid_support_matches",
|
| 8 |
+
"falsify_properties.py::TestPaperII_Simplex::test_softmax_all_positive",
|
| 9 |
+
"falsify_properties.py::TestPaperII_Simplex::test_softmax_matches_reference",
|
| 10 |
+
"falsify_properties.py::TestPaperII_Simplex::test_softmax_shift_invariant",
|
| 11 |
+
"falsify_properties.py::TestPaperII_Simplex::test_softmax_sums_to_one",
|
| 12 |
+
"falsify_properties.py::TestPaperII_Simplex::test_vertex_centroid_is_indicator",
|
| 13 |
+
"falsify_properties.py::TestPaperI_NAND::test_and_via_nand",
|
| 14 |
+
"falsify_properties.py::TestPaperI_NAND::test_demorgan",
|
| 15 |
+
"falsify_properties.py::TestPaperI_NAND::test_nand_truth_table",
|
| 16 |
+
"falsify_properties.py::TestPaperI_NAND::test_not_via_nand",
|
| 17 |
+
"falsify_properties.py::TestPaperI_NAND::test_or_via_nand"
|
| 18 |
+
]
|
tests/.pytest_cache/v/cache/stepwise
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[]
|
tests/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (159 Bytes). View file
|
|
|
tests/__pycache__/falsify_properties.cpython-312-pytest-8.3.5.pyc
ADDED
|
Binary file (40.5 kB). View file
|
|
|
tests/falsify_properties.py
CHANGED
|
@@ -25,8 +25,26 @@ from hypothesis import strategies as st
|
|
| 25 |
|
| 26 |
# ── Load the shared library ───────────────────────────────────────────────────
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
def _load_lib():
|
| 29 |
-
repo = pathlib.Path(__file__).parent.parent
|
| 30 |
candidates = [
|
| 31 |
repo / "build" / "libsovereign_array.so",
|
| 32 |
repo / "build" / "libsovereign_array.dll",
|
|
|
|
| 25 |
|
| 26 |
# ── Load the shared library ───────────────────────────────────────────────────
|
| 27 |
|
| 28 |
+
def _add_dll_dirs():
|
| 29 |
+
"""Add MinGW/Strawberry runtime dirs so ctypes can resolve DLL deps on Windows."""
|
| 30 |
+
for d in [
|
| 31 |
+
r"C:\Strawberry\c\bin",
|
| 32 |
+
r"C:\Program Files\mingw64\bin",
|
| 33 |
+
r"C:\mingw64\bin",
|
| 34 |
+
r"C:\msys64\mingw64\bin",
|
| 35 |
+
]:
|
| 36 |
+
if os.path.isdir(d):
|
| 37 |
+
try:
|
| 38 |
+
os.add_dll_directory(d)
|
| 39 |
+
except AttributeError:
|
| 40 |
+
pass # Python < 3.8
|
| 41 |
+
|
| 42 |
+
if os.name == "nt":
|
| 43 |
+
_add_dll_dirs()
|
| 44 |
+
|
| 45 |
+
|
| 46 |
def _load_lib():
|
| 47 |
+
repo = pathlib.Path(__file__).resolve().parent.parent
|
| 48 |
candidates = [
|
| 49 |
repo / "build" / "libsovereign_array.so",
|
| 50 |
repo / "build" / "libsovereign_array.dll",
|