A Model-based Semantic Network for Smart Representation and the Inference of Islamic Law Ahmed Mabrouk Abstract Over the last few decades, knowledge representation techniques have made huge strides toward computerizing human knowledge. Modern smart engines can capture some aspects of human intel- ligence and process natural language texts. However, classical Is- lamic sciences have yet to benefit from these technological advances. This paper introduces a novel hybrid approach for smart representation and the deduction of Islamic legal rulings. An uṣūl- based structure is used to represent the various elements of rulings across a multi-dimensional semantic network. Moreover, smart deduction engines provide compact codes of fiqh rules and deduce answers to the queries relevant to these rules. Accordingly, a fully computerized system that comprises a fiqh knowledge base and smart deduction engines can be developed. This paper delineates the proposed system’s selective browsing, comparative analysis, deduction from fiqh rules, and fatwa assistance features. Keywords: Comparative analysis; Computational intelligence; De- duction; fatwa assistance; fiqh rules; Islamic law; Knowledge rep- resentation; Rule-based expert systems; Selective browsing; Strong methods. Introduction Over the past several decades, knowledge representation techniques have made remarkable advances in a variety of fields.1 For instance, the NYCE knowledge- Ahmed Mabrouk received his PhD degree in electrical and computer engineering from Boston University in 1998. His research interests include the philosophy of science, the theoretical and experimental validation of scientific theorems, and human and brain-like intelligences. based medical system has been assisting medical practitioners diagnose and pre- scribe medicine.2 A broad range of speech recognition engines have been widely used in smart phones as well as in publicly accessible tools on the web.3 More- over, complex robotic systems incorporate modules for knowledge representa- tion.4 Unfortunately, traditional Islamic sciences have yet to be touched by this technological revolution. While many sciences have moved to new dimensions in order to capitalize on the power and programming facilities of high-end digital computers, Islamic sciences continue to use the same centuries-old approaches and tools. This article attempts to remedy, in part, this serious shortcoming by presenting a computerized system for storing and smartly processing Islamic law (fiqh). Its implementation details are, however, beyond the scope of this ar- ticle and therefore will be addressed in a future work. Since knowledge is the most valuable outcome of human intelligence, knowledge representation lies at the core of artificial intelligence (AI) topics.5 While the majority of engineering disciplines seek to develop devices and tech- niques for measuring and calculating quantitative figures, AI puts human in- telligence and behavior, including factors such as motivation and preference, into a computational context6 so that it can use the tremendous computational power offered by modern digital computers to imitate human functions.7 Ex- perts of knowledge representation research how human minds store and process mental constructs for what we know about ourselves and the external world.8 How Can Machines Complement Human Intelligence? The next logical question concerns what machines can offer over and/or be- yond the capabilities of humans. Even though in terms of intelligence it is hard to claim that machines can surpass humans, we must remember that men- tal tasks do not depend solely upon intelligence. Let us first survey machines’ competitive edges, and then discuss how and at which points they can com- plement human intelligence. In general, machines are privileged over humans in the following aspects9: • Speed. While human brains perform tasks in the range of milliseconds, machines can perform the same tasks in the range of micro- to nanosec- onds. Roughly, current machines can perform calculations millions of times faster than humans can. • Perfect reproducibility. Machines always provide the same result when the same data and formulas are supplied, thereby eliminating the possi- bility of error under normal functionality. Mabrouk: A Model-based Semantic Network 49 • No degradation in performance. While human performance is heavily impacted by the individual’s personal mode, level of comfort, surround- ing environment, and other factors, machines are immune to them and thus maintain the same level of performance. • No decay in memory capacity. Semiconductor materials, which are the modern medium for memory devices, keep their content intact through- out their lifetime. On the other hand, the retrieval ability and response time of the human memory depend upon the storage period and retrieval frequency of the respective data.10 The above factors suggest that machines are better suited to the following types of computational tasks because they (1) can carry out a large number of calculations far faster than humans; (2) neither get bored nor tired of perform- ing repetitive tasks, and thus always perform them with the same degree of accuracy and willingness; (3) safeguard against the natural bias and subjec- tivity inherent in human judgment, and thus analyze data and produce calcu- lations based on preset formulae; and (4) can retrieve all relevant data to the point in question because, unlike human beings, they do not “forget” data ac- quired long ago. Another advantage of using machines is related to how they are pro- grammed. They literally follow the programmer’s instructions and thus do only what they are told to do. On the other hand, human experts keep many hidden assumptions to themselves and conduct many mental shortcuts based upon their experience. Interestingly, what they verbalize is sometimes less im- portant than what they do not say. In order to represent this untold part of the knowledge of experts, all steps of their mental progression have to be clearly spelled out to the machine in order for it to run. This, in a way, forces an in- vestigation of how the human mind functions, adding precious input to the literature of cognitive psychology and artificial intelligence. Can Mathematics Capture the Beauty of Art? A Historical Perspective Before ending this introduction, we would like to mention that discovering the pattern or, alternatively, the repeatable unit in some kind of scientific or artistic material existed long before AI began to flourish during the second half of the twentieth century. For the sake of brevity, I will mention one at- tempt in this regard. The versification of Arabic poetry began centuries before Islam’s inception. Words of different compositions form particular sequences, 50 The American Journal of Islamic Social Sciences 33:4 thereby contributing to its inherent musical sense, which blends with and adds beauty to meaning.11 Arabs spontaneously synthesized poetry based on their high sense and full maturity of Arabic usage, and thus their poets did not need schools or structured training to sharpen their poetic skills. Centuries later, al-Khalil ibn Ahmad (d. 786) presented symbolic formulas for alternat- ing long and short syllables and thereby captured most poetic sequences and perhaps all of the widely used ones. As a result, he became a leading figure in prosody. In the twentieth century, several attempts were made to convert his sym- bolic sequences into numerical ones. The advantage is obvious: Computers handle numbers better than symbols, for the former are naturally linked to a wide array of digital applications. In his remarkable work, Ahmad Mosta- geer noticed that all verses of Arabic poetry contain twelve two-letter units, each of which consists of a vowel followed by a consonant.12 These twelve units can be divided into either three or four groups. The consonant is omitted once in each group. Its position or its index within each group identifies the type of sequence used in the poetry under consideration. Once the numerical sequence has been identified, computers can readily identify the type of poetry by using a parsing program. Also, different types of sequences can be grouped into categories, each of which contains similar types. In addition to making poetry amenable to computational processing, this work established an interesting relationship between two distinctive fields: Mathematics, with numbers representing its basic figures, is the language of science and poetry, which undoubtedly belongs to the arts. The numerical se- quences of Arabic poetry are practical demonstrations that the beauty of art can be sensed and embodied in scientific terms. The Derivation Process of Legal Rulings Islamic legal rulings are derived from a combination of textual evidence, namely, the Qur’anic and Prophetic statements, and the logical rules for deduction and inference. Fiqh, defined as the science that generates these rulings,13 provides a mixture of qualitative and quantitative answers that assign ranks of permissibility to human acts and describe the procedures for conducting acts of worship and contracts (e.g., how to pray and formulate a marriage contract). The theory of Islamic legal reasoning is discussed in the science of uṣūl al-fiqh. Among other topics, this science analyzes the rules of interpreting legal texts, how to extend and/or modify their outcomes to other cases, and how to prioritize each piece of legal evidence.14 The jurists’ views differ for Mabrouk: A Model-based Semantic Network 51 52 The American Journal of Islamic Social Sciences 33:4 many reasons, including their different lines of reasoning, which are repre- sented in their differing uṣūl rules.15 Islamic history has seen many renowned jurists with exceptional legal mentalities. The overwhelming majority of them were attracted to Hanafi, Maliki, Shafi‘i, and Hanbali legal schools. Over the centuries, these schools developed a rich legacy and thus gained prominence over individual jurists.16 As rulings differ from one school to another, they also differ, but to a lesser degree, within the same school.17 To avoid legal chaos and the spread of conflicting views among the public, the scholars of each school determined which of their resources provided the most authentic views of their particular school.18 Legal maxims act as intermediate stages between fiqh and uṣūl.19 Contrary to uṣūl rules, fiqh rules do not express a principle of legislation or a criterion for deriving rulings; rather, they present a broader legal view regarding a cer- tain topic. For this reason, fiqh rules are typically investigated by researchers interested in the general features of a fiqh school. These rules will be discussed in more detail below. Methodology: Discovering the DNA of Islamic Law Turning to the world of living organisms (biology) and seeking examples of intelligence, one can find two types of intelligence: conscious intelligence in human minds and, to a lesser degree, in non-human minds, and unconscious intelligence, which literally exists in every cell of our bodies. Conscious in- telligence allows people to consciously plan, correlate, and conclude. With unconscious intelligence, cells encode all of the particulars and characteristics of our bodies as they perform countless biological operations.20 This intelli- gence is embodied in how DNA molecules are put together. Although com- posed of few elements, human DNA in the nucleus of one cell can possess up to 3 billion instructions, a far higher capacity than the conscious memory of a brilliant person can ever hope to absorb.21 The goal of this research is to use our “limited” conscious intelligence to design an unconscious structure that is amenable to fiqh rulings. As this struc- ture will be the basic building block for storing, or representing, fiqh material, we will call it a cell. Each cell comprises the elements of a single fiqh ruling. An aggregate of cells representing the rulings on a particular topic, such as prayer or marriage, forms a tissue. As histologists identify biological tissues based on the type of their cells, in our expert system tissues are identified based on the structure of their cells. In this research, we adopt biological terminology because of its intrinsic similarity with our proposed semantic network approach. The structure(s) of cells is a key factor behind the success of the proposed expert system. An efficient structure would provide a clear classification of the ruling’s different elements, direct access to each element, and maintain the relationships among these elements. Furthermore, this structure has to allow for the overlapping of cells as a result of two or more cells having a common element. The science of uṣūl al-fiqh is considered the most pertinent discipline for designing the structure of cells. As a science that regulates and characterizes the process of deriving fiqh rulings, uṣūl naturally provides con- crete definitions for the rulings’ constituents.22 An uṣūl-based structure would depict the jurist’s conception of fiqh rulings and how they interconnect to form a coherent piece of knowledge. Since the main objective of this article is to introduce digital coding tech- niques for fiqh rulings, the views of the Shafi‘i school have been arbitrarily chosen to demonstrate these techniques. However, the proposed techniques can be applied to other fiqh schools and, quite feasibly, to non-Islamic legal systems (e.g., British law). The process of deriving rulings and the philosophy of Islamic legislation are beyond the scope of this work. The Scope and Features of the Proposed System The main functions of the proposed system are as follows: • Storage and retrieval: Fiqh rulings can be added to the knowledge base, thereby forming new cells. Similarly, a particular ruling can be retrieved, either in full or in part, based on the user’s request. • Selective browsing: Users can obtain answers to customized queries across the entire knowledge base by providing the ruling’s selective el- ements, such as conditions or integrals (i.e., mandatory acts/elements that must be done/observed to validate an act of worship or a contract). Furthermore, many cells can be linked during the selective browsing process based on a common feature. For example, one can find out whether intention is required in all acts of worship. Also, advanced search expressions can be formed by using common operators, such as and, or, and not. • Comparative analysis: Data related to particular types of people or situa- tions can be compiled, such as lists of rulings related to children, blind people, cases of coercion, and people under the influence of drugs. Addi- tionally, the system can compare between two processes or contracts in terms of particular aspects (e.g., integrals, conditions, or outcomes). For Mabrouk: A Model-based Semantic Network 53 example, integrals of wuḍū’ can be compared to those of ghusl, and the outcome of a sales contract can be compared to that of a rental contract. • Coding of and deduction from fiqh rules: Fiqh rules can be coded and ex- panded to generate the rulings they govern. Exceptions can also be pointed out. Once generated, these rules can be used by the fatwa engine. • Fatwa assistance: This engine is responsible for figuring out novel situ- ations whose rulings are not directly stated in the knowledge base. This engine is invoked only after a mismatch with all available rulings is re- ported, after which it resorts to the general principles of Islamic legisla- tion as well as the developed fiqh rules. Three types of personnel are involved in developing and/or using the expert system: domain experts, AI engineers, and end users. Domain experts, who in this case are jurists, provide fiqh material to be coded into the knowledge base. These experts should have solid theoretical knowledge as well as long practical experience in education and issuing fatwa (i.e., a legal ruling issued by an ex- perienced jurist that is usually concerned with a complicated or unusual case, rather than a basic point of fiqh). To a large extent, the quality input of the fiqh expert determines the utilitarian value of the knowledge base. AI engineers help experts articulate their input in a way that the machine can understand. Domain experts usually express arguments based on hidden assumptions and a great deal of background knowledge. AI engineers should verbalize these hidden assumptions and background knowledge and then represent them in a machine-compliant format. In short, they translate the domain experts’ expertise into the appropriate structured format. Finally, end users can browse and query the knowledge base but should not be able to modify or edit it. Only AI engineers, under the direction of fiqh experts, should be given this privilege. Nonetheless, end users can enhance its quality by submitting sensible queries that can augment the material con- tained within the knowledge base and eventually bring it up to a competitive level. Fiqh experts should constantly update the knowledge base based upon the submitted queries. Only after many progressive cycles of submitting queries and adding their answers will the knowledge base become a powerful tool for learning and research. General Architecture Figure 1 shows the proposed system’s general architecture. The gate to the system, the user interface module, consists of two sub-modules: a function 54 The American Journal of Islamic Social Sciences 33:4 list module that allows users to engage with all of the system’s features, and a graphical interface module that provides various templates of cells for fill- ing the elements of fiqh rulings. The knowledge base contains fiqh rulings supplied by AI engineers that have been confirmed by domain experts. The editor translates the AI engineers’ input from its natural lexical format into a format appropriate for a low-level programming language. It thus maintains the correct syntax throughout the knowledge base. After adding new cells or editing existing ones, the connectivity manager updates the knowledge base such that all relevant cells are properly connected. Connectivity is both a cen- tral theme of the knowledge base and the prime factor of its power. Smart engines execute user’s queries and perform advanced processing tasks by extracting relevant data from the knowledge base, processing it, and sending output data to the display manager so that it can be displayed in a user- friendly format. Figure 1. The general architecture of the proposed system. An Overview of Knowledge Representation Approaches Generally speaking, knowledge representation approaches can be divided into three categories: weak problem-solving methods, strong problem-solving methods, and distributed problem-solving methods.23 Weak methods, which are intended to be applied to a wide variety of applications, are restricted to syntax-based checking procedures. In contrast, strong methods use intensive amounts of knowledge about the situation and the environment to solve prob- lems. Obviously these methods, which target specific domains as the type of experience used in some field, say medical diagnosis, would be useless in solving problems in other fields. Finally, distributed systems consist of au- tonomous agents, each of which acts spontaneously and without receiving in- Mabrouk: A Model-based Semantic Network 55 begdelwonK esab tiS ytivticennoC Use terfnI er ecfa g rtoiEd cihpaGr alpsDi ganaM ctimaneS abegdelwonK martS senigEn lac ya reg esa ytivticennoC reganaM ganaM reg structions from a central controller. Its agents are electronic modules situated in an interactive environment that receive sensory inputs and respond within the context of their particular tasks. Actions taken by agents should direct the system toward the desired goals. Robert Brooks, an AI expert, claims that a properly layered system can capture enough intelligence through its interaction with the surrounding en- vironment and, consequently, accomplish its final objectives.24 Since law ma- terial, including fiqh, involves a complex network of interconnected topics with a high number of situation-dependent issues and their associated excep- tions, strong methods seem to be the most appropriate choice for representing legal material. We will also utilize a layered architecture to acquire a better representation of the hierarchical relationships among legal points. The fol- lowing paragraphs discuss the main types of expert systems that employ strong methods. The most widely used expert systems are rule-based and model-based systems.25 Rule-based expert systems capture the theoretical knowledge and experience-based heuristics of domain experts. Such knowledge is represented as if … then … rules. The if part of the premise corresponds to the condition, and the then part represents the conclusion. The rules’ structure makes rule- based expert systems well-suited for capturing empirical knowledge and han- dling practical situations. The rules obviously correspond to specific cases and do not lay out a full theory of how the represented system functions. If a new case is addressed, a new set of rules has to be added. To overcome the rules-based system’s limited applicability, model-based expert systems were introduced to simulate the functionality and/or configu- ration of the modeled systems. Electronic devices are ideal candidates for model-based systems. Software simulations are widely used in developmental, debugging, and educational purposes of electronic systems. Because they op- erate at a high level of detail, model-based systems come with an additional cost of complexity. Moreover, they can only be applied to fields that have con- crete scientific theories; they cannot be applied to financial applications, for example, that lack such theories. Design Principles By reviewing the features that the system will offer, we can see that smart engines work on the semantic network that represents fiqh rulings. Accord- ingly, the semantic network should follow a model-based approach in order to capture the tremendous amount of intricate details embedded in fiqh ma- 56 The American Journal of Islamic Social Sciences 33:4 terial. In contrast, the general principles used in fiqh derivation processes can be directly represented by a rule-based approach. This hybrid approach is meant to cope with the various types of knowledge to be represented in the knowledge base. From this point onward, we will call the proposed system the Semantic-based System for Representing Islamic Law using a Hybrid approach (SRIL-H).26 Semantic networks represent meanings, and therefore knowledge, as a network of associations among nodes.27 In our fiqh knowledge base, every node represents an element of a ruling. A relationship between two nodes is mapped into a concept taken from uṣūl al-fiqh. The totality of concepts con- stitutes the primitives (i.e., the basic inherent elements that constitute the in- frastructure of a semantic network), initially programmed by the AI engineer, needed to interpret the network. As such, relationships between nodes are stan- dardized in accordance with the concepts of uṣūl. An understanding of the at- tributes and the fiqh standpoint of a particular act can be obtained by browsing the cell of this act. Elements of fiqh rulings naturally follow a hierarchical order. For exam- ple, prayer and fasting are subclasses of worship, and the integrals of prayer are subclasses of prayer. These integrals reside at a lower level than prayer, which, in turn, resides at a lower level than worship. Such a hierarchical order enables the implementation of an advantageous feature: inheritance. In this context, inheritance means that one element connected to another element re- siding at a higher level of the hierarchy can inherit its attributes. Inheritance thus eliminates the need for restating the shared attributes between two ele- ments on different levels and leads to a significant computational advantage when processing elements on different levels. The knowledge base is separated from the smart engines that process it. Alternatively, the memory is separated from the processor in order to simplify the development and control of operations. Accordingly, the principles of our design can be summarized as follows: • A hybrid implementation of the knowledge base that combines model- based and rule-based expert systems. • A hierarchical knowledge base that enables the assertion of the inheri- tance feature while navigating the knowledge base. • The separation of the knowledge base and smart engines. Relevant data from the knowledge base is passed to respective smart engines, as needed. Mabrouk: A Model-based Semantic Network 57 The Structure of the Semantic Network The model-based semantic network consists of interconnected cells, each of which represents the elements of a fiqh ruling. The elements of a cell comprise all of the concepts that must be stated in order to establish a correct ruling. Omitting one of these elements would result in an incomplete meaning that may mislead learners. For example, the time of fasting during Ramadan, namely, from dawn to sunset, is an element of the ruling of fasting that has to be stated, since the ruling only applies during this time. Likewise, the cash subject to zakat must be above the niṣāb (i.e., the minimum amount) and pos- sessed for at least one year. These two conditions are elements of the same ruling that must be stated in connection with the element of those properties that are subject to zakat. If no conditions are associated with an element, the respective ruling applies to all instances of this element. Once again, the relationships among the elements are based upon the def- initions and terminology of uṣūl. The act to which the ruling is assigned is the nucleus of that ruling. The nucleus of a cell is designated with an attribute that specifies the type of ruling. For example, the attribute of being “mandatory” is assigned to fasting when some conditions are fulfilled. The ruling may change when some conditions change. For example, fasting becomes “unlaw- ful” when one has a life-threatening illness. Figure 2 shows the elements of a generic ruling with some examples for each element. Not all of the elements mentioned in it have to be present in every ruling. For example, the ruling of wuḍū’ includes a tool (i.e., water), whereas the ruling of prayer includes no tool. The names of the elements in this are aligned with the grammatical parts of a natural statement. Consider, for instance, the statement “Ali eats an apple.” In this statement, “Ali” is the doer, “eats” is the act, and “apple” is the object. In a similar fashion, the ele- ments of the ruling of wuḍū’ would be as follows: person (adult sane Muslim) : wuḍū’ [mandatory]: face arms head feet : water (purifying): entry of time of mandatory prayer : Nil : carrying minor ḥadath : ḥadath lifted where “:” is a delimiter that separates two consecutive elements and “Nil” is a reserved parameter showing that no value is assigned to this element (i.e., the ruling applies to all instances of this element). The ruling’s attribute is written between square brackets; associated conditions with an element are written inside parentheses. The above example shows that elements of a ruling do not compose a complete natural sentence from the linguistic point of view. 58 The American Journal of Islamic Social Sciences 33:4 Some words are missing; however, they can be guessed with relative ease. In- terestingly, the missing words or propositions are not needed because the po- sition of the element dictates how it relates to other elements. In other words, only keywords have to be supplied to the knowledge base. Figure 2. The elements of a generic ruling with some examples for each element. Examples are not related to each other. A ruling may have multiple derivatives that share some elements and dif- fer in other elements. For example, the ruling of paying zakat has some de- rivatives, each of which corresponds to a different type of property that is subject to zakat (e.g., cash, cattle, and particular crops). The multiplicity of the object in this ruling generates the latter’s derivatives. The instances of this object actually have different associated conditions. Cash, cattle, and crops have different amounts of niṣāb. Also, ḥawl (one hijrī year of possession) is not required in the case of crops, whereas it is required in the cases of cash and cattle. Thus, the attribute of the ruling in each derivative is asserted based upon different combinations of conditions. A ruling’s derivatives portray an extension of the ruling along the hori- zontal direction, where all derivatives are located within the same hierarchical level. Another type of extension takes place along the vertical direction, where a set of elements belongs to or constitutes an element in the hierarchy’s upper level. For instance, the six integrals of wuḍū’ constitute the entire process of wuḍū’, and wuḍū’, in turn, belongs to worship. As the reader will recall, an extension along the vertical direction automatically invokes the feature of inheritance. The cell’s structure achieves computational efficiency by providing a great deal of background information and thus releases developers from providing it in conjunction with the ruling’s specific elements. The cell structure provides two types of information: uṣūl-based information and element-order-based Mabrouk: A Model-based Semantic Network 59 tAc reDo tcejOb looT meiT aPl eca atuiS - noti tcOu - meo p ;reayPr ;ealM t;ludA m;isluM s angrO Of ; W ;rWate f oytrnE reayrp ;meti awn toD t;senuS sqoM akkM ;equ ;kah k;ciS ;releavTr gntifiL thada ; pshiwnerO ;resfantr information. As previously mentioned, the relationships between conditions and preventives on one side and their corresponding elements on the other side are based on uṣūl. Also, the relationship between acts and their integrals is taken from uṣūl. Moreover, the five types of attributes are defined in uṣūl. With regard to the elements’ order, the index of an element within the whole sequence sets the context for that element. For example, we know that the first element, doer, has to be a person who may be either male or female as well as an adult or a child. Similarly, we know that the fifth element is time- related and thus can be a date or a time of day. The Graphical Representation of Rulings Graphs are commonly used in AI applications as a visual approach to knowl- edge representation. Semantic networks in particular are good candidates for graphical representation, in which connectivity can be depicted naturally. John Sowa, among others, introduced conceptual graphs for representing natural language.28 In this article, we introduce a customized graphical representation approach that suits the legal issues of Islamic law. This approach can be ex- tended, with minor modifications, to other branches of knowledge in which declarative statements are held to be correct under specific conditions and/or situations. Figure 3 shows a graphical representation of a generic cell. In this figure, the nucleus is represented by a circle, around which the ruling’s attribute(s) is noted: Mandatory (M), Recommended (R), Permissible (P), Discouraged (D), and Unlawful (U). The ruling’s elements are represented as ellipses, and the conditions are represented as boxes. A one-letter label indicates the type of element, such as T for time. A branch of related elements originates from its corresponding attribute. The order according to which elements are placed on the branch is as follows: doer (D), object (O), tool (L), time (T), place (P), sit- uation (S), and outcome (C). If a specific element is irrelevant, its ellipse is omitted. When an act is sometimes recommended and other times permitted, two branches will emit from the two attributes around the nucleus. Several branches often share some elements and not others. For example, in the ruling of fasting, as long as the doer is able to fast, there are three attributes that depend only upon the time of fasting: Fasting is mandatory during Ra- madan, unlawful on five specific days, and otherwise recommended. The three branches that correspond to these three attributes would differ only in the time and outcome elements. Figure 4, which depicts the graphical representation of this case, presents common elements as short-cuts across the three branches. 60 The American Journal of Islamic Social Sciences 33:4 Figure 3. A generic cell with two branches corresponding to two attributes. The X signs represents a “Nil” value. Elements are shown in ellipses and their associated conditions in boxes. Figure 4. The template of the fasting cell. Several elements are shared among the three branches and thus shortcut. Despite the fact that graphical representations work well for educational and training purposes, they suffer from significant visual clutter in complex cases. Moreover, graphical representation only occurs at the user level, rather than at the low-level of coding. Actually, the editor converts the machine rep- resentation of the semantic network into graphs. In the semantic network, cells connect to other cells in two ways. First, a group of cells may belong to the same category, in which case they would compose the material of a certain topic. For example, the cells of prayer, fast- ing, zakat, and hajj represent different acts of worship. Second, two elements in different cells may share the same value. Sometimes, the outcome of a cell is a condition in another cell. For example, the outcome of wuḍū’, which is lifting ḥadath (i.e., a virtual impurity that resides on specific bodily organs and invalidates prayer, unless otherwise permitted), is a condition of the doer in the prayer cell. Connections between cells enable one to conduct a correl- ative analysis, which yields an intelligent output. Mabrouk: A Model-based Semantic Network 61 D O O T P C Act t D O O C U T C U R D OM U R O T T C C Case Studies In this section, we provide a few illustrative examples for the structure of cells and associated relevant fiqh data to (1) show how to adapt a cell structure to different fiqh topics and (2) demonstrate the degree of flexibility a cell structure can offer in response to different levels of detail and sophistication. Of course, it is beyond the scope of this paper to cover all of the cells of fiqh, as this will be part of the system’s actual development. The few examples given below are sufficient to establish the principles of the concepts under discussion. Figure 5 shows the cell of wuḍū’.29 As wuḍū’ is either mandatory or rec- ommended, it carries two attributes, with at least one branch connected to each of them. Regardless of the type, wuḍū’ is performed in the same way and with purifying water. Accordingly, the object and tool elements are short- cut across the two branches. Since wuḍū’ includes mandatory and recom- mended acts, a set of integrals and a set of recommended acts are branched off the act element. The same classification is reflected in the object element, which includes a set of organs affected by the integrals and another one af- fected by the recommended acts. As previously mentioned, these two sets are extracted from the integrals and the recommended acts. The place and situa- tion elements are irrelevant and thus left blank in both branches. Sometimes, the value of some elements is chosen arbitrarily. For example, instead of leaving the recommended branch’s outcome element blank, one may choose to fill it with “getting reward.” Actually, this can be a default value for the outcome element in all types of worship. Also, based upon the desired level of detail, more branches can be added to represent rarer cases. For ex- ample, a third branch connected to the recommended attribute can be added Figure 5. The cell of wuḍū’. Some minor fiqh details may not be shown. 62 The American Journal of Islamic Social Sciences 33:4 arC gniyr thada gniyfPuri waxoN meTi ytrnE gntifiL thada gnttiGe dwareR P nsore nsorPe ruoF sangro rWate No thada to represent the case of performing wuḍū’ before the entry of time while car- rying ḥadath. This cell carries many similarities with other cells that belong to worship and include both mandatory and recommended acts. Figure 6 depicts the cell of sale.30 Whereas wuḍū’ is classified as an act of worship, sale is classified as a contract. Contracts, in turn, belong to deals. Only the case of permissibility is shown in the figure, as it is the most com- mon one for sale transactions. There are several fundamental differences be- tween the sale cell and the cells of worship. In Islam, contracts can be conducted verbally and are legally binding as such. We thus add an element that represents the statement of the contract. Second, the doer element in- cludes multiple individuals because deals are obviously conducted among several parties. Similarly, the object element includes the two compensatory items to be exchanged. A sale can be conducted at any time, except during the time mentioned in the associated condition. Developers can simply refer to this condition, rather than restating it in the time element. In addition, a sale can only be coerced for a good reason. This can be specified as a condition of the doer or as a value in the situation element. We are more inclined to input it into the situation element. Either choice is valid, for the search engine will capture this point in either case. The choice is merely a matter of discretion and, perhaps, personal taste. Figure 6. The cell of a sale contact. A new element for statement has been added. Only the branch of permissibility is shown. Mabrouk: A Model-based Semantic Network 63 taS tnmete relleS eciPr Not ;lanoitidnoc o N;gnidnet poN seau pgnol nuloV relleS ecirwn po ylitarn ealS t pecx ellA ni notiidnco nuloV wn oreyBu tyreporp ylitarn sopoPr lse tosal ll ecntapeccA yu bto reyBu repoPr il Utiro t;lud A;eanS dzeirothuA r oll seto buy ;Pure vileD alaivAv lsuaiv ni ty ty ;luf Use ;elabre ro felab noitspecn t oN gnirud aydirF reayrp A problematic point arises in defining the integrals of sale. Fiqh litera- ture usually counts five integrals, including the statement. However, the state- ment is actually the contract itself. Once the statement is uttered, the contract is considered to have been made, which leaves only four integrals. In order to maintain consistency with fiqh literature, statement is listed as one of the integrals. Figure 7 shows the cell of marriage.31 For visual clarity, only the branch representing the most common case is shown. All parties involved in drawing up the contract are shown in the doer element. The condition elements asso- ciated with the husband and the wife are used to provide their basic features, such as being male and female, respectively, for these features are unknown to the tool. Contrary to the cell of sale, it is better to include “not in a state of iḥrām” in the conditions associated with the husband and the wife because this condition does not apply to all the parties in the doer element. Figure 7. The cell of marriage. Only the branch of recommendation is shown. Integrals and recommended acts lie in a lower level than the cell. 64 The American Journal of Islamic Social Sciences 33:4 lacoviuqeUn ;eaguganl gno loN seaup Fe ;emal ;deirmarUn a nt ion ealM wws oKn sh dan ;e efwi s e i seaup netweeb saloporp ylpe rdan efWi dnsbauH gntiwai doirep eagirmar mi hto elabe m M irar I N T E G R eagi tateS tnme R M E C O M M M M M anidGuar Two ssseetnWi nt ioN hi tanuloV smirPe sPhy j rh m; ;yliar elbssi alci R A L S M M E N D E D nearppA ae hanC aw loKn stat aruccA twhat M ;tyirgtent in k; tal,e se,ar f oeagugan t;nmee lalce ryatel are hye th t oN f is i dreporp stret roN ildanh eporp misluM t;ludA myjoneq th Wi; ;notiersc f odtecir s i hgn s etire ;eal Mm; ean S; tnme A Closer Look at Cells: A Histological Analysis Cell structures reveal a great deal about the distinctive features of particular topics in Islamic jurisprudence. A visual inspection of the structure, or the skeleton, of these cells yields the following observations: • All deals comprise statements that bring contracts into existence. The counterpart of statements in worship is intention. Intention is a mental transaction, whereas statement is a verbal entity that conveys the con- tract’s significant elements. The difference between the two signifies the fact that intention directs worship to God, Who knows our inner thoughts, whereas deals establish legal commitments on involved parties based upon the statement’s content. • In all acts of worship, except for the collective payment of zakat, the doer element includes one person. In the case of deals, at least two per- sons are involved. This highlights the fact that acts of worship target the individual, whereas the social aspect is manifested more in deals. • Acts of worship are heavily regulated with respect to time. Most of them, except making an invocation, are scheduled at specific times. Conversely, the time element is usually blank in deals, giving the parties involved ample time to formulate them. • The structure of a cell defines those elements that accompany acts. Each element is defined by the tool, using some background information. More- over, each element is associated with the conditions that set the context for it. Based upon the level of detail, other associated elements (e.g., defini- tions) can be added as needed. For example, the definition of ḥadath in the cell of wuḍū’ can be added under a new entry marked as definition. Likewise, examples can be captured under another entry labeled examples. Some examples of a utility in the cell of sale can be added to clarify this less common type of sale. Thus, the semantic network is expandable, as needed, based upon the material and level of comprehension. Adding a Layer of Intelligence to the Semantic Network So far, we have introduced an efficient approach for representing fiqh material in a natural way that considers the inherent relationships among the elements of fiqh rulings. In this section, we discuss how to convert the semantic network into an interactive system with deduction ability.32 To achieve this, fiqh data has to be processed for the sake of conducting a comparative analysis and producing further developed conclusions. Smart engines, as shown in figure Mabrouk: A Model-based Semantic Network 65 1, are designed to process data in the semantic network and yield smart find- ings that are less likely to be obtained from traditional books, in which data is listed serially. Here, we propose four engines that implement the four functions of the system discussed earlier, namely, selective browsing, comparative analysis, deduction from fiqh rules, and fatwa assistance. Each engine is discussed below. The Selective Browsing Engine Selective browsing capitalizes on the fact that fiqh rulings are represented in a multi-dimensional domain across which elements can be connected freely. As such, a common element in two cells connects them irrespective of the topics to which they belong. This feature enables the selective browsing engine to seek correlations within topics that would seem distant or unrelated in clas- sical documentation. Interestingly, people traditionally study topics in a serial fashion, which renders points belonging to different topics less clearly con- nected in human minds than points of the same topic. With the proposed cell structure, aspects of similarity can be explored with the same ease across the entire domain of fiqh material. The browsing of classical documents, whether in hard or soft format, takes place by flipping pages or scrolling down the document. People en- gaged in this selective browsing can determine how to move from one point to another. For example, they can select integrals under the category of wor- ship and simply read through them under whichever act of worship they choose. In addition, they may check the connections between cells and trace how one cell leads to the other one. Moreover, an advanced search can also be formed using logical operators. After the results are depicted in a graphical format, the users can glance through them using the zoom-in and zoom-out features. The Comparative Analysis Engine Comparative analysis employs the machines’ computational power, as demonstrated in their ability to scan a huge number of cells. The outcomes that this engine can produce are usually discussed in the books of al-ashbāh wa al-naẓā’ir (similar and parallel cases),33 for this is where basic fiqh knowledge is analyzed and compared in order to determine similar and dis- similar aspects between acts of worship and/or contracts. Instead of relying solely upon the superior mentality of outstanding jurists, this engine can 66 The American Journal of Islamic Social Sciences 33:4 help beginning and intermediate fiqh students compare selective aspects among various topics. For example, they can make comparisons between wuḍū’ and ghusl in terms of the different integrals that each one has and in terms of the result, in the outcome element, of each one. They can also do this with two specific acts that are done under wuḍū’: washing one’s feet and wiping one’s footwear. These two acts yield the same result, but nevertheless differ in that the latter one is effective only for a limited time. Also, marriage and revoking divorce during the waiting period lead to the same result, the permissibility of physical enjoyment, but differ drastically in their integrals and their timing. This engine can highlight these differences by performing such selected comparisons, as well as produce the points of a limited-scope thesis. In addi- tion, it can compile rulings related to specific doers, such as those that deal with minors and blind people. Similarly, rulings related to special circum- stances (e.g., handicapped people and coercion) can be compiled. As a matter of fact, jurists have compiled such books in an attempt to gather in one place as many dispersed points as possible.34 The competitive edge of these books is that they cover cases that are less likely to be captured. But machines do not have this limitation, for all pieces of data are equally accessed with the same ease. Thus this engine can be a valuable tool for complementing human capabilities. The Deduction from Fiqh Rules Engine A fiqh rule logically connects some rulings in a similar manner as a thread physically connects the beads of a necklace.35 For example, the rule “hardship calls for facilitation” encompasses all of the rulings of dispensations (e.g., shortening the prayers, breaking the fast, and wiping one’s footwear) that are meant to lessen a hardship.36 Fiqh has an interesting pattern of connectivity between its rules and rulings. For example, the number of rulings that can be connected to a rule is relatively small. Furthermore, most fiqh rulings have many exceptions, sometimes comparable to the number of cases, that are com- pliant with the rule. Thus, jurists cannot proceed with a large number of de- ductions based upon the same rule. To further complicate the pattern of connectivity, rules hand over their ju- risdiction to each other quite often. Figure 8 visually contrasts fiqh, as a prac- tical science, to other conceptual sciences. In the case of fiqh, it is hard to find a branch, representing a rule, to which many rulings are connected. Rather, one finds intersecting branches to which some rulings are attached. This in- Mabrouk: A Model-based Semantic Network 67 tricate pattern of connectivity poses many challenges to the study and char- acterization of fiqh knowledge, for it also opens a large space for heuristics and intelligence. With fiqh, it is not enough just to master the rules; one must receive intensive training on how to apply and link the rules to their respective rulings.37 Figure 8. The intricate and complex pattern of rules and rulings in fiqh relative to other conceptual sciences. Thick lines represent rules, and hexagonal shapes represent rulings. As discussed above, a limited number of rulings can be deducted from their respective fiqh rules. Hence, a rule can be regarded as a compact code of some rulings, provided that the exceptions to it are pointed out. Such a com- pact code can be expanded on demand in order to generate rulings that corre- spond to minor situations that have fine details. The deduction engine both codes fiqh rules and generates the appropriate rulings when triggered by ques- tions whose answers are not available in cells. Al-Suyuti (1445-1505) divided fiqh rules into three categories based upon the number of rulings that they link38: (1) the five universal rules that constitute the framework of Islamic leg- islation, (2) the forty rules to which a large number of rulings are referred, and (3) rules with two different outcomes. Some scholars follow one outcome, while others follow the other outcome. The following paragraphs discuss the techniques implemented in the de- duction engine to code two fiqh rules of the first category and one rule of the second category. The analysis presents rulings according to the Shafi‘i school’s point of view. As the focal point here is to explain the engine’s coding mech- anisms, naturally not all of the fiqh details are mentioned. 68 The American Journal of Islamic Social Sciences 33:4 C secnei Scaltupecno qhFi One of the universal fiqh rules is that “doubt does not prevail over cer- tainty.” This rule generates many rulings, such as: • Consider a person who was sure of his purity. Later on, he doubted if his purity was still valid. Such a person should consider that his purity is valid and discard the unsure possibility of its invalidation. • Consider a person who is preparing to fast. She ate something during the last part of night and thought that she might have eaten after dawn. Her fast is valid. • Someone doubted whether he prayed two or three rak‘ahs (the repeatable unit of prayer). He should assume that he prayed two rak‘ahs only and discard the additional doubtful one. • In a profit-sharing venture, the owner and the trader disputed the amount of profit. The lower figure given by the trader should be accepted, for the extra amount claimed by the owner is doubtful. • While walking in a forest, someone came across an unknown plant and considered eating it. She should assume that doing so is permissible in accordance with the default case and discard the other possibility. Two of the exceptional cases of this rule are listed below: • Consider a person who doubted that she performed one of the prayer’s integrals after finishing it. She should assume that she fulfilled all of its integrals. • A car owner claimed that he rented his car to someone. However, this person claimed that he borrowed the car and refuses to pay the rent. The car owner’s claim is accepted. To generate rulings out of this rule, two pieces of data per ruling have to be provided to the engine: the default case and the doubtful/exceptional case. Table 1 lists the data needed by the engine for the above five compliant cases, in addition to the two exceptional cases. Upon receiving the user’s ques- tion, the engine will (1) parse the question to extract the two elements, (2) match the two extracted elements with the entries of the two lists and identify the correct match, if any, and then (3) generate the answer based on the default case if the concerned ruling is compliant with the rule or based on the doubtful/ exceptional event if it is not.Table 1 shows that the doubtful/exceptional event cannot always be generated by simply negating the default case, as in the first case. Therefore, those events have to be explicitly provided. Although some Mabrouk: A Model-based Semantic Network 69 Table 1: Examples of entries needed by the deduction engine to answer questions based on the rule that “Doubt does not prevail over certainty.” Questions raised Default Case Doubtful/Exceptional Compliant by Users Event with Rule Is one’s purity still Purity is maintained Purity was later T valid? after acquiring it invalidated Is the fast valid? Eating took place Eating took place T at night after dawn How many rak‘ahs Two rak‘ahs were A third rak‘ah T should be assumed? performed was performed What amount of No profit or lower An extra amount of T profit should be amount of profit profit was realized acknowledged? was realized Is that particular All plants are edible Some plants are T plant edible? inedible Should this prayer Integrals have not been One usually finishes F be repeated or performed unless one prayer assuming completed? is sure of having per- that all integrals have formed them been performed Which claim should One is not required to People usually give their F be accepted? pay rent unless there is cars for a significant proof of a rental contract time on a rental basis cases imply a timing relationship between the default case and the doubtful event, as in the first two cases, other cases carry no such relationship. This, in part, relates to the fact that this rule can be sub-divided into several rules. Nonetheless, in order to achieve higher computational efficiency, as many rul- ings as possible should be linked to the same rule. As can be seen, the two lists, in addition to their processing engine, fulfill a compact means for repre- senting rulings without detailing all of the elements required by cells. Cells are more suitable for rulings based on texts from the Qur’an and Sunnah that cannot be linked to rules. A second universal fiqh rule, one that encompasses many incidents, is “hardship calls for lenience.” According to this rule, the requirements of many acts of worship are reduced when one is confronted with specific cases of dif- ficulty (e.g., travel, illness, and recurring burdens) and the consequences of 70 The American Journal of Islamic Social Sciences 33:4 wrongdoings are waived under particular conditions (e.g., coercion, forget- fulness, and being unaware of prohibition) and when they are performed by particular classes of individuals (e.g., children and the insane). Each of these circumstances is also associated with some additional conditions. For instance, in order for the lenience to go into effect, one must be travelling, among other reasons, for a permissible and recognized reason as well as beyond a certain distance. One way to code this rule is to compile three lists: the recognized cases of difficulty, associated conditions, and the given permissions under each case. The engine processes the raised question to identify the case of difficulty, if any, and looks for other associated conditions that may be mentioned in the question. It then matches these conditions with the ones in the second list, as- suming that other unstated conditions are fulfilled. If the stated conditions pos- itively match the corresponding ones in the second list, then the engine composes an answer that indicates that the given permissions are allowed. Oth- erwise, the answer would indicate that the permissions are not allowed. A third fiqh rule with a large number of rulings is that “whenever a lawful case is mixed with an unlawful one, the ruling follows the unlawful case.” Some instances of this rule are: • When a marriageable woman mingles with unmarriageable ones such that she cannot be identified, the suitor cannot marry any of them. • When a properly slaughtered animal is mixed together with other dead animals such that it cannot be distinguished, none of them can be eaten. • When a Muslim and a pagan jointly slaughter an animal, it becomes un- lawful to eat. This rule also has many exceptions, such as: • Tafsīr books that include Qur’anic statements and a greater number of illustrative words can be touched. • When a person sells pure drinks in addition to wine, the sale is validated with respect to the drinks and invalidated with respect to the wine. • When a person writes a will to a non-relative and an heir, the will is val- idated with respect to the non-relative and invalidated with respect to the heir. In each of the above six examples, the ruling is concerned with a sin- gle act. In the first three examples these are “marry,” “eat,” and “eat.” Fur- Mabrouk: A Model-based Semantic Network 71 thermore, the first two examples contain two types of object, one of which renders the act lawful and the other one that renders it unlawful. Similarly, the third example contains two subjects, one of which renders the ruling lawful and another one that renders it unlawful. In conclusion, these are compound cases because one of them carries a permissible outcome whereas the other one carries a prohibition. In those cases that comply with the rule, the rulings are given in accordance with the prohibition. In con- trast, in those cases that do not comply with the rule, the rulings are given in accordance with the permissibility. It thus becomes evident that two lists are needed to represent the two sub-cases that constitute the com- pound case. Also, a third field is needed to indicate whether the ruling complies with the rule or not. As the reader might expect, the engine would parse the question in order to identify the two sub-cases and, consequently, match them with those in the lists. The answer is then composed based upon the compliance field. The Fatwa Assistance Engine So far, we have introduced two main techniques for the machine representa- tion of fiqh knowledge. Cells can be used to represent basic fiqh knowledge that is extracted directly from Qur’anic and/or Prophetic texts. Also, the de- duction engine can be used to code fiqh rules, which capture a good number of fiqh rulings. The fatwa assistance engine can invoke the deduction engine as well as search and retrieve data from the cells. Additionally, this engine has its own modules that revert to the general principles of fiqh and provide an- swers to many fiqh instances. One of the main functions of fiqh is to prioritize acts in cases of contention according to some rules. The following points relate several important criteria for prioritizing acts. • Fiqh is meant to protect and maintain the following five targets (listed in order of importance): religion, the human soul, chastity, mind/intellect, and money/property. If one of these targets has to be sacrificed for the sake of another one, the one with the greater importance should be main- tained.39 For example, the life of a kidnapped person should be saved by paying a ransom. • Obligations take priority over recommended acts. For instance, one should invest in learning essential knowledge before moving on to fur- ther studies, and should financially support his own family before giving charity to others. 72 The American Journal of Islamic Social Sciences 33:4 • Prayer is the most important favorable type of worship. Thus, it should be performed before distributing zakat. • Obligations to be performed soon or within a limited period of time take priority over those to be performed within a long period of time. For ex- ample, washing and burying a deceased person should be done before distributing zakat. Also, taking care of parents is a valid reason for de- laying one’s hajj.40 • Personal obligations take priority over communal obligations for which there are other available candidates who can carry them out. For ex- ample, one is not required to interrupt her job to attend a funeral prayer that other people will attend. • The rights of other human beings take priority over duties to God. For example, instead of buying overpriced water to perform wuḍū’, one should perform tayammum (i.e., a dirt-based substitute purification per- formed when water is unavailable or cannot be used), prayer should be interrupted to rescue a drowning person, and a due loan precludes one from performing hajj.41 • Highly rewarded acts take priority over less rewarded ones. Accordingly, one should attempt to pray in a group, and reciting the Qur’an while in a state of purity is better than doing so while in a state of impurity.42 • Efforts that positively impact oneself and others are preferred over those that have only a personal impact. Therefore, acquiring knowledge is bet- ter than intensive worship.43 • Efforts that fulfill a higher need for Muslims or boosts a scarce expert- ise are preferred over those with a limited need. Thus, choosing a spe- cialty that establishes a newly needed technology is preferred over choosing a well-established technology that already has a broad base of experts. • Some places, like Makkah, are privileged over other places. Likewise, some days and months, such as Friday and Ramadan, are preferred over others. It is thus more recommended to worship in these privileged places and/or during these preferred times. • Acts that do not have substitutes take priority over those that do have substitutes. For this reason, a person who carries enough water for per- forming wuḍū’ or for removing filth in a desert should use the water to remove the filth and perform tayammum instead of wuḍū’. Each of these above rules can be readily coded using if … then … state- ments. Accordingly, a rule-based system associated with the relevant lists can capture a large portion of fiqh knowledge based upon first principles. Mabrouk: A Model-based Semantic Network 73 Conclusion and Future Work This paper proposed three computationally efficient techniques for the ma- chine representation of fiqh knowledge. Interconnected semantic cells effi- ciently capture the content of textual evidence and thereby enable seamless selective browsing through different topics. Eliminating the notion of serial browsing enables the compilation of complete lists of specific themes, such as issues related to handicapped people. The coding mechanisms of the de- duction engine only requires a minimum amount of data relevant to respective cases to compose answers to the questions raised. The fatwa assistance engine capitalizes on the capabilities of other engines and reverts to general principles of legislation in order to answer many miscellaneous fiqh questions. The proposed representation techniques and smart engines achieve a high level of computational efficiency by customizing various techniques, each of which best suits the inner structure of the concerned type of fiqh knowledge. The discussion shows that computational power can also act in favor of qualitative analysis based upon symbolic figures, and thus amends the widespread conception that computers can only digest numbers. This work has demonstrated the proposed system’s high potential as a valuable learn- ing and research tool that complements, rather than competes with, human intelligence. This paper was limited to proposing the computational techniques of SRIL-H from a qualitative point of view. The programming techniques and design aspects of the proposed system’s software prototype will be discussed in a future research work. Endnotes 1. Knowledge representation techniques are usually discussed under two disci- plines: cognitive psychology and artificial intelligence (AI). Our discussion in this paper is more oriented toward the AI point of view. 2. George Luger, Artificial Intelligence: Structures and Strategies for Complex Problem Solving (Essex: Pearson Education Limited, 2005). 3. Many smart phones can currently receive and act upon speech inputs from users. See, for example, Mike Schuster, “Speech Recognition for Mobile Devices at Google,” Trends in Artificial Intelligence, 11th Pacific Rim International Con- ference on Artificial Intelligence, Daegu, Korea (2010): 8-10. 4. Ming Xie, Fundamentals of Robotics: Linking Perception to Action (River Edge, NJ: World Scientific Publisher, 2003). 5. Staurt Russell and Peter Norvig, Artificial Intelligence: A Modern Approach, 3d ed. (Upper Saddle River, NJ: Pearson Education Inc., 2010). 74 The American Journal of Islamic Social Sciences 33:4 6. Bernhard Sendhoff, Edgar Korner, Olef Sporns, Helge Ritter, and Kenji Doya, eds., Creating Brain-like Intelligence from Basic Principles to Intelligent Sys- tems (Heidelberg, Germany: Springer Berlin, 2009). 7. Robert Sternberg, Cognitive Psychology, 5th ed. (Belmont, CA: Wadsworth Cengage Learning, 2009), 23. 8. Ibid., 299. 9. Emmanuel Ifeachor and Barrie Jervis, Digital Signal Processing: A Practical Approach, 2d ed. (Essex: Prentice Hall, 2002), 2. 10. Bruce Goldstein, Cognitive Psychology, 3d ed. (Singapore: Wadsworth, Cengage Learning, 2011). 11. Muhammad Al-Samman, Fann al-Musīqā fī al-Shi‘r al-‘Arabī (Tanta: Dar Abu al-‘Aynayn, 1978). 12. Ahmad Mostageer, The Numerical Indices of the Arabic Poetry Meters (Cairo: Maktabit Gharib, 1980). 13. For a taxonomy of the sciences that support and connect with fiqh, see Ahmed Mabrouk, Islamic Worship: Fundamentals and Applications (Kuala Lumpur: Fajar Ulung, 2016), 5-8. 14. A standard uṣūl book for the Shafi‘i school is Muhammad al-Shafi‘i, Al-Risālah (Beirut: Dar al-Fikr, n.d.), and for the Hanafī school is Muhammad al-Sarakhsi, Uṣūl al-Sarakhsī (Beirut: Dar al-Ma‘rifah, 1952). 15. Mustafa al-Khun, Athar al-Ikhtilāf fī al-Qawā‘id al-Uṣūlīyah fī Ikhtilāf al- Fuqahā’ (Beirut: Mu’assassat al-Risalah, 1989). 16. The causes behind the four schools’ dominance are analyzed in ibn Khaldun, Muqaddimat ibn Khuldūn (Damascus: Dar al-Ya‘rub, 2004), 2:188-89. 17. For example, views of Shafi‘i scholars are analyzed in Yahya al-Nawawi, Al- Majmū‘ Sharḥ al-Muhadhdhab (Beirut: Dar al-Fikr, 1996). 18. Ali Jum‘ah, Al-Madkhal ilā Dirāsat al-Madhāhib al-Fiqhīyah (Cairo: Dar al- Salam, 2004). 19. Muhammad al-Zuhili, Al-Qawā‘id al-Fiqhīyah wa Tatbīqātihā fī al-Madhāhib al-Arba‘ah (Damascus: Dar al-Fikr, 2006). 20. Jane Reece, Lisa Urry, Michael Cain, Steven Wasserman, Peter Minorsky, and Robert Jackson, Campbell Biology, 9th ed. (San Francisco: Pearson Education Inc., 2011), 86-89. 21. Harun Yahya, The Miracle in the Cell (New Delhi: Millat Book Center, 2006), 30-38. 22. Ali Al-Amidy, Al-Iḥkām fī Uṣūl al-Aḥkām (Beirut: Dar al-Kutub al-‘Ilmiyyah, 1985). 23. Luger, Artificial Intelligence, 223-26. 24. Robert Brooks, “Intelligence without Representation,” Artificial Intelligence (1991):139-59. 25. Luger, Artificial Intelligence, 286-314. 26. In addition to the customized functions described in SRIL-H, a Natural Language Processing (NLP) tool is needed to parse questions and identify keywords. NLP Mabrouk: A Model-based Semantic Network 75 is a computer program that analyzes, understands, and generates natural language. There are many commercial and publicly accessible NLP tools. For example, MIT researchers have developed a free NLP tool called MontyLingua. 27. It should be noted that our proposed structure of the semantic network is totally different from that shown in Luger, Artificial Intelligence, 228-35, as demon- strated in the next section. 28. John Sowa, Knowledge Representation: Logical, Philosophical, and Computa- tional Foundation (Pacific Grove, CA: Brooks/Cole, A division of Thomson Learning, 2000), 476-489. 29. Al-Nawawi, Al-Majmū‘ fī Sharḥ al-Muhadhdhab, vol. 1. 30. Al-Ramli, Nihāyat al-Muḥtāj ilā Sharḥ al-Minhāj (Beirut: Dar al-Fikr, 1984), vol. 3. 31. Ibn Hajar al-Haytami, Tuḥfat al-Muḥtāj bi Sharḥ al-Minhāj (Beirut: Dar Sadir, n.d.), vol. 7. 32. Joseph Giarratano and Gary Riley, Expert Systems: Principles and Programming (Toronto: Thomson Learning, 2005), 115-88. 33. Al-Suyuti, Al-Ashbāh wa Al-Naẓā’ir (Beirut: Dar al-Kitab al-‘Arabi, 1987). 34. Muhammad Al-Asrushni, Jāmi‘ Aḥkām al-Sighār (Cairo: Dar al-Fadilah, n.d.). 35. Ali al-Nadawi, Al-Qawā‘id al-Fiqhīyah (Damascus: Dar al-Qalam, 1994), 39- 71. 36. Abd al-Aziz ibn Abd al-Salam, Al-Qawā‘id al-Kubrā (Damascus: Dar al-Qalam, 2000), 2:12-22. 37. Imam al-Zarkashi indicated that fiqh skills can be divided into ten, the most use- ful of which is to know general principles that compile many points and the rules to which many minor issues are referred. See al-Zarkashi, Al-Manthūr fī al-Qawā‘id (Beirut: Dar al-Kutub al-‘Ilmiyyah, 2000), 13. 38. Al-Suyuti, Al-Ashbāh wa al-Naẓā’ir, 35-335. 39. Muhammad ibn Ashur, Maqāṣid al-Sharī‘ah al-Islāmīyah (Qatar: Ministry of Religious Affairs, 2004), vol. 3. 40. Al-Qarafi, Al-Furūq (Beirut: ‘Alam al-Kutub, n.d.), 2:203. 41. Ibn Husayn al-Makki, Tahdhīb al-Furūq (Beirut: ‘Alam al-Kutub, n.d.), 1:157. 42. Al-Qarafi, Al-Furūq, 215. 43. Ibid., 221. 76 The American Journal of Islamic Social Sciences 33:4