As Sabra says...
As Sabra says, Avicenna seems to hold that “the properties constituting the subject matter of logic would be inconceivable without the exercise of a particular function of language” (Sabra (1980) 764).
However, Ibn Sina and al-Farabi were concerned to distinguish logic from grammar as many Arabic grammarians - whose linguistic theories were developed to a high degree of complexity and sophistication - were contemptuous of the philosophers for importing Greek logic, which they saw as a foreign linguistic tradition, into the Arabic milieu.
This attitude toward Greek logic is epitomized in a famous debate reported to have taken place in Baghdad in 932 between the grammarian Abu Sa'id al-Sirafi and Abu Bishr Matta, a Syriac Christian who translated some of Aristotle's works into Arabic and is purported to have been one of al-Farabi's teachers. Abû Bishr argued that speakers of Arabic need to learn Greek logic. For him Logic comes ahead of Grammar: "The logician has no need of grammar, whereas the grammarian does need logic.
For logic enquires into the meaning, whereas grammar enquires into the expression. If, therefore, the logician deals with the expression, it is accidental, and it is likewise accidental if the grammarian deals with the meaning. Now, the meaning is more exalted than the expression, and the expression humbler than the meaning".
The extant account of the debate is heavily biased towards al-Sirafi, who attacks logical formalism and denies the ability of logic to act as a measure of reasoning over and above the innate capacities of the intellect itself. His principal claims are that philosophical logic is nothing but Greek grammar warmed over, that it is inextricably tied to the idiom of the Greek language and that it has nothing to offer speakers of another language such as Arabic.
Yahya ibn 'Adi, makes his case for the independence of logic from grammar based upon the differences between the grammar of a particular nation and the universal science of logic. He argues that the subject matter of grammar is mere expressions ( al-alfaz ), which it studies from the limited perspective of their correct articulation and vocalization according to Arabic conventions.
The grammarian is especially concerned with language as an oral phenomenon; the logician alone is properly concerned with 'expressions in so far as they signify meanings' ( al-alfaz al-dalla 'ala al-ma'ani ) (Maqala fi tabyin, in Endress 1978: 188).