A
(abstract-concatenation tree) → concatenation
Function:
(defun abstract-concatenation (tree) (declare (xargs :guard (treep tree))) (b* (((fun (fail)) (abstract-fail)) ((unless (tree-case tree :nonleaf)) (fail)) (treess (tree-nonleaf->branches tree)) ((unless (and (consp treess) (consp (cdr treess)))) (fail)) (trees-repetition (car treess)) (trees-repetitions (cadr treess)) ((unless (consp trees-repetition)) (fail)) (tree-repetition (car trees-repetition)) (repetition (abstract-repetition tree-repetition)) (repetitions (abstract-conc-rest trees-repetitions))) (cons repetition repetitions)))