2014-05-23 23:20:15 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								USING:  assocs  help.markup  help.syntax  kernel  math  sets  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								tools.crossref.private words ;
 
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								IN:  tools.crossref  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-04-22 05:20:38 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								ARTICLE: "tools.crossref"  "Definition cross referencing" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								"Definitions can answer a sequence of definitions they directly depend on:"  
						 
					
						
							
								
									
										
										
										
											2009-10-01 15:56:36 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $subsections uses }
							 
						 
					
						
							
								
									
										
										
										
											2009-04-22 05:20:38 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								"An inverted index of the above:"  
						 
					
						
							
								
									
										
										
										
											2009-10-01 15:56:36 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $subsections get-crossref }
							 
						 
					
						
							
								
									
										
										
										
											2009-04-22 05:20:38 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								"Words to access it:"  
						 
					
						
							
								
									
										
										
										
											2009-10-01 15:56:36 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $subsections
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    usage
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    smart-usage
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}
							 
						 
					
						
							
								
									
										
										
										
											2009-04-22 05:20:38 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								"Tools for interactive use:"  
						 
					
						
							
								
									
										
										
										
											2009-10-01 15:56:36 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $subsections
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    usage.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    vocab-uses.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    vocab-usage.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}
							 
						 
					
						
							
								
									
										
										
										
											2009-03-11 08:18:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $see-also "definitions"  "words"  "see"  } ;
 
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ABOUT: "tools.crossref" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-04-22 05:20:38 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HELP:  uses  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $values { "defspec"  "a definition specifier"  } { "seq"  "a sequence of definition specifiers"  } }
							 
						 
					
						
							
								
									
										
										
										
											2016-05-25 08:54:13 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $description "Outputs a sequence of definitions called by the given definition."  }
							 
						 
					
						
							
								
									
										
										
										
											2009-04-22 05:20:38 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $notes "The sequence might include the definition itself, if it is a recursive word."  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $examples
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    "We can ask the "  { $link sq  } " word to produce a list of words it calls:" 
							 
						 
					
						
							
								
									
										
										
										
											2010-11-29 04:41:57 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    { $unchecked-example "\\ sq uses ."  "{ dup * }"  }
							 
						 
					
						
							
								
									
										
										
										
											2009-04-22 05:20:38 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								} ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  crossref  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $var-description "A graph whose vertices are definition specifiers and edges are usages. See "  { $link "graphs"  } ". This variable is reset to "  { $link f  } " every time a definition is added or removed. Call "  { $link get-crossref } " to lazily construct the graph instead of using this variable directly."  } ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  get-crossref  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $values { "crossref"  assoc  } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $description "Outputs the cross-referencing index, mapping definitions to usages, building it first if necessary."  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $notes "This word is used to implement "  { $link usage } " and "  { $link usage. } "."  } ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  crossref-def  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $values { "defspec"  "a definition specifier"  } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $description "Adds a vertex representing this definition, along with edges representing dependencies to the "  { $link crossref } " graph."  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$low-level-note ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  usage  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $values { "defspec"  "a definition specifier"  } { "seq"  "a sequence of definition specifiers"  } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $description "Outputs a sequence of definitions that directly call the given definition."  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $notes "The sequence might include the definition itself, if it is a recursive word."  } ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								HELP:  usage.  
						 
					
						
							
								
									
										
										
										
											2014-05-23 23:20:15 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $values { "word"  word } }
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{ $description "Prints an list of all callers of a word. This may include the word itself, if it is recursive."  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $examples { $code "\\ reverse usage."  } } ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-04-22 05:20:38 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HELP:  quot-uses  
						 
					
						
							
								
									
										
										
										
											2016-03-29 18:46:29 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $values { "obj"  object  } { "set"  "a "  { $link set  } " of words"  } }
							 
						 
					
						
							
								
									
										
										
										
											2009-04-22 05:20:38 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $description "Outputs a set of words referenced by the quotation and any quotations it contains."  } ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{ usage usage. } related-words