SK is a conceptual programming language designed to handle incomplete, approximate, or partially known information as first-class entities. Unlike traditional languages, SK does not assume all variables have exact values. Instead, it tracks uncertainty explicitly throughout calculations, decisions, and control flow.
The language is designed for safer, more honest, and analyzable computation in contexts where data may be noisy, incomplete, or evolving.
For the moment, SK is implemented as a Python-based prototype. This allows experimenting with the core concepts of uncertain values, intervals, and symbolic expressions using Python classes and operator overloading. Variables such as SValue, SSymbolic, and their variants simulate the behavior of the language, while arithmetic operations automatically propagate uncertainty and generate symbolic expressions when operands are unknown or partially known. This approach provides a flexible environment to test and refine the semantics of SK before developing a full compiler or interpreter.
In order to run the python sk tests:
python3 sk.py <testname> # only after 'test-', inside ./python-prototype/Please contact for license information, still in the works.
SK supports several kinds of values:
- Known values – exact, fully determined numbers or objects:
let n = 3 // n is exactly 3- Intervals – ranges of possible numeric values:
let temperature = [18..24] // temperature can be any value between 18 and 24- Unknown values – undefined, but tracked:
unknown x- Symbolic values – formulas that may depend on unknowns or intervals:
symbolic area
area = side^2- Quiet symbolic values – similar to symbolic, but if unresolved, printing hides the formula:
quiet volume
volume = side^3- Constant symbolics – immutable symbolic expressions:
const symbolic k = a + b
const quiet j = a + (2 * b)- All arithmetic operators propagate uncertainty:
let a = 2
unknown b // 'Same as' let b = unknown
symbolic z = a + b
print(z) // → a + b
print(z.resolve()) // → 2 + unknown
b = 3
print(z) // → 2 + 3
print(z.resolve()) // → 5- Zero propagation and Exponentiation edge cases:
0 * unknown = 0
0 ^ 0 = 1- Symbolics in SK represent arithmetic expressions over unknown or interval values. They are created automatically whenever an operation involves unknowns or other symbolics.
Creation:
unknown b
let a = 2
symbolic z = a + b // automatically creates a symbolic expression
Resolution:
-
z itself preserves the symbolic formula (a + b)
-
z.resolve() evaluates as much as possible using known operands (2 + unknown)
When all operands are known, z.resolve() returns a concrete known value
b = 3 // not unknown anymore
print(z) // 2 + 3
print(z.resolve()) // → 5Quiet Symbolics
- Quiet symbolics (quiet) hide the formula if not fully resolvable:
quiet volume
volume = side^3
print(volume) // → unknown if side is unknownConstant Symbolics
- Immutable symbolic expressions (const) cannot have their operands changed once created:
const symbolic z = a + bThis guarantees the symbolic formula will not be altered during program execution.
- Control flow respects uncertainty:
let x = [0..1]
if x > 0.5 {
result = "high"
} else {
result = "low"
}
// SK merges both possibilities and produces
// result = ["low".."high"] = interval from low to high- Functions can accept uncertain values and propagate uncertainty:
fn addUp(n) {
let result = n * (n + 1) / 2
print(result)
}- Functions operate seamlessly on known, interval, unknown, and symbolic values.
- Future SK syntax may allow constraints on unknown values:
unknown x > 0 // x is unknown but positive
unknown y % 2 == 0 // y is unknown but evenSK makes unknown and partially known values first-class citizens. Calculations propagate uncertainty, and control flow respects partial knowledge.
- This allows developers to:
- Write safer programs for uncertain environments
- Track assumptions explicitly
- Produce explanations for derived values
- Reason rigorously about partially known information
SK transforms programming from assuming precision to honestly modeling knowledge and ignorance, enabling robust, intelligent systems.