#] #] ********************* #] "$d_Qtest"'faults/faults- develop.txt' - res ipsa loquitor # www.BillHowell.ca 12Apr2022 initial # view this file in a text editor, with [constant width font, tab = 3 spaces], no line-wrap 48************************************************48 24************************24 # Table of Contents, generated with : # $ grep "^#]" "$d_Qtest"'faults/faults- develop.txt' | sed 's/^#\]/ /' # ********************* 24************************24 08********08 #] ??Apr2022 08********08 #] ??Apr2022 08********08 #] ??Apr2022 08********08 #] 12Apr2022 remove redundant optrs IF flag_debug THEN write 'loading lstL_checkIfAnyFaults' ; ENDIF ; # loaddefs link d_Qndfs 'faults.ndf' IF flag_debug THEN write 'loading lstL_checkIsAllFaults' ; ENDIF ; #] lstL_checkIsAllFaults IS OP lstL - res ipsa loquitor lstL_checkIsAllFaults IS OP lstL { AND AND (LEAF isfault lstL) } #] lstL_checkIfAnyFaults IS OP lstL - res ipsa loquitor lstL_checkIfAnyFaults IS OP lstL { OR OR (LEAF isfault lstL) } IF flag_debug THEN write 'loading lstL_countFaults' ; ENDIF ; #] lstL_countFaults IS OP lstL - res ipsa loquitor # 13Feb2022 initial lstL_countFaults IS OP lstL { sum EACH isfault (ary_to_atomL lstL) } # 13Feb2022 tests qnial> lstL_countFaults (fault '?1') (fault '?2') (fault '?3') (fault '?4') 4 qnial> lstL_countFaults l o l (fault '?1') l l (fault '?2') o o (fault '?3') ooo (fault '?4') 4 qnial> lstL_countFaults (fault '?1') (l o l (l l (o o (l o (fault '?3'))))) (fault '?2') 3 change optr names : ary_checkIsAllFaults -> ary_isAllFaults ary_checkIfAnyFaults -> ary_hasFaults # enddoc