Replies: 9 comments 3 replies
-
Thanks for the suggestion, @NotBad4U! I agree that having something more general than what is currently at simplification.rs is a better path. That said, I'm reticent of relying on an external library, specially one that does not seem to be actively maintained (last update was 4y ago). I prefer for Carcara to have its own term rewriting engine, which can be freely customizable by rules/strategies (note that in simplification.rs not only the rules but also the strategy is hard-corded, following the Alethe spec). Another benefit of Carcara having its own rewriting engine is that it could be leverage for proof elaboration, not only for proof checking. So if one is interested in following a proof reconstruction approach for term rewriting, like the one described in this paper, Carcara could do it. |
Beta Was this translation helpful? Give feedback.
-
The library term-rewriting-rs provides a trace of all the rewrites. it might be possible to do the reconstruction of simple things from this. I agree that this solution might only be able to cover simple simplification. How is difficult to implement the algorithm described in this paper ? Is there already an implementation that maybe we can call by FFI? |
Beta Was this translation helpful? Give feedback.
-
I think this is a good starting point for this direction we are discussing. As for the code generation, I think this would better be done in a second phase. I think the path forward for this is, at least initially, as @NotBad4U suggested, having a general term rewriting engine that is parameterized by rewrite rules. I just think that we should implement that in Carcara itself. So it's like building an interpreter for Rare rather than a compiler. |
Beta Was this translation helpful? Give feedback.
-
@HanielB , where could I find the list of rules of the RARE database? |
Beta Was this translation helpful? Give feedback.
-
I'm glad to hear you'd like to try that! The current RARE database of cvc5 can be found in the links below. That is including only the cvc5 theories that are supported in Alethe currently (so no strings or bit-vectors, for example).
So that I understand better, what is it exactly that you are thinking of building a POC for? The checking of a given rewrite in an Alethe proof with a general term rewriting algorithm in Carcara that is parameterized by a set of read RARE rewrites? |
Beta Was this translation helpful? Give feedback.
-
@HanielB could you point me to the Gradual type implementation?
this rule expects two |
Beta Was this translation helpful? Give feedback.
-
You mean to how the rule itself would be represented internally? Or for instances of the rule? Instances of the rule will not have lists "explicitly", i.e., it would be something like
Lists can be represented easily enough with |
Beta Was this translation helpful? Give feedback.
-
Sorry if you misunderstand my question. My question was related to the typing system of RARE+CVC5. For example if you have the clause: |
Beta Was this translation helpful? Give feedback.
-
It's more ad-hoc than that. In cvc5's type system the The code in cvc5 for representing the RARE rules in in here: https://github.com/cvc5/cvc5/blob/proof-new/src/rewriter/rewrite_db.h |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The crate term-rewriting-rs could be use to defined some rewriting rules specified in Alethe. This lib is a Rust implementation of first-order term rewriting systems (TRS).
Here is an example of utilisation from the documentation on doc.rs:
It could be a good alternative to writing all the simplification by hand in simplification.rs and having an algorithm that tries to compose them.
Beta Was this translation helpful? Give feedback.
All reactions