Previous Up Next

Appendix F  Restrictions and Limits

The ECLiPSe implementation tries to impose as few limits as possible. The existing limits are:
  1. The maximum arity of a predicate in ECLiPSe is 255 (this value can be queried using get_flag(max_predicate_arity,X)). Note however that the arity of compound terms is unlimited.

  2. The maximum arity of external predicates in the current implementation of ECLiPSe is 16.

  3. The stack and heap sizes have virtual memory limits which can be changed using the -g, -l, -s and -p command line options or the ec_set_option function in case of an embedded ECLiPSe.

  4. When the occur check is disabled (the default) it is possible (and sometimes useful) to create cyclic data structures. E.g. the unification of X and g(X) in
        X = g(X)
    will result in a cyclic structure
        X = g(g(g(g(g(...)))))
    Not all ECLiPSe built-in predicates handle cyclic terms gracefully. Care must be taken with all predicates which traverse the whole term, e.g. copy_term/2, nonground/1, term_variables/2, term_hash/4, writeq/2, assert/1, compile_term/1. These will typically loop or overflow a stack when applied to cyclic terms. Note however that, starting from version 5.6, cyclic terms are allowed in all heap copying predicates (setval/2, bag_enter/2, shelf_set/3, store_set/3, record/2, etc).

Previous Up Next