Start with one file and top-level functions. Executable statements and global bindings cannot appear outside functions. The entry function takes no arguments and returns the process status.
The storable types are bool, i64, f64, string, c_ptr. unit means no result. Use دع / let for immutable bindings and متغير / var for mutation. Conditions require booleans. The example sums integers in a loop, then prints a literal on success.
Declare each function parameter and result type. Check the rejected example, then correct the binding to allow mutation. A diagnostic identifies a source reason and location; a runtime trap ends execution immediately.
Bind a local name to literal library and symbol names through a specified adapter. Mark the declaration and every call with غير_آمن / unsafe. Check the example locally before running on the supported host.
One .aspl file contains function definitions and foreign declarations. The required الرئيسية / main takes no parameters and returns i64. Valid statuses are 0..255; any other value traps instead of truncating.
Accepted: top-level functions. Rejected: global bindings, statements outside functions, a missing entry function, or calling it from source.
hello-ar · ASPL 0.1.0
Browser and native
دالة الرئيسية() -> صحيح64 {
أرجع 0;
}
Expected outcomes and literal output
browser: check success; success / main 0; stdout ""
native: check 0; success / status 0; stdout ""
Source is strict UTF-8 under Unicode 17.0. Identifiers are case-sensitive NFC names, each using one Arabic or Latin script. English keywords are exact aliases and may mix. Executable digits, operators and punctuation use ASCII. Display order does not change source bytes.
Accepted: Arabic and English keywords in one program. Rejected: unconverted non-ASCII digits outside strings and comments, or an identifier mixing scripts. The editor makes invisible controls visible.
Reasons and outcomes: non-ascii-digit, mixed-script-identifier
There are no implicit conversions. i64 is signed and overflow traps. f64 uses IEEE 754 binary64. Strings are immutable literal values; c_ptr is opaque and nullable. unit cannot be stored. Initialized bindings may infer their type. Names cannot shadow; parameters and bindings are immutable unless a local binding opts into mutation. if, while require boolean conditions, and return must match the declared result.
Accepted: assigning a mutable binding and using a comparison as a boolean condition. Rejected: uninitialized bindings, immutable assignment, or implicitly mixing numeric types.
Functions have unique top-level names, typed parameters and a typed result. Calls pass values by value. Definition order does not matter and recursion is allowed. Every path in a non-unit function must return a value. The factorial example returns status 120 without output.
Accepted: calling a later definition or recursing. Rejected: overloading, nested functions, wrong call arity, or a missing return path.
functions-ar · ASPL 0.1.0
Browser and native
دالة مضروب(القيمة: صحيح64) -> صحيح64 {
إذا القيمة <= 1 {
أرجع 1;
}
أرجع القيمة * مضروب(القيمة - 1);
}
دالة الرئيسية() -> صحيح64 {
أرجع مضروب(5);
}
Expected outcomes and literal output
browser: check success; success / main 120; stdout ""
native: check 0; success / status 120; stdout ""
A diagnostic carries a stable reason key, severity, typed arguments, source spans and an optional edit. Language changes wording only. Warnings do not block execution. Direct execution maps findings to source; built programs contain no source map. The first example assigns an immutable binding. The correction replaces دع / let with متغير / var and normally returns status 1.
Accepted: correct the binding and check again. Rejected: interpreting every nonzero status as a source error. Use the outcome class and diagnostic to distinguish failures.
diagnostic-ar · ASPL 0.1.0
Browser and native
دالة الرئيسية() -> صحيح64 {
دع قيمة = 0;
قيمة = 1;
أرجع قيمة;
}
The only builtin signature is اطبع / print: (string) -> unit. It writes string bytes in order, including NUL, without an automatic newline or flush. Add \n explicitly. Neither alias can be redefined. The browser safely displays output bytes without interpreting them as page markup.
Accepted: one string, including an empty string. Rejected: a number, multiple arguments, or storing the result.
Writing is synchronous; an empty string does not touch the host. Native output retries interrupted writes and continues short writes. Output accepted before failure remains visible. There is no special SIGPIPE handler; a closed pipe may terminate the process through that signal. If the environment ignores or blocks it and writing returns EPIPE, the result is a host failure with status 8.
The tool accepts one source file. check validates source, run executes in-process, and build atomically publishes a validated ELF program. Check and build do not open program libraries. Building invokes no C compiler or linker. Built programs run independently of the tool installation.
Accepted: diagnostic options before the command and one source path after it. Rejected: multiple sources, public bytecode output, or program arguments. Use -- before a path starting with a dash.
The browser runs bytecode locally and applies a ceiling of 10000000 instructions per run. The following loop ends with limit-stop at that ceiling. The table lists both host limits. Units are MiB = 1048576 bytes and KiB = 1024 bytes. Here none means no product ceiling and n/a means not applicable.
Accepted: running the common language in the browser. Rejected: a foreign import even if unused. Do not send the infinite-loop example to native execution.
Fixed resource ceilings
Resource
Native
Browser
Source bytes
16 MiB
1 MiB
Lexical items
1048576
131072
Syntax nodes
1048576
131072
Syntactic nesting
256
128
Compiler working memory
512 MiB
128 MiB
Bytecode bytes
64 MiB
8 MiB
Functions
65536
4096
Foreign imports
4096
0
Integer constants
1048576
131072
Float constants
1048576
131072
String references
1048576
131072
String bytes
16 MiB
2 MiB
Bytecode instructions
4194304
524288
Registers per function
65536
8192
Executed instructions
none
10000000
Runtime frames
4096
512
Runtime value slots
1048576
131072
VM-owned execution memory
256 MiB
64 MiB
Captured output
none
256 KiB
Check wall time
none
2 s
Run wall time
none
3 s
WebAssembly linear memory
n/a
256 MiB
Concurrent worker jobs
n/a
1
Source includes every byte read, including a leading byte-order mark. Compiler memory includes all live compilation allocations. Execution memory includes frames, slots and C-string loans, excluding immutable program storage, libraries and foreign allocations. A structural ceiling wins over a memory ceiling at the same operation. Allocation failure below the ceiling is host-failure / allocation-failed.
The check clock starts when the loaded worker accepts the job; the run clock starts when it accepts execution after a successful check. Loading counts against neither clock. The first observed ceiling determines the outcome; a deadline terminates the worker with time-limit. The output ceiling rejects the entire crossing write and retains prior output as partial. Native execution has no product instruction, time or output ceiling, subject to the instruction counter's representational maximum.
For serialized details, read the bytecode contract and runtime value model. Bytecode is private and versioned, not a public compatibility interface.
The ASPL MVP makes no stable-public-bytecode claim.
3Understand the limits of C
The two adapters and the C-string loan
On x86-64 Linux with glibc, an ASPL native program can load any shared library accepted by the glibc dynamic loader and call a named function when its exact C type matches a supported foreign adapter profile. The MVP supports int(const char *) and double(double). Library availability, pointer validity, and foreign-function behavior remain the program's responsibility.
Accepted: nonempty literal library and symbol names without NUL, with both unsafe markers. Rejected: duplicate library/symbol pairs, mismatched signatures, or a missing marker.
Adapter سي_صحيح__مؤشر_محرف_ثابت / c_int__const_char_ptr maps (string) -> i64 to int (*)(const char *). Before entering C, it rejects a string containing NUL, copies the bytes and appends the terminator. The loan ends when the function returns. C may read only during the call and may neither modify nor retain the pointer. The int result converts by value; negative values remain ordinary data.
Adapter سي_مزدوج__مزدوج / c_double__double maps (f64) -> f64 to double (*)(double). It passes binary64 values, canonicalizes returned NaN and restores the floating-point environment. Neither adapter inspects errno, exception flags or library error conventions.
The commands check and build validate declarations without opening libraries. Execution prepares every import before the entry function, ordered by library bytes, symbol bytes, then adapter ID. Each name opens once with RTLD_NOW | RTLD_LOCAL, followed by lookup using dlsym and dlerror. Names pass unchanged under the glibc loader rules. The first failure prevents entry and closes opened handles in reverse order.
For puts, download the source, check it, then run on the native host. The library function adds the newline. Check a negative result yourself and do not use its unspecified positive value as the process status. Loan allocation failure is a host failure; foreign crashes or retention of the pointer are outside the trap guarantees.
puts-ar · ASPL 0.1.0
Native only
Native only. The browser rejects this import with policy-rejection / foreign-imports-not-supported before execution, even if unused.
The target is baseline Linux x86-64 with glibc 2.34 or later. Results must be Linux, x86_64 and glibc 2.34 or later. Failure to identify GNU libc does not establish compatibility. See the normative host limitations.
The 0.1.0 project release is published. Download aspl-0.1.0-x86_64-linux-gnu.tar.xz; it is 126468 bytes with SHA-256 e022c777a6e3b61f721fdd02b0adb16a5a0dec25724b9daa545f476793d8fe61. The evidence bundle records both the passing checks and the release owner's accepted evidence omissions. This publication therefore does not claim complete official ASPL MVP conformance.
The download directory contains the archive, SHA256SUMS and the licenses. The matching directory inside the archive contains only aspl, LICENSE-MIT, LICENSE-APACHE and THIRD-PARTY-NOTICES. Licensing is a choice of MIT OR Apache-2.0.
Download the archive and checksum into the same directory. The checksum file has one line with 64 lowercase hex digits, two spaces, the filename and a newline. Verification must report aspl-0.1.0-x86_64-linux-gnu.tar.xz: OK before extraction. The checksum checks integrity and does not prove publisher identity.
This archive includes Unicode notices because the tool incorporates derived Unicode tables. Read the complete texts: MIT, Apache-2.0, and third-party notices.
Use a fresh download directory for each version. Inspect the listing before extraction; it must match the directory, files and modes described here. Stop if any command fails or the listing or version differs, and do not continue to the install commands.
sha256sum --check SHA256SUMS &&
tar -tvJf aspl-0.1.0-x86_64-linux-gnu.tar.xz
tar -xJf aspl-0.1.0-x86_64-linux-gnu.tar.xz &&
./aspl-0.1.0-x86_64-linux-gnu/aspl --version
The extracted tool must print aspl 0.1.0. Directory and tool modes are 0755; licenses use 0644. The archive has no links, absolute paths or parent traversal. Choose one installation location. The default path is user-owned and needs no administrator access.
The command command -v aspl must resolve to $HOME/.local/bin/aspl. Otherwise use export PATH="$HOME/.local/bin:$PATH" in the current shell. To persist it, manually add that line to ~/.bashrc for Bash or ~/.zshrc for Zsh. For Fish, use fish_add_path "$HOME/.local/bin". Open a new shell and check the path and version again.
For administrator-managed installation, after the same verification, replace the two install commands with sudo install -m 0755 aspl-0.1.0-x86_64-linux-gnu/aspl /usr/local/bin/aspl. Check the resolved path so an older copy does not mask the chosen executable.
Download the linked Arabic or English example and save it as hello.aspl. The version must print aspl 0.1.0. Checking succeeds silently on both streams with status 0. Then continue to the run and build contract.
To upgrade, repeat the host check, download, verification, extraction and extracted-version check for the new release, then replace the tool with the same install command. To roll back, follow those steps with a chosen archived version and its checksum. Published versions are immutable. There is no automatic backup; retain archives for offline rollback. Only the newest release receives fixes before 1.0.
Uninstall removes only the selected executable, leaving shell configuration, source, built programs and archives. Remove only the path you selected.
After removal, run command -v aspl to detect another installed copy on your path.
rm -- "$HOME/.local/bin/aspl"
For the administrator-managed location only: sudo rm -- /usr/local/bin/aspl