An easy to implement prolog graphical interface [closed]

懵懂的女人 提交于 2019-12-11 07:37:40

问题


So, I have a college project now that uses Prolog, I'm not the first one to work on the code so it's already pretty huge, but I have to put it working with a Prolog graphical interface, so my question is: is there any Prolog graphical interface that doesn't require me to change the code that's already written?


回答1:


Another option you might want to look into:

https://www.gtk-server.org




回答2:


Besides SWI-Prolog own XPCE GUI toolkit, as mentioned in the comments, another possibility is to write the GUI in Java and use the SWI-Prolog JPL library to interface with it. The SWI-Prolog distribution includes some JPL examples that showcase GUI elements.

Adding a GUI interface to what, I assume, is currently a command-line application, will be facilitated if the Prolog application is already abstracting I/O using mechanisms such as the message printing mechanism. If that's already the case, the messages being printed can be intercepted using a hook predicate to display them in GUI elements.



来源:https://stackoverflow.com/questions/54445286/an-easy-to-implement-prolog-graphical-interface

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!