Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
8000 GitHub - engboris/stellogen: An experimental language exploring computation and meaning through term unification, with logic-agnostic types.
Nothing Special   »   [go: up one dir, main page]

Skip to content

engboris/stellogen

Repository files navigation

Stellogen

A programming language where computation and types are built from the same mechanism: term unification.

Status: Experimental License: GPL-3.0 OCaml

Stellogen is a research language exploring what programming looks like without primitive types or fixed logical rules, just elementary interactive building blocks based on term unification.

Status: Experimental proof of concept / Research project / Esoteric language (not production-ready)


Why Stellogen?

Traditional typed languages use types to constrain programs and ensure correctness. Types act as questions, programs as answers. This is powerful but also constraining, it defines which questions you can even ask.

Stellogen explores a different path:

  • Computation and typing use the same mechanism (term unification)
  • No primitive types or fixed logic imposed from above
  • The compiler only checks that blocks connect: semantic power belongs to you

This shifts responsibility from the language designer to the user. With that power comes the need for discipline, but also the freedom to explore computational models that don't fit traditional type systems.

Influences

Stellogen draws inspiration from:

  • Prolog/Datalog - Unification and logic programming
  • Smalltalk - Minimalism and message-passing
  • Rocq (Coq) - Proof-as-program paradigm
  • Scheme/Racket - Metaprogramming philosophy
  • Shen - Optional type systems and user responsibility
  • Girard's Transcendental Syntax - Theoretical foundation

What Makes Stellogen Different?

  • No primitive types - Types are user-defined as sets of interactive tests
  • Unification everywhere - The same mechanism handles both computation and type checking
  • Logic-agnostic - Build your own logic rather than conforming to one imposed by the language
  • Multi-paradigm - Express logic programming, functional, imperative, or OO styles using the same underlying mechanism

Stellogen's constellation-based model supports multiple programming paradigms:

Paradigm Stellogen Equivalent
Logic Constellations (elementary blocks)
Functional Layered constellations enforcing order of interaction
Imperative Iterative recipes for building constellations
Object-oriented Structured constellations

Quick Example

' Define variable x as positive first-order term +f(a)
(:= x (+f a))

' Define variable y as block of terms containing +f(X) and X
(:= y [(-f X) X])

' Display [(-f X) X] on screen
(show #y)

' Make x and y interact along (+f a) and (-f X)
' The conflict is resolved and propagated to the other term X
' It results in [a]
(:= result (exec #x @#y))

' Display result [a] on screen
(show #result)

Getting Started

1. Install

Option A: Download Binary (fastest)

  • Get the latest release from Releases then put the executable in your PATH as sgen.

Option B: Install via opam (up-to-date and more convenient)

opam pin stellogen https://github.com/engboris/stellogen.git
# The command sgen is directly accessible from your PATH

Option C: Build from Source

# Install dependencies
opam install . --deps-only --with-test

# Build
dune build

# Executable will be in _build/default/bin/
# You can put it in your PATH for more convenience

Option D: Build with Nix

nix develop
dune build

2. Run Your First Program

Assuming the executable is named sgen and that it is in your PATH:

sgen run examples/hello.sg

3. Learn the Basics


Commands

Stellogen provides three main commands:

run - Execute a Program

Run a Stellogen program:

sgen run <filename>

Example:

sgen run examples/hello.sg

preprocess - View Preprocessed Code

Show how macros expand and code is preprocessed:

sgen preprocess <filename>

Useful for debugging macro expansions and understanding how syntactic sugar is desugared.

watch - Development Mode (Linux)

Automatically re-run your program when the file changes (great for development):

sgen.exe watch <filename>
sgen.exe watch --timeout=5 <filename>  # Custom timeout in seconds

Example workflow:

# In one terminal
sgen watch myprogram.sg

# Edit myprogram.sg in your editor, it auto-reruns on save!

Help

For detailed command information:

sgen --help
sgen run --help
sgen preprocess --help
sgen watch --help

Ready to explore? Dive into the Quick Tutorial!

0