mirror of
https://github.com/allaunthefox/BioSight.git
synced 2026-07-31 03:05:22 +00:00
- Aligned layer naming and numbering (1 to 4) with the formal Lean specifications in SilverSight. - Implemented phi.silversight to verify rule ordering, N=8 necessity, and Lean compilation status. - Integrated SilverSight validation checks into equation_dna_encoder.py and rigour_pipeline.py. Build: 3307 jobs, 0 errors (lake build)
23 lines
950 B
Python
23 lines
950 B
Python
"""
|
|
phi — SilverSight Equation-to-DNA Φ Encoding Pipeline
|
|
|
|
Independent modules, each reusable without the others:
|
|
|
|
charclass Layer 1: byte-class frequencies on Δ₇ (bases 0-7)
|
|
ast_parse Layer 2 & 3: AST parsing → τ (Layer 2, bases 8-15) and δ (Layer 3, bases 16-23)
|
|
consistency Layer 4: 6 consistency rules (bases 24-29) → ADMIT/QUARANTINE
|
|
embed Core Φ: (F, τ, δ) → 30-base hachimoji DNA sequence
|
|
output FASTQ, Adleman graph, PCR primer protocol
|
|
|
|
Usage:
|
|
from phi import encode_phi
|
|
result = encode_phi("d_F(p,q) = 2*arccos(sum(sqrt(p_i*q_i)))")
|
|
print(result["dna_sequence"])
|
|
"""
|
|
|
|
from .embed import encode_phi
|
|
from .output import to_fastq, to_adleman_graph, design_filtering_protocol, PRIMER_DESIGN
|
|
from .charclass import compute_F
|
|
from .ast_parse import compute_tau, compute_delta
|
|
from .consistency import check_consistency, CONSISTENCY_RULES
|
|
from .silversight import verify_pipeline_receipt
|