ZELYRA
ZELYRA / GLOSSARY
The concepts
behind the language.
Short, precise explanations for 60 essential concepts across syntax, type safety, contracts, collections, databases, web views, and compiler tooling. Complete with syntax examples and direct links into the handbook.
60 Terms
8 Categories
π Live Instant Search [/]
π Handbook Cross-links
- AI-Native Language Design Compiler, CLI & QA
- Language and tooling features such as structured diagnostics, contracts, and typed holes can support AI-assisted work. They do not guarantee error-free code or replace human review.
- Argon2 Password Hashing Web, UI & Auth
- State-of-the-art memory-hard hashing algorithm natively enforced across Zelyra authentication modules.
- Array (Type[]) Collections & Data
- A homogeneous ordered collection of elements. Supports indexed access and standard utilities like `len()`, `append()`, `first()`, and `contains()`.
- assert (Test Assertion) Compiler, CLI & QA
- Checks a condition and reports an error when it is false. Project-specific assertions can run in an executable `.zyl` file with `zelyra run`; a separate test subcommand is not documented.
- AST (Abstract Syntax Tree) Compiler, CLI & QA
- The hierarchical syntax tree built by the parser from source code. Compiler phases such as name resolution and type checking continue from this structured representation.
- Authentication (auth) Web, UI & Auth
- Native declarative block configuring user login, session lifecycle, and credentials without third-party frameworks.
- Block & Scope Basics & Syntax
- The lexical scope of identifiers, bounded by curly braces `{ ... }`. Names declared inside a block are bound to that scope.
- Capability Contracts & Capabilities
- Explicit permission clause (`uses FileSystem`, `uses Database`) without which code cannot perform I/O or access external resources.
- Component (component) Web, UI & Auth
- Reusable UI template unit with typed props, slots, and automated contextual HTML escaping against XSS vulnerabilities.
- CRUD Resource (crud) Database & Persistence
- Create, Read, Update, Delete: Declarative resource binding generating query routines, forms, and layouts without repetitive boilerplate.
- CSRF Protection Web, UI & Auth
- Built-in cryptographic token mechanism preventing Cross-Site Request Forgery on all state-modifying requests.
- Data Type Type System & Safety
- A precise description of allowable values and valid operations. Includes scalars (Int, Float, Bool, String, Decimal, Id) and compound types.
- Design by Contract Contracts & Capabilities
- Formal software engineering method ensuring correctness: functions declare rigorous preconditions (`requires`) and postconditions (`ensures`).
- Domain Types (Nominal) Type System & Safety
- Nominal type definitions like `type UserId = Id` and `type OrderId = Id`. Prevents accidentally swapping identically represented primitives in business logic.
- Enum / Sum Type Type System & Safety
- An enum describes a fixed set of distinct variants. User-defined `enum` declarations are not part of the currently documented Zelyra language surface; the conceptual pattern is not executable Zelyra syntax.
- for .. in Iteration Collections & Data
- A loop form that visits collection elements in sequence and avoids manual index management.
- Foreign Key (fk) Database & Persistence
- Declarative relational link between tables enforcing referential integrity and cascade rules directly at database level.
- Form & Validation (form) Web, UI & Auth
- Declarative web form specification providing unified server and browser validation with structured error feedback.
- Function (fn) Basics & Syntax
- A named operation with explicit parameter types and a definite return type. Functions are the foundational building blocks of Zelyra programs.
- Immutable Collections Collections & Data
- Immutable collection operations do not change the existing value directly; they return a new value for a change.
- json_encode & json_decode System, I/O & Concurrency
- Type-safe JSON serialization and deserialization yielding explicit `Result<T, JsonError>` containers.
- Loop Invariant (invariant) Contracts & Capabilities
- Formal assertion inside loops that must remain true before and after each iteration, facilitating mathematical verification.
- LSP (Language Server Protocol) Compiler, CLI & QA
- The Language Server Protocol standardizes communication between a language and an editor. The current CLI reference documents `zelyra editor` for Studio, but no separate `zelyra lsp` subcommand.
- Map (Map<K, V>) Collections & Data
- Associative key-value dictionary. Querying via `get(map, key)` always returns a safe `Option<V>`, eliminating crashes on missing keys.
- Migration (db plan & apply) Database & Persistence
- Controlled schema changes: `zelyra db plan` shows the difference between the source model and database; `zelyra db apply` applies the reviewed plan. Review possible effects first, since interrupted DDL can leave a partially changed state.
- mutable (Mutability) Basics & Syntax
- Keyword required to declare variables that may be reassigned. Makes state mutations explicitly visible to developers and compilers.
- Native SQL (sql { ... }) Database & Persistence
- First-class SQL validated against schemas at compile-time. Delivers raw query performance and expressiveness without ORM friction.
- Null Safety (Zero null) Type System & Safety
- Zelyra has no concept of `null`, `nil`, or `undefined`. The "billion-dollar mistake" of null-pointer exceptions is structurally excluded by the type system.
- Option (Some / None) Type System & Safety
- Type representing a value that may be present (`Some(v)`) or absent (`None`). The question mark suffix `Type?` guarantees absence is handled explicitly.
- parallel & await System, I/O & Concurrency
- A `parallel` block starts independent tasks and uses `await` to wait for their results. The task scope remains visible in the block.
- Pattern Matching (match) Type System & Safety
- Exhaustive pattern evaluation across data structures, options, and results. The compiler rejects code if any branch is left unhandled.
- Postcondition (ensures & result) Contracts & Capabilities
- Contractual guarantee about the computation. The keyword `result` references the returned value and verifies its invariants.
- Precondition (requires) Contracts & Capabilities
- Contract clause attached to a function signature enforcing valid caller inputs before body execution. Shields functions from invalid state.
- Pure Function Basics & Syntax
- A function without side effects: its result depends only on its inputs, so identical inputs produce the same result.
- read_text & write_text System, I/O & Concurrency
- Standard library utilities for atomic, safe UTF-8 file reading and writing with automatic resource closing.
- Record / Struct Type System & Safety
- A structured collection of named, strongly typed fields representing a concrete entity, with constructor and destructuring support.
- Regression Prevention Compiler, CLI & QA
- Prevention of bugs reappearing after refactoring. Static checks, contract verification, and project-specific test runs help catch unintended changes.
- requires auth & permits Web, UI & Auth
- Declarative route authorization attribute restricting endpoints to logged-in users or specific privilege roles.
- Result (Ok / Err) Type System & Safety
- A type for operations that may fail. It returns success as `Ok(data)` and an error as `Err(reason)` explicitly.
- Route Web, UI & Auth
- Explicit binding of HTTP method and URL endpoint to an executable controller handler or CRUD resource.
- Sandboxing & Least Privilege Contracts & Capabilities
- The capability model limits system access to capabilities requested by functions and enabled for the project.
- Slot (slot: name) Web, UI & Auth
- A named injection slot in container components enabling flexible layout composition with dynamic child elements.
- Source Authority Principle Compiler, CLI & QA
- A rule for resolving conflicting sources. The handbook reference orders them as language specification, compiler implementation, official tests, standard library, verified examples, and documentation.
- Standard Library (std) Compiler, CLI & QA
- Overview of documented standard functions and capability-guarded functions such as filesystem, time, randomness, and database access.
- Table Schema (table) Database & Persistence
- Direct relational table declaration in Zelyra syntax including types, primary keys, uniqueness constraints, and default values.
- TDD (Test-Driven Development) Compiler, CLI & QA
- Methodology where formal contracts and automated test assertions precede the actual function implementation.
- Three-Layer Architecture Compiler, CLI & QA
- Canonical Zelyra architectural pattern strictly isolating UI presentation, pure business logic, and schema persistence.
- Transaction (transaction) Database & Persistence
- Atomic database transaction block: all database operations succeed together or automatically roll back upon any failure.
- Type Inference Basics & Syntax
- The compiler's capability to automatically deduce data types from values and expressions, combining static safety with concise syntax.
- Typed Hole (_) Basics & Syntax
- The underscore `_` as a formal typed placeholder. Instructs compiler and AI tools where implementation is needed, with expected types inferred from surrounding context.
- uses Clock & now() System, I/O & Concurrency
- System time capability: querying current timestamps via `now()` requires `uses Clock`, enabling deterministic mocking in automated tests.
- uses Environment & env() System, I/O & Concurrency
- Environment variable capability: `env("KEY")` queries runtime configuration or `.env` and yields a null-safe `Option<String>`.
- uses FileSystem System, I/O & Concurrency
- Security capability governing storage I/O. Functions reading or writing files must declare this permission at the boundary.
- uses Random & random_int() System, I/O & Concurrency
- Randomness capability: grants access to pseudo-random generators while keeping pure algorithms cleanly separated.
- Value Basics & Syntax
- A named piece of data. In Zelyra, values are immutable by default to prevent hidden side effects and state bugs.
- Zelyra CLI (zelyra) Compiler, CLI & QA
- The command-line interface for Zelyra projects: it creates projects with `new`, checks source with `check`, runs programs with `run`, and provides other documented subcommands. The current CLI reference does not list a dedicated `test` subcommand.
- zelyra fmt (Formatter) Compiler, CLI & QA
- Built-in source formatter with deterministic output. `--check` checks formatting without changing the file.
- zelyra verify (Contract Prover) Compiler, CLI & QA
- CLI command for the documented contract and invariant checks. Formal analysis is limited to the supported verification scope and does not guarantee overall program correctness.
- zelyra.toml (Project Manifest) Compiler, CLI & QA
- Project manifest for metadata, capability grants, and supported project settings. Zelyra modules are included by project path; a package registry is outside the documented scope.
- zelyrac (Compiler) Compiler, CLI & QA
- The compiler processes Zelyra source behind the `zelyra` CLI. The current CLI reference does not document a separate `zelyrac` executable or `zelyrac build`; use `zelyra check` and `zelyra run` to check and execute programs.
zelyra
fn verify_solution() -> Bool { ... }
zelyra
password: argon2 Β· verify_password(raw, hash)
zelyra
zahlen: Int[] = [1, 2, 3, 4]
zelyra
assert(result == 42, "Berechnung fehlgeschlagen")
zelyra
Source -> AST -> Verifier -> Executable
zelyra
auth { model: User, password: argon2 }
zelyra
{ temp = 10; print(temp) }
zelyra
fn save() uses FileSystem, Database { ... }
zelyra
component Alert(msg: String) { div { msg } }
zelyra
crud Address { table addresses }
zelyra
form { csrf; ... }
zelyra
Int Β· Float Β· Bool Β· String Β· Decimal Β· Id
zelyra
contract Β· requires Β· ensures
zelyra
type UserId = Id; type OrderId = Id;
zelyra
Option<T> Β· Result<T, E>
zelyra
for id in aufgabe_ids { print(id) }
zelyra
user_id: Id fk(users.id)
zelyra
form AddressForm { street: String min(3) }
zelyra
fn add(a: Int, b: Int) -> Int { return a + b }
zelyra
neu = append(liste, 42)
zelyra
json_encode(data) Β· json_decode<User>(raw)
zelyra
while i < len invariant { i >= 0 } { ... }
zelyra
Language Server Protocol
zelyra
Map { "de": 49, "at": 43, "ch": 41 }
zelyra
zelyra db plan Β· zelyra db apply
zelyra
mutable counter: Int = 0
zelyra
sql { SELECT * FROM users WHERE active = true }
zelyra
"tok-comment">// Null-Pointer sind unmΓΆglich!
zelyra
avatar_url: String? = None
zelyra
parallel { a = await task1(); b = await task2(); }
zelyra
match opt { Some(v) => v, None => "Standard" }
zelyra
ensures { result >= min && result <= max }
zelyra
requires { limit > 0 && offset >= 0 }
zelyra
fn square(x: Int) -> Int { return x * x }
zelyra
text = read_text("export.csv")
zelyra
record User { id: UserId, name: String }
zelyra
zelyra check main.zyl Β· zelyra verify main.zyl
zelyra
route POST /admin requires auth permits("admin")
zelyra
Result<User, String> = Ok(user)
zelyra
route GET /users -> list_users
zelyra
capability Database { read, write }
zelyra
slot: content
zelyra
Specification > Compiler > Tests > Examples > Handbook
zelyra
print(value) Β· len(array) Β· now()
zelyra
table users { id: Id primary, email: String unique }
zelyra
Vertrag -> Test -> Implementierung -> Refactoring
zelyra
Web (UI) -> Business (Pure) -> Storage (DB)
zelyra
transaction { debit(from, amt); credit(to, amt); }
zelyra
anzahl = 42 "tok-comment">// Automatisch Int
zelyra
fn find(id: Id) -> User { return _ }
zelyra
timestamp = now() "tok-comment">// verlangt uses Clock
zelyra
port = env("APP_PORT") "tok-comment">// Option<String>
zelyra
fn save_csv() uses FileSystem { ... }
zelyra
wuerfel = random_int(1, 6) "tok-comment">// uses Random
zelyra
name: String = "Zelyra"
zelyra
zelyra new Β· zelyra check Β· zelyra run
zelyra
zelyra fmt src/main.zyl
zelyra
zelyra verify main.zyl
zelyra
[package]
name = "myapp"
version = "0.1.0"
zelyra
zelyra check src/main.zyl
No terms found
Try adjusting your search query or choosing another category filter.