Adding a Degree of Certainty to Deductions in a Fuzzy Temporal Constraint Prolog: FTCProlog
Abstract
:1. Introduction
2. FTCLogic
2.1. Basic Notions of FTCN
2.2. Syntax of FTCLogic
- A predicate indicating that John tested positive in an active infection diagnostic test (PDIA) for COVID-19 at the instant , associated with the network in Figure 4. This network specifies that the test was carried out on 15 November at 0:00 h. This is determined by the restriction labeled with the fuzzy number between the indicated date and the instant :
- A predicate indicating that John started experiencing COVID-19 symptoms at the time . The network , associated with this fact, corresponds to the network in which all the constraints are , that is, it is a network without information:
- A predicate indicating that Louis had a contact with John at the time . The associated network is , as before:
- A predicate indicating that Peter had contact with John at the time :
2.3. Semantics of FTCLogic
2.4. Resolution Principle in FTCLogic
- Fact clauses : ;
- Rules clauses : ;
- Goal clauses : .
2.5. Soundness and Completeness in FTCLogic
3. PROLogic
- Check for an infected patient:?-c:confirmed_case (P, VIRUS, T_CC).P = johnVIRUS = covidT_CC = T_CCTemporal constraints:(T_CC,T_PDIA=t_pdia_john,(-infinite,-infinite,0sec,0sec))(T_CC,origin,(-infinite,-infinite,0sec,0sec))(T_PDIA=t_pdia_john,T_PDIA=t_pdia_john,(0sec,0sec,0sec,0sec))(T_PDIA=t_pdia_john,origin,(0sec,0sec,0sec,0sec))(origin,origin,(0sec,0sec,0sec,0sec))As we can see, each answer includes the temporal constraints of an associated FTCN.
- Check John’s close contacts:?-c:close_contact(john, P2, VIRUS, T_CONT).P2 = louisVIRUS = covidT_CONT = t_cont_jlTemporal constraints:(T_CONT=t_cont_jl,T_CONT=t_cont_jl,(0sec,0sec,0sec,0sec))(T_CONT=t_cont_jl,T_CC,(5d,5d,infinite,infinite))(T_CONT=t_cont_jl,T_SS=t_sym_john,(-2d,0sec,2d,4d))(T_CONT=t_cont_jl,T_PDIA=t_pdia_john,(5d,5d,5d,5d))(T_CONT=t_cont_jl,origin,(5d,5d,5d,5d))(T_CONT=t_cont_jl,today,(3mo 3w 6d,3mo 3w 6d,3mo 3w 6d,3mo 3w 6d))(T_CC,T_SS=t_sym_john,(-infinite,-infinite,-3d,-1d))(T_CC,T_PDIA=t_pdia_john,(-infinite,-infinite,0sec,0sec))(T_CC,origin,(-infinite,-infinite,0sec,0sec))(T_CC,today,(-infinite,-infinite,3mo 3w 1d,3mo 3w 1d))(T_SS=t_sym_john,T_SS=t_sym_john,(-6d,-2d,2d,6d))(T_SS=t_sym_john,T_PDIA=t_pdia_john,(1d,3d,5d,1w))(T_SS=t_sym_john,origin,(1d,3d,5d,1w))(T_SS=t_sym_john,today,(3mo 3w 2d,3mo 3w 4d,3mo 3w 6d,3mo 4w 1d))(T_PDIA=t_pdia_john,T_PDIA=t_pdia_john,(0sec,0sec,0sec,0sec))(T_PDIA=t_pdia_john,origin,(0sec,0sec,0sec,0sec))(T_PDIA=t_pdia_john,today,(3mo 3w 1d,3mo 3w 1d,3mo 3w 1d,3mo 3w 1d))(origin,origin,(0sec,0sec,0sec,0sec))(origin,today,(3mo 3w 1d,3mo 3w 1d,3mo 3w 1d,3mo 3w 1d))(today,today,(0sec,0sec,0sec,0sec))We can verify that this network is the same as the one in Figure 11 associated with the refutation by resolution to check that Louis is John’s close contact.
- Is Peter a close contact of John??-c:close_contact(john, peter, AREA, covid, T_CONT).No answers.We can verify that if we ask if Peter is John’s close contact, the system detects the temporal inconsistency and responds accordingly.
4. FTCProlog
4.1. Associating a Certainty Index with Each Deduction
4.2. Soundness of the Certainty Measure
4.3. Study of the Certainty Index through an Example
5. Discussion and Conclusions
- Reasoning is complete and sound.
- Treatment of time is efficient.
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
FTCN | Fuzzy Temporal Contraint Network |
FTCLogic | Fuzzy Temporal Constraint Logic |
FTCProlog | Fuzzy Temporal Constraint Prolog |
GTL | Gödel Temporal Logic |
ILP | Inductive Logic Programming |
LTL | Linear Temporal Logic |
MTPL | Multi-Valued Temporal Propositional Logic |
PNL | Propositional Neighborhood Logic |
PRISMA | Preferred Reporting Items for Systematic Reviews and Meta-Analyses |
STeLP | Splittable Temporal Logic Program |
TILR | Temporal Inductive Logic Reasoning |
XAI | Explainable Artificial Intelligence |
Appendix A
Appendix A.1. Program Syntax
- Single-line comments. Start with % and continue until the end of the line.%Single-line comment
- Multi-line comments. Start with /* and end with */./* Multi-linecomment. */
Appendix A.2. Command and Query Syntax
- Load a program
- Make a query
- Basic information regarding networks
- Network resolution
- Hypothetical queries
- Help command
- End session
Appendix B
Appendix C
Appendix D
Appendix E
References
- Allen, J.F. Maintaining knowledge about temporal intervals. Commun. ACM 1983, 26, 832–843. [Google Scholar] [CrossRef]
- Gammoudi, A.; Hadjali, A.; Yaghlane, B. Fuzz-time: An intelligent system for managing fuzzy temporal information. Int. J. Intell. Comput. Cybern. 2017, 10, 200–222. [Google Scholar] [CrossRef]
- Dubois, D.; Prade, H. Possibility Theory and its Applications: Where Do we Stand? In Handbook Computational Intelligence; Kacprzuk, J., Pedrycz, W., Eds.; Springer: Berlin/Heidelberg, Germany, 2015; pp. 31–60. [Google Scholar]
- Dubois, D.; Lang, J.; Prade, H. Timed Possibilistic Logic. Fundam. Informaticae 1991, 15, 211–234. [Google Scholar] [CrossRef]
- Marín, R.; Cárdenas-Viedma, M.A.; Balsa, M.; Sánchez, J.L. Obtaining Solutions in Fuzzy Constraint Networks. Int. J. Approx. Reason. 1997, 16, 261–288. [Google Scholar] [CrossRef]
- Barro, S.; Marín, R.; Mira, J.; Patón, A.R. A model and a language for the fuzzy representation and handling of time. Fuzzy Sets Syst. 1994, 61, 153–175. [Google Scholar] [CrossRef]
- Marín, R.; Barro, S.; Bosch, A.; Mira, J. Modeling time representation from a fuzzy perspective. Cybernet Syst. 1994, 25, 207–215. [Google Scholar] [CrossRef]
- Campos, M.; Juarez, J.M.; Palma, J.; Marín, R.; Palacios, F. Avian influenza: Temporal modeling of a human transmission case. Expert Syst. Appl. 2011, 38, 8865–8885. [Google Scholar] [CrossRef]
- Augusto, J.C. The logical approach to temporal reasoning. Artif. Rev. 2001, 16, 301–333. [Google Scholar] [CrossRef]
- Lu, Z.; Augusto, J.; Liu, J.; Wang, H.; Aztiria, A. A system to reason about uncertain and dynamic environments. Int. J. Artif. Intell. Tools 2012, 21, 1250023. [Google Scholar] [CrossRef]
- Bresolin, D.; Goranko, V.; Montanari, A.; Sciavicco, G. Propositional interval neighborhood logics: Expressiveness, decidability, and undecidable extensions. Ann. Pure Appl. Log. 2009, 161, 289–304. [Google Scholar] [CrossRef]
- Aguilera, J.P.; Diéguez, M.; Fernández-Duque, D.; McLean, B. Time and Gödel: Fuzzy Temporal Reasoning in PSPACE. In Logic, Language, Information, and Computation; Springer: Cham, Switzerland, 2022. [Google Scholar] [CrossRef]
- Godo, L.; Vila, L. Possibilistic temporal reasoning based on fuzzy temporal constraints. In Proceedings of the IJCAI’95, Montreal, QC, Canada, 20–25 August 1995. [Google Scholar]
- Alsinet, T.; Godo, L. Towards an automated deduction system for First-order possibilistic logic programming with fuzzy constants. Int. J. Intell. Syst. 2002, 17, 887–924. [Google Scholar] [CrossRef]
- Pnueli, A. The temporal logics of programs. In Proceedings of the 18th Annual Symposium on Foundations of Computer Science (FOCS), Providence, RI, USA, 31 October–1 November 1977; pp. 46–57. [Google Scholar]
- Aguado, F.; Cabalar, P.; Pérez, G.; Vidal, C.; Diéguez, M. Temporal logic programs with variables. Theory Pract. Log. Program. 2017, 17, 226–243. [Google Scholar] [CrossRef]
- Cárdenas-Viedma, M.A.; Marín, R. FTCLogic: Fuzzy Temporal Constraint Logic. Fuzzy Set Syst. 2019, 363, 84–112. [Google Scholar] [CrossRef]
- Dubois, D.; Lang, J.; Prade, H. Possibilistic Logic. In Handbook of Logic in Artificial Intelligence and Logic Programming; Gabbay, D.M., Hogger, C.J., Robinson, J.A., Eds.; Oxford University Press: Oxford, UK, 1994; Volume 3, pp. 439–513. [Google Scholar]
- Dubois, D.; Prade, H. Possibilistic logic—An overview. In Handbook of the History of Logic; Volume 9: Siekmann J (vol. ed) Computational Logic; Gabbay, D.M., Woods, J., Eds.; Elsevier, North-Holland: Amsterdam, The Netherlands, 2015; pp. 283–342. [Google Scholar]
- Cárdenas-Viedma, M.A.; Galindo-Navarro, F.M. PROLogic: A Fuzzy Temporal Constraint Prolog. Int. J. Appl. Math. 2019, 32, 677–719. [Google Scholar] [CrossRef]
- Abadi, M.; Manna, Z. Temporal Logic Programming. J. Symb. Comput. 1989, 8, 277–295. [Google Scholar] [CrossRef]
- Hrycej, T. A Temporal extension of Prolog. J. Log. Program. 1993, 15, 113–145. [Google Scholar] [CrossRef]
- Sakuragawa, T. Temporal Prolog. In RIMS Conference on Software Science and Engineering; Springer: Berlin/Heidelberg, Germany, 1987. [Google Scholar]
- Orgun, M.A.; Ashcroft, E.A. (Eds.) Tu Van Le, Fuzzy Temporal Prolog. In Intensional Programming I: Based on the Papers at Islip ’95; World Scientific: Singapore, 1996. [Google Scholar]
- Górriz, J.M.; Álvarez–Illán, I.; Álvarez–Marquina, A.; Arco, J.E.; Atzmueller, M.; Ballarini, F.; Barakova, E.; Bologna, G.; Bonomini, P.; Castellanos-Dominguez, G.; et al. Computational approaches to Explainable Artificial Intelligence: Advances in theory, applications and trends. Inf. Fusion 2023, 100, 101945. [Google Scholar] [CrossRef]
- Zheng, Y.; Xu, Z.; Wang, X. The Fusion of Deep Learning and Fuzzy Systems: A State-of-the-Art Survey. IEEE Trans. Fuzzy Syst. 2022, 30, 2783–2799. [Google Scholar] [CrossRef]
- Sun, C.; Vamvoudakis, K.G. Continuous-Time Safe Learning with Temporal Logic Constraints in Adversarial Environments. In Proceedings of the 2020 American Control Conference (ACC), Denver, CO, USA, 1–3 July 2020; pp. 4786–4791. [Google Scholar] [CrossRef]
- Canabal–Juanatey, M.; Alonso–Moral, J.M.; Catala, A.; Bugarín–Diz, A. Enriching interactive explanations with fuzzy temporal constraint networks. Int. J. Approx. Reason. 2024, 171, 109128. [Google Scholar] [CrossRef]
- Kiani, M.; Andreu-Perez, J.; Hagras, H. A Temporal Type-2 Fuzzy System for Time-Dependent Explainable Artificial Intelligence. IEEE Trans. Artif. Intell. 2023, 4, 573–586. [Google Scholar] [CrossRef]
- Cai, B.; Ding, X.; Sun, Z.; Qin, B.; Liu, T.; Wang, B.; Shang, L. Self-Supervised Logic Induction for Explainable Fuzzy Temporal Commonsense Reasoning. In Proceedings of the Thirty-Seventh AAAI Conference on Artificial Intelligence, Washington, DC, USA, 7–14 February 2023; Volume 37. [Google Scholar]
- Yang, Y.; Xiong, S.; Kerce, J.C.; Fekri, F. Temporal Inductive Logic Reasoning. arXiv 2022, arXiv:2206.05051. [Google Scholar] [CrossRef]
- Leeuwenberg, A.; Moens, M.-F. A Survey on Temporal Reasoning for Temporal Information Extraction from Text. J. Artif. Intell. Res. 2019, 66, 341–380. [Google Scholar] [CrossRef]
- Page, M.J.; McKenzie, J.E.; Bossuyt, P.M.; Boutron, I.; Hoffmann, T.C.; Mulrow, C.D.; Shamseer, L.; Tetzlaff, J.M.; Akl, E.A.; Brennan, S.E.; et al. The PRISMA 2020 statement: An updated guideline for reporting systematic reviews. Syst. Rev. 2021, 10, 89. [Google Scholar] [CrossRef] [PubMed]
- University Libraries, 2024, Creating a PRISMA Flow Diagram: PRISMA 2020. Available online: https://guides.lib.unc.edu/prisma (accessed on 6 June 2024).
- Dechter, R.; Meiri, I.; Pearl, J. Temporal constraint networks. Artif. Intell. 1991, 49, 61–65. [Google Scholar] [CrossRef]
- Kaufmann, A.; Gupta, M. Introduction to Fuzzy Arithmetic; Van Nostrand Reinhold: New York, NY, USA, 1985. [Google Scholar]
- García, L.; Portela, A. Transmisibilidad del COVID-19. Revista Española de Salud Pública. 2020. Available online: https://www.sanidad.gob.es/biblioPublic/publicaciones/recursos_propios/resp/revista_cdrom/Suplementos/Pildoras/pildora29_transmisibilidad_covid_19.pdf (accessed on 25 April 2023).
- Apt, K.R.; van Emden, M.H. Contributions to the Theory of Logic Programming. J. ACM 1982, 29, 841–862. [Google Scholar] [CrossRef]
- Galindo-Navarro, F.M.; Cárdenas-Viedma, M.A. PROLogic 2017. Available online: https://webs.um.es/mariancv/PROLogic/PROLogic.exe (accessed on 11 June 2024).
- Galindo-Navarro, F.M.; Cárdenas-Viedma, M.A. FTCProlog 2024. Available online: https://github.com/mariantocv/FTCProlog (accessed on 11 June 2024).
- Marlow, S. Alex: A Lexical Analyser Generator for Haskell. 2015. Available online: https://www.haskell.org/alex/ (accessed on 11 June 2024).
- Marlow, S. Happy: The Parser Generator for Haskell. 2015. Available online: https://www.haskell.org/happy/ (accessed on 11 June 2024).
- Vila, L.; Godo, L. On fuzzy temporal constraint networks. Mathw. Soft Comput. 1994, 1, 315–334. [Google Scholar]
NAME | PUB → REACH | >1000 Visits | PUB → PEAK | Matches Pattern | Certainty |
---|---|---|---|---|---|
prod1 | ‘12 h before’ | yes | ‘approximately 3 days before’ | yes | 1 |
prod2 | (12,12,12,12) h | yes | (0,2,4,6) days | yes | 1 |
prod3 | ‘approximately 12 h before’ | yes | (0,2,4,6) days | yes | 0.5 |
prod4 | (9,11,13,15) h | yes | (1,2,4,5) days | yes | 0.36486 |
prod5 | (1,2,20,30) h | yes | (1,2,4,5) days | yes | 0.47945205 |
prod6 | (1,2,20,30) h | yes | (2,2.5,3,3.5) days | yes | 0 |
prod7 | (10,11,12,13) h | yes | (5,6,7,8) days | no | - |
prod8 | (12,12,12,12) h | no | (0,2,4,6) days | no | - |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Cárdenas-Viedma, M.-A. Adding a Degree of Certainty to Deductions in a Fuzzy Temporal Constraint Prolog: FTCProlog. Axioms 2024, 13, 472. https://doi.org/10.3390/axioms13070472
Cárdenas-Viedma M-A. Adding a Degree of Certainty to Deductions in a Fuzzy Temporal Constraint Prolog: FTCProlog. Axioms. 2024; 13(7):472. https://doi.org/10.3390/axioms13070472
Chicago/Turabian StyleCárdenas-Viedma, María-Antonia. 2024. "Adding a Degree of Certainty to Deductions in a Fuzzy Temporal Constraint Prolog: FTCProlog" Axioms 13, no. 7: 472. https://doi.org/10.3390/axioms13070472
APA StyleCárdenas-Viedma, M. -A. (2024). Adding a Degree of Certainty to Deductions in a Fuzzy Temporal Constraint Prolog: FTCProlog. Axioms, 13(7), 472. https://doi.org/10.3390/axioms13070472