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
60 terms visible
Tip: Press [/] to focus search Β· [Esc] to reset
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.
zelyra
fn verify_solution() -> Bool { ... }
State-of-the-art memory-hard hashing algorithm natively enforced across Zelyra authentication modules.
zelyra
password: argon2 Β· verify_password(raw, hash)
Array (Type[])
Collections & Data
A homogeneous ordered collection of elements. Supports indexed access and standard utilities like `len()`, `append()`, `first()`, and `contains()`.
zelyra
zahlen: Int[] = [1, 2, 3, 4]
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.
zelyra
assert(result == 42, "Berechnung fehlgeschlagen")
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.
zelyra
Source -> AST -> Verifier -> Executable
Native declarative block configuring user login, session lifecycle, and credentials without third-party frameworks.
zelyra
auth { model: User, password: argon2 }
Block & Scope
Basics & Syntax
The lexical scope of identifiers, bounded by curly braces `{ ... }`. Names declared inside a block are bound to that scope.
zelyra
{ temp = 10; print(temp) }
Capability
Contracts & Capabilities
Explicit permission clause (`uses FileSystem`, `uses Database`) without which code cannot perform I/O or access external resources.
zelyra
fn save() uses FileSystem, Database { ... }
Reusable UI template unit with typed props, slots, and automated contextual HTML escaping against XSS vulnerabilities.
zelyra
component Alert(msg: String) { div { msg } }
CRUD Resource (crud)
Database & Persistence
Create, Read, Update, Delete: Declarative resource binding generating query routines, forms, and layouts without repetitive boilerplate.
zelyra
crud Address { table addresses }
CSRF Protection
Web, UI & Auth
Built-in cryptographic token mechanism preventing Cross-Site Request Forgery on all state-modifying requests.
zelyra
form { csrf; ... }
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.
zelyra
Int Β· Float Β· Bool Β· String Β· Decimal Β· Id
Design by Contract
Contracts & Capabilities
Formal software engineering method ensuring correctness: functions declare rigorous preconditions (`requires`) and postconditions (`ensures`).
zelyra
contract Β· requires Β· 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.
zelyra
type UserId = Id; type OrderId = Id;
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.
zelyra
Option<T> Β· Result<T, E>
for .. in Iteration
Collections & Data
A loop form that visits collection elements in sequence and avoids manual index management.
zelyra
for id in aufgabe_ids { print(id) }
Foreign Key (fk)
Database & Persistence
Declarative relational link between tables enforcing referential integrity and cascade rules directly at database level.
zelyra
user_id: Id fk(users.id)
Declarative web form specification providing unified server and browser validation with structured error feedback.
zelyra
form AddressForm { street: String min(3) }
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.
zelyra
fn add(a: Int, b: Int) -> Int { return a + b }
Immutable Collections
Collections & Data
Immutable collection operations do not change the existing value directly; they return a new value for a change.
zelyra
neu = append(liste, 42)
json_encode & json_decode
System, I/O & Concurrency
Type-safe JSON serialization and deserialization yielding explicit `Result<T, JsonError>` containers.
zelyra
json_encode(data) Β· json_decode<User>(raw)
Loop Invariant (invariant)
Contracts & Capabilities
Formal assertion inside loops that must remain true before and after each iteration, facilitating mathematical verification.
zelyra
while i < len invariant { i >= 0 } { ... }
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.
zelyra
Language Server Protocol
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.
zelyra
Map { "de": 49, "at": 43, "ch": 41 }
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.
zelyra
zelyra db plan Β· zelyra db apply
mutable (Mutability)
Basics & Syntax
Keyword required to declare variables that may be reassigned. Makes state mutations explicitly visible to developers and compilers.
zelyra
mutable counter: Int = 0
Native SQL (sql { ... })
Database & Persistence
First-class SQL validated against schemas at compile-time. Delivers raw query performance and expressiveness without ORM friction.
zelyra
sql { SELECT * FROM users WHERE active = true }
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.
zelyra
"tok-comment">// Null-Pointer sind unmΓΆglich!
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.
zelyra
avatar_url: String? = None
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.
zelyra
parallel { a = await task1(); b = await task2(); }
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.
zelyra
match opt { Some(v) => v, None => "Standard" }
Postcondition (ensures & result)
Contracts & Capabilities
Contractual guarantee about the computation. The keyword `result` references the returned value and verifies its invariants.
zelyra
ensures { result >= min && result <= max }
Precondition (requires)
Contracts & Capabilities
Contract clause attached to a function signature enforcing valid caller inputs before body execution. Shields functions from invalid state.
zelyra
requires { limit > 0 && offset >= 0 }
Pure Function
Basics & Syntax
A function without side effects: its result depends only on its inputs, so identical inputs produce the same result.
zelyra
fn square(x: Int) -> Int { return x * x }
read_text & write_text
System, I/O & Concurrency
Standard library utilities for atomic, safe UTF-8 file reading and writing with automatic resource closing.
zelyra
text = read_text("export.csv")
Record / Struct
Type System & Safety
A structured collection of named, strongly typed fields representing a concrete entity, with constructor and destructuring support.
zelyra
record User { id: UserId, name: String }
Regression Prevention
Compiler, CLI & QA
Prevention of bugs reappearing after refactoring. Static checks, contract verification, and project-specific test runs help catch unintended changes.
zelyra
zelyra check main.zyl Β· zelyra verify main.zyl
Declarative route authorization attribute restricting endpoints to logged-in users or specific privilege roles.
zelyra
route POST /admin requires auth permits("admin")
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.
zelyra
Result<User, String> = Ok(user)
Route
Web, UI & Auth
Explicit binding of HTTP method and URL endpoint to an executable controller handler or CRUD resource.
zelyra
route GET /users -> list_users
Sandboxing & Least Privilege
Contracts & Capabilities
The capability model limits system access to capabilities requested by functions and enabled for the project.
zelyra
capability Database { read, write }
Slot (slot: name)
Web, UI & Auth
A named injection slot in container components enabling flexible layout composition with dynamic child elements.
zelyra
slot: content
A rule for resolving conflicting sources. The handbook reference orders them as language specification, compiler implementation, official tests, standard library, verified examples, and documentation.
zelyra
Specification > Compiler > Tests > Examples > Handbook
Standard Library (std)
Compiler, CLI & QA
Overview of documented standard functions and capability-guarded functions such as filesystem, time, randomness, and database access.
zelyra
print(value) Β· len(array) Β· now()
Table Schema (table)
Database & Persistence
Direct relational table declaration in Zelyra syntax including types, primary keys, uniqueness constraints, and default values.
zelyra
table users { id: Id primary, email: String unique }
Methodology where formal contracts and automated test assertions precede the actual function implementation.
zelyra
Vertrag -> Test -> Implementierung -> Refactoring
Three-Layer Architecture
Compiler, CLI & QA
Canonical Zelyra architectural pattern strictly isolating UI presentation, pure business logic, and schema persistence.
zelyra
Web (UI) -> Business (Pure) -> Storage (DB)
Transaction (transaction)
Database & Persistence
Atomic database transaction block: all database operations succeed together or automatically roll back upon any failure.
zelyra
transaction { debit(from, amt); credit(to, amt); }
Type Inference
Basics & Syntax
The compiler's capability to automatically deduce data types from values and expressions, combining static safety with concise syntax.
zelyra
anzahl = 42  "tok-comment">// Automatisch Int
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.
zelyra
fn find(id: Id) -> User { return _ }
uses Clock & now()
System, I/O & Concurrency
System time capability: querying current timestamps via `now()` requires `uses Clock`, enabling deterministic mocking in automated tests.
zelyra
timestamp = now()  "tok-comment">// verlangt uses Clock
uses Environment & env()
System, I/O & Concurrency
Environment variable capability: `env("KEY")` queries runtime configuration or `.env` and yields a null-safe `Option<String>`.
zelyra
port = env("APP_PORT") "tok-comment">// 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.
zelyra
fn save_csv() uses FileSystem { ... }
uses Random & random_int()
System, I/O & Concurrency
Randomness capability: grants access to pseudo-random generators while keeping pure algorithms cleanly separated.
zelyra
wuerfel = random_int(1, 6) "tok-comment">// uses Random
Value
Basics & Syntax
A named piece of data. In Zelyra, values are immutable by default to prevent hidden side effects and state bugs.
zelyra
name: String = "Zelyra"
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
zelyra new Β· zelyra check Β· zelyra run
zelyra fmt (Formatter)
Compiler, CLI & QA
Built-in source formatter with deterministic output. `--check` checks formatting without changing the file.
zelyra
zelyra fmt src/main.zyl
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
zelyra verify main.zyl
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.
zelyra
[package]
name = "myapp"
version = "0.1.0"
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
zelyra check src/main.zyl

No terms found

Try adjusting your search query or choosing another category filter.