A revolutionary programming language for scientific computing with parallel execution and uncertainty quantification
Project description
Synapse Programming Language
Created by Michael Benjamin Crowe
A proprietary programming language designed for deep scientific reasoning and enhanced parallel thought processing pipelines.
Dark / light adaptive inline logo example:
<picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MichaelCrowe11/synapse-lang/master/branding/dark-inline.svg"> <img alt="Synapse-Lang" width="140" src="https://raw.githubusercontent.com/MichaelCrowe11/synapse-lang/master/branding/light-inline.svg" /> </picture>
Overview
Synapse is a domain-specific language that combines:
- Parallel execution streams for simultaneous hypothesis testing
- Uncertainty quantification built into the type system
- Scientific reasoning chains with formal logic constructs
- Native tensor operations for high-dimensional data
- Hypothesis-driven programming paradigm
Key Features
1. Uncertainty-Aware Computing
uncertain measurement = 42.3 ± 0.5
uncertain temperature = 300 ± 10
// Uncertainty propagates automatically through calculations
2. Parallel Thought Streams
parallel {
branch A: test_hypothesis_1()
branch B: test_hypothesis_2()
branch C: control_experiment()
}
3. Reasoning Chains
reason chain ScientificMethod {
premise P1: "Observable phenomenon exists"
derive D1 from P1: "Hypothesis can be formed"
conclude: D1 => "Experiment validates or refutes"
}
Project Structure
synapse-lang/
├── LANGUAGE_SPEC.md # Complete language specification
├── synapse_interpreter.py # Core interpreter implementation
├── test_synapse.py # Test suite
├── examples/
│ ├── quantum_simulation.syn # Quantum mechanics example
│ ├── climate_model.syn # Climate modeling example
│ └── drug_discovery.syn # Drug discovery pipeline
└── README.md # This file
Running Tests
cd synapse-lang
python test_synapse.py
Example Programs
Quantum Simulation
Demonstrates parallel evolution of quantum states with uncertainty:
experiment DoubleSlitSimulation {
parallel {
branch slit_A: evolve_wavefunction(path="A")
branch slit_B: evolve_wavefunction(path="B")
}
synthesize: compute_interference(slit_A, slit_B)
}
Climate Modeling
Complex system analysis with ensemble runs:
parallel {
branch RCP2.6: model_pathway(emissions="low")
branch RCP4.5: model_pathway(emissions="moderate")
branch RCP8.5: model_pathway(emissions="high")
}
Drug Discovery
Molecular simulation pipeline with parallel screening:
pipeline DrugDiscovery {
stage VirtualScreening parallel(64) {
fork {
path ligand_docking: autodock_vina
path ml_prediction: graph_neural_network
}
}
}
Implementation Status
✅ Completed:
- Basic lexer/tokenizer
- Token types for scientific operators
- Uncertain value arithmetic with error propagation
- Parallel execution framework
- Variable storage and retrieval
- Example scientific programs
🚧 In Progress:
- Full parser implementation
- Advanced reasoning chains
- Tensor operations
- Symbolic mathematics
- Pipeline execution
Design Philosophy
Synapse is designed to express scientific thinking naturally:
- Hypothesis-first: Start with assumptions, derive conclusions
- Parallel exploration: Test multiple theories simultaneously
- Uncertainty-native: Propagate measurement errors automatically
- Reasoning chains: Build formal logical arguments
- Pipeline-oriented: Structure complex workflows
Branding & Assets
The project now includes an initial logo/identity kit (v1) under branding/LOGO_KIT.html featuring:
- Synapse‑Lang horizontal + stacked lockups
- Icon-only badge (simplified path & nodes)
- Favicon simplification (no ± token for clarity at 16–32px)
- Seed marks for Qubit‑Flow and QNet (shared gradient family; QNet uses emerald accent)
- Palette & typography reference (Inter + JetBrains Mono)
Quick Usage (Markdown badge / inline HTML)
<!-- Inline SVG icon example -->
<svg width="20" height="20" viewBox="0 0 256 256" aria-hidden="true">
<defs>
<linearGradient id="synG" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#43E5FF"/>
<stop offset="100%" stop-color="#7A5CFF"/>
</linearGradient>
</defs>
<path d="M64 56 C128 56, 128 120, 192 120 C224 120, 224 160, 192 176 C160 192, 112 184, 88 208" fill="none" stroke="url(#synG)" stroke-width="18" stroke-linecap="round"/>
<circle cx="64" cy="56" r="16" fill="#0B0F14"/>
<circle cx="192" cy="120" r="16" fill="#0B0F14"/>
<circle cx="88" cy="208" r="16" fill="#0B0F14"/>
</svg>
<span style="font:600 14px 'JetBrains Mono', monospace; vertical-align:middle;">Synapse‑Lang</span>
Guidelines: keep gradient stroke, avoid arbitrary recoloring of node fills except to invert for dark backgrounds; maintain minimum horizontal lockup width of 160px or switch to icon.
Asset Inventory
branding/light-inline.svg– Inline horizontal lockup (light / default)branding/dark-inline.svg– Inline horizontal lockup tuned for dark backgroundsbranding/LOGO_KIT.html– Interactive reference + download kitscripts/optimize_svgs.py– Batch optimizer (usessvgoif available, else trims whitespace)
Optimizing SVG Assets
Optional deep optimization via svgo (Node.js). Fallback lightweight trim always works.
Install (optional):
npm install -g svgo
Run optimization (auto-modifies files):
python -m synapse_lang.scripts.optimize_svgs
CI / check mode (fails if further optimization possible):
python -m synapse_lang.scripts.optimize_svgs --check
Output lists per-file bytes saved plus total.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synapse_lang-2.0.0.tar.gz.
File metadata
- Download URL: synapse_lang-2.0.0.tar.gz
- Upload date:
- Size: 268.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76e287a5220fae61c813ea1e21e7b7b12c3256eb19bebb8f384c787ff58d5038
|
|
| MD5 |
d53cfae6cef6285aeeeef7916a9c9d90
|
|
| BLAKE2b-256 |
c7426182f904e32b40ae181e1c4dc2223287457c743617938d072c5dad39b403
|
File details
Details for the file synapse_lang-2.0.0-py3-none-any.whl.
File metadata
- Download URL: synapse_lang-2.0.0-py3-none-any.whl
- Upload date:
- Size: 138.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f0e9faee8f47b9df393a202580bb77c572a65368e6e17c5e91697768ccd8b44
|
|
| MD5 |
b5d9bf7f78b32b16bcd4995e9d689558
|
|
| BLAKE2b-256 |
cda543b74181a7581ba33d27d0b1571bffad7e5f0380d9d69077a6c62f02fed6
|