sempa 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sempa/__init__.py +18 -0
- sempa-0.1.0.dist-info/METADATA +110 -0
- sempa-0.1.0.dist-info/RECORD +5 -0
- sempa-0.1.0.dist-info/WHEEL +5 -0
- sempa-0.1.0.dist-info/top_level.txt +1 -0
sempa/__init__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SEMPA — Semantic Pattern Address SDK
|
|
3
|
+
Reference implementation of the MORPH semantic canonicalization standard.
|
|
4
|
+
|
|
5
|
+
MORPH is the standard. SEMPA is the implementation.
|
|
6
|
+
|
|
7
|
+
https://vrlg.tech
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
__version__ = "0.1.0"
|
|
11
|
+
__author__ = "Anton Kupreev"
|
|
12
|
+
__email__ = "antonio@vrlg.tech"
|
|
13
|
+
|
|
14
|
+
# Placeholder — full implementation coming in 0.2.0
|
|
15
|
+
# pip install sempa
|
|
16
|
+
|
|
17
|
+
def version():
|
|
18
|
+
return __version__
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sempa
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Semantic Pattern Address — reference implementation of the MORPH semantic canonicalization standard
|
|
5
|
+
Author-email: Anton Kupreev <antonio@vrlg.tech>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://vrlg.tech
|
|
8
|
+
Project-URL: Repository, https://github.com/kupreano/sempa
|
|
9
|
+
Project-URL: Documentation, https://app.vrlg.tech/morph-demo
|
|
10
|
+
Keywords: semantic,pattern,address,canonicalization,deduplication,code-analysis,morph,sempa
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# SEMPA — Semantic Pattern Address
|
|
25
|
+
|
|
26
|
+
**SEMPA** is the reference implementation of the **MORPH** semantic canonicalization standard.
|
|
27
|
+
|
|
28
|
+
> MORPH is the standard. SEMPA is the implementation.
|
|
29
|
+
|
|
30
|
+
## What is MORPH?
|
|
31
|
+
|
|
32
|
+
MORPH (Multidimensional Executable Patterns) is a semantic canonicalization standard that computes a language-independent **PatternAddress** for any function or program — based on its semantic structure, not its syntax.
|
|
33
|
+
|
|
34
|
+
Two functions that do the same thing, written differently or in different languages, get the same PatternAddress.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Python function
|
|
38
|
+
↓
|
|
39
|
+
SEMPA extractor
|
|
40
|
+
↓
|
|
41
|
+
PatternAddress: 0xa727d60b670188b9...
|
|
42
|
+
↓
|
|
43
|
+
Veralog attestation (Ed25519 signed, publicly verifiable)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Key Concepts
|
|
47
|
+
|
|
48
|
+
- **PatternAddress** — SHA3-256 of the canonical semantic representation. Language-independent.
|
|
49
|
+
- **SourceHash** — SHA-256 of the exact source text. Language-specific.
|
|
50
|
+
- **PatternFamily** — semantic category: Decision, PureFunction, StateMachine, Loop, etc.
|
|
51
|
+
|
|
52
|
+
## Status
|
|
53
|
+
|
|
54
|
+
Currently in early development (Alpha). Full SDK coming in 0.2.0.
|
|
55
|
+
|
|
56
|
+
Live demo: [app.vrlg.tech/morph-demo](https://app.vrlg.tech/morph-demo)
|
|
57
|
+
|
|
58
|
+
## Quick Start
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install sempa
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
import sempa
|
|
66
|
+
print(sempa.version()) # 0.1.0
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Full API (coming in 0.2.0):
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from sempa import analyze, attest
|
|
73
|
+
|
|
74
|
+
result = analyze("""
|
|
75
|
+
def approve_loan(credit_score: int, amount: float):
|
|
76
|
+
if credit_score >= 700 and amount > 0:
|
|
77
|
+
return "Approved"
|
|
78
|
+
return "Rejected"
|
|
79
|
+
""")
|
|
80
|
+
|
|
81
|
+
print(result.pattern_address) # 0x40f5d23e...
|
|
82
|
+
print(result.pattern_family) # Decision
|
|
83
|
+
print(result.source_hash) # 0x65593b32...
|
|
84
|
+
|
|
85
|
+
# Attest to Veralog (cryptographic proof)
|
|
86
|
+
proof = attest(result, api_key="vrlg_...")
|
|
87
|
+
print(proof.verify_url) # https://vrlg.tech/verify/.../page
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Architecture
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
MORPH Standard
|
|
94
|
+
└── SEMPA SDK (this package)
|
|
95
|
+
├── sempa.analyze() — compute PatternAddress
|
|
96
|
+
├── sempa.attest() — sign via Veralog
|
|
97
|
+
├── sempa.verify() — verify a PatternAddress
|
|
98
|
+
└── sempa.store — semantic deduplication store
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Links
|
|
102
|
+
|
|
103
|
+
- Standard: [MORPH](https://vrlg.tech)
|
|
104
|
+
- Attestation: [Veralog](https://vrlg.tech)
|
|
105
|
+
- Demo: [app.vrlg.tech/morph-demo](https://app.vrlg.tech/morph-demo)
|
|
106
|
+
- Issues: [github.com/kupreano/sempa](https://github.com/kupreano/sempa/issues)
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
Apache 2.0
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
sempa/__init__.py,sha256=PVyZY53Q9wWkmfh_y3Ui4PK4Ej1Rgq-Fqb-9NQU3DZg,391
|
|
2
|
+
sempa-0.1.0.dist-info/METADATA,sha256=KQy9byug_Z3bN9CkFVhu-GeUPIMZkWJx46WNsIRa2So,3495
|
|
3
|
+
sempa-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
4
|
+
sempa-0.1.0.dist-info/top_level.txt,sha256=3V6elTG__yjisTdoGELjj8owTzSfMq705xqmmzQlLCU,6
|
|
5
|
+
sempa-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sempa
|