BOUNDED-LENGTH PREDICATE, Written by Donald Smith, Brandeis University (?), Shelved on 21 August 1993 Many Prologs have a built-in function length/2 that can be used either (1) to determine the length of a given list; or (2) to non-deterministically create longer and longer lists. We define a function length_bounded/3 with the following specification: length_bounded(?L,?Len,+Max) "L is a list of length Len, where Len<=Max". Like length/2, it can bind L to successively longer lists when Len is unbound, but subject to the constraint that Len<=Max. It uses ":-wait" declarations and needs to run under Sicstus Prolog. SIZE: 5 kilobytes. CHECKED ON EDINBURGH-COMPATIBLE (POPLOG) PROLOG : no. PORTABILITY : Requires the :-wait feature of Sicstus Prolog. INTERNAL DOCUMENTATION : Good.