eyelet

eye reasoning in prolog

Rationale for bottom-up reasoning

EyeProlog execution

EyeProlog recognizes :+ as an extended infix operator. When a loaded program contains :+/2 rules and no explicit -g/--goal is supplied, it autoloads its bundled Prolog library(eyelet) fixed-point driver. The driver repeatedly solves premises and adds novel conclusions until closure. true :+ Goal prints successful instances, false :+ Goal emits fuse(Goal) and exits with status 2, conclusion-only variables are Skolemized, and derived :+ rules retain universal variables.

EyeProlog bundles library(eyelet), which exports the :+ operator, stable/1, and becomes/2. Its normal library autoloader discovers the helper predicates even inside :+ premises, so Eyelet files can run directly with eyeprolog input/file.pl; no EyeProlog compatibility prelude is needed. The fixed-point semantics live in that Prolog module; the JavaScript host only bootstraps it and provides private mutability/output adapters.

The portable eyelet.pl driver uses the same simplified structure: it inspects rules before execution rather than proving premises during setup, tracks closure growth with an explicit changed/0 marker instead of the older brake/0 loop, avoids fixed-point iteration for query-only files, preserves universal variables in derived :+ rules, and prepares state predicates used by becomes/2 where the host Prolog permits it.

Testing

or

or

or