[m-dev.] stratify.m

Oliver Hutchison ohutch at students.cs.mu.oz.au
Sat Feb 22 12:44:14 AEDT 1997


On Fri, 21 Feb 1997, Fergus Henderson wrote:
> 
> I have forgotten what the current status of `stratify.m' is.
> (i.e. does it work?  is the algorithm fundamentally flawed?
> is it used for anything?)
> 
> Does anyone remember?


Fergus,

	stratify.m does work but it is not actually used by any of the code
currently in the compiler. The tabling code I have written uses
stratification analysis and I have had no problems with it.

	I'm not sure if you remember the algorithm that is uses, but
basically it is extremely conservative. It assume that any calls to an
imported or higher order pred are not stratified. This works but is
not really very useful in the real world. There is code in stratify.m that
would allow higher order functions to partially work but it is commented
out because it cant detect cases where a high order function is hidden in
a complex data structure.

	In order to support stratification analysis of imported preds
there would need to be a global analysis pass which is on my TODO list but
at the moment its not to high up.


	Oliver

PS.	I should get round to committing my tabling changes some time next
week. I'm currently debugging the type_layout code as my tabling code is
rather dependant on it.




More information about the developers mailing list