<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cie-pseudocode-compiler.git/include/cps/RuntimeCheck.h, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://git.ov4.org/cie-pseudocode-compiler.git/atom/include/cps/RuntimeCheck.h?h=main</id>
<link rel='self' href='https://git.ov4.org/cie-pseudocode-compiler.git/atom/include/cps/RuntimeCheck.h?h=main'/>
<link rel='alternate' type='text/html' href='https://git.ov4.org/cie-pseudocode-compiler.git/'/>
<updated>2026-10-27T14:00:16Z</updated>
<entry>
<title>feat(library)!: replace #LIB with __LIB source regions</title>
<updated>2026-10-27T14:00:16Z</updated>
<author>
<name>_ov4</name>
<email>ov4@ov4.org</email>
</author>
<published>2026-10-27T14:00:16Z</published>
<link rel='alternate' type='text/html' href='https://git.ov4.org/cie-pseudocode-compiler.git/commit/?id=3d7d1d7cf8685f0d9230cd89d06017869da1c6d8'/>
<id>urn:sha1:3d7d1d7cf8685f0d9230cd89d06017869da1c6d8</id>
<content type='text'>
Track library mode by original source line, including deferred template bodies
and automatic object cleanup. Update call lines from ordinary code and migrate
the embedded standard library to PP_DEFINE __LIB.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat(driver): add #LIB directive hiding library lines in runtime errors</title>
<updated>2026-10-18T08:04:15Z</updated>
<author>
<name>_ov4</name>
<email>ov4@ov4.org</email>
</author>
<published>2026-10-18T08:04:15Z</published>
<link rel='alternate' type='text/html' href='https://git.ov4.org/cie-pseudocode-compiler.git/commit/?id=927e3fc0384c941f9ad313a28768660c3cdb1777'/>
<id>urn:sha1:927e3fc0384c941f9ad313a28768660c3cdb1777</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>refactor(runtime): write runtime diagnostics with fprintf(stderr)</title>
<updated>2026-10-17T09:46:23Z</updated>
<author>
<name>_ov4</name>
<email>ov4@ov4.org</email>
</author>
<published>2026-10-17T09:46:23Z</published>
<link rel='alternate' type='text/html' href='https://git.ov4.org/cie-pseudocode-compiler.git/commit/?id=0305500e31eda6fe6da84f88748fc20843aebbce'/>
<id>urn:sha1:0305500e31eda6fe6da84f88748fc20843aebbce</id>
<content type='text'>
Replace snprintf+write(2) with a single fprintf call on the platform's
stderr: the C library's stderr / __stderrp, or __acrt_iob_func(2) on
Windows, which the embedded runner binds to the host shim.

Co-Authored-By: Claude Sonnet 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat(runtime): write runtime diagnostics to stderr</title>
<updated>2026-10-17T09:35:19Z</updated>
<author>
<name>_ov4</name>
<email>ov4@ov4.org</email>
</author>
<published>2026-10-17T09:35:19Z</published>
<link rel='alternate' type='text/html' href='https://git.ov4.org/cie-pseudocode-compiler.git/commit/?id=6b332f91c82da6e19efad92b58ac1d9c1bc9eec0'/>
<id>urn:sha1:6b332f91c82da6e19efad92b58ac1d9c1bc9eec0</id>
<content type='text'>
Runtime check messages and the unhandled-exception message were printed
to stdout by the generated program, so `cpsc x.cps -r &gt;out.txt` captured
them. They are now formatted with snprintf and written with write(2).
Test expectations and docs are updated accordingly.

Co-Authored-By: Claude Sonnet 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix(codegen): restore runtime diagnostics before throwing</title>
<updated>2026-10-15T02:41:11Z</updated>
<author>
<name>_ov4</name>
<email>ov4@ov4.org</email>
</author>
<published>2026-10-15T02:41:11Z</published>
<link rel='alternate' type='text/html' href='https://git.ov4.org/cie-pseudocode-compiler.git/commit/?id=c4565386553ea86308a9487650d2435804893ed0'/>
<id>urn:sha1:c4565386553ea86308a9487650d2435804893ed0</id>
<content type='text'>
Reuse historical runtime messages and source-line reporting for arithmetic,
array, enum, pointer and file checks while preserving anonymous exceptions.
Update the manuals and subsystem guidance to describe diagnostic output.

Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat(compiler)!: add try-catch with C++ stack unwinding</title>
<updated>2026-10-13T14:52:57Z</updated>
<author>
<name>_ov4</name>
<email>ov4@ov4.org</email>
</author>
<published>2026-10-13T14:52:57Z</published>
<link rel='alternate' type='text/html' href='https://git.ov4.org/cie-pseudocode-compiler.git/commit/?id=a484f314b719aec5ed7bdc6f08403342b2125561'/>
<id>urn:sha1:a484f314b719aec5ed7bdc6f08403342b2125561</id>
<content type='text'>
Add TRY/CATCH/ENDTRY and anonymous THROW statements. Use LLVM exception
handling and the C++ ABI to propagate exceptions across function calls,
clean up catch state, and handle uncaught exceptions at the program boundary.
Register exception runtime symbols for the statically linked embedded runner.

Verify runtime checks, nested catches, returns, loops, and invalid syntax
with smoke programs; exercise unwinding with MCJIT, lli, and native binaries.

BREAKING CHANGE: Runtime check failures now throw anonymous exceptions and
print only a generic message when uncaught. Native binaries require linking
the C++ runtime.

Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: whole arrays (and records) as FUNCTION/PROCEDURE parameters</title>
<updated>2026-07-26T17:42:08Z</updated>
<author>
<name>_ov4</name>
<email>ov4@ov4.org</email>
</author>
<published>2026-07-26T17:42:08Z</published>
<link rel='alternate' type='text/html' href='https://git.ov4.org/cie-pseudocode-compiler.git/commit/?id=a44f1246dbe24fc813a212a5ef3f5811b1d6402a'/>
<id>urn:sha1:a44f1246dbe24fc813a212a5ef3f5811b1d6402a</id>
<content type='text'>
- Parameter syntax lands end-to-end: ARRAY OF T (rank 1, bounds travel
  with the argument) and ARRAY[l:u,...] OF T (any rank, literal bounds as
  a checked contract). Element type and rank must match exactly.
- Flattened ABI: each rank-R array parameter becomes a data pointer plus
  kBoundArgsPerDim i64 bounds per dimension. The callee rebuilds
  ArrayMetadata from those bounds (ArrayHandler::bindArrayParameter via a
  binder callback injected by CodeGen, so FunctionGen stays ignorant of
  the array subsystem); the checked-indexing pipeline is reused unchanged.
- BYVAL (the CIE default) copies the whole buffer at callee entry
  (malloc+memcpy, never freed — consistent with the string policy) so
  callee writes stay invisible; BYREF binds the caller's buffer.
- Bounded-parameter contract: compile-time comparison when the caller's
  bounds are constants, else a runtime [Fatal] check
  (RuntimeCheck::emitArrayArgBoundsCheck).
- marshalCallArgs gains the array branch and a call-site line number
  (CallStmtAST now carries one); whole-array-to-scalar keeps a clear
  error, FUNCTION RETURNS ARRAY is a dedicated parse error.
- Verified: BYREF fill/sort-style mutation, BYVAL copy invisibility,
  2-D bounded params, ARRAY OF &lt;record&gt; with field writes through the
  parameter, bounds-contract mismatches at compile time and run time.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: user type registry and enumerated types (CIE 4.1/4.2)</title>
<updated>2026-07-26T17:32:24Z</updated>
<author>
<name>_ov4</name>
<email>ov4@ov4.org</email>
</author>
<published>2026-07-26T17:32:24Z</published>
<link rel='alternate' type='text/html' href='https://git.ov4.org/cie-pseudocode-compiler.git/commit/?id=f19f1c956780f41f1440b372187770ce0be8efed'/>
<id>urn:sha1:f19f1c956780f41f1440b372187770ce0be8efed</id>
<content type='text'>
- TypeSystem: TypeKinds Enum/Record/Pointer with per-kind payloads and
  checked accessors; two-pass registration (names first, then definitions
  in source order) so pointer TYPEs may forward-reference; enum-constant
  table owned by TypeSystem so constants stay visible inside function
  bodies across the Symbols save/clear/restore. Dead surface removed
  (Custom kind, Printable/Builtin/ReferenceLike, ElementSize, hasType,
  CodeGen::getNamedValue/getLLVMType).
- Enums are i64 with 0-based ordinals (constexpr kEnumOrdinalBase); all
  type identity is by NAME. New emitCoercedExpr is the single admission
  gate, replacing raw coercion at assignments, array stores, BYVAL args,
  RETURN, IF/WHILE/REPEAT/FOR operands, file operands and builtin args;
  coerceValueToType now hard-errors if a user-kind target reaches it.
- Binary ops with user-kind operands are intercepted ahead of
  ArithmeticHandler ('&amp;'-intercept precedent): same-enum comparisons,
  enum +/- INTEGER (with a runtime range check, [Fatal] on overflow, the
  only site that can manufacture an invalid ordinal), same-name pointer
  =/&lt;&gt;; everything else is a compile error naming the operator.
- OUTPUT is an exhaustive switch over TypeKind (enum prints its ordinal;
  record/pointer are compile errors, also covering whole-array OUTPUT);
  INPUT's silent %lld fallback for unknown kinds is now an explicit error.
- Enum value names are globally reserved: collisions with DECLARE,
  array names, parameters and function names are compile errors.
- RuntimeCheck: emitEnumRangeCheck + emitNullDerefCheck (used by the
  pointer phase) following the emitIndexCheck recipe.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: implement CIE 9.1 text file handling (OPENFILE/READFILE/WRITEFILE/CLOSEFILE/EOF)</title>
<updated>2026-07-26T15:45:40Z</updated>
<author>
<name>_ov4</name>
<email>ov4@ov4.org</email>
</author>
<published>2026-07-26T15:45:40Z</published>
<link rel='alternate' type='text/html' href='https://git.ov4.org/cie-pseudocode-compiler.git/commit/?id=344206d57e834b2394cbe2ec0df50b04a8b3c171'/>
<id>urn:sha1:344206d57e834b2394cbe2ec0df50b04a8b3c171</id>
<content type='text'>
Front end: OPENFILE/READFILE/WRITEFILE/CLOSEFILE plus reserved mode
keywords READ/WRITE/APPEND (RANDOM reserved with a dedicated
not-implemented error); statement nodes in new FileAST.h, parsing in new
ParserFile.cc; EOF joins the Builtins table as the 12th builtin and
CallExprAST now carries a line number for its runtime diagnostics.

Runtime: new FileHandler (StringHandler-shaped leaf) lazily synthesizes
internal __cps_file_* helper functions and a 16-slot open-file table
keyed by filename content (strcmp — STRING '=' is pointer identity).
EOF is an fgetc/ungetc peek; READFILE grows a malloc/realloc line buffer
and strips a trailing CR; fopen uses text modes so mingw-w64 line
translation works. File-free programs get byte-identical IR. All misuse
(not open, wrong mode, reopen, fopen failure, read past EOF, table full)
dies with the existing "[Fatal] line N:" pattern via a new
RuntimeCheck::emitErrorAndExit overload taking runtime printf args.

Also fixes a pre-existing ArithmeticHandler hole surfaced by adversarial
review: mixed-width integer operands (i1 BOOLEAN / i8 CHAR vs i64) now
widen via ZExt instead of emitting invalid IR, and remaining type
mismatches get a clean diagnostic; -EOF(f) and -IS_NUM(x) compile.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Added runtime check for array index and division</title>
<updated>2026-01-30T02:06:37Z</updated>
<author>
<name>ov-4</name>
<email>hausemasterstream@gmail.com</email>
</author>
<published>2026-01-30T02:06:37Z</published>
<link rel='alternate' type='text/html' href='https://git.ov4.org/cie-pseudocode-compiler.git/commit/?id=766a4b8e5236bffb40984439a79186c5ee823ff8'/>
<id>urn:sha1:766a4b8e5236bffb40984439a79186c5ee823ff8</id>
<content type='text'>
</content>
</entry>
</feed>
