# expr-lang/expr

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/expr-lang-expr).**

7,906 stars · 504 forks · Go · MIT

## Links

- GitHub: https://github.com/expr-lang/expr
- Homepage: https://expr-lang.org
- awesome-repositories: https://awesome-repositories.com/repository/expr-lang-expr.md

## Topics

`bytecode` `configuration-language` `engine` `evaluator` `expr` `expression` `expression-evaluator` `expression-language` `go` `golang` `rule-engine`

## Description

Expr is a statically typed expression engine and domain-specific language for parsing and evaluating dynamic logic strings within Go applications. It functions as a bytecode expression evaluator that executes compiled logic with guaranteed termination and memory safety.

The engine utilizes a specialized compiler and virtual machine to achieve high-performance execution. It employs static type validation during the compilation phase to ensure operand compatibility and prevent runtime crashes.

The project provides a data transformation engine capable of mapping, filtering, and aggregating collections through functional operators. It ensures security by using a pure-function execution model that calculates results without modifying external state or introducing side effects.

## Tags

### Software Engineering & Architecture

- [Dynamic Rule Engines](https://awesome-repositories.com/f/software-engineering-architecture/dynamic-rule-engines.md) — Provides a dynamic rule engine to evaluate custom logic strings at runtime based on changing data environments.
- [Pure Functional Logic Implementations](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/design-patterns/functional-design-patterns/pure-functional-logic-implementations.md) — Uses a pure-function execution model to calculate results without modifying external state or introducing side effects. ([source](https://github.com/expr-lang/expr#readme))
- [Static Analysis](https://awesome-repositories.com/f/software-engineering-architecture/static-analysis.md) — Performs static analysis during the compilation phase to validate operand compatibility and prevent runtime crashes.
- [Abstract Syntax Tree Parsing](https://awesome-repositories.com/f/software-engineering-architecture/abstract-syntax-tree-parsing.md) — Implements a system to convert expression strings into structured trees for logical analysis and grammar enforcement.

### Programming Languages & Runtimes

- [Bytecode Virtual Machines](https://awesome-repositories.com/f/programming-languages-runtimes/bytecode-virtual-machines.md) — Utilizes a custom bytecode virtual machine to execute compiled expressions with high performance and guaranteed termination.
- [Expression Evaluators](https://awesome-repositories.com/f/programming-languages-runtimes/expression-evaluators.md) — Parses and executes dynamic logic expressions against specific data environments to determine results at runtime. ([source](https://github.com/expr-lang/expr#readme))
- [Type Validation](https://awesome-repositories.com/f/programming-languages-runtimes/expression-evaluators/type-validation.md) — Validates that dynamic expressions adhere to expected data types during compilation to prevent runtime errors. ([source](https://github.com/expr-lang/expr/blob/master/README.md))
- [Statically Typed Evaluators](https://awesome-repositories.com/f/programming-languages-runtimes/expression-evaluators/type-validation/statically-typed-evaluators.md) — Ships a statically typed engine that validates type compatibility during compilation to prevent runtime data errors.
- [Expression Languages](https://awesome-repositories.com/f/programming-languages-runtimes/expression-languages.md) — Provides a domain-specific expression language for parsing and evaluating dynamic logic strings within Go applications.
- [High-Performance Expression Evaluators](https://awesome-repositories.com/f/programming-languages-runtimes/high-performance-expression-evaluators.md) — Running complex logic via a bytecode compiler and virtual machine to achieve faster evaluation than standard interpreters.
- [Sandboxed Logic Execution](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/type-systems/memory-safety-and-value-semantics/memory-safe-core-logic/sandboxed-logic-execution.md) — Ensures memory safety and guaranteed termination when executing user-defined logic within Go applications.
- [Context-Aware Variable Resolution](https://awesome-repositories.com/f/programming-languages-runtimes/context-aware-variable-resolution.md) — Resolves variable identifiers by looking up values within a provided data context during expression evaluation.
- [Expression Tree Compilation](https://awesome-repositories.com/f/programming-languages-runtimes/expression-tree-compilation.md) — Transforms human-readable expressions into an executable internal format to eliminate repeated parsing overhead at runtime.

### Security & Cryptography

- [Expression Sandboxes](https://awesome-repositories.com/f/security-cryptography/network-infrastructure-security/safe-execution-environments/expression-sandboxes.md) — Provides a security layer ensuring user-defined expressions terminate reliably and execute without memory vulnerabilities. ([source](https://github.com/expr-lang/expr/blob/master/README.md))

### Data & Databases

- [Data Transformation](https://awesome-repositories.com/f/data-databases/data-transformation.md) — Enables the restructuring and mapping of data collections using a flexible, runtime-evaluated expression language.
- [Collection Operators](https://awesome-repositories.com/f/data-databases/json-patching/transformation-operations/collection-operators.md) — Provides functional operators such as map and filter to transform, refine, and aggregate data collections. ([source](https://github.com/expr-lang/expr/blob/master/README.md))
