ATOMIC AI CORE EXTENDED SPEC (EN) PURPOSE AND RELATION TO CORE MINIMUM RULE: This document extends the Atomic AI Core Minimum Specification. RULE: All rules defined here are mandatory. RULE: These rules complement, not override, the minimum core. RULE: Any conflict must be resolved in favor of the minimum core. MATHEMATICAL EXPRESSIONS RULE: Atomic supports mathematical expressions composed of: numbers variables constants mathematical operators RULE: Decimal numbers are fully supported. RULE: Operator precedence follows standard mathematical rules. RULE: Atomic provides predefined mathematical constants and functions. RULE: The list of mathematical constants and functions is closed and defined in reference files only. FORBIDDEN: User-defined mathematical operators. TEXT AND STRING HANDLING RULE: Atomic supports text (string) values. RULE: Text values may contain dynamic variable substitution. RULE: Dynamic substitution syntax uses angle brackets: RULE: Substitution is evaluated at execution time. RULE: Only variables may be substituted inside text. FORBIDDEN: Function calls inside text. FORBIDDEN: Expressions inside text. FORBIDDEN: Nested substitutions. CODE BLOCKS RULE: Atomic uses code blocks delimited by curly braces { }. RULE: A block may contain one or more instructions. RULE: Instructions inside a block are executed sequentially. RULE: Code blocks are used in: conditional structures iteration structures contextual execution of elements FORBIDDEN: Empty block with implicit behavior. CONDITIONAL STRUCTURES RULE: Atomic supports conditional execution based on logical expressions. RULE: Conditions evaluate to either true or false. RULE: Logical expressions may include: logical operators comparison operators boolean constants RULE: Conditional execution controls exactly one block of code. ITERATION STRUCTURES RULE: Atomic supports iteration structures. RULE: Iterations execute a block of code repeatedly. RULE: Iteration may be controlled by: a logical condition a numeric repetition count RULE: The concrete iteration syntax is defined in reference files. OBJECTS, INSTANCES, AND ELEMENTS RULE: Atomic distinguishes three concepts: object instance element RULE: An object is an abstract definition. RULE: An instance is a concrete realization of an object. RULE: The term element refers generically to objects or instances. RULE: Elements possess internal state defined by arguments. CONTEXTUAL EXECUTION (ELEMENT CONTEXT) RULE: Code may be executed from the perspective of an element. RULE: Contextual execution uses the construct: esegue al suo interno questo codice { ... } RULE: Inside contextual execution: element arguments behave as local variables modifications affect the current element directly RULE: Contextual execution does not change global execution flow. USER-DEFINED FUNCTIONS RULE: Atomic allows user-defined functions. RULE: Functions are defined using: definisci funzione "function name" { ... } RULE: Function parameters are symbolic and accessed using: <"PARAMETER_NAME"> RULE: Parameters are read-only inside the function body. FUNCTIONS RETURNING VALUES RULE: A user-defined function may return a value. RULE: To return a value: the function name MUST start with "ottieni" the function definition MUST contain the phrase: "con questa funzione ottieni ..." RULE: Returned values MUST be assigned to a variable. FORBIDDEN: Using value-returning functions without assignment. EXTERNAL FILE INCLUSION RULE: Atomic supports inclusion of external code files. RULE: Inclusion syntax is: includi "file path" RULE: Included files must contain valid Atomic code. RULE: Included code is treated as if written inline. RULE: Inclusion may be used to split programs into multiple files. COORDINATE SYSTEM RULE: Atomic uses a two-dimensional coordinate system. RULE: The origin (0,0) is located at the top-left corner of the window. RULE: The X axis increases to the right. RULE: The Y axis increases downward. RULE: Coordinates may be negative. ANGLES RULE: Angles are expressed in sexagesimal degrees. RULE: Angle 0 points to the right. RULE: Angle values increase counterclockwise. UNITS OF MEASUREMENT RULE: The implicit unit of measurement is the pixel. RULE: Pixels are used for: coordinates dimensions thickness values COMMANDS AND ARGUMENTS RULE: Commands use the syntax: command name --> (ARGUMENT: value) RULE: Arguments may be specified in any order. RULE: Arguments have default values. RULE: If an argument is omitted, its default value is used. RULE: Argument names are case-sensitive. RULE: Predefined arguments MUST be written in uppercase. LANGUAGE CLOSURE AND LIMITS RULE: Atomic does not support: nested function calls member access via dot notation undocumented implicit constructs RULE: No standard functions, constructs, constants, or variables exist beyond those officially documented. RULE: The language definition is closed.