Replies: 1 comment 2 replies
-
What part needs work? Looks good to me! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear all,
as hinted in #2720 (comment), several tools may benefit from being able to meta-interpret
!/0
, at the very least for analytic purposes and maybe in the future also for automated suggestions and rewrites using more recent constructs with more desirable algebraic properties.I think it is possible to meta-interpret
!/0
with the standard control constructscatch/3
andthrow/1
. Declaratively,!/0
is true, and any faithful emulation must succeed exactly once.I therefore suggest the following predicate to emulate
!/0
with exceptions:This succeeds, and throws an exception on backtracking.
We can catch the exception with
catch/3
. For example:This suggests, as a rough outline for how meta-interpretation could be performed:
I hope this helps!
All the best,
Markus
Beta Was this translation helpful? Give feedback.
All reactions