Good Morning,
I'm a post-graduate student at University of Bologna. For my final thesis, I'm collecting informations about tail call optimization in a Prolog system. I read many articles on the web, and I found in Wikipedia that Ciao implements tail call optimization. My doubt is about when it is correct to perform this optimization; for example, when the query catch(Goal1, Arg, Goal2) calls the throw/1 predicate during the execution of Goal1, execution must go back to the catch predicate and proceed with Goal2. So, I think that no stack optimization can be performed in presence of this query and consequently it has to be disabled. I haven't found any documents that confirm my thought and the ISO standard doesn't specify anything on it. Please, can you help me?
Thank you in advance and kind regards, Silvia Umiliacchi