ZELYRA
ZELYRA / GLOSSARY

The concepts
behind the language.

Short, precise explanations for 43 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
Core philosophy of Zelyra: unambiguous syntax, formal contracts, and typed holes allow AI assistants to generate and mathematically verify correct code.
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
Core assertion primitive for unit tests and invariants, failing test runs immediately with structured diagnostic context.
zelyra
assert(result == 42, "Berechnung fehlgeschlagen")
The structured syntax tree into which the parser parses code, serving as the foundation for contract verification and code generation.
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
Lexical scope bounded by curly braces `{ ... }`. Local variables remain strictly confined to their block, avoiding namespace collisions.
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 algebraic data type defining a fixed set of distinct variants. Variants can optionally carry typed payloads and are consumed via `match`.
zelyra
enum State { Draft, Active, Archived }
for .. in Iteration
Collections & Data
Idiomatic iteration over arrays and maps, avoiding traditional indexing bounds errors and endless loop vulnerabilities.
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
Collection operations return updated instances rather than modifying in place, guaranteeing thread-safe and predictable data pipelines.
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 } { ... }
Standard protocol powering IDE tooling: provides real-time syntax checking, autocomplete, go-to-definition, and inline contract hints.
zelyra
zelyra lsp
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
Safe schema evolution workflow: `zelyra db plan` inspects diffs between code definitions and live DB; `zelyra db apply` executes migrations atomically.
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
Structured concurrency primitive: dispatches independent asynchronous tasks safely across CPU cores without thread deadlocks.
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 side-effect-free function: it relies only on its arguments and always returns the same result for identical inputs. Highly testable and parallelizable.
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 codebase refactoring, guaranteed via continuous contract checks and test suites.
zelyra
zelyra test "tok-comment">// Erkennt Regressionen sofort
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
The standard container for operations that may fail. Eliminates unhandled exceptions by returning explicit values: `Ok(data)` or `Err(reason)`.
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
Zelyra's security principle: modules execute isolated by default and hold only the specific capabilities declared on their boundary.
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
Zelyra's hierarchy of truth: formal specification and parser verification tests supersede loose documentation and examples.
zelyra
Spec > Compiler > Test Suite > Examples
Standard Library (std)
Compiler, CLI & QA
The official curated collection of core modules in Zelyra providing math, strings, collections, time, filesystem, and networking.
zelyra
import std::math Β· import std::time
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 unified developer CLI: scaffolds projects (`new`), launches apps (`run`), executes tests (`test`), and checks contracts (`check`).
zelyra
zelyra run Β· zelyra test Β· zelyra check
zelyra fmt (Formatter)
Compiler, CLI & QA
Built-in source code formatter establishing a single canonical style and ending debates over whitespace and indentation.
zelyra
zelyra fmt src/
Static contract verification tool in Zelyra CLI, formally proving that pre- and postconditions hold mathematically.
zelyra
zelyra verify src/
The canonical project manifest defining package metadata, dependencies, compiler targets, and capability policies.
zelyra
[package]
name = "myapp"
version = "0.1.0"
zelyrac (Compiler)
Compiler, CLI & QA
The core Zelyra compiler engine. Verifies contracts, validates type soundness, and compiles code into optimized bytecode or machine code.
zelyra
zelyrac build src/main.zy

No terms found

Try adjusting your search query or choosing another category filter.