Page 1 of 1
Posted: 27 Jul 2020 6:21
they say it is already possible to convert C-code to webassembly code,
would it theoretically be possible to let VP generate webassembly code?
the other way would be to make a prolog parser to parse prolog code, and then write a prolog program which can output webassembly code for this parsed prolog code
Posted: 27 Jul 2020 20:19
(Your "other way" seems to describe a compiler, which is also what the first part is concerned with).
It is long time since I looked at WebAssembly
and things may have changed since then. My conclusions at that time was the following.
There would be some complications for Prolog
- The instructions/"processor" did not support backtracking in the form we normally use.
- Tail calls was not supported or limited.
These complication can most likely be handled, but more important from my point of view:
Posted: 27 Jul 2020 20:49
thankyou for the information,
Posted: 28 Jul 2020 21:20
Posted: 29 Jul 2020 5:41
also there exists the language webassembly script which can compile to webassembly code.
as far as i can understand it, it seems to be as such that,
as the relation which visual prolog has to normal prolog, it helps the prorammer for type checking )
then webassembly-script looks much like Type-script, so it becomes a very easy next step
with prolog one could write a parser which can parse prolog and generate webassembly code,
but VP is much faster because it has a C-program which does the parsing and compiling , or is VP using its own prolog code already
as a tool instead of C code?
Posted: 29 Jul 2020 15:52
The parser for Visual Prolog is in the Commercial Edition in the directory vip/vipSyntax. It is almost completely in Prolog, only a little of the lexer is in C/C++. It is generated by the LALR parser generator
Posted: 30 Jul 2020 8:00
so when VP itself uses prolog as a developping language that should proof that it is fast.
despite the fact that Artificial intelligence seems now te be used and accepted everywhere in society, to me it seems that prolog is still not accepted for programmers in companies. To me it seems that the companies are looking for python or C programmers to implement their AI.
maybe prolog is better for building knowledge based systems which is still not happening yet? and that there may eventually come a time when prolog is asked for everywhere?