CMU Artificial Intelligence Repository
Home INFO Search FAQs Repository Root

Bounded-length version of the list-length predicate

lang/prolog/code/ext/length/
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. This package defines 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 hence needs to run under Sicstus Prolog.
Origin:   

   src.doc.ic.ac.uk:packages/prolog-pd-software/ (146.169.2.1)
   as length_bounded.zip

Version: 21-AUG-93 (26-FEB-91) Ports: Runs in Sicstus Prolog. CD-ROM: Prime Time Freeware for AI, Issue 1-1 Author(s): Donald A. Smith Brandeis University Keywords: Authors!Smith, Bounded Length, Brandeis University, Length, Lists, Prolog!Code, Prolog!Extensions References: ?
Last Web update on Mon Feb 13 10:33:38 1995
AI.Repository@cs.cmu.edu