Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!leah!bingvaxu!kym From: kym@bingvaxu.cc.binghamton.edu (R. Kym Horsell) Newsgroups: comp.lang.prolog Subject: Re: Arrays in Prolog Message-ID: <3996@bingvaxu.cc.binghamton.edu> Date: 13 Sep 90 04:26:36 GMT References: <90239.175243SCHMIED@DB0TUI11.BITNET> <1990Sep11.150245.26833@sics.se> <1990Sep12.170553.14414@cl.cam.ac.uk> Reply-To: kym@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (R. Kym Horsell) Organization: SUNY Binghamton, NY Lines: 22 In article <1990Sep12.170553.14414@cl.cam.ac.uk> ksh@cl.cam.ac.uk (Kish Shen) writes: \\\ >Perhaps I am showing my ignorance, but can you not have a "special trail" to >store the those trailing that need value trailing? This is what I am doing for >my own work with implementing dependent and-parallelism in Prolog -- I have a >special trail which grows in the opposite direction to the normal >trail, towards >the normal trail. This means that you only pay for the cost of value >trailing for >those variables that need to use it. Am I missing something? \\\ No you're not. Although the trail _can_ grow to twice the size using naive value trailing the cases where values _are_ trailed (and I don't have any figures on this to hand on how _often_ this happens) can be ``special cased''. I prefer the using a single bit in the trail entries (you come across them during backtracking in sequence anyway, right)? Probably not too portable `tho. -Kym Horsell