packages feed

ychr-0.1.0.0: test/golden/bounded_cycle_self_loop/bounded_cycle_self_loop.chr

:- module(bounded_cycle_self_loop, [result/1]).
:- use_module(library(prelude)).

:- chr_constraint result(int).

% Forbidden: 'f' requires itself. Single-vertex self-loop exercises the
% 'qn elem path' branch in dfs when qn == the current vertex (path
% length 1). The cycle graph must be acyclic.
:- function f(T) -> T requiring f(T) -> T.
f(X) -> X.

result(R) <=> R is f(1).