PYTHON 3.11 โ DETERMINISTIC PORTABLE ISO C11
PyCForge is a bounded Python-to-C source transpiler with a desktop workspace, command-line interface, and structured Python API.
| Application | {{APPLICATION_VERSION}} | Converter contract | 0.16.0 |
|---|---|---|---|
| Source grammar | Python 3.11 | Target | Portable ISO C11 source |
Save the following source as example.py:
def add(left: int, right: int) -> int:
return left + right
In the workspace, open the file and choose Transpile Source
Bundle (Ctrl+Return). From a terminal:
pycforge convert example.py --output example.c
A successful result contains a typed C prototype and definition using
int64_t. Generated C is published only after the complete source
bundle passes parsing, normalization, analysis, proof validation, C-IR
validation, rendering, and conformance checks.
Use an isolated virtual environment. Substitute the actual archive location if it is not in the current PowerShell directory.
py -3.12 -m venv .venv .\.venv\Scripts\python.exe -m pip install --upgrade pip .\.venv\Scripts\python.exe -m pip install .\pycforge-1.0.1.tar.gz .\.venv\Scripts\pycforge-workspace.exe
Verify the command surface and installed version:
.\.venv\Scripts\python.exe -c "import pycforge; print(pycforge.__version__)" .\.venv\Scripts\pycforge.exe --help
For source review after extraction, create the environment beside the
extracted directory and install the directory with
python.exe -m pip install .. Keep review results separate from the
original archive so its checksum remains meaningful.
| Family | Admitted surface | Detailed reference |
|---|---|---|
| Typed scalars | bool, signed 64-bit int, finite float, bounded strings, annotated top-level functions, assignments, returns, arithmetic, comparisons | Types and expressions |
| Control flow | Reachability-aware conditionals, branch-defined scalar publication, while, positional range, fixed-container loops, break, continue, loop-else | Control flow and scope |
| Fixed data | Homogeneous local lists, tuples, dictionaries, numeric/Boolean sets, literal access, set membership, bounded ordered-container iteration, immutable automatic static records | Containers and records |
| Calls and bundles | Direct calls, positional and supported keyword binding, required keyword-only parameters, selective cross-module imports, explicit 1โ64 document bundles | Calls, modules, and bundles |
| File effects | Bounded whole-file UTF-8 reads, exact UTF-8 writes, sequential closed sessions, ownership transfer, cleanup, explicit generated-C status ABI | File I/O and C ABI |
| Conversion engineering | Five core Ting proof agents plus typed capability/resource binding, appendable roles, tested RuleSpecs, reproducible verified Compact-IR, indexed matching, and fail-closed shadow review | Ting conversion agents |
F3 and Shift+F3 move through global matches.