Functional Arabic Morphology: Formal System and Implementation