A Modular Algorithmic Framework for Islamic Inheritance: Integrating Formal Fiqh Principles with Edge Case Calculation
DOI:
https://doi.org/10.24256/kharaj.v8i1.9731Keywords:
fiqh mawaris, special case, modular algorithm, object-oriented programming.Abstract
The digitization of Islamic inheritance calculation is dominated by applications focused on settling common cases (masail ammah). The majority of previous research has neither addressed nor provided solutions to specific cases of inheritance distribution. Thus, there is a challenge to develop an inheritance calculation algorithm that addresses exceptional cases within the community. This study develops a modular algorithm framework for the calculation of mawaris fiqh that includes classical mechanisms (harmony, conditions, hajb, distribution of asbabul furud and 'asobah, awl, radd, and interaction of jaddul ikhwah) so that it is not only an application of the inheritance calculator and is accompanied by a transparent pseudocode. The approach taken is normative and translates the rules of mawaris fiqh, which includes exceptional cases, into modular algorithms and object-oriented programs. The algorithm's results are then implemented and tested to ensure consistency and accuracy of the calculations. The system has been proven to be able to handle several special cases, including Umariyyatayn, awl cases, radd without 'asobah, and jaddul ikhwah complex interactions. This study contributes to the standardization of algorithms for mawaris fiqh, including classical mechanism rules with exceptional cases, an explicit modular architecture based on fiqh stages, and formal pseudocode to ensure future maintenance. This framework provides a transparent alternative to the black-box LLM trend and can be the foundation for an Islamic inheritance system algorithm that can be examined and improved.
References
AlDahoul, N., & Zaki, Y. (2025). Benchmarking the legal reasoning of LLMs in Arabic Islamic inheritance cases. arXiv preprint arXiv:2508.15796. https://doi.org/10.48550/arXiv.2508.15796
Alharbi, A., & Alshammari, M. (2023). Explainable AI for Islamic finance decision support systems. Journal of King Saud University - Computer and Information Sciences, 35(7), Article 101890. https://doi.org/10.1016/j.jksuci.2023.101890
AL-Smadi, M. (2025). QU-NLP at QIAS 2025 shared task: A two-phase LLM fine-tuning and retrieval-augmented generation approach for Islamic inheritance reasoning. arXiv preprint arXiv:2508.15854. https://doi.org/10.48550/arXiv.2508.15854
Alshuqayran, N., Ali, N., & Evans, R. (2022). A systematic mapping study of microservice architecture. Journal of Systems and Software, 194, Article 111456. https://doi.org/10.1016/j.jss.2022.111456
Az-Zuhaili, W. (1997). Al-Fiqh al-Islami wa Adillatuhu. Dar al-Fikr.
Bench-Capon, T., & Sartor, G. (2003). A model of legal reasoning with cases incorporating theories and values. Artificial Intelligence, 150(1–2), 97–143. https://doi.org/10.1016/S0004-3702(03)00108-5
Billah, M. (2023). COMPLETE AND INCOMPLETE CALCULATION: Expert systems apps on the special cases of Islamic inheritance law. Al-Ahwal: Jurnal Hukum Keluarga Islam, 16(2), 201–216. https://doi.org/10.14421/ahwal.2023.16201
Bogner, J., Zimmermann, A., & Wagner, S. (2022). Automatically measuring the maintainability of service- and microservice-based systems. Journal of Systems and Software, 191, Article 111345. https://doi.org/10.1016/j.jss.2022.111345
Chen, L. (2022). Microservices: Architecting for continuous delivery and DevOps. IEEE Software, 39(2), 84–90. https://doi.org/10.1109/MS.2021.3128806
Di Francesco, P., Malavolta, I., & Lago, P. (2017). Research on architecting microservices: Trends, focus, and potential for industrial adoption. IEEE International Conference on Software Architecture (ICSA), 21–30. https://doi.org/10.1109/ICSA.2017.24
Dijkstra, E. W. (1968). Go to statement considered harmful. Communications of the ACM, 11(3), 147–148. https://doi.org/10.1145/362929.362947
Fernández, A., García, S., Galar, M., Prati, R. C., Krawczyk, B., & Herrera, F. (2022). Learning from imbalanced data sets: Recent advances and challenges. Expert Systems with Applications, 201, Article 117098. https://doi.org/10.1016/j.eswa.2022.117098
Forgy, C. L. (1982). Rete: A fast algorithm for the many pattern/many object pattern match problem. Artificial Intelligence, 19(1), 17–37. https://doi.org/10.1016/0004-3702(82)90020-0
Gamma, E., Helm, R., Johnson, R., Vlissides, J., & Booch, G. (1993). Design patterns: Abstraction and reuse of object-oriented design. ECOOP'93—Object-Oriented Programming, 406–431. https://doi.org/10.1007/3-540-47910-4_21
García-Martínez, R., Britos, P., & Rodríguez, D. (2022). Validation and verification frameworks for rule-based expert systems. Knowledge-Based Systems, 248, Article 108847. https://doi.org/10.1016/j.knosys.2022.108847
Garlan, D., & Shaw, M. (1993). An introduction to software architecture. Advances in Software Engineering and Knowledge Engineering, 1, 1–39. https://doi.org/10.1142/9789812798039_0001
Governatori, G., Idelberger, F., Milosevic, Z., Riveret, R., Sartor, G., & Xu, X. (2018). On legal contracts, imperative and declarative smart contracts, and blockchain systems. Artificial Intelligence and Law, 26(4), 377–409. https://doi.org/10.1007/s10506-018-9223-3
Gupta, P., & Gupta, N. (2022). Algorithm design paradigms: A comprehensive survey. ACM Computing Surveys, 54(3), Article 52. https://doi.org/10.1145/3448734
Hassan, M. K., Rabbani, M. R., & Ali, M. A. M. (2022). Challenges for Islamic finance and banking in the post-COVID era and the role of Fintech. Journal of Economic Cooperation and Development, 43(3), 93–116.
Hayes-Roth, F. (1985). Rule-based systems. Communications of the ACM, 28(9), 921–932. https://doi.org/10.1145/4284.4286
Hoare, C. A. R. (1969). An axiomatic basis for computer programming. Communications of the ACM, 12(10), 576–580. https://doi.org/10.1145/363235.363259
Hoque, A. H. M. S., Tabassum, S., Nazib, A., Mustafa, R., & Rahman, M. O. (2022). An effective software architecture for the Islamic inheritance system employing a structured paradigm. Jurnal Kejuruteraan, 34(6), 1271–1284. https://doi.org/10.17576/jkukm-2022-34(6)-12
Knoche, H., & Hasselbring, W. (2019). Drivers and barriers for microservice adoption: A survey among professionals in Germany. Enterprise Modelling and Information Systems Architectures, 14, 1–35. https://doi.org/10.18417/emisa.14.1
Kruchten, P. (1995). The 4+1 view model of architecture. IEEE Software, 12(6), 42–50. https://doi.org/10.1109/52.469759
Kumar, A., Sharma, K., & Singh, H. (2023). Hybrid knowledge-based system for automated legal compliance checking. Knowledge-Based Systems, 267, Article 110456. https://doi.org/10.1016/j.knosys.2023.110456
Li, J., Wang, H. J., & Bai, X. (2023). A rule-based expert system with a bidirectional reasoning strategy. Expert Systems with Applications, 213, Article 118963. https://doi.org/10.1016/j.eswa.2022.118963
Li, Z., Liang, P., & Avgeriou, P. (2023). Understanding architectural technical debt: A systematic mapping study. Journal of Systems and Software, 198, Article 111589. https://doi.org/10.1016/j.jss.2023.111589
Liao, S. H. (2005). Expert system methodologies and applications—A decade review from 1995 to 2004. Expert Systems with Applications, 28(1), 93–103. https://doi.org/10.1016/j.eswa.2004.08.003
Md Zin, I. H., Mansor, N. F., Mat Diah, N., Hashim, S., & Mansor, M. I. (2025). Faraid distribution calculation using an AI-based Quranic chatbot. International Journal of Robotics and Automation, 14(3), 393–406. https://doi.org/10.11591/ijra.v14i3.pp393-406
Mehdiyev, N., Enke, D., Fettke, P., & Loos, P. (2022). Evaluating forecasting performance by decomposing market efficiency into three components. Expert Systems with Applications, 203, Article 117449. https://doi.org/10.1016/j.eswa.2022.117449
Pahl, C., & Jamshidi, P. (2021). Microservices architecture: A systematic mapping study. Journal of Systems and Software, 182, Article 110987. https://doi.org/10.1016/j.jss.2021.110987
Palmirani, M., Martoni, M., Rossi, A., Bartolini, C., & Robaldo, L. (2020). Legal ontology for modelling GDPR concepts and norms. Artificial Intelligence and Law, 28(2), 149–169. https://doi.org/10.1007/s10506-020-09267-8
Parnas, D. L. (1972). On the criteria to be used in decomposing systems into modules. Communications of the ACM, 15(12), 1053–1058. https://doi.org/10.1145/361598.361623
Patel, M., Virparia, P., & Patel, D. (2021). A modular architecture for intelligent decision support systems. Knowledge-Based Systems, 231, Article 107432. https://doi.org/10.1016/j.knosys.2021.107432
Prakken, H., & Sartor, G. (2015). Law and logic: A review from an argumentation perspective. Artificial Intelligence, 227, 214–245. https://doi.org/10.1016/j.artint.2015.06.005
Prentzas, J., & Hatzilygeroudis, I. (2007). Categorizing approaches combining rule-based and case-based reasoning. Expert Systems, 24(2), 97–122. https://doi.org/10.1111/j.1468-0394.2007.00423.x
Shortliffe, E. H., & Buchanan, B. G. (1975). A model of inexact reasoning in medicine. Mathematical Biosciences, 23(3–4), 351–379. https://doi.org/10.1016/0025-5564(75)90047-4
Singh, R., & Gill, N. S. (2022). Ontology-based knowledge representation and reasoning in expert systems. Knowledge-Based Systems, 254, Article 109630. https://doi.org/10.1016/j.knosys.2022.109630
Soldani, J., Tamburri, D. A., & Van Den Heuvel, W.-J. (2021). The pains and gains of microservices: A systematic grey literature review. Journal of Systems and Software, 175, Article 110915. https://doi.org/10.1016/j.jss.2021.110915
Soto, J., Melin, P., & Castillo, O. (2022). A modular neural network architecture with fuzzy response integration for complex time series prediction. Expert Systems with Applications, 186, Article 115705. https://doi.org/10.1016/j.eswa.2021.115705
Susskind, R. (1987). Expert systems in law: A jurisprudential approach to artificial intelligence and legal reasoning. The Modern Law Review, 50(2), 168–194. https://doi.org/10.1111/j.1468-2230.1987.tb02575.x
Taibi, D., Lenarduzzi, V., & Pahl, C. (2023). Architectural patterns for microservices: A systematic mapping study. Journal of Systems and Software, 203, Article 111723. https://doi.org/10.1016/j.jss.2023.111723
Washizaki, H., Guéhéneuc, Y.-G., & Khomh, F. (2019). A taxonomy of software architecture patterns for distributed systems. IEEE Access, 7, 176888–176904. https://doi.org/10.1109/ACCESS.2019.2957887
Woodcock, J., Larsen, P. G., Bicarregui, J., & Fitzgerald, J. (2009). Formal methods: Practice and experience. ACM Computing Surveys, 41(4), Article 19. https://doi.org/10.1145/1592434.1592436
Zdun, U., & Avgeriou, P. (2005). Modeling architectural patterns using architectural primitives. ACM SIGPLAN Notices, 40(10), 133–146. https://doi.org/10.1145/1103845.1094824
Zhou, W., & Feng, L. (2023). Optimization strategies for large-scale rule-based inference engines. Knowledge-Based Systems, 272, Article 110589. https://doi.org/10.1016/j.knosys.2023.110589
Zimmermann, O. (2022). Architectural refactoring: A task-centric view. IEEE Software, 39(4), 77–84. https://doi.org/10.1109/MS.2022.3167936
Downloads
Published
How to Cite
Issue
Section
Citation Check
License
Copyright (c) 2026 Irfanun Nisa Tsalis Hantanty, Any Meilani, Muhammad Anis, Tirto Prayitno

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. In line with the license, authors are allowed to share and adapt the material. In addition, the material must be given appropriate credit, provided with a link to the license, and indicated if changes were made. If authors remix, transform or build upon the material, authors must distribute their contributions under the same license as the original.







