Analogy (Islamic) or qiyas is the fourth source of Sharia (Islamic Law). In case of the lack of direct text, from the Quran or Hadith, on any contemporary issue, making judgment based on analogy is permissible by Sharia. Analogical reasoning can be deduced from a known Islamic judgment and then applied to the unknown problem within the Islamic model of the Quran, Hadith, and the Islamic consensus. This means that the Quran and Hadith can be further analyzed and extended from a primary known issue (asl) to a new problem (fara') if there is a common cause ('illa) for both problems.
Example: drug abuse and wine drinking are both not permitted by Sharia although they are two different problems. The first was not known in the early days of Islam and it was not mentioned in the Quran or Hadith. Analogically speaking, since drug abuse has the same effects of alcoholic abuse (Loss of Consciousness), which is forbidden in the Quran and Hadith, therefore, drug abuse must be banned by law as well.