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