Nell/Prolog: Difference between revisions
< Nell
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
== Interesting Prologs == |
== Interesting Prologs == |
||
* Datalog |
* Datalog |
||
* Logtalk -- the object oriented features provide a good encapsulation mechanism for a prolog-style language. It also supports "event-driven programming"; I can't tell if that would help one construct a truth maintenance system (ie, track dependencies) or not. |
* [http://logtalk.org/ Logtalk] ([http://en.wikipedia.org/wiki/Logtalk wiki]) -- the object oriented features provide a good encapsulation mechanism for a prolog-style language. It also supports "event-driven programming"; I can't tell if that would help one construct a truth maintenance system (ie, track dependencies) or not. |
||
* [http://sourceforge.net/project/shownotes.php?release_id=%20538440&group_id=44926 JScriptLog]: implementation of ISO-Standard PROLOG in JavaScript. Seems pretty capable, but the code is not the cleanest -- no attempt at using prototypes or object-orientation. Parser is apparently weak. |
* [http://sourceforge.net/project/shownotes.php?release_id=%20538440&group_id=44926 JScriptLog]: implementation of ISO-Standard PROLOG in JavaScript. Seems pretty capable, but the code is not the cleanest -- no attempt at using prototypes or object-orientation. Parser is apparently weak. |
||
* [http://sourceforge.net/projects/yieldprolog/ Yield Prolog]: an embedding of Prolog control flow into JavaScript using the yield operator. (See https://github.com/cscott/jsshaper for an implementation of yield for non-Firefox browsers.) Contains a compiler to translate 'standard' prolog into yield-using JavaScript (or Python, etc). The parser is original DEC-10 PROLOG and the compiler is also written in prolog, translated into yield-JavaScript, so the implementation must be fairly complete. I'm not 100% convinced it handles the various cut cases correctly. Also, modules in prolog are a mess (see Logtalk for a better solution), although there is [http://yieldprolog.svn.sourceforge.net/viewvc/yieldprolog/YieldProlog/source/prolog/compiler.P?annotate=918 some sort of module system] implemented. |
* [http://sourceforge.net/projects/yieldprolog/ Yield Prolog]: an embedding of Prolog control flow into JavaScript using the yield operator. (See https://github.com/cscott/jsshaper for an implementation of yield for non-Firefox browsers.) Contains a compiler to translate 'standard' prolog into yield-using JavaScript (or Python, etc). The parser is original DEC-10 PROLOG and the compiler is also written in prolog, translated into yield-JavaScript, so the implementation must be fairly complete. I'm not 100% convinced it handles the various cut cases correctly. Also, modules in prolog are a mess (see Logtalk for a better solution), although there is [http://yieldprolog.svn.sourceforge.net/viewvc/yieldprolog/YieldProlog/source/prolog/compiler.P?annotate=918 some sort of module system] implemented. |
||
** Would be interesting to port Logtalk to run on top of Yield Prolog, although I'm not sure how useful the result would be. Seems like a rather esoteric tower to build software for kids with. |
** Would be interesting to port Logtalk to run on top of Yield Prolog, although I'm not sure how useful the result would be. Seems like a rather esoteric tower to build software for kids with. |
||
* [http://wambook.sourceforge.net/ Warren's Abstract Machine] ([http://en.wikipedia.org/wiki/Warren_abstract_machine wiki]) -- underlying virtual machine for many early Prologs. Worth digging through to get an idea of how Prolog is implemented. |
|||
== Truth Maintenance / Planners == |
== Truth Maintenance / Planners == |
||
Line 20: | Line 21: | ||
== Natural Language Processing == |
== Natural Language Processing == |
||
Prolog and [http://en.wikipedia.org/wiki/Definite_clause_grammar DCG]s (Prolog's version of the [http://en.wikipedia.org/wiki/Monad_(functional_programming) Monad]) are a pretty good way to tackle some natural language processing tasks. |
Prolog and [http://en.wikipedia.org/wiki/Definite_clause_grammar DCG]s (Prolog's version of the [http://en.wikipedia.org/wiki/Monad_(functional_programming) Monad]) are a pretty good way to tackle some natural language processing tasks. |
||
== Adventure == |
|||
* An adventure game in Logtalk: http://trac.logtalk.org/browser/trunk/examples/adventure/sleepy.lgt |
Revision as of 21:27, 21 February 2012
CSA: I did a lot of research on Prolog and Prolog-related topics. The bottom line is that it's probably not directly relevant for our project: what we really need is an incremental planner or a truth maintenance system, not a backtracking solver. Prolog doesn't come with any magic bullets to answer the "now what goals have their preconditions satisfied" question, which is at the core of a UNIVERSE-style storytelling system.
Datalog might still be interesting as a data model for "avatar services".
Interesting Prologs
- Datalog
- Logtalk (wiki) -- the object oriented features provide a good encapsulation mechanism for a prolog-style language. It also supports "event-driven programming"; I can't tell if that would help one construct a truth maintenance system (ie, track dependencies) or not.
- JScriptLog: implementation of ISO-Standard PROLOG in JavaScript. Seems pretty capable, but the code is not the cleanest -- no attempt at using prototypes or object-orientation. Parser is apparently weak.
- Yield Prolog: an embedding of Prolog control flow into JavaScript using the yield operator. (See https://github.com/cscott/jsshaper for an implementation of yield for non-Firefox browsers.) Contains a compiler to translate 'standard' prolog into yield-using JavaScript (or Python, etc). The parser is original DEC-10 PROLOG and the compiler is also written in prolog, translated into yield-JavaScript, so the implementation must be fairly complete. I'm not 100% convinced it handles the various cut cases correctly. Also, modules in prolog are a mess (see Logtalk for a better solution), although there is some sort of module system implemented.
- Would be interesting to port Logtalk to run on top of Yield Prolog, although I'm not sure how useful the result would be. Seems like a rather esoteric tower to build software for kids with.
- Warren's Abstract Machine (wiki) -- underlying virtual machine for many early Prologs. Worth digging through to get an idea of how Prolog is implemented.
Truth Maintenance / Planners
- STRIPS
Storytelling
- UNIVERSE
- 1984 paper, xxx, 19xx paper
- Blog posts comparing it to MINSTREL
Natural Language Processing
Prolog and DCGs (Prolog's version of the Monad) are a pretty good way to tackle some natural language processing tasks.
Adventure
- An adventure game in Logtalk: http://trac.logtalk.org/browser/trunk/examples/adventure/sleepy.lgt