시공간적 합성 가능성을 위한 프로그래밍 패러다임
A Programming Paradigm for Spatiotemporal Composability
August 26, 2026
저자: Yifan Shi, Wei Zhang, Tianyi Cui
cs.AI
초록
플러그인 시스템에서 자기 진화형 에이전트 하네스에 이르기까지, 현대 소프트웨어는 점점 더 동적 구성을 요구하지만 그 형식적 기반은 여전히 미흡하다. 우리는 이 문제의 두 가지 직교 차원을 식별한다. 하나는 시간적 합성성(temporal composability), 즉 컴포넌트가 제거될 때 그 부수 효과(side effect)를 완전히 되돌릴 수 있는 능력이고, 다른 하나는 공간적 합성성(spatial composability), 즉 컴포넌트 간 의존성을 선언하고 반응적으로 관리할 수 있는 능력이다. 우리는 고전적인 효과(effect)와 공효과(coeffect) 개념을 런타임 메커니즘으로 승격시켜 이 두 차원을 다룬다. 특히, 우리는 되돌릴 수 있는 효과(revertible effects)를 형식화한다. 이 효과에서는 모든 컨텍스트 변환이 런타임이 보유한 역(inverse)을 수반하며, 이를 통해 한 컴포넌트에 국한된 시간적 합성성이 확립된다. 또한 우리는 반응적 공효과(reactive coeffects)를 형식화한다. 이 공효과에서는 모든 컨텍스트 변화가 컴포넌트의 공효과 명세에 따라 분류되어 그 컴포넌트의 활성화와 비활성화를 구동하며, 이를 통해 한 컴포넌트에 국한된 공간적 합성성이 확립된다. 그런 다음 우리는 효과 컨텍스트와 공효과 컨텍스트를 단일 컨텍스트 타입으로 통합하고 모든 효과와 공효과를 이 타입을 통해 매개한다. 그리하여 우리는 컨텍스트 패러다임이라 부르는 규율을 도출한다. 이 매개는 관찰적 동치를 유도하며, 그 동치 하에서 서로 다른 컴포넌트들의 효과는 서로를 방해하지 않고 교차 실행된다. 이러한 메커니즘들을 컴포넌트라는 개념으로 결합하여, 우리는 동적 구성의 계산법을 제시한다. 이 계산법의 메타이론은 시공간적 합성성을 단일 컴포넌트에서 교차 실행되는 컴포넌트들로 이루어진 전체 시스템으로 전달한다. 우리는 이러한 아이디어를 Cordis에 구현한다. Cordis는 시공간적 합성성을 위한 메타 프레임워크로서, 효과 추적과 공효과 해석(coeffect resolution)을 제공하는 핵심 라이브러리와, 구성 조정(configuration reconciliation) 및 핫 모듈 교체(hot module replacement)를 수행하는 선언적 컴포넌트 로더를 제공한다.
English
Modern software -- from plugin systems to self-evolving agent harnesses -- increasingly requires dynamic composition, yet its formal foundations remain underdeveloped. We identify two orthogonal dimensions of the problem: temporal composability, the ability to completely revert a component's side effects upon removal, and spatial composability, the ability to declare and reactively manage inter-component dependencies. We address the two dimensions by lifting classical effect and coeffect concepts to runtime mechanisms. In particular, we formalize revertible effects, in which every context transformation carries an inverse that the runtime holds, establishing temporal composability local to one component. We formalize reactive coeffects, in which every context change is classified against a component's coeffect specification to drive its activation and deactivation, establishing spatial composability local to one component. We then unify the effect context and the coeffect context into a single context type and mediate every effect and coeffect through it, yielding a discipline we call the context paradigm; the mediation induces an observational equivalence up to which the effects of distinct components interleave without disturbing one another. Combining these mechanisms into the notion of a component, we give a calculus of dynamic composition whose metatheory carries spatiotemporal composability from a single component to a whole system of interleaved components. We implement these ideas in Cordis, a meta-framework of spatiotemporal composability that provides a core library with effect tracking and coeffect resolution, as well as a declarative component loader with configuration reconciliation and hot module replacement.