- Added more outlining for the arachne system.
This commit is contained in:
		
							parent
							
								
									9cf3bf3da3
								
							
						
					
					
						commit
						b74567b2e0
					
				@ -9,8 +9,64 @@
 | 
			
		||||
#include "system.h"
 | 
			
		||||
#include "arachne.h"
 | 
			
		||||
 | 
			
		||||
//! Init Arachne engine
 | 
			
		||||
void
 | 
			
		||||
arachneInit (const System sys)
 | 
			
		||||
{
 | 
			
		||||
  /*
 | 
			
		||||
   * Add intruder protocol roles
 | 
			
		||||
   */
 | 
			
		||||
  return;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//! Close Arachne engine
 | 
			
		||||
void
 | 
			
		||||
arachneDone (const System sys)
 | 
			
		||||
{
 | 
			
		||||
  return;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//! Prune determination
 | 
			
		||||
/**
 | 
			
		||||
 *@returns true iff this state is invalid for some reason
 | 
			
		||||
 */
 | 
			
		||||
int
 | 
			
		||||
prune (const System sys)
 | 
			
		||||
{
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//! Main recursive procedure for Arachne
 | 
			
		||||
int
 | 
			
		||||
iterate (const System sys)
 | 
			
		||||
{
 | 
			
		||||
  /**
 | 
			
		||||
   * Possibly prune this state
 | 
			
		||||
   */
 | 
			
		||||
 | 
			
		||||
  if (prune (sys))
 | 
			
		||||
    return 0;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * If not pruned, check whether its a final state (i.e. all goals bound)
 | 
			
		||||
   * - Yes: check whether property holds
 | 
			
		||||
   * - No:  iterate further
 | 
			
		||||
   */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//! Main code for Arachne
 | 
			
		||||
/**
 | 
			
		||||
 * For this test, we manually set up some stuff.
 | 
			
		||||
 */
 | 
			
		||||
int
 | 
			
		||||
arachne (const System sys)
 | 
			
		||||
{
 | 
			
		||||
  /*
 | 
			
		||||
   * set up claim role(s)
 | 
			
		||||
   */
 | 
			
		||||
 | 
			
		||||
  /*
 | 
			
		||||
   * iterate
 | 
			
		||||
   */
 | 
			
		||||
  iterate (sys);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -3,6 +3,8 @@
 | 
			
		||||
 | 
			
		||||
#include "system.h"
 | 
			
		||||
 | 
			
		||||
void arachneInit (const System sys);
 | 
			
		||||
void arachneDone (const System sys);
 | 
			
		||||
int arachne (const System sys);
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -539,6 +539,11 @@ main (int argc, char **argv)
 | 
			
		||||
#ifdef DEBUG
 | 
			
		||||
  warning ("Selected output method is %i", sys->output);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  if (sys->engine == ARACHNE_ENGINE)
 | 
			
		||||
    {
 | 
			
		||||
      arachneInit ();
 | 
			
		||||
    }
 | 
			
		||||
  /*
 | 
			
		||||
   * ---------------------------------------
 | 
			
		||||
   *  Start real stuff
 | 
			
		||||
@ -620,6 +625,10 @@ main (int argc, char **argv)
 | 
			
		||||
   * Now we clean up any memory that was allocated.
 | 
			
		||||
   */
 | 
			
		||||
 | 
			
		||||
  if (sys->engine == ARACHNE_ENGINE)
 | 
			
		||||
    {
 | 
			
		||||
      arachneDone ();
 | 
			
		||||
    }
 | 
			
		||||
  knowledgeDestroy (sys->know);
 | 
			
		||||
  systemDone (sys);
 | 
			
		||||
  compilerDone ();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user