Initial commit: Mathematical Programming Language (MPL)

A proof-of-concept parser demonstrating that programming languages can be built
entirely from mathematical notation, enabling cognitive universality in computing.

MPL replaces English keywords with mathematical symbols, making programming
accessible to the 80% of humanity who don't speak English. Every design decision
follows the Fatima Test: "Will this make sense to a 10-year-old who doesn't
speak English?"

Current implementation:
- Complete ANTLR 4 grammar with 70+ mathematical operators
- Parser supporting all major programming paradigms
- Zero grammar ambiguities
- ASCII escape sequences for every Unicode symbol

This release contains:
- Core parser implementation
- Grammar specification
- Example programs
- Comprehensive documentation
- Whitepaper outlining the vision

Note: This is a parser-only proof of concept. Programs can be parsed but not
executed. The interpreter and runtime are future work.
This commit is contained in:
developtheweb@protonmail.com 2025-07-26 18:39:08 -04:00
commit 3cf435b41e
43 changed files with 5528 additions and 0 deletions

13
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1,13 @@
# These are supported funding model platforms
github: [developtheweb]
patreon: # Replace with up to 4 Patreon usernames
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name
community_bridge: # Replace with a single Community Bridge project-name
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name
custom: ['https://mpl-lang.org/donate', 'https://mpl-lang.org/sponsor-pilot']

50
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,50 @@
---
name: Bug report
about: Create a report to help us improve MPL
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Write MPL code '...'
2. Run command '....'
3. See error
**MPL Code**
```mpl
# Paste your MPL code here
```
**Expected behavior**
A clear and concise description of what you expected to happen.
**Actual behavior**
What actually happened instead.
**Error messages**
```
Paste any error messages here
```
**Environment (please complete the following information):**
- OS: [e.g. Ubuntu 22.04, Windows 11, macOS 13]
- Java Version: [e.g. OpenJDK 11.0.17]
- MPL Version: [e.g. 2.0.0]
- Terminal/IDE: [e.g. VS Code, IntelliJ IDEA]
**Additional context**
Add any other context about the problem here.
**Symbol Display**
- [ ] I can see mathematical symbols correctly in my environment
- [ ] I tried using ASCII escapes (e.g., `\sum` instead of ∑)
**Checklist**
- [ ] I have searched existing issues for duplicates
- [ ] I have provided a minimal code example
- [ ] I have included all error messages

View file

@ -0,0 +1,42 @@
---
name: Feature request
about: Suggest an idea for MPL
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Does this feature pass the Fatima Test?**
Would a 10-year-old non-English speaker understand this feature? Please explain why.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Proposed syntax (if applicable)**
```mpl
# Show how the feature would look in MPL code
```
**Mathematical basis**
If proposing a new symbol or operator:
- What mathematical concept does it represent?
- Is there established notation for this?
- What would be the ASCII escape sequence?
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context, mockups, or examples about the feature request here.
**Impact on education**
How would this feature help students learning to program?
**Checklist**
- [ ] This feature aligns with MPL's mission of cognitive universality
- [ ] I've considered how non-English speakers would understand this
- [ ] I've searched existing issues for similar requests
- [ ] The proposed syntax uses mathematical notation, not English keywords

56
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,56 @@
## Description
Brief description of what this PR does.
## Motivation and Context
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
Fixes #(issue)
## How Has This Been Tested?
Please describe the tests that you ran to verify your changes:
- [ ] All existing tests pass
- [ ] Added new tests for new functionality
- [ ] Tested with example programs
- [ ] Tested with different input methods (visual, keyboard, ASCII escapes)
## Types of changes
What types of changes does your code introduce? Check all that apply:
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
- [ ] Grammar modification
- [ ] New symbol/operator
## Checklist
- [ ] My code follows the code style of this project
- [ ] My change requires a change to the documentation
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [ ] All new and existing tests passed
- [ ] I have updated CHANGELOG.md in the Unreleased section
- [ ] My changes pass the Fatima Test (understandable by non-English speakers)
## MPL-Specific Considerations
### For new symbols/operators:
- [ ] Symbol has clear mathematical meaning
- [ ] ASCII escape sequence provided
- [ ] Added to glyph-escapes.md
- [ ] Precedence defined and tested
- [ ] Example usage provided
### For grammar changes:
- [ ] No shift/reduce conflicts introduced
- [ ] Precedence table updated if needed
- [ ] Backwards compatibility maintained
## Additional Notes
Any additional information that reviewers should know.