Skip to content

Commit

Permalink
Missing reference file
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihai Budiu authored and ryzhyk committed Jul 29, 2020
1 parent 857044d commit a202ae8
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions test/datalog_tests/simple.debug.ast.expected
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ typedef serializable_t = ConsInt{x: bigint} |
ConsBit{y: bit<32>} |
ConsBool{z: bool} |
Cons0{}
typedef souffle_types::TEmtpy = ()
typedef souffle_types::TEmpty = ()
typedef souffle_types::Tfloat = double
typedef souffle_types::Tnumber = signed<32>
typedef souffle_types::Tsymbol = intern::IString
Expand Down Expand Up @@ -901,7 +901,21 @@ function souffle_lib::group_mean (g: std::Group<'K,signed<32>>): signed<32>
{
((var sum: signed<32>) = (std::group_sum(g): signed<32>);
((var count: bit<64>) = std::group_count(g);
(sum / ((count as signed<64>) as signed<32>))))
(if (count == 64'd0) {
32'sd0
} else {
sum
} / ((count as signed<64>) as signed<32>))))
}
function souffle_lib::group_mean_d (g: std::Group<'K,double>): double
{
((var sum: double) = (std::group_sum(g): double);
((var count: bit<64>) = std::group_count(g);
(if (count == 64'd0) {
64'f0.0
} else {
sum
} / (count as double))))
}
function souffle_lib::itof (l: signed<32>): double
{
Expand Down Expand Up @@ -986,6 +1000,13 @@ function souffle_lib::to_number (s: intern::IString): souffle_types::Tnumber
(std::Some{.x=(var x: signed<64>)}: std::Option<signed<64>>) -> (x as souffle_types::Tnumber)
}
}
function souffle_lib::to_number (f: double): souffle_types::Tnumber
{
match (fp::int_from_d(f)) {
(std::None{}: std::Option<bigint>) -> 32'sd0,
(std::Some{.x=(var x: bigint)}: std::Option<bigint>) -> (x as souffle_types::Tnumber)
}
}
function souffle_lib::utof (l: bit<32>): double
{
(l as double)
Expand Down

0 comments on commit a202ae8

Please sign in to comment.