/*@ depends \call(dequeue, q, ...), \call(size, q); @ assigns q->data; @*/ $atomic_f _Bool dequeue(cqueue* q, int* res) { $seq_remove(&q->data, $seq_length(&q->data)-1, res, 1); }
void proof_step_display_human_file_latex(FILE *outfile, proof_step *pStep, divisor *pDiv, fdata_list *pFdatum) { bool answer; t_set *pTset; seq_set *pSeqs; fdata_list *pFdataApp; fdata *pFdata; t_set *pExcluded; list_node *pNode; bool found_one = FALSE; binterval *pInterval; if (!pStep->other_reason) { pTset = t_set_associated_to_seq(div_genus(pDiv), pStep->pSeq); pFdataApp = fdata_list_applicable_formulas(pDiv, pTset, pFdatum, seq_length(pStep->pSeq)); pExcluded = t_set_subset_complement(pTset, pStep->pIncluded); fprintf(outfile, "\n$A = "); seq_display_file_latex(outfile, pStep->pSeq); fprintf(outfile, "$\n\\bigskip\n"); fprintf(outfile, "using the formula "); for (pNode = pFdataApp->pHead ; ((pNode != NULL) && (!found_one)) ; pNode = pNode->pNext) { found_one = t_set_subset_formula_ok (pDiv, pTset, pStep->pIncluded, (fdata *) (pNode->pData)); if (found_one) pFdata = (fdata *) (pNode->pData); } fdata_display_file(outfile, pFdata); if (pFdata->type == 'c') { pInterval = t_set_subset_formula_c_interval (pDiv, pTset, pStep->pIncluded, pFdata); fprintf(outfile, "\n\n\\begin{gather*}\n"); fprintf(outfile, "v^* D = "); bq_display_file_latex(outfile, pInterval->pLb); fprintf(outfile, "\\Big(K_{\\overline{M}_{0, %d}} + ", seq_a(pStep->pSeq) + seq_z(pStep->pSeq, div_genus(pDiv))); coeffs_display_file_latex(outfile, pDiv, pTset, pFdata->formula_c, pInterval->pLb); fprintf(outfile, "\\Big)\n"); fprintf(outfile, "\\end{gather*}\n"); binterval_kill(pInterval); fflush(stdout); } else { if (t_set_length(pExcluded) != 0) { printf("The coefficients which are not in " "0 are as follows:\n"); t_set_display(pExcluded); } else printf("all coefficients are 0\n"); } printf("we now need to check the following sequences: \n"); pSeqs = seq_set_to_check(pTset, pStep->pIncluded, div_genus(pDiv)); seq_set_display(pSeqs); seq_set_kill(pSeqs); t_set_kill(pExcluded); t_set_kill(pTset); fdata_list_kill(pFdataApp); } else { switch (pStep->reason) { case F_BOUND: printf("Restriction sequence : "); seq_display(pStep->pSeq); printf("\nsince the F-conjecture is true on M_{0, n} "); printf("for n <= %d,\n", CURRENT_F_BOUND); printf("it follows that this restriction gives " "something nef.\n"); } } printf("-------------------------------------------------\n\n"); }
/*@ pure; @ depends \call(enqueue, q, ...), \call(dequeue,q, ...); @ reads q->data; @ assigns \nothing; @*/ $atomic_f int size(cqueue* q) { return $seq_length(&q->data); }