mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-06 17:44:09 +00:00
docs/rosette: Regen rosette.diff
This time from the actual source, which apparently means changing all of the spaces for tabs.
This commit is contained in:
parent
fa2d45a922
commit
dc5a5b7bd1
|
@ -1,7 +1,7 @@
|
|||
diff --git a/smtlib.cc b/smtlib_rosette.cc
|
||||
index 3eacf407c..a93bd04b0 100644
|
||||
--- a/smtlib.cc
|
||||
+++ b/smtlib_rosette.cc
|
||||
diff --git a/backends/functional/smtlib.cc b/backends/functional/smtlib_rosette.cc
|
||||
index 3eacf407c..c9e737d19 100644
|
||||
--- a/backends/functional/smtlib.cc
|
||||
+++ b/backends/functional/smtlib_rosette.cc
|
||||
@@ -29,80 +29,86 @@ PRIVATE_NAMESPACE_BEGIN
|
||||
using SExprUtil::list;
|
||||
|
||||
|
@ -243,20 +243,9 @@ index 3eacf407c..a93bd04b0 100644
|
|||
for (auto input : ir.inputs())
|
||||
input_struct.insert(input->name, input->sort);
|
||||
for (auto output : ir.outputs())
|
||||
@@ -209,17 +210,20 @@ struct SmtModule {
|
||||
state_struct.insert(state->name, state->sort);
|
||||
}
|
||||
|
||||
- void write_eval(SExprWriter &w)
|
||||
- {
|
||||
+ void write(std::ostream &out)
|
||||
+ {
|
||||
+ SExprWriter w(out);
|
||||
+
|
||||
+ input_struct.write_definition(w);
|
||||
+ output_struct.write_definition(w);
|
||||
+ state_struct.write_definition(w);
|
||||
+
|
||||
@@ -212,14 +213,11 @@ struct SmtModule {
|
||||
void write_eval(SExprWriter &w)
|
||||
{
|
||||
w.push();
|
||||
- w.open(list("define-fun", name,
|
||||
- list(list("inputs", input_struct.name),
|
||||
|
@ -271,7 +260,7 @@ index 3eacf407c..a93bd04b0 100644
|
|||
auto node_to_sexpr = [&](Functional::Node n) -> SExpr {
|
||||
if(inlined(n))
|
||||
return n.visit(visitor);
|
||||
@@ -230,66 +234,75 @@ struct SmtModule {
|
||||
@@ -230,9 +228,9 @@ struct SmtModule {
|
||||
for(auto n : ir)
|
||||
if(!inlined(n)) {
|
||||
w.open(list("let", list(list(node_to_sexpr(n), n.visit(visitor)))), false);
|
||||
|
@ -283,10 +272,10 @@ index 3eacf407c..a93bd04b0 100644
|
|||
output_struct.write_value(w, [&](IdString name) { return node_to_sexpr(ir.output(name).value()); });
|
||||
state_struct.write_value(w, [&](IdString name) { return node_to_sexpr(ir.state(name).next_value()); });
|
||||
w.pop();
|
||||
- }
|
||||
@@ -240,19 +238,23 @@ struct SmtModule {
|
||||
|
||||
- void write_initial(SExprWriter &w)
|
||||
- {
|
||||
void write_initial(SExprWriter &w)
|
||||
{
|
||||
- std::string initial = name + "-initial";
|
||||
- w << list("declare-const", initial, state_struct.name);
|
||||
+ w.push();
|
||||
|
@ -310,23 +299,20 @@ index 3eacf407c..a93bd04b0 100644
|
|||
+ w.close();
|
||||
}
|
||||
}
|
||||
- }
|
||||
-
|
||||
- void write(std::ostream &out)
|
||||
- {
|
||||
- SExprWriter w(out);
|
||||
-
|
||||
- input_struct.write_definition(w);
|
||||
- output_struct.write_definition(w);
|
||||
- state_struct.write_definition(w);
|
||||
-
|
||||
+ w.pop();
|
||||
}
|
||||
|
||||
void write(std::ostream &out)
|
||||
@@ -263,33 +265,53 @@ struct SmtModule {
|
||||
output_struct.write_definition(w);
|
||||
state_struct.write_definition(w);
|
||||
|
||||
- w << list("declare-datatypes",
|
||||
- list(list("Pair", 2)),
|
||||
- list(list("par", list("X", "Y"), list(list("pair", list("first", "X"), list("second", "Y"))))));
|
||||
-
|
||||
- write_eval(w);
|
||||
- write_initial(w);
|
||||
+ w.pop();
|
||||
write_eval(w);
|
||||
write_initial(w);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue