Skip to content

HorseIR

HorseIR is an array-based programming language inspired by APL and ELI. Designed as a non-SSA intermediate representation for compiler writers, it supports both scientific computation and relational database queries. This is achieved by combining a rich, SQL-inspired type system with structured control flow and typical operators found in most programming languages as a collection of built-in functions.

The language specification is divided into the following sections. All constructs are defined in standard EBNF syntax.

  • Lexical Elements: Comments, keywords, identifiers and values
  • Types: Basic and compound types
  • Modules: Modules, functions, global and imports
  • Statements: Assignments, control-flow and expressions
  • Expressions: Function calls, type casting, and literals