From atoosa@ccs.neu.edu Fri Dec 12 14:59:16 1997 Received: from denali.ccs.neu.edu (atoosa@denali.ccs.neu.edu [129.10.113.75]) by amber.ccs.neu.edu (8.8.6/8.8.6) with SMTP id OAA29655 for ; Fri, 12 Dec 1997 14:59:15 -0500 (EST) Date: Fri, 12 Dec 1997 14:59:14 -0500 (EST) From: Atusa Fattahi Reply-To: Atusa Fattahi To: Karl Lieberherr Subject: description of design Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Status: R Content-Length: 2440 what this program does is it interprets some web scripting language which is explained in this paper : SRC report 148 by Luca Cardelli and Rown Davies http://www.research.digital.com/src/publications so if any body wants to continue this project I recommend reading this paper first. I tried to explain it in my READ_ME file very shortly What I did was I am walking through the commands and collect any relevant information that might be necessary in future interpretation and get rid of those information when they are not needed any more meanwhile if I get to a URL call I try to fetch it depending on what the collected information is so far. what makes the structure of the program confusing is as I wasn't able to use around methods because I had more than one visitor to control the traversal at some points I had to use flags and to keep them in stacks as the language can become quit nested what is complicated about controlling the flags is that two different flags have been used for this two different commands S ? S and S | S if using an around method then the program is going to be quit straight forward there are three visitors that become activated together : the limitCheckingVisitor keeps track of the time limits the repeatCheckingVisitor keeps track of the repeat commands the Visitor is the main visitor that does the interpretation the body of the two other visitors can be inserted in the body of the main Visitor but to make things organized I tried to give one job to each visitor the other thing that the main Visitor does is controlling the flags and stacks that won't be necessary if using the around method the main Visitor communicates with the two other visitors to get the information that have been gathered so far and make the decision about interpretation there is a timeCheckingVisitor too that checks the descending order of the nested timelimits at the beginning of the program and if it's not like that then it stops the interpretation and notifies the user there are also some other controls like using a repeat command with no time limit .to stop the program to get to a loop it gives a warning in this case to the user. so what I did is exactly what people do when reading a sentence some times you understand what you have read so far and some times you need to keep some information in mind for future understanding.