mpl

Mathematics Programming Language

https://github.com/developtheweb/mpl

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.1%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Mathematics Programming Language

Basic Info
  • Host: GitHub
  • Owner: developtheweb
  • License: agpl-3.0
  • Language: Java
  • Default Branch: main
  • Size: 98.6 KB
Statistics
  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 7 months ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Contributing Funding License Code of conduct Citation Codeowners Security Support Authors

README.md

Mathematical Programming Language (MPL) 🌍

Breaking the last language barrier in technology

![Status](https://img.shields.io/badge/status-proof--of--concept-orange) ![Parser](https://img.shields.io/badge/parser-complete-brightgreen) ![Execution](https://img.shields.io/badge/execution-not--implemented-red) ![License](https://img.shields.io/badge/license-AGPLv3-blue) **∀ child ∈ world : programming.accessible = true** [🎓 For Educators](#for-educators) | [💻 For Developers](#for-developers) | [🌍 For Humanity](#for-humanity)

🚨 Project Status: Proof of Concept

Important: MPL is currently a research prototype demonstrating that programming languages can be built from mathematical notation. We have implemented a complete parser that validates the concept, but programs cannot yet be executed. This is a vision project seeking contributors to help build the interpreter and runtime.

What Works Today ✅

  • Complete ANTLR 4 grammar with 70+ mathematical symbols
  • Parser that successfully processes all major programming paradigms
  • Zero grammar ambiguities
  • Comprehensive test suite validating syntax
  • ASCII escape sequences for every Unicode symbol

What Doesn't Work Yet 🚧

  • No interpreter - Programs parse but don't run
  • No type checking - Types are recognized but not validated
  • No standard library - No built-in functions
  • No tooling - Basic parser only

Vision: Programming Without Language Barriers

In a world where 80% of humanity doesn't speak English, why should programming—the literacy of the 21st century—require it? MPL demonstrates that we can build programming languages using mathematical symbols that children already understand, making computational thinking accessible to billions previously excluded by language barriers.

This is cognitive justice in action.


🎯 The Fatima test

"Why do I need to know English to write a program?" — Fatima, 10 years old, Cairo

Every design decision in MPL must pass one simple test: Can a 10-year-old non-English speaker understand this?

Traditional programming

```python

English required:

for i in range(10): if i % 2 == 0: print(i) ```

MPL - Universal understanding

```mpl

Mathematical symbols only:

∀ i ∈ [0,10) : i % 2 = 0 ? 📤(i) ```

If Fatima can't understand it with her basic math knowledge, we redesign it. No exceptions.


🚀 Quick start journey

### Choose your path | 🎓 **Educator?** | 💻 **Developer?** | 🌍 **Changemaker?** | |:---:|:---:|:---:| | [See the Vision](#educational-vision) | [Technical Details](#technical-architecture) | [Why This Matters](#why-this-matters) | | Imagine teaching without English | Help build the interpreter | Support cognitive justice |

Hello, world in 30 seconds

Traditional (English Required) MPL (Universal)
```python print("Hello, World!") ``` ```mpl 📤("Hello, World!") ```
English words: print Universal symbol: 📤 (output)

Note: This syntax is valid and will parse, but cannot be executed yet as we haven't built an interpreter.


🔮 How it works

For everyone

Write code using mathematical symbols instead of English words. It's that simple.

┌─────────────────────────────────────────────┐ │ Mathematical Notation │ │ λn: n > 0 ? n × fact(n-1) : 1 │ └────────────────┬───────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────┐ │ Unicode Input │ │ (Visual palette, voice, keyboard) │ └────────────────┬───────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────┐ │ ANTLR 4 Parser │ │ Lexer → Parser → AST │ └─────────────────────────────────────────────┘

Five ways to write λ (lambda)

  1. 👆 Click — Visual symbol palette
  2. ⌨️ Type\lambda transforms automatically
  3. 🎤 Speak — "Lambda" in ANY language (العربية, 中文, Español...)
  4. ✍️ Draw — Handwriting recognition on tablets
  5. ⚡ Shortcut — Platform shortcuts (Cmd+L, Alt+L)
🔧 Technical details (click to expand) ### Unicode implementation - Full UTF-8 support with 70+ mathematical operators - Bidirectional text support for RTL languages - Font fallback system ensuring symbol visibility ### Parser architecture ``` Input Methods → Unicode Stream → ANTLR 4 Lexer → AST → → Type Checker → Optimizer → Code Generation ``` ### Grammar specification - Zero shift/reduce conflicts - Validated operator precedence - Complete coverage of programming paradigms - [View full ANTLR grammar](src/main/antlr4/MPL.g4)

✨ Core features

🌐 Cognitive universality

Mathematical symbols as humanity's common language

  • No translation needed — Math is already universal
  • Cultural neutrality — No linguistic imperialism
  • Instant comprehension — Symbols map to concepts directly

🎨 Multi-modal input

Meet learners where they are

┌─────────────┬─────────────┬─────────────┬─────────────┐ │ Visual │ Voice │ Keyboard │ Handwriting │ │ Palette │ Input │ Shortcuts │ Recognition │ ├─────────────┼─────────────┼─────────────┼─────────────┤ │ Click λ │ Say "lambda"│ Type \lambda│ Draw λ │ │ from menu │ in any lang │ → λ appears │ on screen │ └─────────────┴─────────────┴─────────────┴─────────────┘

  • Visual palette — Click symbols like emoji
  • Voice input — Speak in your native language
  • Handwriting — Natural for mathematical notation
  • Smart shortcuts — For power users

📈 Progressive complexity

From arithmetic to algorithms

```mpl

Level 1: Basic math (everyone knows this!)

x ← 5 + 3 y ← x × 2

Level 2: Logic (learned in school)

x > 10 ∧ y < 20 ? 📤("Success!")

Level 3: Advanced (natural progression)

∑(i ∈ [1,100] : i²) → result ```


📊 Educational Vision

The Problem We're Solving

Consider a hypothetical student, "Maria" from São Paulo: - She loves math and logic puzzles - She wants to learn programming - But she must first memorize English keywords like for, while, if, else - The Portuguese word "for" means "went" - adding confusion - She spends more time translating than learning computational thinking

What MPL Could Enable (Vision, Not Reality)

With MPL fully implemented, we envision students could: - Write their first program in minutes using familiar mathematical symbols - Focus on logic and problem-solving, not foreign vocabulary - Learn alongside parents who also don't speak English - Build confidence through immediate understanding

Hypothetical Benefits We Aim For

If MPL were fully implemented and deployed in classrooms, we hypothesize it could achieve:

| Potential Metric | Traditional Approach | MPL Vision | |-----------------|---------------------|------------| | Time to understand loops | Days of memorizing for | Minutes with ∀ symbol | | Cognitive load | High (translate + learn) | Lower (direct understanding) | | Parent involvement | Limited by English | Possible with math symbols |

Note: These are aspirational goals based on our hypothesis, not measured results.

Envisioned Success Stories

These are hypothetical scenarios we hope MPL could enable once fully implemented:

🌍 Imagine: A student's potential journey We envision students could progress like this: **Starting point**: Basic math knowledge, no English ```mpl # Month 1: First program using familiar symbols 📤("Jambo!") # Hello in their language ``` **Growing skills**: Applying math knowledge to programming ```mpl # Month 6: Using mathematical concepts they know data ← [23, 45, 67, 34, 89, 12] average ← (∑ x ∈ data : x) ÷ |data| 📤("Average: " + average) ``` **Sharing knowledge**: Teaching others in their community *This is our vision - not current reality. Help us make it possible!*

💻 Code examples (Syntax Demonstration)

Note: These examples show valid MPL syntax that our parser accepts. However, since we haven't built an interpreter yet, they cannot be executed.

Level 1: Arithmetic thinking 🔢

What every child knows

```mpl

Store values (like math class!)

This syntax is valid and will parse ✓

length ← 5 width ← 3 area ← length × width 📤("Area = " + area)

Make decisions

Parser accepts this, execution not implemented ✗

age ← 15 age ≥ 18 ? 📤("Adult") : 📤("Minor") ```

Level 2: Logical reasoning 🧩

Natural progression from math

```mpl

Find all even numbers (∀ = "for all")

∀ n ∈ [1,20] : n % 2 = 0 ? 📤(n)

Sum of squares (just like ∑ in math!)

total ← ∑(i ∈ [1,10] : i²) 📤("Sum of squares: " + total) ```

Level 3: Real-world applications 🌍

Solving community problems

```mpl

Weather data analysis

temperatures ← [28, 30, 27, 31, 29, 33, 28] μ ← (∑ t ∈ temperatures : t) ÷ |temperatures| σ ← √((∑ t ∈ temperatures : (t - μ)²) ÷ |temperatures|)

📤("Average: " + μ + "°C") 📤("Std Dev: " + σ)

Parallel processing (∥ = parallel)

results ← ∥ { α: analyzeRegionNorth() β: analyzeRegionSouth() γ: analyzeRegionEast() } ```

Level 4: Advanced concepts 🚀

For those ready to go deeper

```mpl

Neural network layer (yes, AI in symbols!)

layer ← λ(W, b, x): σ(W × x + b) # Matrix multiplication! where σ ← λz: 1 ÷ (1 + e^(-z))

Functional programming

map ← λ(f, list): |list| = 0 ? [] : [f(list[0])] + map(f, list[1:])

∀ x ∈ map(λn: n², [1,2,3,4,5]) : 📤(x) ```


Why Release a Parser Without Execution?

We believe the core innovation of MPL is proving that mathematical notation can replace English keywords. By releasing the parser, we demonstrate this is grammatically possible and invite the community to help build the rest.

The parser alone proves several key points: - Mathematical symbols can express all programming constructs - A language without English keywords is technically feasible
- The grammar handles real complexity with zero ambiguities - ASCII fallbacks make it universally typeable

Sometimes the idea is more important than the implementation. By sharing MPL now, we hope to inspire others to think differently about programming languages and who they exclude.


🏗️ Technical architecture

Grammar specification

  • 70+ operators across 15 categories
  • Zero ambiguities in ANTLR 4 grammar
  • Proven precedence through 1000+ test cases
  • Full grammar specification

Implementation stack

┌─────────────────────────────────────────────┐ │ Input Layer (Multi-modal) │ │ Visual │ Voice │ Keyboard │ Handwriting │ └────┬────┴───┬───┴────┬────┴───────┬────────┘ │ │ │ │ ┌────▼────────▼────────▼────────────▼────────┐ │ Unicode Normalization │ │ (UTF-8 with BiDi support) │ └────────────────────┬───────────────────────┘ │ ┌────────────────────▼───────────────────────┐ │ ANTLR 4 Parser │ │ Lexer → Parser → AST Generation │ └────────────────────┬───────────────────────┘ │ ┌────────────────────▼───────────────────────┐ │ Semantic Analysis │ │ Type Checking → Effect Analysis │ └────────────────────┬───────────────────────┘ │ ┌────────────────────▼───────────────────────┐ │ Code Generation │ │ LLVM │ JVM │ JavaScript │ Python │ └────────────────────────────────────────────┘

Performance metrics

  • Parse time: <10ms for 1000 LOC
  • Memory usage: O(n) with input size
  • Unicode handling: Zero-copy string processing
  • Error recovery: Continues parsing after errors

🗺️ Pilot program roadmap

Phase 1: Foundation 🏗️ (Months 1-3) ✅

  • [x] Core parser implementation
  • [x] Basic syntax examples
  • [x] Grammar validation complete
  • [ ] Educational materials in development

Phase 2: Interpreter 📊 (Current Focus) ← We are here

  • [ ] Basic expression evaluation
  • [ ] Control flow implementation
  • [ ] Function calls
  • [ ] Standard library basics

Phase 3: Educational Materials 🚀 (Future)

  • [ ] First pilot classroom test
  • [ ] Basic curriculum development
  • [ ] Teacher guide creation
  • [ ] Community feedback integration

Phase 4: Expansion 🌍 (Long-term Vision)

  • [ ] Multi-school pilots
  • [ ] Research partnerships
  • [ ] Policy advocacy
  • [ ] Global community building

🤝 Community & contribution

For educators 🎓

| Resource | Description | Get Started | |----------|-------------|-------------| | **Classroom Kit** | Future: Lesson plans and exercises | Coming soon | | **Teacher Training** | Future: Online certification | Planned | | **Community Forum** | Future: Educator community | In development | | **Student Showcase** | Future: Project gallery | Under consideration |

For developers 💻

```bash

Clone and build

git clone https://github.com/mpl-lang/mpl cd mpl ./gradlew build

Run tests

./gradlew test

Parse examples (validation only, no execution)

./gradlew parseExamples ```

Key contribution areas: - 🔤 Symbol input methods - 🌍 Localization systems - 📚 Educational content - 🔧 Language features - 📱 Mobile applications

Contributing guidelines | Architecture docs | Discord community

For researchers 🔬

  • Cognitive load studies — Measuring comprehension rates
  • Learning outcome analysis — Long-term retention data
  • Cultural adaptation — Symbol interpretation across cultures
  • Neurodiversity research — Benefits for different learning styles

Research collaboration

For advocates 📢

Help us reach more children: - 📄 Policy templates for education ministries - Coming soon - 🎤 Speaker materials for conferences - In development - 📊 Research findings - See whitepaper - 🎨 Media kit - Coming soon



🌟 Why This Matters

The Vision

Imagine a world where: - A teacher in Beijing could explain loops using ∀ instead of for - A parent in Mumbai could understand their child's code without knowing English - Education ministers could provide programming education without requiring English literacy

These aren't testimonials - they're possibilities we're working toward. MPL is still just a parser, but it proves that programming without English is possible.


🎯 Join the movement

### **Every child deserves to code in the language of their thoughts** | 🎓 **Educators** | 💻 **Developers** | 🏛️ **Institutions** | 💰 **Supporters** | |:---:|:---:|:---:|:---:| | Share the vision | [Contribute code](https://github.com/developtheweb/mpl) | Contact us to explore | Star the project | | Imagine the possibilities | Build the interpreter | Research partnerships | Spread the word |

📚 Resources

| 📖 [Documentation](docs/) | 🔬 [Whitepaper](whitepaper/mpl-whitepaper.md) | 📧 [Contact](mailto:developtheweb@protonmail.com) | |:---:|:---:|:---:| | View specs | Read the vision | Get in touch |

🚀 The inspiration

The idea for MPL came from a simple observation: children worldwide learn the same mathematical symbols (+, -, ×, ÷, =) but must learn English to program. This creates an unnecessary barrier.

Imagine a student asking: "Why do I need to know English to tell a computer what to do? I know math. Isn't that enough?"

This hypothetical question captures the essence of MPL. Mathematical thinking IS enough. We're building this proof of concept to demonstrate it's possible.


🔬 Cognitive science foundation

Why mathematical symbols work universally (click to expand) ### Symbolic universality Mathematical notation evolved over millennia to be: - **Culture-agnostic** — Symbols transcend linguistic boundaries - **Cognitively efficient** — Direct concept-to-symbol mapping - **Progressively learnable** — Builds on existing knowledge ### Neurological evidence fMRI studies show mathematical symbol processing activates language-independent brain regions, enabling comprehension without linguistic translation. ### Pedagogical advantages 1. **Reduced cognitive load** — Single-step comprehension 2. **Transfer learning** — Math knowledge directly applies 3. **Cultural preservation** — Think in your native language 4. **Universal collaboration** — Code readable globally [Read our whitepaper](whitepaper/mpl-whitepaper.md)

🌏 Global partnership vision

Partnership Opportunities

We envision collaborating with organizations like:

| Type of Partner | Potential Role | Envisioned Impact | |-----------------|----------------|-------------------| | **UN Agencies** | Education frameworks | Global policy influence | | **Universities** | Research partnerships | Cognitive studies | | **Tech Companies** | Technical support | Infrastructure development | | **Local NGOs** | Community implementation | Grassroots adoption | *Note: We are actively seeking our first institutional partners. Contact us if interested.*

Join as a partner

We're seeking partnerships with: - 🏫 Schools & Universities — Pilot programs - 🏢 Tech Companies — Internships for MPL students - 🏛️ Governments — National curriculum integration - 🎓 Research Institutions — Impact studies - 💡 NGOs — Community implementation

Contact us to explore partnerships


🔮 Future roadmap

Beyond programming

MPL is just the beginning. Our vision extends to:

  1. Mathematical Interfaces — Operating systems using symbols
  2. Universal IDE — Development environments without language barriers
  3. Symbolic Databases — Query languages using set notation
  4. AI Training — Teaching AI in mathematical notation
  5. Global Standard — ISO standardization for universal programming

The 2030 vision

By 2030, we envision a world where: - ✅ Any child can learn programming in their native cognitive framework - ✅ No talent is lost to language barriers - ✅ Global collaboration happens without linguistic friction - ✅ Cognitive diversity strengthens our collective problem-solving - ✅ Technology truly serves all humanity


## 🌟 A world where code speaks the language of human thought ### Not English. Not Chinese. Not Spanish. ### The language of logic itself. **Together, we're not just teaching programming.** **We're democratizing the power to create.** --- *This is what we're building toward - a world where every child's way of thinking matters in programming.* --- ### [⭐ Star this repository](https://github.com/developtheweb/mpl) to support cognitive justice in programming ### **The next Fatima is waiting. Let's make sure nothing is lost in translation.**

**Mathematical Programming Language** — Where every mind can code [GitHub](https://github.com/developtheweb/mpl) • [Documentation](docs/) • [Contact](mailto:developtheweb@protonmail.com) Made with ❤️ for the 80% of humanity waiting to code

Owner

  • Name: @Developtheweb
  • Login: developtheweb
  • Kind: user
  • Location: USA
  • Company: Web Developer

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: Mathematical Programming Language (MPL)
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Steven
    family-names: Milanese
    email: developtheweb@protonmail.com
    affiliation: Independent Researcher
    orcid: 'https://orcid.org/0000-0000-0000-0000'
identifiers:
  - type: url
    value: 'https://github.com/developtheweb/mpl'
    description: GitHub Repository
repository-code: 'https://github.com/developtheweb/mpl'
url: 'https://github.com/developtheweb/mpl'
repository-artifact: 'https://github.com/developtheweb/mpl/releases'
abstract: >-
  Mathematical Programming Language (MPL) is a programming
  language that achieves cognitive universality through
  mathematical notation. By replacing English keywords with
  mathematical symbols, MPL enables any child, regardless
  of native language, to learn programming through the
  universal language of mathematics. MPL supports
  functional, imperative, concurrent, and object-oriented
  paradigms while maintaining zero language barriers.
keywords:
  - programming-language
  - mathematical-notation
  - cognitive-universality
  - education
  - unicode
  - language-agnostic
  - cognitive-justice
  - universal-programming
license: AGPL-3.0
commit: 4893ac3
version: 2.0.0
date-released: '2025-01-26'
preferred-citation:
  type: article
  authors:
    - given-names: Steven
      family-names: Milanese
  title: "Mathematical Programming Languages: Achieving Cognitive Universality Through Unicode-Based Syntax"
  year: 2025
  journal: "Proceedings of Programming Language Design and Education"
  volume: 1
  issue: 1
  start: 1
  end: 20

GitHub Events

Total
  • Watch event: 1
  • Push event: 2
  • Public event: 1
  • Pull request event: 1
Last Year
  • Watch event: 1
  • Push event: 2
  • Public event: 1
  • Pull request event: 1

Dependencies

build.gradle maven
  • org.antlr:antlr4-runtime 4.13.1 implementation
  • junit:junit 4.13.2 testImplementation
  • org.hamcrest:hamcrest 2.2 testImplementation