/** Helper for getting just the predicates out of the module structures. */
 @SubL(source = "cycl/builder-utilities.lisp", position = 38219)
 public static final SubLObject get_all_sbhl_module_link_predicates() {
   {
     final SubLThread thread = SubLProcess.currentSubLThread();
     {
       SubLObject link_predicates = NIL;
       SubLObject iteration_state =
           dictionary_contents.do_dictionary_contents_state(
               dictionary.dictionary_contents(sbhl_module_vars.get_sbhl_modules()));
       while ((NIL == dictionary_contents.do_dictionary_contents_doneP(iteration_state))) {
         thread.resetMultipleValues();
         {
           SubLObject key = dictionary_contents.do_dictionary_contents_key_value(iteration_state);
           SubLObject module = thread.secondMultipleValue();
           thread.resetMultipleValues();
           link_predicates =
               cons(sbhl_module_vars.get_sbhl_module_link_pred(module), link_predicates);
           iteration_state = dictionary_contents.do_dictionary_contents_next(iteration_state);
         }
       }
       dictionary_contents.do_dictionary_contents_finalize(iteration_state);
       return link_predicates;
     }
   }
 }
 /**
  * Returns the cyc product identifier for this combination of code-product, kb-product and
  * branch-tag.
  */
 @SubL(source = "cycl/builder-utilities.lisp", position = 28769)
 public static final SubLObject find_cyc_product(
     SubLObject code_product, SubLObject kb_product, SubLObject branch_tag) {
   {
     final SubLThread thread = SubLProcess.currentSubLThread();
     return Sequences.find(
             list(code_product, kb_product, branch_tag),
             $cyc_product_definitions$.getDynamicValue(thread),
             Symbols.symbol_function(EQUAL),
             Symbols.symbol_function($sym40$CDR),
             UNPROVIDED,
             UNPROVIDED)
         .first();
   }
 }
 /** Returns T if a cyc product definition composed of these 4 values exists. */
 @SubL(source = "cycl/builder-utilities.lisp", position = 28472)
 public static final SubLObject cyc_product_definition_presentP(
     SubLObject cyc_product,
     SubLObject code_product,
     SubLObject kb_product,
     SubLObject branch_tag) {
   {
     final SubLThread thread = SubLProcess.currentSubLThread();
     return conses_high.member(
         list(cyc_product, code_product, kb_product, branch_tag),
         $cyc_product_definitions$.getDynamicValue(thread),
         Symbols.symbol_function(EQUAL),
         UNPROVIDED);
   }
 }
 @SubL(source = "cycl/operation-queues.lisp", position = 9125)
 public static final SubLObject local_operation_storage_queue_enqueue(SubLObject operation) {
   {
     final SubLThread thread = SubLProcess.currentSubLThread();
     {
       SubLObject lock = $local_operation_storage_queue_lock$.getDynamicValue(thread);
       SubLObject release = NIL;
       try {
         release = Locks.seize_lock(lock);
         queues.enqueue(operation, $local_operation_storage_queue$.getGlobalValue());
       } finally {
         if ((NIL != release)) {
           Locks.release_lock(lock);
         }
       }
     }
     return NIL;
   }
 }
 @SubL(source = "cycl/operation-queues.lisp", position = 5157)
 public static final SubLObject transcript_queue_dequeue() {
   {
     final SubLThread thread = SubLProcess.currentSubLThread();
     {
       SubLObject ans = NIL;
       SubLObject lock = $transcript_queue_lock$.getDynamicValue(thread);
       SubLObject release = NIL;
       try {
         release = Locks.seize_lock(lock);
         ans = queues.dequeue($transcript_queue$.getGlobalValue());
       } finally {
         if ((NIL != release)) {
           Locks.release_lock(lock);
         }
       }
       return ans;
     }
   }
 }
 @SubL(source = "cycl/constant-completion.lisp", position = 2143)
 public static final SubLObject compute_bogus_constant_names_in_code() {
   {
     final SubLThread thread = SubLProcess.currentSubLThread();
     if ((NIL != $constant_names_in_code$.getGlobalValue())) {
       {
         SubLObject _prev_bind_0 =
             utilities_macros.$noting_progress_start_time$.currentBinding(thread);
         try {
           utilities_macros.$noting_progress_start_time$.bind(Time.get_universal_time(), thread);
           utilities_macros.noting_progress_preamble($str4$Computing_bogus_constant_names_in);
           $bogus_constant_names_in_code$.setGlobalValue(NIL);
           {
             SubLObject cdolist_list_var = $constant_names_in_code$.getGlobalValue();
             SubLObject name = NIL;
             for (name = cdolist_list_var.first();
                 (NIL != cdolist_list_var);
                 cdolist_list_var = cdolist_list_var.rest(), name = cdolist_list_var.first()) {
               {
                 SubLObject constant = constants_high.find_constant(name);
                 if ((NIL != constants_high.uninstalled_constant_p(constant))) {
                   $bogus_constant_names_in_code$.setGlobalValue(
                       cons(name, $bogus_constant_names_in_code$.getGlobalValue()));
                 }
               }
             }
           }
           $bogus_constant_names_in_code$.setGlobalValue(
               Sort.sort(
                   $bogus_constant_names_in_code$.getGlobalValue(),
                   Symbols.symbol_function($sym3$STRING_),
                   UNPROVIDED));
           utilities_macros.noting_progress_postamble();
         } finally {
           utilities_macros.$noting_progress_start_time$.rebind(_prev_bind_0, thread);
         }
       }
     }
     return Sequences.length($bogus_constant_names_in_code$.getGlobalValue());
   }
 }
 /**
  * Declare that CYC-PRODUCT is composed of CODE-PRODUCT, KB-PRODUCT and BRANCH-TAG. This
  * information is used to compositionally determine the CYC-PRODUCT of a running image, which in
  * turn can be used to gate various behaviors.
  */
 @SubL(source = "cycl/builder-utilities.lisp", position = 27262)
 public static final SubLObject declare_cyc_product(
     SubLObject cyc_product,
     SubLObject code_product,
     SubLObject kb_product,
     SubLObject branch_tag) {
   {
     final SubLThread thread = SubLProcess.currentSubLThread();
     checkType(cyc_product, $sym35$KEYWORDP);
     checkType(kb_product, $sym35$KEYWORDP);
     checkType(code_product, $sym35$KEYWORDP);
     checkType(branch_tag, $sym36$STRINGP);
     if ((NIL
         != cyc_product_definition_presentP(cyc_product, code_product, kb_product, branch_tag))) {
       return Errors.warn($str37$The_cyc_product___A__is_already_p, cyc_product);
     } else if ((NIL != find_cyc_product(code_product, kb_product, branch_tag))) {
       return Errors.error(
           $str38$There_already_exists_a_different_,
           find_cyc_product(code_product, kb_product, branch_tag));
     } else if ((NIL
         != conses_high.assoc(
             cyc_product,
             $cyc_product_definitions$.getDynamicValue(thread),
             UNPROVIDED,
             UNPROVIDED))) {
       return Errors.error($str39$The_cyc_product__A_already_exists, cyc_product);
     } else {
       $all_cyc_products$.setDynamicValue(
           cons(cyc_product, $all_cyc_products$.getDynamicValue(thread)), thread);
       $cyc_product_definitions$.setDynamicValue(
           cons(
               list(cyc_product, kb_product, code_product, branch_tag),
               $cyc_product_definitions$.getDynamicValue(thread)),
           thread);
       return $cyc_product_definitions$.getDynamicValue(thread);
     }
   }
 }