MALDA™ Reference Manual

The AI-First Programming Language - Version 1.0.11

36. Appendix

36.1 Appendix A: Reserved Words

Keywords are defined in MaldaLang/Lexer.cs. fn and def are not reserved; the parser rejects them as function keywords. reply is a built-in function, not a reserved word.

if, else, while, for, foreach, function, return, var, const, print, input,
true, false, and, or, not, break, continue, try, catch, finally, throw,
match, case, default, defer,
class, new, this, super, extends, public, private, static, null, type, schema, api,
prompt, async, await,
actor, spawn, send, receive, self, on, then, timeout, message,
workflow, step, approval, wait, retry, backoff, delay, maxDelay, compensate, onReject,
component, property,
dict, graph, directed, undirected, in,
using, include, import, export

36.2 Appendix B: Operator Precedence

The table below mirrors the descent order of the reference parser (MaldaLang/Parser/Parser.cs), from highest precedence (binds tightest) to lowest.

#LevelOperatorsAssociativity
1PrimaryLiterals, identifiers, (), array / dict / graph / object literals, comprehensions, new, spawn, receive
2PostfixCall f(...), index a[i], member a.b, null-conditional a?.b and a?[i], postfix ++ / --Left
3Unary (prefix)await, async, not (!), unary -, prefix ++ / --Right
4Multiplicative*, /, %Left
5Additive+, -Left
6Comparison<, >, <=, >=Left
7Equality==, !=Left
8Logical ANDand (&&)Left
9Logical ORor (||)Left
10Match expressionmatch{ case}
11Null coalescing??Right
12Ternary conditional? :Right
13Pipe forward|>Left
14Assignment=, +=, -=, *=, /=Right
Two consequences worth remembering: |> binds looser than the ternary conditional, so a ? b : c |> f pipes the whole conditional into f. And await is a unary prefix operator, so await a.b() awaits the result of the call, while (await a).b() needs explicit parentheses.

36.3 Appendix C: Object-Oriented Concepts Summary

Classes

Objects

Inheritance

Encapsulation

Polymorphism

Static Members

See Also

36.4 Appendix D: Command-line reference

Summary of malda CLI commands. See 32. Personal Assistant and CLI for details on the assistant, config, and cron.

CommandDescription
malda <file.malda>Run a MALDA file
malda <file.malda> --profileRun a MALDA file with the built-in profiler enabled
malda debug-adapterDebug Adapter Protocol on stdio for editors (interpret-only). Do not mix with malda-lsp. See 2.6.5 and docs/debugging-interpret.md.
malda compile <file.malda>Compile to executable or DLL
malda compile <file.malda> --profileCompile a transpiled executable with profiler instrumentation enabled
malda -e "<code>"Execute code directly
malda -c "<code>"Compile code directly
malda --symbols <file.malda>Print symbols (classes, functions, actors)
malda agentInteractive chat with the default assistant
malda agent -m "<message>"One-shot: send message and print response
malda cron add --name <n> --message <msg> --cron <expr>Add a scheduled job
malda cron listList cron jobs
malda cron remove <job-id>Remove a cron job
malda onboardInitialize ~/.malda and config.json
malda statusShow config path, API key, cron jobs
malda deploy [--config ... --profile ... --observability ...]Validate deploy and observability contracts (safe skeleton mode)
malda install / uninstall / list[--workspace] / search / initPackages: local path or workspace first; remote search/install needs MALDA_REGISTRY_URL
malda trace summary|show|replay <file>Trace inspection and replay

36.5 Appendix E: Deploy and observability contract baseline

The malda deploy command in this baseline validates configuration contracts and exits without starting deployment orchestration.

Default input contracts:

Minimum validated expectations:

36.6 Appendix F: Profiling MALDA programs

MALDA includes a built-in profiler for performance investigations. It can profile interpreted runs and transpiled executables and reports hotspots in terms of MALDA built-ins, functions, and statement locations.

Supported CLI flags:

JSON reports include a Partial field: true for periodic snapshots, false for the final write at exit. Periodic snapshots overwrite the same output path; they do not spam the console.

Examples:

malda my-script.malda --profile
malda my-script.malda --profile --profile-output profile.json --profile-format json
malda my-script.malda --profile --profile-output profile.json --profile-format json --profile-periodic-seconds 60
malda compile my-script.malda --mode transpile -o my-script.exe --profile --profile-output profile.json --profile-format json

The profiler currently reports:

Each report entry includes call count, total time, average time, and self time. Expression-level profiling is intentionally not included in this first version to keep overhead practical.

36.7 Appendix G: Optional packs

Core MALDA keeps domain-specific packs out of the public core. The compiler still has string-only emit hooks for optional packs so separately distributed assemblies can plug in without becoming ProjectReferences of the core.

Vertical packs are not included in this open-source repository. If you maintain such a pack, load it with loadNativeModule(...) and ship the DLLs beside your app; core does not auto-register pack globals.