Status
This page says what Sprite is today, in one place. See Compatibility with PAKCS and KiCS2 for what runs unchanged, what produces different output, and what Sprite refuses when you port a program from PAKCS or KiCS2.
The front end
Sprite translates Curry to FlatCurry with the Curry front end of PAKCS
3.10.0, the pinned release (front end 3.1.0). The binding optimization of PAKCS is applied
to the FlatCurry file as PAKCS applies it. Sprite’s own port of
icurry 3.3.0 writes the ICurry. The Curry library under curry/lib is
base 3.4.0 from PAKCS 3.10.0, with Sprite’s own Control.SetFunctions,
Control.Search.SetFunctions and Sprite.Stream.
Control.Search.SetFunctions, Control.Search.Unsafe and
Control.Search.AllValues run on Sprite’s set functions. Choices in
the body are captured, choices in arguments stay outside and duplicates
are kept. The search strategies they name are accepted and ignored:
every search uses Sprite’s scheduler and value order. rewriteAll and
rewriteSome of Control.Search.Unsafe use weak encapsulation too.
Control.Search.SearchTree compiles and builds its tree from allValues;
its externals have Curry alternatives under PAKCS.
Sprite provides weak encapsulation (Set functions).
Every module of the Curry library compiles, ships compiled and imports.
Missing externals refused by the support rule raise the named errors
listed in Compatibility with PAKCS and KiCS2. Other externals without a primitive in
the runtime raise not implemented at their call.
Curry.Compiler.Distribution, System.CPUTime, System.Environment,
Data.IORef, System.IO and System.IO.Unsafe have their primitives.
Debug.Trace.traceIO uses the current Python standard error stream, and
pure trace runs through System.IO.Unsafe.unsafePerformIO. The CPM
packages directory and process have registered primitives too.
spawnConstraint uses the suspension rule of &: it demands the
constraint first, runs the value expression when the constraint suspends,
and releases a value only after the constraint is True.
The unsafe variable observations use the evaluating configuration’s bindings.
compareAnyTerm orders variables before functions before data; variables
use internal group identifiers, partial functions use their qualified head
names and supplied arguments, and data use constructor declaration order
and lexicographic fields (numeric values compare numerically).
The library README describes the read/show syntax and ordering details.
Registered primitives use the same qualified names in native code and module images,
whether implemented in C++ or Python.
How code runs
The C++ runtime, libcurryrt, runs a function interpreted, compiled just
in time or compiled ahead of time. The JIT has two backends: LLVM through
llvmlite and C++ through a compiler in a child process. The flags
interpret, jit and jit_backend choose; Compilation Options
describes them and the supported platforms.
On Windows x64 the generated modules compile to DLLs with clang-cl of
Visual Studio, ahead of time and in the C++ tier of the JIT; the library ships compiled and interpret
defaults to new there as everywhere. A load maps the canonical DLL, and
a publication retires a mapped DLL under a generation name before it
replaces the canonical name. A saved program is a small native launcher
that runs the program with Python. It uses the saving interpreter,
falls back to python on PATH if needed and has no runtime DLL
dependency. The Windows workflow gates the native
run with clang-cl; Microsoft cl is not supported.
Sprite finds Visual Studio itself; no developer prompt is needed.
LLVM JIT batches persist beside module images as relocatable .jit
objects on supported Unix platforms. Current objects link before evaluation;
SPRITE_JIT_CACHE supplies a fallback for read-only products. Local stages
fill the library cache when llvmlite is present. Wheels omit native JIT
objects and Windows persistence remains future work.
The typed boundary
Sprite reads the type scheme of every symbol from the FlatCurry interface
beside its module. curry.term and symbol calls type expressions at construction,
convert Python values by the expected type, supply the class
dictionaries and report a typing failure at construction with
the error catalog. A goal without a type signature keeps
its class constraints and curry.eval(), the REPL, sprite-exec
-g and curry.save default them with the table of the PAKCS REPL
(Defaulting an ambiguous goal). A text goal may end in where x free, and
curry.solve reports the bindings with each value.
The benchmark harness and committed records are described on Performance.
Known limits
Arithmetic on a free variable of a built-in type suspends the evaluation;
==on such a variable in a required position binds it through the binding optimization and=:=always does, as in PAKCS.There is no debugger for a nondeterministic computation. Development Variables lists the trace build and runtime counters.
A value built by a functional pattern stays narrowed. Every later comparison resolves it again. Read it through a set function (
set1,sortValues) to resolve it once, as 24: A makefile in Curry does. Issue #86 records the measurements.A functional-pattern binding (
=:<=) can lose call-time choice for a shared application that reads the bound variable (#251). For example:pick n = if n == 1 then 0 ? 1 else failed let r = pick x in (x =:<= 1) &> (r,r)
Sprite gives four pairs. Call-time choice and PAKCS 3.10.0 give only
(0,0)and(1,1). The same mechanism makes currypp’s contract check of a seven-element sort recompute exponentially (#247). 0.9.0a3 ships with this known defect. The general fix comes after the release (decision #269, 2026-11-08).Under the C++ backend of the JIT, a module of the same name cannot be reloaded from another directory in one process. An edited source is not read again in one process. A program shorter than its compile ends interpreted with no object written (#179).
What is experimental
The Memory Pool System collector (
make GC=mps), optional, off by default; the default collector is the mark-and-sweep collector of the block heap.The write counters of the collector (
make GC_WRITE_COUNTERS=1) and the scheduler counters (make COUNTERS=1): instrumentation for the measurements of the generational design and of the parallel-evaluation gate, off in the default build.The conda recipe under
conda/: a scaffold, not published.The ICurry cache (
SPRITE_CACHE_FILE): off by default outside the test drivers; CMakeENABLE_ICURRY_CACHE=ONturns it on (see Compiler and runtime variables).
Where the plan lives
Contributing links to the tracker and the current milestone.