View Source API Reference cure v0.1.0

Modules

Cure Programming Language - AST Definitions

This module defines the Abstract Syntax Tree (AST) node types and structure for the Cure programming language. It provides comprehensive type definitions and helper functions for creating and manipulating AST nodes throughout the compilation pipeline.

Cure Programming Language - Command Line Interface

This module provides a comprehensive command-line interface for the Cure programming language compiler. It handles argument parsing, file compilation, and the complete compilation pipeline from Cure source code to BEAM bytecode.

Cure Programming Language - BEAM Code Generator

The code generator transforms typed Cure AST into BEAM bytecode, enabling Cure programs to run on the Erlang Virtual Machine. It handles all Cure language features including dependent types, finite state machines, pattern matching, and integration with Erlang/OTP.

Cure Error Reporter

Enhanced error reporting module with precise location tracking and user-friendly diagnostic messages. This module provides rich error formatting for parser, lexer, and semantic analysis errors.

Cure Programming Language - FSM Built-in Functions

This module provides built-in FSM functions that interface directly with the cure_fsm_runtime module. These functions are called from Cure programs via the FFI (Foreign Function Interface) to provide FSM functionality.

Cure FSM API Wrapper

This module provides the Cure-level FSM API that matches the design in lib/std/fsm.cure. It wraps the underlying cure_fsm_runtime gen_server to provide

Cure Programming Language - FSM Runtime System

The FSM runtime system provides a comprehensive execution environment for finite state machines in the Cure programming language. It implements a complete FSM execution model with state transitions, guard evaluation, action execution, and performance optimizations, all built on top of the BEAM virtual machine.

Guard Validation Code Generation

This module generates runtime validation code for dependent type guards. It translates guard constraints into executable BEAM code that validates values against dependent type requirements.

Cure Programming Language - Lexer

The lexer module provides tokenization services for Cure source code, converting raw text into a structured stream of tokens for the parser. It supports all Cure language constructs including keywords, operators, literals, and comments.

Cure Language Server Protocol (LSP) Implementation

This module implements the Language Server Protocol for the Cure programming language, providing IDE features like

Cure Programming Language - Parser

The parser module implements a recursive descent parser that converts tokens from the lexer into an Abstract Syntax Tree (AST). It handles the complete Cure language grammar including modules, functions, finite state machines, types, records, and expressions.

Cure Runtime Profiler

Collects runtime execution statistics to guide compiler optimizations. Provides lightweight instrumentation and aggregation of

Cure Programming Language - Runtime Execution Engine

The runtime execution engine interprets and executes BEAM instructions generated by the Cure compiler. It provides a complete execution environment for Cure programs with stack-based instruction processing, function calls, module loading, and integration with the Erlang standard library.

Native Erlang implementations of Show trait functions for Cure.

Cure SMT Model Parser

Parses S-expression output from SMT solvers (Z3, CVC5) to extract variable bindings and convert them to Erlang terms.

Cure SMT Solver Process Manager

Manages external SMT solver processes (Z3, CVC5) using Erlang ports. Provides process pooling, timeout enforcement, and resource management.

Cure Programming Language - SMT Solver and Proof Assistant

The SMT (Satisfiability Modulo Theories) solver provides constraint solving capabilities for Cure's dependent type system. It handles arithmetic constraints, logical reasoning, and proof generation for dependent type verification.

Cure SMT-LIB Translator

Translates Cure type constraints and expressions into SMT-LIB format for consumption by external SMT solvers (Z3, CVC5).

Cure Programming Language - Standard Library Runtime

Provides core runtime functions that cannot be implemented in pure Cure due to their need for Erlang-specific features. This module contains the essential low-level operations for I/O, monadic operations, FSM integration, and value serialization.

Native Erlang implementations of string operations for Cure.

Cure Programming Language - Type-directed Optimizer

The type optimizer leverages rich type information from Cure's dependent type system to perform sophisticated program optimizations. It analyzes type usage patterns, specializes generic functions, eliminates dead code, and optimizes memory layouts based on static type analysis.

Cure Programming Language - Type Checker

The type checker module provides high-level type checking functionality for Cure programs. It works with parsed AST nodes and implements comprehensive static type analysis including dependent type verification, constraint solving, and type inference.

Cure Programming Language - Type System Core

The core type system module implementing Cure's advanced dependent type system with constraint solving, type inference, and support for higher-kinded types. This module provides the foundational type operations that power Cure's static type checking and dependent type verification.