- Fixed a bug in output overwrite for de-class code.
This commit is contained in:
		
							parent
							
								
									4d7b744e1b
								
							
						
					
					
						commit
						8c03bba02a
					
				| @ -1732,6 +1732,36 @@ createNewTermGeneric (Termlist tl, Term t) | ||||
|   return termlistPrepend (tl, newterm); | ||||
| } | ||||
| 
 | ||||
| //! Construct a list of already used constants
 | ||||
| Termlist | ||||
| findUsedConstants (const System sys) | ||||
| { | ||||
|   int run; | ||||
|   Termlist tl; | ||||
|   Termlist tlconst; | ||||
| 
 | ||||
|   tl = NULL; | ||||
|   tlconst = NULL; | ||||
|   for (run = 0; run < sys->maxruns; run++) | ||||
|     { | ||||
|       tl = termlistAddBasics (tl, sys->runs[run].rho); | ||||
|       tl = termlistAddBasics (tl, sys->runs[run].sigma); | ||||
|     } | ||||
|   while (tl != NULL) | ||||
|     { | ||||
|       Term t; | ||||
| 
 | ||||
|       t = tl->term; | ||||
|       if (!realTermVariable (t)) | ||||
| 	{ | ||||
| 	  tlconst = termlistAddNew (tlconst, t); | ||||
| 	} | ||||
|       tl = tl->next; | ||||
|     } | ||||
|   termlistDelete (tl); | ||||
|   return tlconst; | ||||
| } | ||||
| 
 | ||||
| //! Create a new term with incremented run rumber, starting at sys->maxruns.
 | ||||
| /**
 | ||||
|  * This is a rather intricate function that tries to generate new terms of a | ||||
| @ -1812,7 +1842,7 @@ makeTraceConcrete (const System sys) | ||||
|   int run; | ||||
| 
 | ||||
|   changedvars = NULL; | ||||
|   tlnew = NULL; | ||||
|   tlnew = findUsedConstants (sys); | ||||
|   run = 0; | ||||
| 
 | ||||
|   while (run < sys->maxruns) | ||||
|  | ||||
							
								
								
									
										19
									
								
								src/dotout.c
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								src/dotout.c
									
									
									
									
									
								
							| @ -63,15 +63,30 @@ void | ||||
| printVisualRun (int rid) | ||||
| { | ||||
|   int run; | ||||
|   int displayi; | ||||
|   int displayr; | ||||
|   int display; | ||||
| 
 | ||||
|   display = 1; | ||||
|   displayi = 0; | ||||
|   displayr = 0; | ||||
|   for (run = 0; run < rid; run++) | ||||
|     { | ||||
|       if (sys->runs[run].protocol != INTRUDER) | ||||
| 	{ | ||||
| 	  display++; | ||||
| 	  displayr++; | ||||
| 	} | ||||
|       else | ||||
| 	{ | ||||
| 	  displayi++; | ||||
| 	} | ||||
|     } | ||||
|   if (sys->runs[rid].protocol == INTRUDER) | ||||
|     { | ||||
|       display = sys->maxruns + displayi + 1; | ||||
|     } | ||||
|   else | ||||
|     { | ||||
|       display = displayr + 1; | ||||
|     } | ||||
|   eprintf ("#%i", display); | ||||
| } | ||||
|  | ||||
| @ -520,11 +520,13 @@ termlistAddRealVariables (Termlist tl, Term t) | ||||
| Termlist | ||||
| termlistAddBasic (Termlist tl, Term t) | ||||
| { | ||||
|   t = deVar (t); | ||||
| 
 | ||||
|   if (t == NULL) | ||||
|     return tl; | ||||
|   if (!isTermLeaf (t)) | ||||
|   if (!realTermLeaf (t)) | ||||
|     { | ||||
|       if (isTermEncrypt (t)) | ||||
|       if (realTermEncrypt (t)) | ||||
| 	return termlistAddBasic (termlistAddBasic (tl, TermOp (t)), | ||||
| 				 TermKey (t)); | ||||
|       else | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user