Download User Manual
Transcript
Appendix F Restrictions and Limits The ECLi PSe implementation tries to impose as few limits as possible. The existing limits are: 1. The maximum arity of a predicate in ECLi PSe 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 ECLi PSe 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 ECLi PSe . 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 ECLi PSe 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). 251