ADG-Lang is a type-safe Arabic grammatical language inspired by the early grammar core attributed to Abu al-Aswad al-Du'ali.
The project goal is to make Arabic grammatical logic inspectable, testable, and eventually executable:
Arabic-inflected .adg source (i'rab-typed)
=> typed ADG AST
=> grammatical contract
=> verifier
=> compiler/backend
Valid ADG AST
=> VerifiedAdgProgram
=> LLVM IR
=> Native Executable
Invalid ADG AST
=> ADG Diagnostic
=> No LLVM IR
=> No Native Executable
This public repository is the official community-facing language repository for:
- The ADG-Lang rule model.
- Public AST examples.
- The public reference compiler release.
- Parser and compiler design notes.
- Community verification and research tasks.
| Document | Purpose |
|---|---|
docs\ADG-Duali-Rules.md |
The single cleaned rule table that anchors the parser. |
docs\Academic-Reading-Key.md |
Color/evidence key for academic review of the rule table. |
docs\Mermaid-Rule-Maps.md |
Mermaid diagrams that apply the academic reading key visually. |
docs\Compiler-Components.md |
Components of the public reference compiler. |
docs\Project-Model.md |
File extensions and ADG application project layout. |
docs\Portability-and-Targets.md |
What "compiled" means across operating systems, native targets, and WebAssembly. |
docs\Release-Testing.md |
How to verify and test the public release. |
docs\Release-v0.1.0.md |
Release notes for the first public testable version. |
docs\Repository-Policy.md |
What public releases include and exclude. |
docs\Language-Overview.md |
Public overview of ADG-Lang as a programming-language interface. |
docs\Verification-Model.md |
How ADG moves from AST to verification and native-proof gates. |
docs\ADG-Wikipedia-Intro-Function.md |
Wikipedia-attributed Abu al-Aswad executable-function demo. |
docs\directives\ADG-WIKIPEDIA-INTRO-DIRECTIVES.md |
Code-linked implementation directives for the Wikipedia demo. |
docs\Community-Roadmap.md |
Open development tracks for contributors. |
examples\README.md |
Valid and invalid AST examples for investigation. |
CONTRIBUTING.md |
How to propose rules, examples, diagnostics, and implementations. |
The public release includes a testable reference compiler:
src\Adg.Compiler
Run:
dotnet run --project src\Adg.Compiler -- --self-test
dotnet run --project src\Adg.Compiler -- test-matrix
powershell -ExecutionPolicy Bypass -File scripts\Verify-AdgRelease.ps1If LLVM clang is unavailable:
powershell -ExecutionPolicy Bypass -File scripts\Verify-AdgRelease.ps1 -SkipNativeAuthor ADG-Lang applications in Arabic-inflected .adg source. This is the canonical
language surface: Arabic grammatical statements whose i'rab (case marking) is enforced as a
compile-time contract before any LLVM IR is emitted.
اتجاهُ النصِّ: RTL
adg 0.1.1
program "hello-adg"
جملةٌ فعليةٌ "كتبَ" فاعلُها "المبرمجُ" مرفوعٌ مفعولُها "التطبيقَ" منصوبٌ
رابطٌ "ثم" ترتيبٌ
جملةٌ فعليةٌ "شغّلَ" فاعلُها "النظامُ" مرفوعٌ مفعولُها "البرنامجَ" منصوبٌ
A فاعل (subject) must be مرفوع (nominative) and a مفعول (object) must be منصوب
(accusative); any violation is rejected as a compile-time diagnostic. Executable functions
use the same Arabic .adg surface with دالةٌ / استدعاءٌ.
.adg.json is the equivalent low-level typed AST that the compiler builds from the Arabic
source. It stays available for tooling that emits or inspects the AST directly, but it is not
the language you author by hand.
Minimal app project:
examples\apps\hello-adg
adg.project.json
src\main.adg # canonical Arabic-inflected source (entrypoint)
src\main.adg.json # equivalent low-level typed AST
scripts\verify.ps1
scripts\build.ps1
scripts\run.ps1
Function demo:
examples\apps\hello-adg\src\abu-al-aswad-wikipedia-intro.adg
ADG-Lang separates historical attribution from modern compiler design:
- Textual core: transmitted definitions such as
Ism,Fi'l, andHarf. - Attributed chapters: Fa'il, Maf'ul, Idafa, case/operator chapters, and exclamation.
- Notation layer: early dot/diacritic metadata.
- Operational inference: parser-safe rules derived from the attributed core.
- Historical guardrails: what must not be back-projected into Abu al-Aswad's work.
ADG-Lang Native Proof v0.1 passed the release verification audit:
Total checks: 59
Passed: 59
Failed: 0
Result: PASS
The public repository is now prepared for community review of the rule table, examples, diagnostics, and future implementation tracks.