Open jberthold opened 4 months ago
A solution here would be to allow the smtlib
attribute with no value. Then, when generating kore, we can add a value to the attribute based on the symbol name.
For backwards compatibility, we should emit a warning if there is an smtlib
attribute with a value on sugared syntax.
I like the adding _nil
to the end of the empty list constructor smtlib attribute, any reason to not do that? It allows the user some control over the name, while still keeping them distinct.
I guess we would need to handle all the cases that this could happen for....
When the special user list syntax
List{SORT, "separator"}
is used together with thesmtlib
attribute, the resultingdefinition.kore
file contains two symbols (with different arity) with the samesmtlib
attribute. This can cause an issue with the SMT solver bindings in the Haskell backend(s) because an SMT function name will be declared twice, with different arity, and one of the kore symbols will be mistranslated, causing a solver error.Example:
test.k
Ideally, the symbol attributes would be disambiguated during desugaring (maybe by simply appending
_nil
to the zero-arity one).