/**
  * 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);
     }
   }
 }