Specification Overview

The ICL specification is maintained in the ICL-Spec repository. This page provides a summary.

Core Sections

An ICL contract consists of 7 sections (6 required, 1 optional):

  1. Identity — Stable ID, version, timestamp, owner, semantic hash
  2. PurposeStatement — Narrative description, intent source, confidence level
  3. DataSemantics — State definition with types and invariants
  4. BehavioralSemantics — Operations with pre/postconditions
  5. ExecutionConstraints — Resource limits, permissions, sandbox mode
  6. HumanMachineContract — Commitments, refusals, user obligations
  7. Extensions — Optional extension points for domain-specific needs

Type System

Primitives

TypeDescriptionExample
Integer64-bit signed42
Float64-bit IEEE 7543.14
StringUTF-8 text"hello"
BooleanLogicaltrue
ISO8601Timestamp2025-01-01T00:00:00Z
UUIDUnique ID"550e8400-..."

Composites

TypeDescriptionSyntax
ObjectStructured recordObject { name: String, age: Integer }
EnumTagged unionEnum { Active, Inactive, Suspended }
ArrayOrdered collectionArray<String>
MapKey-valueMap<String, Integer>

Determinism Requirements

Every ICL implementation MUST guarantee:

  • Same input → same output (no randomness)
  • No system time dependency in core logic
  • BTreeMap not HashMap (ordered iteration)
  • All floating point operations use IEEE 754 semantics

Formal Grammar

The complete BNF grammar is available at: ICL-Spec/grammar/icl.bnf

Full Specification

Read the complete specification: CORE-SPECIFICATION.md