Knowledge representation + programming

Axioma.

Represent knowledge.
Compute its consequences.

Express concepts, facts and rules. Inspect what follows from your assumptions. Build programs that use those results, in the same language.

An open-source language with a native interpreter and a browser playground.

Follow the example ↓
Premise → conclusion → revisionRun in Playground ↗
relation human(name)
assert/axiom human("socrates")
mortal(X) whenever human(X)

count_mortals() = len({ X | X <- mortal(X) })
println(count_mortals())
why mortal("socrates")

forget_cascade("human", "socrates")
println(count_mortals())
Output
1
Explanation for: mortal(socrates)
This is a theorem derived by strict inference from:
  - human("socrates")  [axiom]

0

Follow the reasoning

A conclusion with a reason.

The example above combines a rule, a query and an ordinary function. Changing the knowledge changes the function’s result.

  1. 01

    State the premise

    We take Socrates’ humanity as an axiom of this example and declare the rule that humans are mortal.

  2. 02

    Derive and explain

    The query derives Socrates’ mortality. why traces the conclusion to its supporting premise.

  3. 03

    Use it in a program

    A function counts the query’s results. Knowledge queries and ordinary computation share one environment.

  4. 04

    Revise the knowledge

    Withdrawing the sole supporting fact removes its dependent conclusion. The count becomes zero.

What this establishes: a consequence of the declared premises and rule, followed by a dependency-aware revision. Zero means the query now derives no members. Grounding records the role and derivation of a claim; the truth of a real-world premise still needs evidence.

One language, connected capabilities

Model. Reason. Program.

Readable, mathematical forms for knowledge work, together with the functions, data structures and numerical tools that turn a model into a working program.

I · Representation

Concepts, relations and sets

Describe a domain with concepts, fields, inheritance and classification rules. Query relations with set-builder notation. Concepts can also carry their purpose, defining boundary, examples and counterexamples.

A definition that classifiesRun in Playground ↗
concept Person
Person has age
ada: a Person { age: 36 }
Adult defines { is Person and age >= 18 }
println(ada is Adult)
println({ n | n <- 1..6, n mod 2 == 0 })
Output
true
{2, 4, 6}
Explore the language tutorial →

II · Logic

Make uncertainty explicit

Use classical logic, quantifiers and typed many-valued truth. Belnap’s four values distinguish support, denial, conflicting information and missing information. Strict rules derive conclusions; defeasible rules express defaults with exceptions.

Unknown, conflicting, and quantifiedRun in Playground ↗
println(?ᵇ)
println(⊤⊥ᵇ)
println(⊤ᵇ and ⊤⊥ᵇ)
println(forall x in {2, 4, 6} | x mod 2 == 0)
Output
?ᵇ
⊤⊥ᵇ
⊤⊥ᵇ
true

The first two lines distinguish an information gap from a conflict. Each logic gives its operators a defined meaning.

Explore missing and conflicting information →

III · Programming

Functions that work with data

Compose functions, match patterns, build pipelines and call collection methods. Dotted calls broadcast across data; connected dotted expressions fuse. Type annotations, contracts, modules and errors as values support larger programs.

Broadcast, transform, reduceRun in Playground ↗
double(x) = 2*x
next_value(x) = x+1
let xs = [1, 2, 3]
println(next_value.(double.(xs)))
println(xs.map(double) |> sum)
println(xs.length())
Output
[3, 5, 7]
12
3

let declares a fresh immutable binding; var declares a mutable one. : and = bind or update. The first printed expression fuses; a pipe between stages is a materialization boundary.

Learn functions and broadcasting →

IV · Computation

Exact numbers and matrices

Compute with arbitrary-precision integers and rational values, including exact matrix operations. Use explicit Float conversion when approximation is intended. Matrices have a shape; their linear indexing and cell iteration follow row-major order.

Exact arithmetic, explicit approximationRun in Playground ↗
m = matrix([[1, 2], [3, 4]])
println(inv(m)[:])
println(1 / 8)
println(fdiv(1, 8))
for cell in m
    println(cell)
end
Output
[-2, 1, 3/2, -1/2]
1/8
0.125
1
2
3
4

Matrix inversion preserves the fractions here. fdiv requests a Float result. The loop visits cells in the same order as linear indexing.

Read the numeric and collection reference →

V · Reflection

Programs can inspect programs

Functions are values. Quotation, AST inspection and hygienic macros make code available to code. Ask the runtime for a function’s documentation, signature or source, and compose functions in either direction.

A macro and a compositionRun in Playground ↗
macro double(x) quasiquote(unquote(x) * 2)
println(double(21))
square(x) = x*x
println((square << (x -> x+1))(3))
Output
42
16

<< composes right to left, like . >> composes left to right. ASCII forms keep the same operations easy to type.

Explore function composition →

VI · Data

Query the same facts in SQL

A relation is a set of tuples. Axioma’s SQL surface queries and updates those relations; a set comprehension can ask the same question. Native knowledge-base persistence can retain supported knowledge across sessions.

Two notations, one relationRun in Playground ↗
relation teaches(teacher, student)
assert teaches("Socrates", "Plato")
assert teaches("Socrates", "Xenophon")
println({ S | S <- teaches("Socrates", S) })
println([sql | SELECT student FROM teaches
               WHERE teacher = 'Socrates'])
Output
{"Plato", "Xenophon"}
{"Plato", "Xenophon"}

These two queries return the same set. The SQL surface has a defined subset and its own documented limits.

Read the SQL reference →
More tools for everyday programs

Collections and control flow

Arrays, dictionaries, tuples, sets, bags and stacks; lazy ranges, generators and streams; comprehensions, loops and recursion. Choose the data structure and traversal that express your problem.

Values and structure

Strings and Unicode, enumerations and algebraic data types, complex and monetary values, dates, times and durations. Modules, closures, pattern matching and contracts help organize the program around them.

Browse data types, control flow and modules →

Ideas put to the test

Read the source. Inspect the model.

The studies use Axioma to examine arguments and models. Source passages, interpretation choices and executable examples make it possible to ask what a formalization preserves and what its conclusions depend on.

Philosophy · Epictetus

Symbolization

The Enchiridion beside its Axioma models: control, judgment, different viewpoints and revision. See where the interpretation adds an assumption and what each example establishes.

Read the Handbook study →

Psychology · ACT

Acceptance and action

Represent central claims of Acceptance and Commitment Therapy. Separate definitions and adopted premises from empirical hypotheses, then compute their conditional consequences.

Read the ACT study →

Learn, build and connect

From a first expression to a knowledge program.

Learn at your own pace

Start with the Textbook for a guided introduction to designing programs. Already programming? Explore the interactive tutorial and keep the Manual beside your code.

Work in your editor

The native REPL, Unicode completion, VS Code/Cursor language support, formatter and debugger support everyday work. Static checks and runtime contracts help you inspect a program before and while it runs.

Editor setup →

Connect tools and agents

The MCP server exposes execution, knowledge queries and inspection to compatible clients. Native integrations include Python execution and translation; configured AI providers can assist with symbolization. Review the resulting formalization against its source.

Native setup and integrations →

Implementation status

Choose the surface for your task.

Interpreter & browser

The native interpreter is the reference runtime. The examples on this page can be opened in the browser playground. Browser execution excludes host file/process access, external runtimes, native persistence and provider-backed AI features.

Tools still developing

The bytecode VM, persistence, modules, MCP and SQL have beta contracts. VM coverage differs from the interpreter; unsupported paths should report a refusal. The Manual and maturity reference describe the relevant boundaries.

Research surfaces

Advanced modal, epistemic, probabilistic and other knowledge-representation systems include experimental work. A representation, a working example and a general proof procedure are different levels of support.

Read the feature maturity and compatibility policy →
Explore the logic and representation families

Truth and inference

Classical propositions and quantified expressions; Kleene K3, Łukasiewicz Ł3, Gödel G3 and Belnap B4 values; strict and defeasible rules. Typed truth operations dispatch by their operands. Solver blocks provide separate SAT, SMT, answer-set, chase and quantified-reasoning surfaces with result metadata.

Worlds and viewpoints

Modal, temporal, epistemic and deontic representations; description, free, fuzzy and probabilistic logic; higher-order representations. Their semantics and execution coverage vary. Sharing notation does not automatically establish a proof across different logics.

Representing meaning

Frames and concepts, relations and rules, semantic networks, conceptual and existential graphs, conceptual spaces, semantic primes and conceptual dependency. These offer different ways to structure a domain, with different maturity levels.

Explaining and revising

Grounding and justifications, assumptions and conjectures, defaults and exceptions, aspectual descriptions with qua, and stored belief attributions. Inspect how a conclusion was obtained and revise supported dependencies when premises change.

Explore the complete language reference →

The idea behind Axioma

Calculemus.
Let us calculate.

Axioma takes inspiration from Leibniz’s characteristica universalis and calculus ratiocinator: a language for expressing ideas and a calculus for reasoning with them.

That ambition guides its cognitive approach to programming: make concepts, assumptions and explanations explicit, then study them through computation. Executable philosophy is one application; knowledge models and ordinary software belong in the same environment.

Explore the philosophical foundations →