Skip to content
oiseePublic

About

ABAPiti: because we can — transpile to ABAP. Compiles WASM and TypeScript into ABAP.

Topics

Resources

Stars

7 stars

Watchers

0 watching

Forks

Repository files navigation

ABAPiti

ABAPiti: because we can transpile to ABAP

CI

🎉🎉 On a real SAP kernel: TS-HA@A4H 11,060 of 11,060 (100 %), 0 wrong answers, 0 traps, 0 unregistered

abaplint's own test suite, compiled by abapiti from TypeScript to ABAP, imported with abapGit into an SAP NetWeaver 7.58 system (A4H) and run there as background jobs. Every one of the 11,060 Node-active tests passes, each title reconciled against the same Node oracle as OSGO.

Host Shards Tests passing Wrong answers Traps
TS-HG@Go (abaplint → HIR → Go) 17 11,060 / 11,060 0 0
TS-HA@OSGO (→ ABAP, open-steamgate Go runtime) 17 11,060 / 11,060 0 0
TS-HA@A4H (→ ABAP, real SAP kernel 7.58) 17 11,060 / 11,060 0 0

On A4H: 2,338 core classes + 5,015 test classes, 0 syntax errors; the longest shards are rules (24 min) and abap/statements (22 min). The first full A4H run had 11,055: the kernel refuses an empty POSIX regex that JavaScript's new RegExp("") accepts; fixed in #155 ((?:)). Certified 14 Oct 2026 and reconciled twice, independently, title by title against the pinned Node oracle (upstream 577f875e). One accounting note: the abap/syntax and lsp shards also register the 6 sql_value_conversion tests that belong to rules. They pass there as well, so A4H ran 11,072 test executions for the 11,060 Node-active titles: 12 duplicate registrations, not extra passes. Archives: v0.5.0 (11,055 as shipped; 11,060 with the #155 delta), and v0.5.1 next. How to run them on your own system: docs/a4h-test-suite.md.

🎉 11,060 of 11,060 abaplint tests pass on abaplint compiled by abapiti (TS-HG@Go), 0 wrong answers

The goal is reached: every Node-active test of abaplint's own suite (625 files, all 17 shards) passes on abaplint compiled from its TypeScript by abapiti and run as Go. Measured 12 Oct 2026 on train 13, twice, on two machines (train 13); released as v0.4.0.

0 → 27 → 661 → 6,515 (of 8,461, four test directories) → 9,022 (of 11,060, all 17) → 10,167 → 10,255 → 10,452 → 10,614 → 10,934 → 11,022 → 11,032 → 11,051 → 11,060

Now Target
abaplint tests passing, all 17 shards 11,060 of 11,060 (100 %) 11,060
wrong answers (tests that run and disagree with Node) 0 0
tests trapped / not registered on Go 0 / 0 0
Raw full-core measurement (abapiti abaplint --full --assume-int=false) 0 blocking diagnostics / 8 HIR errors; the emitted build retains explicit refusals on unsupported paths 0 / 0

The 32 tests that Node itself skips (it.skip) are outside the denominator. Reached 100 % on the ABAP host, on TS-HA@OSGO and TS-HA@A4H, a real SAP kernel (above and below). After that, a second project, @abaplint/transpiler.

On the ABAP host — TS-HA@OSGO: 11,060 of 11,060 (100 %), 0 wrong answers, 0 traps, 0 unregistered (abaplint compiled by abapiti to ABAP, running on open-steamgate's Go runtime)

521 (first full run) → 677 (train O2) → 5,329 (O3) → 10,767 → 10,996 → 11,037 → 11,060 · certified 2026-10-14 on all 17 shards, OSG f83dc5c3, express train #149 (8ad792f); TS-HG@Go on the same commit: 11,060 / 11,060

In every shard, passes equal Node-active tests; the only tests not run are the ones Node itself marks pending. The same suite then passed on a real SAP kernel, TS-HA@A4H, 11,060 / 11,060 (above).

ABAPiti is a TypeScript → ABAP transpiler. Its first real job is to compile abaplint itself into ABAP, and later the abaplint transpiler. The result runs off-stack, on open-steamgate (Go and JS), and on-stack, on a real SAP kernel. That is a step towards self-hosting: the ABAP tooling running in ABAP.

flowchart LR
  T["abaplint core<br/>(TypeScript)"] -->|"tsgo checker"| H["HIR<br/>typed object IR"]
  H -->|verify · emit| A["readable ABAP core"]
  A --> K["SAP kernel (A4H)"]
  A --> O["osgo<br/>open-steamgate, Go"]
  A --> J["OSG-JS<br/>open-steamgate, JS"]
  A -->|osabap| N["zabaplint<br/>native command"]
Loading

Status, 10 Oct 2026 (v0.3.0). The translated abaplint checks zabapgit_standalone.prog.abap (159K lines) plus abaplint/deps, using abapGit's ci/abaplint.json. On every host the issues equal vanilla abaplint on Node byte for byte (SHA-256 of all issues). "Equal" means the issues, not the speed:

Run v0.1 v0.2 v0.3
TS-HA@A4H: SAP 7.58 kernel, background job 221 s 206.6 s 171.5–179.3 s
TS-HA@OSGO: open-steamgate Go runtime 91 s 61.3 s 14.3–17.2 s
TS-HA@OSGB: zabaplint, one executable (linux-amd64) 92 s 62 s 17–20 s
TS-HA@OSGJ: open-steamgate JS runtime did not finish did not finish 85 min
TS-HG@Go: zabaplint-go, TypeScript → HIR → Go — — 7.9 s
TS@Node: abaplint 2.120.56 (vanilla) 13.5 s 13.5 s 14.0 s

TS-HA is abaplint translated TypeScript → HIR → ABAP by abapiti, TS-HG the same HIR emitted as Go; the names are explained in the glossary. v0.3: abapiti f9d5f8c, open-steamgate 7720f6e2 (OSGJ: 6e10128e). OSGO, OSGB, Go and Node ran on one 16-core Linux machine, with other jobs running; A4H is a separate machine, and runs of the same build there vary by about 5 %.

A seeded variant with one error per rule equals vanilla on every host too. What changed in each step is in the release notes of v0.3.0 and v0.2.0.

Not a general TypeScript → ABAP compiler yet. The translator is tuned for abaplint core at commit 577f875e (2.120.56). Since v0.5.0 the default build includes all of core and all rules, with readable ABAP names. --scope zabapgit retains the old smaller six-rule, trace-pruned build. Unsupported operations are still refused with their TypeScript location, never answered silently differently. Certified on a real SAP kernel: TS-HA@A4H 11,060 / 11,060.

Goal: 100 % of abaplint — reached

The goal was the whole of abaplint core, not just the zabapgit paths: every test of abaplint's own suite passes on abaplint compiled by abapiti. The suite has 625 files; 11,060 of its mocha tests are active on Node (32 more are it.skip there too). The test files are compiled through abapiti together with the unpruned core, with a small TypeScript stand-in for mocha and chai, and run on TS-HG@Go, the fastest host.

Where it stood (12 Oct 2026, train 13, v0.4.0):

Measure Today Target
abaplint tests passing on the compiled abaplint (TS-HG@Go) 11,060 / 11,060, 0 wrong answers 11,060 / 11,060
Tests trapped / not registered on Go 0 / 0 0
Historical assume-integer full-core blocking diagnostics (--full --assume-int) 19 (644 → 33 in train 3 → 48 → 42 → 37 → 19); none of the 11,060 tests reaches them 0

Reached on every host: TS-HG@Go, TS-HA@OSGO and TS-HA@A4H (a real SAP 7.58 kernel), each 11,060 / 11,060. Next: a second project, the @abaplint/transpiler probe.

wasm/ and abap/wasm_compiler/: experimental, deprecated (2026-10-10): tests off by default (go test -tags wasmlegacy ./wasm), planned for removal; the supported path is TypeScript → HIR → ABAP/Go.

Quick start: three abaplints with one command

Download abapiti for your platform from the latest release, then:

abapiti abaplint -o out

abaplint 577f875e is built into the binary (every file checked against its recorded SHA-256), so this needs no network. The full core takes longer to build than the old pruned scope (--scope zabapgit) and writes:

Directory For Run it
out/osg/ open-steamgate, osgo and OSG-JS in an open-steamgate checkout: npm run osgo:unit -- ../out/osg or npm run osgjs:unit -- ../out/osg
out/a4h/ an ABAP system (the full core uses PCRE, requiring 7.55; kernel certification is in progress) import abaplint-577f875e-a4h.zip into $ZLNT, then abaplint-577f875e-a4h-registry.zip into $ZLNT_A4H with abapGit, then run ZLNT_REGISTRY_RUN as a background job (see A4H)
out/native/ a native command node tools/gogen/osabap.mjs ../out/native/zabaplint.prog.abap --lib ../out/native/lib in open-steamgate, or take zabaplint from the release

An opt-in fourth target, TS-HG@Go (TypeScript → HIR → Go), writes a standalone standard-library Go module to out/go and builds out/go/zabaplint-go when Go is on PATH:

abapiti abaplint -o out --target go
out/go/zabaplint-go --file zabapgit_standalone.prog.abap --config abaplint.json --deps deps.txt

TS-HG@Go permits reads in the directory trees containing the named file, config, deps list and each listed dependency. Dependency paths are relative to deps.txt; repeat -allow-read DIR to grant more roots. Symlinks and .. cannot escape those roots.

all retains the three ABAP targets: the automatic Go build would add a toolchain dependency and change the default command’s behavior. TS-HG@Go uses the same pinned sources, overrides and full core; see its limits.

To have the open-steamgate output check zabapgit itself, pass the inputs. They are embedded into a driver class whose result is compared with Node's:

abapiti abaplint -o out --input zabapgit/ --deps deps/src --config abaplint.json

Narration is on by default: every step prints what it did, with counts and timings. --quiet turns it off. Details: docs/abaplint-cli.md.

zabaplint: abaplint as one native command

The release also has zabaplint for Linux, macOS and Windows (amd64, arm64). It is the translated abaplint compiled TypeScript → ABAP → Go by open-steamgate's osabap:

zabaplint --file zabapgit_standalone.prog.abap --config abaplint.json \
          --deps deps.txt --times -allow-read .

deps.txt lists one dependency path per line, and -allow-read is the sandbox root for file reads. The output is the issue count, then one line per issue: key|severity|file|row:col|row:col|message.

Reproduce everything from scratch

git clone https://github.com/oisee/abapiti && cd abapiti
go build -o abapiti ./cmd/abapiti          # Go 1.26
./abapiti abaplint -o out                   # or: ./abapiti abaplint ~/src/abaplint -o out
go test ./hir/... ./tsfront ./cmd/...       # unit tests, emitter fixtures, the generation gate
  • Runtimes. CI runs the feature fixtures as ABAP Unit on osgo and OSG-JS at the pinned open-steamgate (.github/ci/osgo.ref).
  • Kernel. The kernel runs used a permanent package on A4H. The driver reads zabapgit from the table ZABAPITI_CORPUS, which is created by the abapGit package in tools/allbackends/corpus-abap/. The builder for its input archive is still a local script and comes with the next release.
  • Node reference. The Node reference is the same harness (registry_run.ts) run on abaplint's own TypeScript.
  • Pruning. The reachability manifest that decides which bodies are compiled was recorded with tools/registry-coverage.mjs (ADR 0009).

How it works in more depth: the ADRs (own object HIR, tsgo front end, ABAP 7.50 target, number semantics, reachability pruning).

Go frontend research: typed Go AST → HIR → Grace → ABAP assesses feasibility, semantic gaps and a staged validation plan. A follow-up daemon and channel proposal explores Go concurrency using ABAP Daemons, APC and AMC. These are research proposals; a Go frontend and concurrency runtime have not been implemented.

Super greets to @larshp for abaplint, the transpiler and the acceptance test: check zabapgit_standalone on the stack in under 5 minutes.

Legacy WASM: experimental, deprecated (2026-10-10). Before TypeScript: WebAssembly, LLVM IR and C → ABAP (QuickJS, Lua, Monocypher, QR codes and a donut on the SAP kernel)

News

2026-10-15 — v0.5.2: self-contained A4H packaging. The a4h core zip no longer carries the A4H registry driver; new -a4h-registry.zip includes the driver, reports and corpus/log runtime. Import core first, then registry. zlnt-system gains layer zlnt-registry-a4h; fixes system self-containment found by the E.10 OSGO proof.

2026-10-14 — 🎉🎉 v0.5.0: abaplint's whole test suite passes on a real SAP kernel. TS-HA@A4H 11,060 / 11,060, all 17 shards, run as background jobs on SAP 7.58 after an abapGit import of the readable $ZLNT core and the $ZLNT_TESTS_* packages. On OSGO, also 11,060 / 11,060. The default build now has all of core and all rules. The kernel taught two lessons: WHEN with && keys, and conditional super->constructor plus empty CASE (#153, #154). The last 5 tests were an empty regex that the kernel refuses (#155).

2026-10-12 — 🎉 v0.4.0: 100 % of abaplint's own tests on the compiled abaplint. All 11,060 Node-active tests pass on abaplint compiled by abapiti (TS-HG@Go), with 0 wrong answers, confirmed by two independent full runs. It took thirteen integration trains in two days (9,022 → 11,060 since the suite was wired up in full). Every new lowering came with a Node oracle. Each genuine mismatch caught on the way was stopped, root-caused and kept as a regression; one reached an integration train (train 9) and was fixed before it was merged, none reached main.

2026-10-10 — v0.3.0: 4× faster on open-steamgate, a Go target faster than Node, readable names.

  • TS-HA@OSGO 61 s → 14–17 s, close to Node (13–14 s). The biggest steps: toUpperCase on ASCII text through TRANSLATE (2.1×), numeric literals emitted as numbers instead of text, and open-steamgate's own fixes found on our input (#701, #706, #707).
  • TS-HA@A4H 207 s → ~172–179 s. int8 constants, the toUpperCase fast path and run_one (abaplint's combinators no longer build a one-element array per call).
  • TS-HG@Go. abapiti abaplint --target go emits the same HIR as a standalone Go module. zabaplint-go checks zabapgit in 7.9 s, Node takes 14 s. The release ships it for six platforms.
  • Readable names. ABAPITI_NAMES=readable gives ZCL_LNT_LEXER, ZIF_LNT_STATEMENT_RUNNABLE and so on: 2,001 readable names, none hashed. On A4H (package $ZLNT) the result is equal to vanilla and just as fast.
  • Grace runs the inlining by default, and every HIR site has a stable id for profiling (sites.json).

2026-10-10 — v0.2.0: the translated abaplint is 1.5× faster off-stack and 7% faster on the kernel.

  • Inlining. A HIR→HIR pass puts the bodies of small, never-overridden methods in place of their calls: 1,487 call sites, verified again afterwards. osgo goes from 70.4 s to 64.8 s; the kernel from 226.9 s to 212.5 s.
  • Integers instead of floats. TypeScript number becomes int8 where the code only computes with integers, and i where range inference proves it fits. About 1.3× on osgo.
  • Readable ABAP. Literal constants are CONSTANTS, calls are functional (x = obj->m( … ).) and names.json maps every ABAP name back to its TypeScript declaration.
  • Checked twice. A critic found one silent miscompile in the inliner before the release (a local without initializer inlined into a loop kept its value). It is fixed and has a test. Two open-steamgate gaps found on the way went upstream (#698, #700).
  • One archive per platform, abaplint-abap-<os>-<arch>, holds zabaplint, abapiti and a check kit that compares both zabapgit runs with Node's output.

2026-10-03 — three small programs run on the kernel bit for bit; JavaScript engines compared.

  • A QR-code encoder (Nayuki's qrcodegen, 16 KB of wasm), the Lua 5.4 interpreter (710 KB, five classes, 8/8 scripts) and Andy Sloane's donut.c (doubles, sin/cos) run on A4H and osgo and give the native answers, once signed division is exact (#23). The QR below came out of the SAP spool and scans; the donut frame too.
  • Three ways to run JavaScript in ABAP, on native, Node, osgo, OSG-JS and A4H: QuickJS compiled by ABAPiti, zmjs and Lars Hvam's zqjs (both hand-written in ABAP). On the kernel zqjs answers 12 of our 16 test scripts, 4–60× faster than QuickJS compiled from wasm on those, but 8.6× slower on sorting 10,000 numbers; QuickJS answers all 16. zmjs was not timed. That is why the next step is speed, and why SUPER-PLANS.md puts a typed IR (llvm/) forward as the production path.
  • Honest status: only the WebAssembly path is really verified (CI on wazero, osgo and OSG-JS, plus the kernel runs above). The llvm/ and TypeScript paths compile, but beyond five small C functions run once on SAP nothing they produce has been executed or checked.
  • Runtime gaps found on the way went to open-steamgate (#537–#543, label kernel-diff).

QR code for github.com/oisee/abapiti, encoded by qrcodegen compiled to ABAP and printed by the SAP kernel ASCII frame of the spinning donut, computed by donut.c compiled to ABAP on the SAP kernel

2026-10-03 — QuickJS runs on a real SAP kernel. Fabrice Bellard's QuickJS JavaScript engine, built for WebAssembly without SIMD (1.0 MB) and compiled by ABAPiti into 13 interfaces, a state class, 13 chunk classes and a facade (253K lines of ABAP), activates object by object on A4H (28/28 in 87 s) and evaluates JavaScript inside ABAP: 1+2, a loop to 100, Array.sort, JSON.stringify, a recursive fib(15), toUpperCase, Math.sqrt, Map and RegExp, and printf through WASI, all equal to the same module in wazero. The 9 tests take about 2 s on the kernel; the same classes pass on open-steamgate's Go runtime (osgo) too. Getting there needed kernel-valid runtime helpers, unique 30-character names, a nesting depth under the kernel's limit of about 128, and a split whose classes depend only on interfaces, so each one activates on its own.

Why? Because we can.

ABAPiti compiles WebAssembly, LLVM IR (so C, and in principle anything clang or rustc can lower) and TypeScript into ABAP, in the demoscene spirit of doing something just to see that it runs. It is the reverse direction of abaplint/transpiler, which takes ABAP out to JavaScript; ABAPiti brings other languages in. None of this is production software. It is a research toy that happens to produce ABAP a real SAP system accepts.

The story so far, with the bugs and the measurements, is a chapter of the open-steamgate demo book: “Because we can: C in ABAP” (по-русски).

A taste

This C, compiled to WebAssembly by clang:

static void qs(int lo, int hi) {
  if (lo >= hi) return;
  int p = a[(lo + hi) / 2], i = lo, j = hi;
  while (i <= j) {
    while (a[i] < p) i++;
    while (a[j] > p) j--;
    if (i <= j) { int t = a[i]; a[i] = a[j]; a[j] = t; i++; j--; }
  }
  qs(lo, j); qs(i, hi);
}

becomes ABAP like this (32-bit multiplication with WebAssembly's wrap-around, which a plain TYPE i would turn into an overflow dump):

lv_w = s1.
lv_w = lv_w * s2.
lv_w = lv_w MOD 4294967296.
IF lv_w > 2147483647.
  lv_w = lv_w - 4294967296.
ENDIF.
s1 = lv_w.

Generated code has no comments, no line longer than 255 characters (the limit the ABAP editor enforces), keeps the WebAssembly memory in one xstring changed in place with REPLACE SECTION, and needs nothing installed on the system besides the class itself.

What runs today

Historical WASM results below; wasm/ and abap/wasm_compiler/ are experimental, deprecated (2026-10-10): tests off by default (go test -tags wasmlegacy ./wasm), planned for removal; the supported path is TypeScript → HIR → ABAP/Go.

Every case is checked against the same program run natively (C compiled by gcc, and wazero), bit for bit.

Rung Size SAP kernel (A4H) OSG-JS osgo
add, factorial 62 bytes of wasm 7/7, 7/7 green in CI green in CI
Arithmetic edge cases (i32/i64 wrap, shifts, branches, memory.grow, saturating truncation, float traps) 796 tests via the corpus green in CI green in CI
C corpus: qsort, base64, crc32, fnv1a64, xorshift64*, Life, Mandelbrot, queens, sieve, recursion, function pointers, a Brainfuck interpreter 9 KB of wasm, 38 checks 38/38 12/12 programs 38/38
Monocypher: BLAKE2b, X25519, ChaCha20, Poly1305, Ed25519 sign and check 53 KB of wasm → 5,209 lines 10/10 in 29 s 10/10 10/10 in 78 s
QuickJS built without SIMD: JavaScript eval inside ABAP 1.0 MB of wasm → 253K lines in 15 classes + 13 interfaces 9/9, 28/28 objects activated 9/9

A sorted array of 500 numbers takes 6.1 ms on the kernel. What is still a draft or left out is listed in docs/TECH-DEBT.md.

What?

One Go module, one CLI (abapiti), several frontends. Status as of 2026-10-03:

Frontend Input → output What works today What does not (yet)
wasm/ (WASM → ABAP, Go) — experimental, deprecated (2026-10-10): tests off by default (go test -tags wasmlegacy ./wasm), planned for removal; the supported path is TypeScript → HIR → ABAP/Go .wasm → a self-contained global ABAP class (METHODS per export, linear memory as xstring); large modules split into a state class, chunk classes and one interface per chunk, each activatable on its own (--split, --class-lines); generated nesting stays below the kernel's limit. Backends: class, function group, hybrid, multi-class. See What runs today. i32 and i64 arithmetic wraps like WebAssembly; branches, loops, call_indirect, memory.grow, sign extension, bulk memory. Exceptions, SIMD, atomics; f32 is computed in double precision; NaN/Inf trap. See docs/TECH-DEBT.md.
abap/wasm_compiler/ (WASM → ABAP, written in ABAP) — experimental, deprecated (2026-10-10): tests off by default (go test -tags wasmlegacy ./wasm), planned for removal; the supported path is TypeScript → HIR → ABAP/Go .wasm xstring → ABAP source, then GENERATE SUBROUTINE POOL on SAP Self-hosting run on SAP (a 785-line compiler); it has an ABAP Unit class. Not packaged for installation. Depends on GENERATE SUBROUTINE POOL, which OSD most likely cannot run.
llvm/ (LLVM IR / C → ABAP) .ll or .c (via clang) → typed CLASS-METHODS; optional abapGit zip; multi-class split 3 tests pass (a 34-function C corpus, leaf functions, control flow). FatFS: 28 functions → 8,016 lines, 0 TODOs, verified 5/5 on SAP via GENERATE SUBROUTINE POOL. QuickJS: 537 methods / 124 K lines, 0 TODOs. QuickJS-as-ABAP is verified only natively (via llc), not on SAP. Test coverage is thin. .c input needs clang on the PATH.
ts/ (TypeScript → ABAP) TS → JSON AST (node + ts/ts_ast.js) → ABAP classes A lexer modelled on abaplint's was transpiled to ABAP (55 classes in ts/testdata/abaplint_lexer/) and ran on SAP. Needs node and npm install at runtime, and finds ts_ast.js only from a source checkout (or ABAPITI_TS_AST_PATH). Its test skips without the TypeScript toolchain.
ts2go/ (TypeScript → Go) TS AST → Go Produced valid Go from the same lexer. No tests, no caller.
jseval/ + abap/jseval/ A JavaScript interpreter in Go (the oracle) and in ABAP (ZCL_JSEVAL*) The Go side passes 109 subtests; the ABAP side ran on SAP (v0.3.3). No harness yet runs both on the same inputs.
Go → ABAP Does not exist.

Other bits: cmd/abapgit-pack/ packs .abap files into an abapGit zip, abap/abaplint-lexer.zip is the transpiled lexer as an abapGit package, and fun/ has examples and the QuickJS-on-SAP write-up.

Usage

go install github.com/oisee/abapiti/cmd/abapiti@latest

abapiti compile wasm add.wasm -o out/          # out/zcl_wasm_add.clas.abap
abapiti add.wasm                               # shortcut for "compile wasm", to stdout
abapiti compile llvm prog.c --class zcl_prog   # needs clang
abapiti compile llvm prog.ll --zip -o prog.zip # abapGit zip
abapiti compile ts lexer.ts -o out/            # needs node + npm install, from a checkout
abapiti abaplint -o out/                       # abaplint core → ABAP, no Node needed

abapiti abaplint translates abaplint's core (commit 577f875e, @abaplint/core 2.120.56) into 2,110 ABAP classes and interfaces, packaged for A4H (abapGit zip), open-steamgate unit runners and open-steamgate's native build. The build is pruned to what checking zabapgit_standalone with abapGit's ci/abaplint.json executes; see docs/abaplint-cli.md.

ABAPiti never talks to SAP. Deploy the output with vsp (vsp deploy out/zcl_wasm_add.clas.abap '$TMP') or abapGit.

How it's verified

Default Go unit tests (go test ./...) exclude the deprecated WASM path. Its opt-in tests (go test -tags wasmlegacy ./wasm) use wazero as the native reference. The legacy generated classes can be checked as ABAP Unit on osgo and OSD through the manual-only osd-m1.yml workflow. The larger-program results above are historical runs on a real kernel (A4H) with throwaway packages.

On every PR, CI's osgo job also collects the emitted ABAP fixtures from the default Go tests and the legacy ABAP Unit generator, then compiles them through gogen on the pinned OSG, without executing them. ABAPITI_ABAP_FIXTURE_DIR and the compile gate describe local reproduction and adding new emitter tests. CI (.github/workflows/ci.yml, the same checks as vsp's) runs on every pull request and push to main: build, vet, the tests with -race and a shuffled order, a clean tree after them, a lint gate on new code, and a leak scan; complexity metrics, a full lint and a "does the new test fail without the fix" check are advisory. One bot comment per pull request (ci-report.yml) sums them up, with deltas against main.

The target pipeline, per test case:

  1. Compile the input with abapiti and generate an ABAP Unit class whose expected values come from a native run (wazero for WASM, clang for C).
  2. Deploy both with vsp to the open-steamgate emulator (OSD), activate, and run the ABAP Unit tests.
  3. Compare the ABAP results with the native ones; any difference fails the build.

OSD activates code through the abaplint transpiler, so a green OSD run proves the generated ABAP passes abaplint and behaves correctly under that runtime. It does not prove kernel behaviour (TYPE i overflow, for one); that stays a check on a real system. The kernel behaviour the generated code relies on is pinned by the ABAP Unit repros in abap/osd_repro/, measured on a real system.

Roadmap

The WASM milestones below are historical; that path is deprecated and planned for removal.

  • M1 (done): abapiti compile wasm output for add and factorial, plus the generated ABAP Unit class, deploys, activates and runs green on a pinned OSD in CI (osd-m1.yml) and on a real kernel, including i32 wrap-around.
  • M2 (done on the kernel and osgo): the size ladder: the C corpus, Monocypher, and QuickJS evaluating JavaScript inside ABAP. QuickJS on OSG-JS is still to run.
  • M3: the TypeScript-transpiled lexer vs the @abaplint/core lexer on the same inputs.
  • M4: jseval (Go) and ZCL_JSEVAL (ABAP) conformance.

History

ABAPiti was split out of oisee/vibing-steampunk (vsp) with its git history: the commits that touched the transpilers keep their original authors and dates, trimmed to the moved paths. The design notes and session logs from that time are in docs/history/; paths there still say pkg/wasmcomp, pkg/llvm2abap and vsp compile, which are now wasm/, llvm/ and abapiti compile.

License

MIT, see LICENSE. Third-party notices are in NOTICE.

About

ABAPiti: because we can — transpile to ABAP. Compiles WASM and TypeScript into ABAP.

Topics

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages