ASPL لباتASPL 0.7.0

Search documentation

Search starts with current English documentation · ASPL 0.7.0

Enter a complete name such as read_line, or words about a topic.

    العربية
    Source files

    Open one UTF-8 .aspl or .لبات file, up to 1 MiB, in a new draft. It stays in this browser and does not run automatically.

    Check sqrt through the double adapter

    ASPL 0.7.0 · Current release

    Call sqrt with 4.0 through the exact double profile and verify 2.0 without output.

    On this page

    Purpose and preparation

    Native only, ASPL 0.7.0 on x86-64 Linux with glibc. Requires libm.so.6 with sqrt. No input lines, source modules or data assets. The program tests sqrt(4.0) against 2.0; success has no output and status 0.

    Native installation · C guide · Foreign API · C collection.

    Arabic source

    Native only. Download this supplied variant unchanged.

    Native only · ASPL 0.7.0 · Arabic source

    Execution: Native only · ASPL 0.7.0

    Prerequisites:
    • Native only. ASPL 0.7.0, x86-64 Linux with glibc; requires libm.so.6 and sqrt. No source modules or data assets.

    Input: No input lines are required.

    غير_آمن خارجي جذر(قيمة: ع64) -> ع64
        = سي_مزدوج__مزدوج("libm.so.6", "sqrt").
    
    دالة ابدأ_الرئيسية() -> ص64 {
        دع النتيجة = غير_آمن جذر(4.0).
        إذا النتيجة تطابق 2.0 { أرجع 0. }
        أرجع 1.
    }
    

    Follow the Linux instructions to run this example. Download the source to keep a copy.

    Download ضعف.لبات

    Expected outcomes
    {
      "browser": {
        "check": "policy-rejection",
        "class": "policy-rejection",
        "reason": "foreign-imports-not-supported",
        "output": ""
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": ""
      }
    }

    English source

    Native only. Download this supplied variant unchanged.

    Native only · ASPL 0.7.0 · English source

    Execution: Native only · ASPL 0.7.0

    Prerequisites:
    • Native only. ASPL 0.7.0, x86-64 Linux with glibc; requires libm.so.6 and sqrt. No source modules or data assets.

    Input: No input lines are required.

    unsafe foreign root(value: f64) -> f64
        = c_double__double("libm.so.6", "sqrt");
    
    fn start_main() -> i64 {
        let result_value = unsafe root(4.0);
        if result_value matches 2.0 { return 0; }
        return 1;
    }
    

    Follow the Linux instructions to run this example. Download the source to keep a copy.

    Download double.aspl

    Expected outcomes
    {
      "browser": {
        "check": "policy-rejection",
        "class": "policy-rejection",
        "reason": "foreign-imports-not-supported",
        "output": ""
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": ""
      }
    }

    Check the result

    Source cards show exact catalog outcomes, original downloads, digests and supplied vocabulary. A nonzero example return indicates a failed assertion or handled library failure.

    aspl check double.aspl
    aspl run double.aspl
    aspl build -o double-program double.aspl
    ./double-program

    Historical normative scope

    • Historical specification, English source

      Historical MVP adapter background only; fixed signatures, Buffer and managed boundaries are later extensions audited against the published native 0.7.0 implementation

    Browse pages