English keywords · readable programs

Describe what is known and what you want to ask.

The parser, formatter, and type checker are implemented in C++. Blocks use two-space indentation, variables start with uppercase letters, and declarations are explicit.

Data and joins

A database identifies storage. Sources describe physical tables. A dataset is a read-only selection or combination.

Sources joined in one dataset must use the same database connection.

database local:
  engine sqlite
  path "shop.sqlite"

source customers:
  database local
  table "customers"
  column id: integer
  column name: text

source orders:
  database local
  table "orders"
  column customer_id: integer
  column total: real

dataset customer_orders:
  from customers as customer
  left join orders as order_item on customer.id = order_item.customer_id
  select customer.name as customer_name
  select order_item.total as total

Logic and unknown knowledge

Facts and rules use a Prolog-inspired open-world model. Knowledge that cannot be proved is unknown, not automatically false.

parent(person_a, person_b)
parent(person_b, person_c)

grandparent(X, Z)
  if parent(X, Y)
  and parent(Y, Z)

ask grandparent(person_a, Who)

Bayesian inference

The C++ runtime performs Bayesian and HDI calculations with explicit seeds and diagnostics. An LLM is never part of the mathematics.

p ~ beta(alpha = 2, beta = 2)
successes ~ binomial(trials = 20, probability = p)

observe successes = 14
ask p
  interval 0.89 hdi