Replies: 7 comments 30 replies
-
An initial suggestion for the term (compound "p" (compound "f" (var "X") (atom "a")) (var "Y") (compound "." (atom "a") (compound "." (atom "b") (atom "[]")))) |
Beta Was this translation helpful? Give feedback.
-
Univ operator |
Beta Was this translation helpful? Give feedback.
-
Strictly speaking, I don't know if you can have an (ergonomic) isomorphism actually, because of stuff like The only way I can see this actually being an isomorphism is not using any syntax sugar and working with something close to the canonical representation of terms (like @triska suggested above). This would mean no lists for example, which is very unfortunate and unergonomic. |
Beta Was this translation helpful? Give feedback.
-
This seems interesting: |
Beta Was this translation helpful? Give feedback.
-
Thanks to @hurufu, found this scary link to a postscript version of the KIF manual |
Beta Was this translation helpful? Give feedback.
-
Update: I think I've found a reasonable approach using DCGs, and working towards it incrementally. I'm working on a predicate scryer_clojure(ScryerString, ClojureString) which, as the name implies, relates a valid Scryer Prolog string to a valid Clojure String. I am currently using DCGs to make a lexer, and the parser will come next. |
Beta Was this translation helpful? Give feedback.
-
Ok, I created an initial executable spec for the lexer. It's certainly not finished, incremental progress towards increasingly complex examples. It's very close to @triska 's initial proposal -- I currently used lists instead of increasing arrity for the lexer just because it was a little easier for me. I'm very open to suggestions for test cases, pull requests, general strategy and/or tactics. Particularly valuable would be things like "can your syntax handle this" or "can your syntax handle that". Obviously it can only handle a subset of Prolog right now, but I'd like to incrementally expand it. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone! For libscryer-clj, I'm trying to work on an isomorphic mapping between a subset of ISO Prolog and lisp forms. If anyone has any thoughts or prior art to point to, please feel free to share here or on the libscryer-clj discussion.
(Regarding syntax: this is meant to be a truly isomorphic effort, I do not want to lose any of the syntactic power of pure ISO prolog. The API will be such that you can transparently meta-interpret either syntax with a mostly invisible adapter abstraction. Deviating from ISO prolog syntax is an anti-goal.)
Beta Was this translation helpful? Give feedback.
All reactions