ACE REVERSE-ENGINE PIPELINE TEST
===============================

TEST 1
======================================================================
Category: Form I — darasa
Input token: دَرَسَ
Normalized token: دَرَسَ
Unicode length: 6

1. Pipeline execution order
----------------------------------------------------------------------
Function: ace_run_reverse_engine_pipeline()

Step 01
Stage: Unnamed stage
Function: ace_extract_arabic_structural_clusters()
Status: COMPLETED

Step 02
Stage: Unnamed stage
Function: ace_build_stem_structure()
Status: COMPLETED

Step 03
Stage: Unnamed stage
Function: ace_assign_positions_from_end()
Status: COMPLETED

Step 04
Stage: Unnamed stage
Function: ace_extract_pattern_features()
Status: COMPLETED

Step 05
Stage: Unnamed stage
Function: ace_identify_potential_forms_by_stem_length()
Status: COMPLETED

Step 06
Stage: Unnamed stage
Function: ace_detect_form()
Status: COMPLETED

Step 07
Stage: Unnamed stage
Function: ace_extract_form_sign()
Status: COMPLETED

Step 08
Stage: Unnamed stage
Function: ace_build_structure()
Status: COMPLETED

Step 09
Stage: Unnamed stage
Function: ace_extract_root_candidates()
Status: COMPLETED

Step 10
Stage: Unnamed stage
Function: ace_generate_root_candidates()
Status: COMPLETED

Step 11
Stage: Unnamed stage
Function: ace_validate_root_candidates()
Status: COMPLETED

Step 12
Stage: Unnamed stage
Function: ace_build_root_candidates()
Status: COMPLETED

Step 13
Stage: Unnamed stage
Function: ace_select_final_root()
Status: COMPLETED

Step 14
Stage: Unnamed stage
Function: ace_identify_form_candidates()
Status: COMPLETED

Step 15
Stage: Unnamed stage
Function: ace_select_best_root_candidate()
Status: COMPLETED

Step 16
Stage: Unnamed stage
Function: ace_detect_weak_radicals()
Status: COMPLETED

Step 17
Stage: Unnamed stage
Function: ace_resolve_mithal_roots()
Status: COMPLETED

Step 18
Stage: Unnamed stage
Function: ace_resolve_hollow_roots()
Status: COMPLETED

Step 19
Stage: Unnamed stage
Function: ace_resolve_defective_roots()
Status: COMPLETED

Step 20
Stage: Unnamed stage
Function: ace_resolve_hamzated_roots()
Status: COMPLETED

Step 21
Stage: Unnamed stage
Function: ace_merge_weak_root_candidates()
Status: COMPLETED

Step 22
Stage: Unnamed stage
Function: ace_score_weak_root_candidates()
Status: COMPLETED

Step 23
Stage: Unnamed stage
Function: ace_select_final_lexical_root()
Status: COMPLETED

2. Normalized input
----------------------------------------------------------------------
Function: ace_normalize_analysis_input()

Original token: دَرَسَ
Normalized token: دَرَسَ
Initial letter: NONE
Imperfect-group onset: NO

3. Suffix analysis
----------------------------------------------------------------------
Function: ace_remove_longest_suffix()

Selected suffix: َ
Selected suffix length: 1
Token after suffix removal: دَرَس

Exact suffix matches:

Match 1
Suffix: َ
Length: 1
Remaining token: دَرَس
Code: NONE

4. Structural stem
----------------------------------------------------------------------
Function: buildStemStructure()

Marked stem: دَرَس
Plain stem: درس
Post-suffix Unicode length: 0
Surface cluster length: 3
Shadda count: 0
Effective stem length: 3

5. Structural clusters
----------------------------------------------------------------------
Function: extractArabicStructuralClusters()

Cluster 1
Complete cluster: دَ
Base letter: د
Marks: َ
Has shadda: NO
Effective value: 1

Cluster 2
Complete cluster: رَ
Base letter: ر
Marks: َ
Has shadda: NO
Effective value: 1

Cluster 3
Complete cluster: س
Base letter: س
Marks: NONE
Has shadda: NO
Effective value: 1

6. Provisional radical assignment
----------------------------------------------------------------------
Function: ace_assign_root_positions()

r0: NONE
r1: NONE
r2: NONE
r0 index: NONE
r1 index: NONE
r2 index: NONE
r1 repeated: NO
r2 repeated: NO

7. Pattern and form features
----------------------------------------------------------------------
Function: ace_extract_pattern_features()

Derivational onset vn: NONE
Medial marker vm: NONE
Form sign fs: NONE
Long alif after r0: NO
Form VIII marker: NONE
Form VII nūn: NO
Full ist prefix: NO

8. Form detection
----------------------------------------------------------------------
Function: ace_detect_form()

Detected form: I
Detection pattern: NONE

9. Generated root candidates
----------------------------------------------------------------------
Function: generateRootCandidates()

No complete root candidate was generated.

10. Weak-root and hamza resolution
----------------------------------------------------------------------
Function: ace_resolve_weak_and_hamzated_root()

Weak-root type: NONE
Weak radical count: 0
Hamzated root: NO
Selected weak candidate: NONE

11. Final selection
----------------------------------------------------------------------
Function: ace_select_final_lexical_root()

Selected root: NONE
Final lexical root: NONE
Final form: I
Candidate count: 0

======================================================================