diff --git a/tests/files.rs b/tests/files.rs index 5906f390..cc12e3d5 100644 --- a/tests/files.rs +++ b/tests/files.rs @@ -3,6 +3,9 @@ use std::path::PathBuf; use egglog::*; use libtest_mimic::Trial; +// Global override to enable all serialization tests. +const ENABLE_ALL_SERIALIZATION_TESTS: bool = true; + #[derive(Clone)] struct Run { name: String, @@ -104,7 +107,8 @@ fn generate_tests(glob: &str) -> Vec { .replace(['.', '-', ' '], "_"); let should_fail = f.to_string_lossy().contains("fail-typecheck"); - let test_serialize = serialize_tests.iter().any(|&e| e == name); + let test_serialize = + ENABLE_ALL_SERIALIZATION_TESTS || serialize_tests.iter().any(|&e| e == name); mk_trial( name.clone(), Run { diff --git a/tests/snapshots/files__antiunify.snap b/tests/snapshots/files__antiunify.snap new file mode 100644 index 00000000..18f62970 --- /dev/null +++ b/tests/snapshots/files__antiunify.snap @@ -0,0 +1,256 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + String-1976739436905633066: + op: "\"x\"" + children: [] + eclass: String-1976739436905633066 + cost: 0 + Var-1976739436905633066: + op: Var + children: + - String-1976739436905633066 + eclass: "0" + cost: 1 + String-17627030480522586708: + op: "\"y\"" + children: [] + eclass: String-17627030480522586708 + cost: 0 + Var-17627030480522586708: + op: Var + children: + - String-17627030480522586708 + eclass: "6" + cost: 1 + e2-0: + op: e2 + children: [] + eclass: "7" + cost: 9223372036854776000 + e1-0: + op: e1 + children: [] + eclass: "4" + cost: 9223372036854776000 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + Num-17615343019692007359: + op: Num + children: + - i64-17615343019692007359 + eclass: "16" + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + Num-5871781006564002453: + op: Num + children: + - i64-5871781006564002453 + eclass: "35" + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + Num-11743562013128004906: + op: Num + children: + - i64-11743562013128004906 + eclass: "34" + cost: 1 + AU-4604575297633516347: + op: AU + children: + - Add-1714775736476281168 + - Add-6465175605220906065 + eclass: "8" + cost: 1 + AU-16783941965674463102: + op: AU + children: + - Var-1976739436905633066 + - Var-17627030480522586708 + eclass: "17" + cost: 1 + AU-3193214076012305492: + op: AU + children: + - Add-2396186110162359870 + - Var-17627030480522586708 + eclass: "13" + cost: 1 + AU-11611171873070133370: + op: AU + children: + - Num-17615343019692007359 + - AU-11611171873070133370 + eclass: "16" + cost: 1 + AU-1714775736476281168: + op: AU + children: + - Var-1976739436905633066 + - Add-2396186110162359870 + eclass: "12" + cost: 1 + AU-2396186110162359870: + op: AU + children: + - Num-5871781006564002453 + - Num-11743562013128004906 + eclass: "79" + cost: 1 + AU-12559954615023299949: + op: AU + children: + - AU-6688173608459297496 + - AU-8267967116726362323 + eclass: "80" + cost: 1 + AU-6688173608459297496: + op: AU + children: + - AU-6688173608459297496 + - Num-11743562013128004906 + eclass: "34" + cost: 1 + AU-8267967116726362323: + op: AU + children: + - AU-8267967116726362323 + - Num-5871781006564002453 + eclass: "35" + cost: 1 + AU-12411632993112218195: + op: AU + children: + - AU-2396186110162359870 + - AU-8267967116726362323 + eclass: "40" + cost: 1 + au12-0: + op: au12 + children: [] + eclass: "8" + cost: 9223372036854776000 + Add-13761752264459356387: + op: Add + children: + - AU-1714775736476281168 + - AU-3193214076012305492 + eclass: "8" + cost: 1 + Add-15497466658049999176: + op: Add + children: + - AU-3193214076012305492 + - AU-1714775736476281168 + eclass: "8" + cost: 1 + Add-17482952879634135823: + op: Add + children: + - Add-12559954615023299949 + - AU-16783941965674463102 + eclass: "8" + cost: 1 + Add-18439239847648427009: + op: Add + children: + - AU-16783941965674463102 + - Num-17615343019692007359 + eclass: "8" + cost: 1 + Add-3193214076012305492: + op: Add + children: + - AU-11611171873070133370 + - Var-17627030480522586708 + eclass: "7" + cost: 1 + Add-9896396136593852202: + op: Add + children: + - Add-2396186110162359870 + - Var-1976739436905633066 + eclass: "4" + cost: 1 + Add-1714775736476281168: + op: Add + children: + - Var-1976739436905633066 + - Add-12559954615023299949 + eclass: "4" + cost: 1 + Add-6465175605220906065: + op: Add + children: + - Var-17627030480522586708 + - Num-17615343019692007359 + eclass: "7" + cost: 1 + Add-2396186110162359870: + op: Add + children: + - Num-5871781006564002453 + - AU-6688173608459297496 + eclass: "16" + cost: 1 + Add-12559954615023299949: + op: Add + children: + - Num-11743562013128004906 + - AU-8267967116726362323 + eclass: "16" + cost: 1 +root_eclasses: [] +class_data: + "0": + type: Expr + String-1976739436905633066: + type: String + "6": + type: Expr + String-17627030480522586708: + type: String + "7": + type: Expr + "4": + type: Expr + "16": + type: Expr + i64-17615343019692007359: + type: i64 + "35": + type: Expr + i64-5871781006564002453: + type: i64 + "34": + type: Expr + i64-11743562013128004906: + type: i64 + "8": + type: Expr + "17": + type: Expr + "13": + type: Expr + "12": + type: Expr + "79": + type: Expr + "80": + type: Expr + "40": + type: Expr + diff --git a/tests/snapshots/files__array.snap b/tests/snapshots/files__array.snap new file mode 100644 index 00000000..0cd972f3 --- /dev/null +++ b/tests/snapshots/files__array.snap @@ -0,0 +1,306 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + String-10923848419941039998: + op: "\"r1\"" + children: [] + eclass: String-10923848419941039998 + cost: 0 + Var-10923848419941039998: + op: Var + children: + - String-10923848419941039998 + eclass: "0" + cost: 1 + String-15673665965278112340: + op: "\"r2\"" + children: [] + eclass: String-15673665965278112340 + cost: 0 + Var-15673665965278112340: + op: Var + children: + - String-15673665965278112340 + eclass: "1" + cost: 1 + String-1566882640312150612: + op: "\"r3\"" + children: [] + eclass: String-1566882640312150612 + cost: 0 + Var-1566882640312150612: + op: Var + children: + - String-1566882640312150612 + eclass: "2" + cost: 1 + select-1351883367118893594: + op: select + children: + - store-8378458532836304618 + - Var-10923848419941039998 + eclass: "6" + cost: 1 + select-11432643272211809986: + op: select + children: + - store-8378458532836304618 + eclass: "9" + cost: 1 + select-10654884905055842184: + op: select + children: + - store-9914705668454262402 + eclass: "17" + cost: 1 + select-11215575473965530962: + op: select + children: + - store-2380122553855171435 + eclass: "17" + cost: 1 + select-11234845072659508782: + op: select + children: + - mem1-0 + eclass: "9" + cost: 1 + select-1154085167566592390: + op: select + children: + - AVar-5040379952546458196 + eclass: "17" + cost: 1 + store-17711188862668393581: + op: store + children: + - store-2380122553855171435 + - Num-11743562013128004906 + eclass: "15" + cost: 1 + store-8378458532836304618: + op: store + children: + - mem1-0 + - Var-10923848419941039998 + - select-1351883367118893594 + eclass: "5" + cost: 1 + store-2380122553855171435: + op: store + children: + - AVar-5040379952546458196 + - Num-5871781006564002453 + eclass: "12" + cost: 1 + store-9914705668454262402: + op: store + children: + - mem1-0 + - Num-11743562013128004906 + eclass: "15" + cost: 1 + i64-7586556743040283621: + op: "17" + children: [] + eclass: i64-7586556743040283621 + cost: 0 + Num-7586556743040283621: + op: Num + children: + - i64-7586556743040283621 + eclass: "7" + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + Num-5871781006564002453: + op: Num + children: + - i64-5871781006564002453 + eclass: "11" + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + Num-11743562013128004906: + op: Num + children: + - i64-11743562013128004906 + eclass: "14" + cost: 1 + i64-6807129317463932018: + op: "42" + children: [] + eclass: i64-6807129317463932018 + cost: 0 + Num-6807129317463932018: + op: Num + children: + - i64-6807129317463932018 + eclass: "6" + cost: 1 + String-5040379952546458196: + op: "\"mem1\"" + children: [] + eclass: String-5040379952546458196 + cost: 0 + AVar-5040379952546458196: + op: AVar + children: + - String-5040379952546458196 + eclass: "3" + cost: 1 + r2-0: + op: r2 + children: [] + eclass: "1" + cost: 9223372036854776000 + r3-0: + op: r3 + children: [] + eclass: "2" + cost: 9223372036854776000 + mem1-0: + op: mem1 + children: [] + eclass: "3" + cost: 9223372036854776000 + test2-0: + op: test2 + children: [] + eclass: "9" + cost: 9223372036854776000 + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + neq-5871781006564002453: + op: neq + children: + - Var-10923848419941039998 + - r2-0 + eclass: Unit-0 + cost: 1 + neq-7659469028595837896: + op: neq + children: + - Var-15673665965278112340 + - r3-0 + eclass: Unit-0 + cost: 1 + neq-11743562013128004906: + op: neq + children: + - Var-10923848419941039998 + - Var-1566882640312150612 + eclass: Unit-0 + cost: 1 + neq-956286968014291186: + op: neq + children: + - r2-0 + - Var-10923848419941039998 + eclass: Unit-0 + cost: 1 + neq-7784354942592584825: + op: neq + children: + - r3-0 + - Var-15673665965278112340 + eclass: Unit-0 + cost: 1 + neq-1912573936028582372: + op: neq + children: + - Var-1566882640312150612 + - Var-10923848419941039998 + eclass: Unit-0 + cost: 1 + neq-6662973804773207269: + op: neq + children: + - Var-10923848419941039998 + eclass: Unit-0 + cost: 1 + neq-13907576835570464937: + op: neq + children: + - Num-11743562013128004906 + - Num-5871781006564002453 + eclass: Unit-0 + cost: 1 + neq-16618847795869376732: + op: neq + children: + - Num-7586556743040283621 + - Num-5871781006564002453 + eclass: Unit-0 + cost: 1 + neq-1945277965775797206: + op: neq + children: + - Num-5871781006564002453 + - Num-11743562013128004906 + eclass: Unit-0 + cost: 1 +root_eclasses: [] +class_data: + "0": + type: Math + String-10923848419941039998: + type: String + "1": + type: Math + String-15673665965278112340: + type: String + "2": + type: Math + String-1566882640312150612: + type: String + "6": + type: Math + "5": + type: Array + "9": + type: Math + "8": + type: Math + "17": + type: Math + "15": + type: Array + "16": + type: Math + "12": + type: Array + "3": + type: Array + "13": + type: Math + "14": + type: Math + "11": + type: Math + "7": + type: Math + i64-7586556743040283621: + type: i64 + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + i64-6807129317463932018: + type: i64 + String-5040379952546458196: + type: String + Unit-0: + type: Unit + diff --git a/tests/snapshots/files__bdd.snap b/tests/snapshots/files__bdd.snap new file mode 100644 index 00000000..d2e31243 --- /dev/null +++ b/tests/snapshots/files__bdd.snap @@ -0,0 +1,85 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + b2-0: + op: b2 + children: [] + eclass: "21" + cost: 9223372036854776000 + b123-0: + op: b123 + children: [] + eclass: "6" + cost: 9223372036854776000 + b11-0: + op: b11 + children: [] + eclass: "12" + cost: 9223372036854776000 + or-3713696389113654829: + op: or + children: + - b2-0 + - b11-0 + eclass: "23" + cost: 1 + or-10384174419947986705: + op: or + children: + - b1-0 + - or-3713696389113654829 + eclass: "24" + cost: 1 + b0-0: + op: b0 + children: [] + eclass: "2" + cost: 9223372036854776000 + or121-0: + op: or121 + children: [] + eclass: "24" + cost: 9223372036854776000 + True-0: + op: "True" + children: [] + eclass: "15" + cost: 9223372036854776000 + False-0: + op: "False" + children: [] + eclass: "19" + cost: 9223372036854776000 + b12-0: + op: b12 + children: [] + eclass: "18" + cost: 9223372036854776000 + b1-0: + op: b1 + children: [] + eclass: "12" + cost: 9223372036854776000 +root_eclasses: [] +class_data: + "21": + type: BDD + "6": + type: BDD + "12": + type: BDD + "23": + type: BDD + "24": + type: BDD + "2": + type: BDD + "15": + type: BDD + "19": + type: BDD + "18": + type: BDD + diff --git a/tests/snapshots/files__before_proofs.snap b/tests/snapshots/files__before_proofs.snap new file mode 100644 index 00000000..56a73f41 --- /dev/null +++ b/tests/snapshots/files__before_proofs.snap @@ -0,0 +1,587 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Rational-0: + op: (rational 2 1) + children: [] + eclass: Rational-0 + cost: 0 + RepConst_Rational__-0: + op: RepConst_Rational__ + children: + - Rational-0 + eclass: "20" + cost: 1 + Rational-5871781006564002453: + op: (rational 0 1) + children: [] + eclass: Rational-5871781006564002453 + cost: 0 + RepConst_Rational__-5871781006564002453: + op: RepConst_Rational__ + children: + - Rational-5871781006564002453 + eclass: "60" + cost: 1 + Original__-5871781006564002453: + op: Original__ + children: + - TrmOf__-17615343019692007359 + eclass: "2" + cost: 1 + Original__-4208978898528913939: + op: Original__ + children: + - TrmOf__-15952540911656918845 + eclass: "8" + cost: 1 + Original__-3377577844511369682: + op: Original__ + children: + - TrmOf__-15121139857639374588 + eclass: "11" + cost: 1 + Original__-16888066223598386617: + op: Original__ + children: + - TrmOf__-987321939341122219 + eclass: "403" + cost: 1 + Original__-5040733954629534610: + op: Original__ + children: [] + eclass: "417" + cost: 1 + Original__-1403464968953739865: + op: Original__ + children: [] + eclass: "5" + cost: 1 + Original__-16784295967757539516: + op: Original__ + children: + - AstVar_String__-3377577844511369682 + eclass: "15" + cost: 1 + Original__-17511749764892698465: + op: Original__ + children: [] + eclass: "19" + cost: 1 + Original__-9041995340435216140: + op: Original__ + children: [] + eclass: "23" + cost: 1 + Original__-13978428036099289028: + op: Original__ + children: [] + eclass: "336" + cost: 1 + RuleTerm__-1480107397956408125: + op: RuleTerm__ + children: + - TrmOf__-16004514540098111499 + eclass: "66" + cost: 1 + RuleTerm__-68000147645774473: + op: RuleTerm__ + children: + - TrmOf__-11016285217034384164 + eclass: "88" + cost: 1 + RuleTerm__-16113564009593019811: + op: RuleTerm__ + children: + - TrmOf__-16160435425421689461 + eclass: "223" + cost: 1 + RuleTerm__-14909174272005618568: + op: RuleTerm__ + children: + - TrmOf__-1195216453105892835 + eclass: "150" + cost: 1 + RuleTerm__-8632718619206876900: + op: RuleTerm__ + children: + - TrmOf__-9717121507046106021 + eclass: "208" + cost: 1 + RuleTerm__-7050700098532748677: + op: RuleTerm__ + children: + - TrmOf__-5716037122281962698 + eclass: "289" + cost: 1 + RuleTerm__-827329982148558853: + op: RuleTerm__ + children: + - TrmOf__-16004514540098111499 + eclass: "102" + cost: 1 + RuleTerm__-4891502376648696847: + op: RuleTerm__ + children: + - TrmOf__-987321939341122219 + eclass: "167" + cost: 1 + RuleTerm__-4296628794274152636: + op: RuleTerm__ + children: + - TrmOf__-16160435425421689461 + eclass: "275" + cost: 1 + RuleTerm__-1464556065508684311: + op: RuleTerm__ + children: + - TrmOf__-11016285217034384164 + eclass: "306" + cost: 1 + ProofNull__-0: + op: ProofNull__ + children: [] + eclass: "0" + cost: 1 + Null__-0: + op: Null__ + children: [] + eclass: "0" + cost: 9223372036854776000 + TrmOf__-15121139857639374588: + op: TrmOf__ + children: + - MakeTrmPrf__-2651793105796594534 + eclass: "10" + cost: 1000000 + TrmOf__-15952540911656918845: + op: TrmOf__ + children: + - MakeTrmPrf__-15787446741851832475 + eclass: "7" + cost: 1000000 + TrmOf__-17615343019692007359: + op: TrmOf__ + children: + - MakeTrmPrf__-7659469028595837896 + eclass: "1" + cost: 1000000 + TrmOf__-16004514540098111499: + op: TrmOf__ + children: + - MakeTrmPrf__-3804304252294174724 + eclass: "65" + cost: 1000000 + TrmOf__-1195216453105892835: + op: TrmOf__ + children: + - MakeTrmPrf__-1262483645723449506 + eclass: "152" + cost: 1000000 + TrmOf__-9717121507046106021: + op: TrmOf__ + children: + - MakeTrmPrf__-5699467722751906279 + eclass: "210" + cost: 1000000 + TrmOf__-16160435425421689461: + op: TrmOf__ + children: + - MakeTrmPrf__-17122760709440669650 + eclass: "222" + cost: 1000000 + TrmOf__-5716037122281962698: + op: TrmOf__ + children: + - MakeTrmPrf__-15035091326745903097 + eclass: "291" + cost: 1000000 + TrmOf__-11016285217034384164: + op: TrmOf__ + children: + - MakeTrmPrf__-10201126904246574918 + eclass: "405" + cost: 1000000 + TrmOf__-987321939341122219: + op: TrmOf__ + children: + - MakeTrmPrf__-14825894830305030089 + eclass: "405" + cost: 1000000 + AstVar_String__-3377577844511369682: + op: AstVar_String__ + children: + - TrmOf__-15121139857639374588 + eclass: "716" + cost: 1 + MakeTrmPrf__-7659469028595837896: + op: MakeTrmPrf__ + children: + - TrmOf__-17615343019692007359 + - Original__-5871781006564002453 + eclass: "3" + cost: 1 + MakeTrmPrf__-15787446741851832475: + op: MakeTrmPrf__ + children: + - TrmOf__-15952540911656918845 + - Original__-4208978898528913939 + eclass: "9" + cost: 1 + MakeTrmPrf__-2651793105796594534: + op: MakeTrmPrf__ + children: + - TrmOf__-15121139857639374588 + - Original__-3377577844511369682 + eclass: "12" + cost: 1 + MakeTrmPrf__-3804304252294174724: + op: MakeTrmPrf__ + children: + - TrmOf__-16004514540098111499 + - RuleTerm__-1480107397956408125 + eclass: "31" + cost: 1 + MakeTrmPrf__-14825894830305030089: + op: MakeTrmPrf__ + children: + - TrmOf__-987321939341122219 + - RuleTerm__-68000147645774473 + eclass: "63" + cost: 1 + MakeTrmPrf__-17122760709440669650: + op: MakeTrmPrf__ + children: + - TrmOf__-16160435425421689461 + - RuleTerm__-16113564009593019811 + eclass: "97" + cost: 1 + MakeTrmPrf__-1262483645723449506: + op: MakeTrmPrf__ + children: + - TrmOf__-1195216453105892835 + - RuleTerm__-14909174272005618568 + eclass: "151" + cost: 1 + MakeTrmPrf__-5699467722751906279: + op: MakeTrmPrf__ + children: + - TrmOf__-9717121507046106021 + - RuleTerm__-8632718619206876900 + eclass: "209" + cost: 1 + MakeTrmPrf__-15035091326745903097: + op: MakeTrmPrf__ + children: + - TrmOf__-5716037122281962698 + - RuleTerm__-7050700098532748677 + eclass: "290" + cost: 1 + MakeTrmPrf__-10201126904246574918: + op: MakeTrmPrf__ + children: + - TrmOf__-11016285217034384164 + - Original__-16888066223598386617 + eclass: "404" + cost: 1 + DemandEq__-5815586648995041194: + op: DemandEq__ + children: [] + eclass: "444" + cost: 1000000 + DemandEq__-7068423019940469303: + op: DemandEq__ + children: [] + eclass: "989" + cost: 1000000 + DemandEq__-2671660272381556966: + op: DemandEq__ + children: + - TrmOf__-16004514540098111499 + eclass: "155" + cost: 1000000 + DemandEq__-6672567656104162082: + op: DemandEq__ + children: + - TrmOf__-987321939341122219 + eclass: "213" + cost: 1000000 + DemandEq__-6568797400263314981: + op: DemandEq__ + children: + - TrmOf__-16160435425421689461 + eclass: "227" + cost: 1000000 + DemandEq__-8231776509339941702: + op: DemandEq__ + children: [] + eclass: "567" + cost: 1000000 + DemandEq__-15870306880821417977: + op: DemandEq__ + children: [] + eclass: "860" + cost: 1000000 + DemandEq__-17948721015344509516: + op: DemandEq__ + children: [] + eclass: "917" + cost: 1000000 + DemandEq__-1544537807812465189: + op: DemandEq__ + children: + - AstVar_String__-3377577844511369682 + - AstVar_String__-3377577844511369682 + eclass: "444" + cost: 1000000 + DemandEq__-2648223368006877125: + op: DemandEq__ + children: [] + eclass: "444" + cost: 1000000 + Congruence__-13691527104406518518: + op: Congruence__ + children: + - RuleTerm__-68000147645774473 + eclass: "159" + cost: 1 + Congruence__-3766688084637180088: + op: Congruence__ + children: + - RuleTerm__-68000147645774473 + eclass: "217" + cost: 1 + Congruence__-233012353760694237: + op: Congruence__ + children: + - RuleTerm__-68000147645774473 + eclass: "298" + cost: 1 + Congruence__-17276645460599582402: + op: Congruence__ + children: + - RuleTerm__-68000147645774473 + eclass: "571" + cost: 1 + Congruence__-4181946109042106699: + op: Congruence__ + children: + - RuleTerm__-68000147645774473 + eclass: "864" + cost: 1 + Congruence__-12692547903445119682: + op: Congruence__ + children: [] + eclass: "880" + cost: 1 + Congruence__-6832070156418317432: + op: Congruence__ + children: + - RuleTerm__-68000147645774473 + eclass: "921" + cost: 1 + Congruence__-17198619085230645144: + op: Congruence__ + children: [] + eclass: "993" + cost: 1 + Congruence__-7618609781449447259: + op: Congruence__ + children: + - RuleTerm__-1480107397956408125 + eclass: "111" + cost: 1 + Congruence__-5746908166228460519: + op: Congruence__ + children: [] + eclass: "132" + cost: 1 +root_eclasses: [] +class_data: + "20": + type: TrmPrf__ + Rational-0: + type: Rational + "60": + type: TrmPrf__ + Rational-5871781006564002453: + type: Rational + "2": + type: Proof__ + "1": + type: Ast__ + "8": + type: Proof__ + "7": + type: Ast__ + "11": + type: Proof__ + "10": + type: Ast__ + "403": + type: Proof__ + "405": + type: Ast__ + "417": + type: Proof__ + "714": + type: Ast__ + "5": + type: Proof__ + "949": + type: Ast__ + "15": + type: Proof__ + "716": + type: Ast__ + "19": + type: Proof__ + "669": + type: Ast__ + "23": + type: Proof__ + "988": + type: Ast__ + "336": + type: Proof__ + "948": + type: Ast__ + "66": + type: Proof__ + "26": + type: Proof__ + "65": + type: Ast__ + "88": + type: Proof__ + "33": + type: Proof__ + "223": + type: Proof__ + "92": + type: Proof__ + "222": + type: Ast__ + "150": + type: Proof__ + "99": + type: Proof__ + "152": + type: Ast__ + "208": + type: Proof__ + "164": + type: Proof__ + "210": + type: Ast__ + "289": + type: Proof__ + "272": + type: Proof__ + "291": + type: Ast__ + "102": + type: Proof__ + "167": + type: Proof__ + "275": + type: Proof__ + "306": + type: Proof__ + "303": + type: Proof__ + "0": + type: ProofList__ + "12": + type: TrmPrf__ + "9": + type: TrmPrf__ + "3": + type: TrmPrf__ + "31": + type: TrmPrf__ + "151": + type: TrmPrf__ + "209": + type: TrmPrf__ + "97": + type: TrmPrf__ + "290": + type: TrmPrf__ + "404": + type: TrmPrf__ + "63": + type: TrmPrf__ + "444": + type: Proof__ + "989": + type: Proof__ + "930": + type: Ast__ + "987": + type: Ast__ + "155": + type: Proof__ + "213": + type: Proof__ + "227": + type: Proof__ + "567": + type: Proof__ + "801": + type: Ast__ + "860": + type: Proof__ + "858": + type: Ast__ + "917": + type: Proof__ + "915": + type: Ast__ + "667": + type: Ast__ + "159": + type: Proof__ + "158": + type: ProofList__ + "217": + type: Proof__ + "216": + type: ProofList__ + "298": + type: Proof__ + "297": + type: ProofList__ + "571": + type: Proof__ + "570": + type: ProofList__ + "864": + type: Proof__ + "863": + type: ProofList__ + "880": + type: Proof__ + "266": + type: Proof__ + "879": + type: ProofList__ + "921": + type: Proof__ + "920": + type: ProofList__ + "993": + type: Proof__ + "238": + type: Proof__ + "992": + type: ProofList__ + "111": + type: Proof__ + "132": + type: Proof__ + "123": + type: Proof__ + diff --git a/tests/snapshots/files__birewrite.snap b/tests/snapshots/files__birewrite.snap new file mode 100644 index 00000000..97d1290d --- /dev/null +++ b/tests/snapshots/files__birewrite.snap @@ -0,0 +1,206 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + c-0: + op: c + children: [] + eclass: "2" + cost: 9223372036854776000 + d-0: + op: d + children: [] + eclass: "3" + cost: 9223372036854776000 + e-0: + op: e + children: [] + eclass: "4" + cost: 9223372036854776000 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + Lit-5871781006564002453: + op: Lit + children: + - i64-5871781006564002453 + eclass: "0" + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + Lit-11743562013128004906: + op: Lit + children: + - i64-11743562013128004906 + eclass: "1" + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + Lit-17615343019692007359: + op: Lit + children: + - i64-17615343019692007359 + eclass: "2" + cost: 1 + i64-5040379952546458196: + op: "4" + children: [] + eclass: i64-5040379952546458196 + cost: 0 + Lit-5040379952546458196: + op: Lit + children: + - i64-5040379952546458196 + eclass: "3" + cost: 1 + i64-10912160959110460649: + op: "5" + children: [] + eclass: i64-10912160959110460649 + cost: 0 + Lit-10912160959110460649: + op: Lit + children: + - i64-10912160959110460649 + eclass: "4" + cost: 1 + i64-16783941965674463102: + op: "6" + children: [] + eclass: i64-16783941965674463102 + cost: 0 + Lit-16783941965674463102: + op: Lit + children: + - i64-16783941965674463102 + eclass: "5" + cost: 1 + a-0: + op: a + children: [] + eclass: "0" + cost: 9223372036854776000 + f-0: + op: f + children: [] + eclass: "5" + cost: 9223372036854776000 + ex1-0: + op: ex1 + children: [] + eclass: "7" + cost: 9223372036854776000 + ex2-0: + op: ex2 + children: [] + eclass: "9" + cost: 9223372036854776000 + b-0: + op: b + children: [] + eclass: "1" + cost: 9223372036854776000 + Add-5871781006564002453: + op: Add + children: + - a-0 + - b-0 + eclass: "6" + cost: 1 + Add-1476769281115640523: + op: Add + children: + - Add-5871781006564002453 + - Lit-17615343019692007359 + eclass: "7" + cost: 1 + Add-11307757358215063057: + op: Add + children: + - Lit-10912160959110460649 + - f-0 + eclass: "8" + cost: 1 + Add-11234845072659508782: + op: Add + children: + - Lit-5040379952546458196 + - Add-11307757358215063057 + eclass: "9" + cost: 1 + Add-7659469028595837896: + op: Add + children: + - Lit-11743562013128004906 + - c-0 + eclass: "10" + cost: 1 + Add-16275225025205966978: + op: Add + children: + - d-0 + - e-0 + eclass: "12" + cost: 1 + Add-3377577844511369682: + op: Add + children: + - Lit-5871781006564002453 + - Add-7659469028595837896 + eclass: "7" + cost: 1 + Add-5395768095842721163: + op: Add + children: + - Add-16275225025205966978 + - Lit-16783941965674463102 + eclass: "9" + cost: 1 +root_eclasses: [] +class_data: + "2": + type: Math + "3": + type: Math + "4": + type: Math + "0": + type: Math + i64-5871781006564002453: + type: i64 + "1": + type: Math + i64-11743562013128004906: + type: i64 + i64-17615343019692007359: + type: i64 + i64-5040379952546458196: + type: i64 + i64-10912160959110460649: + type: i64 + "5": + type: Math + i64-16783941965674463102: + type: i64 + "7": + type: Math + "9": + type: Math + "6": + type: Math + "8": + type: Math + "10": + type: Math + "12": + type: Math + diff --git a/tests/snapshots/files__bitwise.snap b/tests/snapshots/files__bitwise.snap new file mode 100644 index 00000000..967d470b --- /dev/null +++ b/tests/snapshots/files__bitwise.snap @@ -0,0 +1,8 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: {} +root_eclasses: [] +class_data: {} + diff --git a/tests/snapshots/files__calc.snap b/tests/snapshots/files__calc.snap new file mode 100644 index 00000000..ac2dae82 --- /dev/null +++ b/tests/snapshots/files__calc.snap @@ -0,0 +1,85 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + I-0: + op: I + children: [] + eclass: "0" + cost: 9223372036854776000 + A4-0: + op: A4 + children: [] + eclass: "4" + cost: 9223372036854776000 + b-0: + op: b + children: [] + eclass: "7" + cost: 9223372036854776000 + A2-0: + op: A2 + children: [] + eclass: "3" + cost: 9223372036854776000 + A-0: + op: A + children: [] + eclass: "1" + cost: 9223372036854776000 + B-0: + op: B + children: [] + eclass: "2" + cost: 9223372036854776000 + A8-0: + op: A8 + children: [] + eclass: "5" + cost: 9223372036854776000 + a-0: + op: a + children: [] + eclass: "6" + cost: 9223372036854776000 + g*-6828067974578293639: + op: g* + children: + - A-0 + - A-0 + eclass: "3" + cost: 1 + g*-15443823971188422721: + op: g* + children: + - g*-6828067974578293639 + - A2-0 + eclass: "4" + cost: 1 + g*-5435976351651060604: + op: g* + children: + - g*-15443823971188422721 + - A4-0 + eclass: "5" + cost: 1 +root_eclasses: [] +class_data: + "0": + type: G + "4": + type: G + "7": + type: G + "3": + type: G + "1": + type: G + "2": + type: G + "5": + type: G + "6": + type: G + diff --git a/tests/snapshots/files__combinators.snap b/tests/snapshots/files__combinators.snap new file mode 100644 index 00000000..581cfe4d --- /dev/null +++ b/tests/snapshots/files__combinators.snap @@ -0,0 +1,241 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + App-791192798209204816: + op: App + children: + - F-0 + eclass: "98" + cost: 1 + If-8845426729208589303: + op: If + children: + - Var-7848520443469635519 + - N-0 + - N-5871781006564002453 + eclass: "34" + cost: 1 + If-13839844697570753058: + op: If + children: + - F-0 + - N-0 + - N-5871781006564002453 + eclass: "173" + cost: 1 + F-0: + op: F + children: [] + eclass: "1" + cost: 9223372036854776000 + String-7848520443469635519: + op: "\"x\"" + children: [] + eclass: String-7848520443469635519 + cost: 0 + Var-7848520443469635519: + op: Var + children: + - String-7848520443469635519 + eclass: "33" + cost: 100 + CVar-7848520443469635519: + op: CVar + children: + - String-7848520443469635519 + eclass: "50" + cost: 10000 + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + N-0: + op: N + children: + - i64-0 + eclass: "3" + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + N-11743562013128004906: + op: N + children: + - i64-11743562013128004906 + eclass: "6" + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + N-5871781006564002453: + op: N + children: + - i64-5871781006564002453 + eclass: "173" + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + N-17615343019692007359: + op: N + children: + - i64-17615343019692007359 + eclass: "98" + cost: 1 + CIf-0: + op: CIf + children: [] + eclass: "104" + cost: 9223372036854776000 + T-0: + op: T + children: [] + eclass: "0" + cost: 9223372036854776000 + test-0: + op: test + children: [] + eclass: "98" + cost: 9223372036854776000 + CAbs-16019926084039146707: + op: CAbs + children: + - String-7848520443469635519 + eclass: "21" + cost: 10000 + CAbs-4276364070911141801: + op: CAbs + children: + - String-7848520443469635519 + eclass: "48" + cost: 10000 + CAbs-16851327138056690964: + op: CAbs + children: + - String-7848520443469635519 + eclass: "35" + cost: 10000 + CAbs-11031519759933881165: + op: CAbs + children: + - String-7848520443469635519 + eclass: "59" + cost: 10000 + CAbs-17682728192074235221: + op: CAbs + children: + - String-7848520443469635519 + eclass: "37" + cost: 10000 + CAbs-3496936645334790198: + op: CAbs + children: + - String-7848520443469635519 + eclass: "66" + cost: 10000 + CAbs-3444963016893597544: + op: CAbs + children: + - String-7848520443469635519 + - CAbs-17682728192074235221 + eclass: "70" + cost: 10000 + CAbs-16903300766497883618: + op: CAbs + children: + - String-7848520443469635519 + eclass: "46" + cost: 10000 + CAbs-9368717651898792651: + op: CAbs + children: + - String-7848520443469635519 + - CVar-7848520443469635519 + eclass: "84" + cost: 10000 + CAbs-8537316597881248394: + op: CAbs + children: + - String-7848520443469635519 + eclass: "86" + cost: 10000 +root_eclasses: [] +class_data: + "98": + type: Expr + "8": + type: Expr + "1": + type: Expr + "34": + type: Expr + "33": + type: Expr + "3": + type: Expr + "173": + type: Expr + String-7848520443469635519: + type: String + "50": + type: CExpr + i64-0: + type: i64 + "6": + type: Expr + i64-11743562013128004906: + type: i64 + i64-5871781006564002453: + type: i64 + i64-17615343019692007359: + type: i64 + "104": + type: CExpr + "0": + type: Expr + "21": + type: CExpr + "42": + type: CExpr + "48": + type: CExpr + "40": + type: CExpr + "35": + type: CExpr + "41": + type: CExpr + "59": + type: CExpr + "52": + type: CExpr + "37": + type: CExpr + "44": + type: CExpr + "66": + type: CExpr + "51": + type: CExpr + "70": + type: CExpr + "46": + type: CExpr + "55": + type: CExpr + "84": + type: CExpr + "86": + type: CExpr + "15": + type: CExpr + diff --git a/tests/snapshots/files__cyk.snap b/tests/snapshots/files__cyk.snap new file mode 100644 index 00000000..cfcdd483 --- /dev/null +++ b/tests/snapshots/files__cyk.snap @@ -0,0 +1,150 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + Prod-7659469028595837896: + op: Prod + children: + - NonTerm-9670903108499433938 + - NonTerm-7415288725214994367 + - NonTerm-1566882640312150612 + eclass: Unit-0 + cost: 1 + Prod-1081172882011038115: + op: Prod + children: + - NonTerm-9670903108499433938 + - NonTerm-1566882640312150612 + - NonTerm-14842264911260568083 + eclass: Unit-0 + cost: 1 + Prod-6544191068063263740: + op: Prod + children: + - NonTerm-7415288725214994367 + - NonTerm-1566882640312150612 + - NonTerm-7415288725214994367 + eclass: Unit-0 + cost: 1 + Prod-14534116445915336970: + op: Prod + children: + - NonTerm-1566882640312150612 + - NonTerm-14842264911260568083 + - NonTerm-14842264911260568083 + eclass: Unit-0 + cost: 1 + Prod-15206526507414598257: + op: Prod + children: + - NonTerm-14842264911260568083 + - NonTerm-7415288725214994367 + - NonTerm-1566882640312150612 + eclass: Unit-0 + cost: 1 + String-17627030480522586708: + op: "\"a\"" + children: [] + eclass: String-17627030480522586708 + cost: 0 + End-11856760466294172486: + op: End + children: + - NonTerm-7415288725214994367 + - String-17627030480522586708 + eclass: Unit-0 + cost: 1 + String-3799122101935431485: + op: "\"b\"" + children: [] + eclass: String-3799122101935431485 + cost: 0 + End-5711696037964013857: + op: End + children: + - NonTerm-1566882640312150612 + - String-3799122101935431485 + eclass: Unit-0 + cost: 1 + End-14321860509961492610: + op: End + children: + - NonTerm-14842264911260568083 + - String-17627030480522586708 + eclass: Unit-0 + cost: 1 + String-9670903108499433938: + op: "\"S\"" + children: [] + eclass: String-9670903108499433938 + cost: 0 + NonTerm-9670903108499433938: + op: NonTerm + children: + - String-9670903108499433938 + eclass: "0" + cost: 1 + String-7415288725214994367: + op: "\"A\"" + children: [] + eclass: String-7415288725214994367 + cost: 0 + NonTerm-7415288725214994367: + op: NonTerm + children: + - String-7415288725214994367 + eclass: "1" + cost: 1 + String-1566882640312150612: + op: "\"B\"" + children: [] + eclass: String-1566882640312150612 + cost: 0 + NonTerm-1566882640312150612: + op: NonTerm + children: + - String-1566882640312150612 + eclass: "2" + cost: 1 + String-14842264911260568083: + op: "\"C\"" + children: [] + eclass: String-14842264911260568083 + cost: 0 + NonTerm-14842264911260568083: + op: NonTerm + children: + - String-14842264911260568083 + eclass: "3" + cost: 1 +root_eclasses: [] +class_data: + Unit-0: + type: Unit + "0": + type: nonterm + "1": + type: nonterm + "2": + type: nonterm + "3": + type: nonterm + String-17627030480522586708: + type: String + String-3799122101935431485: + type: String + String-9670903108499433938: + type: String + String-7415288725214994367: + type: String + String-1566882640312150612: + type: String + String-14842264911260568083: + type: String + diff --git a/tests/snapshots/files__cykjson.snap b/tests/snapshots/files__cykjson.snap new file mode 100644 index 00000000..f98ed8f6 --- /dev/null +++ b/tests/snapshots/files__cykjson.snap @@ -0,0 +1,911 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + i64-17147757364762811680: + op: "160" + children: [] + eclass: i64-17147757364762811680 + cost: 0 + String-8150770311509600722: + op: "\"H9\"" + children: [] + eclass: String-8150770311509600722 + cost: 0 + P-15144575588694754941: + op: P + children: + - i64-5871781006564002453 + - i64-17147757364762811680 + - String-8150770311509600722 + eclass: Unit-0 + cost: 1 + i64-13250620236881053665: + op: "285" + children: [] + eclass: i64-13250620236881053665 + cost: 0 + P-6660603375870406635: + op: P + children: + - i64-5871781006564002453 + - i64-13250620236881053665 + - String-8150770311509600722 + eclass: Unit-0 + cost: 1 + i64-16108815799063573221: + op: "785" + children: [] + eclass: i64-16108815799063573221 + cost: 0 + P-1273666883823903385: + op: P + children: + - i64-5871781006564002453 + - i64-16108815799063573221 + - String-8150770311509600722 + eclass: Unit-0 + cost: 1 + i64-10081113907175992806: + op: "718" + children: [] + eclass: i64-10081113907175992806 + cost: 0 + P-17922521199970013583: + op: P + children: + - i64-5871781006564002453 + - i64-10081113907175992806 + - String-8150770311509600722 + eclass: Unit-0 + cost: 1 + i64-4053412015288412391: + op: "651" + children: [] + eclass: i64-4053412015288412391 + cost: 0 + P-7652032519244375412: + op: P + children: + - i64-5871781006564002453 + - i64-4053412015288412391 + - String-8150770311509600722 + eclass: Unit-0 + cost: 1 + i64-7482786487199436520: + op: "328" + children: [] + eclass: i64-7482786487199436520 + cost: 0 + P-2005925516484039893: + op: P + children: + - i64-5871781006564002453 + - i64-7482786487199436520 + - String-8150770311509600722 + eclass: Unit-0 + cost: 1 + i64-1455084595311856105: + op: "261" + children: [] + eclass: i64-1455084595311856105 + cost: 0 + P-14537644614317802246: + op: P + children: + - i64-5871781006564002453 + - i64-1455084595311856105 + - String-8150770311509600722 + eclass: Unit-0 + cost: 1 + i64-13406718123246169834: + op: "706" + children: [] + eclass: i64-13406718123246169834 + cost: 0 + P-14614914964862122408: + op: P + children: + - i64-5871781006564002453 + - i64-13406718123246169834 + - String-8150770311509600722 + eclass: Unit-0 + cost: 1 + i64-17667493649174738220: + op: "380" + children: [] + eclass: i64-17667493649174738220 + cost: 0 + P-7073739528995426935: + op: P + children: + - i64-5871781006564002453 + - i64-17667493649174738220 + - String-8150770311509600722 + eclass: Unit-0 + cost: 1 + i64-2442583535694516531: + op: "679" + children: [] + eclass: i64-2442583535694516531 + cost: 0 + P-15556507817656699869: + op: P + children: + - i64-5871781006564002453 + - i64-2442583535694516531 + - String-8150770311509600722 + eclass: Unit-0 + cost: 1 + i64-17823591535539854389: + op: "801" + children: [] + eclass: i64-17823591535539854389 + cost: 0 + String-3098702898132563177: + op: "\"VAL\"" + children: [] + eclass: String-3098702898132563177 + cost: 0 + B-16791568458799218522: + op: B + children: + - i64-17823591535539854389 + - i64-5871781006564002453 + - String-3098702898132563177 + eclass: "0" + cost: 100000 + B-15144575588694754941: + op: B + children: + - i64-5871781006564002453 + - i64-17147757364762811680 + - String-8150770311509600722 + eclass: "1" + cost: 100000 + B-6660603375870406635: + op: B + children: + - i64-5871781006564002453 + - i64-13250620236881053665 + - String-8150770311509600722 + eclass: "1" + cost: 100000 + B-1273666883823903385: + op: B + children: + - i64-5871781006564002453 + - i64-16108815799063573221 + - String-8150770311509600722 + eclass: "1" + cost: 100000 + B-17922521199970013583: + op: B + children: + - i64-5871781006564002453 + - i64-10081113907175992806 + - String-8150770311509600722 + eclass: "1" + cost: 100000 + B-7652032519244375412: + op: B + children: + - i64-5871781006564002453 + - i64-4053412015288412391 + - String-8150770311509600722 + eclass: "1" + cost: 100000 + B-2005925516484039893: + op: B + children: + - i64-5871781006564002453 + - i64-7482786487199436520 + - String-8150770311509600722 + eclass: "1" + cost: 100000 + B-14537644614317802246: + op: B + children: + - i64-5871781006564002453 + - i64-1455084595311856105 + - String-8150770311509600722 + eclass: "1" + cost: 100000 + B-14614914964862122408: + op: B + children: + - i64-5871781006564002453 + - i64-13406718123246169834 + - String-8150770311509600722 + eclass: "1" + cost: 100000 + B-7073739528995426935: + op: B + children: + - i64-5871781006564002453 + - i64-17667493649174738220 + - String-8150770311509600722 + eclass: "1" + cost: 100000 + String-3400952766172528380: + op: "\"H7\"" + children: [] + eclass: String-3400952766172528380 + cost: 0 + NT-2176608565598431445: + op: NT + children: + - String-3400952766172528380 + - T-15139977626647034397 + - T-2994503827742450628 + eclass: "12" + cost: 1 + String-7017119389452091262: + op: "\"H8\"" + children: [] + eclass: String-7017119389452091262 + cost: 0 + NT-17905997656708914419: + op: NT + children: + - String-7017119389452091262 + - T-1293589485465454534 + - B-15144575588694754941 + eclass: "13" + cost: 1 + NT-9361484887233955811: + op: NT + children: + - String-7017119389452091262 + - T-6732138773774815835 + - B-6660603375870406635 + eclass: "14" + cost: 1 + String-1845757586690957117: + op: "\"ELM\"" + children: [] + eclass: String-1845757586690957117 + cost: 0 + NT-11442316754243898537: + op: NT + children: + - String-1845757586690957117 + - NT-17905997656708914419 + - T-17023076937514119005 + eclass: "15" + cost: 1 + NT-12200805522705888519: + op: NT + children: + - String-1845757586690957117 + - NT-9361484887233955811 + - T-17023076937514119005 + eclass: "16" + cost: 1 + String-2688846101539080723: + op: "\"MEM\"" + children: [] + eclass: String-2688846101539080723 + cost: 0 + NT-3071556225764271360: + op: NT + children: + - String-2688846101539080723 + - NT-2176608565598431445 + - T-6732138773774815835 + eclass: "17" + cost: 1 + NT-12320915076839643495: + op: NT + children: + - String-2688846101539080723 + - NT-2176608565598431445 + - T-1293589485465454534 + eclass: "18" + cost: 1 + String-14420720653836506280: + op: "\"PR\"" + children: [] + eclass: String-14420720653836506280 + cost: 0 + NT-7239000051061034411: + op: NT + children: + - String-14420720653836506280 + - NT-2176608565598431445 + - T-6732138773774815835 + eclass: "19" + cost: 1 + NT-16436385273695213892: + op: NT + children: + - String-14420720653836506280 + - NT-2176608565598431445 + - T-1293589485465454534 + eclass: "20" + cost: 1 + String-2278989304945598269: + op: "\"H2\"" + children: [] + eclass: String-2278989304945598269 + cost: 0 + NT-1174069112454411311: + op: NT + children: + - String-2278989304945598269 + - T-3828771413392206835 + - NT-12320915076839643495 + eclass: "21" + cost: 1 + String-5764174078010485202: + op: "\"str\"" + children: [] + eclass: String-5764174078010485202 + cost: 0 + End-6732138773774815835: + op: End + children: + - String-3098702898132563177 + - String-5764174078010485202 + eclass: Unit-0 + cost: 1 + String-14022551318073603175: + op: "\"num\"" + children: [] + eclass: String-14022551318073603175 + cost: 0 + End-1293589485465454534: + op: End + children: + - String-3098702898132563177 + - String-14022551318073603175 + eclass: Unit-0 + cost: 1 + String-4653898077614134440: + op: "\"true\"" + children: [] + eclass: String-4653898077614134440 + cost: 0 + End-5621862773378465073: + op: End + children: + - String-3098702898132563177 + - String-4653898077614134440 + eclass: Unit-0 + cost: 1 + String-11635955084574487655: + op: "\"false\"" + children: [] + eclass: String-11635955084574487655 + cost: 0 + End-860357767210813382: + op: End + children: + - String-3098702898132563177 + - String-11635955084574487655 + eclass: Unit-0 + cost: 1 + String-10525679084178136893: + op: "\"null\"" + children: [] + eclass: String-10525679084178136893 + cost: 0 + End-18196825840524014236: + op: End + children: + - String-3098702898132563177 + - String-10525679084178136893 + eclass: Unit-0 + cost: 1 + End-17023076937514119005: + op: End + children: + - String-1845757586690957117 + - String-5764174078010485202 + eclass: Unit-0 + cost: 1 + End-13537892164449232072: + op: End + children: + - String-1845757586690957117 + - String-14022551318073603175 + eclass: Unit-0 + cost: 1 + End-2506436815954674823: + op: End + children: + - String-1845757586690957117 + - String-4653898077614134440 + eclass: Unit-0 + cost: 1 + End-11151295930950116552: + op: End + children: + - String-1845757586690957117 + - String-11635955084574487655 + eclass: Unit-0 + cost: 1 + End-15081399883100223986: + op: End + children: + - String-1845757586690957117 + - String-10525679084178136893 + eclass: Unit-0 + cost: 1 + String-12045811881167970109: + op: "\"{\"" + children: [] + eclass: String-12045811881167970109 + cost: 0 + getString-5871781006564002453: + op: getString + children: + - i64-5871781006564002453 + eclass: String-12045811881167970109 + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + getString-11743562013128004906: + op: getString + children: + - i64-11743562013128004906 + eclass: String-5764174078010485202 + cost: 1 + String-9682590569330013287: + op: "\":\"" + children: [] + eclass: String-9682590569330013287 + cost: 0 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + getString-17615343019692007359: + op: getString + children: + - i64-17615343019692007359 + eclass: String-9682590569330013287 + cost: 1 + String-8970483904696565630: + op: "\"[\"" + children: [] + eclass: String-8970483904696565630 + cost: 0 + i64-5040379952546458196: + op: "4" + children: [] + eclass: i64-5040379952546458196 + cost: 0 + getString-5040379952546458196: + op: getString + children: + - i64-5040379952546458196 + eclass: String-8970483904696565630 + cost: 1 + i64-10912160959110460649: + op: "5" + children: [] + eclass: i64-10912160959110460649 + cost: 0 + getString-10912160959110460649: + op: getString + children: + - i64-10912160959110460649 + eclass: String-12045811881167970109 + cost: 1 + i64-16783941965674463102: + op: "6" + children: [] + eclass: i64-16783941965674463102 + cost: 0 + getString-16783941965674463102: + op: getString + children: + - i64-16783941965674463102 + eclass: String-5764174078010485202 + cost: 1 + i64-4208978898528913939: + op: "7" + children: [] + eclass: i64-4208978898528913939 + cost: 0 + getString-4208978898528913939: + op: getString + children: + - i64-4208978898528913939 + eclass: String-9682590569330013287 + cost: 1 + i64-10080759905092916392: + op: "8" + children: [] + eclass: i64-10080759905092916392 + cost: 0 + getString-10080759905092916392: + op: getString + children: + - i64-10080759905092916392 + eclass: String-5764174078010485202 + cost: 1 + String-13999176396412444477: + op: "\",\"" + children: [] + eclass: String-13999176396412444477 + cost: 0 + i64-15952540911656918845: + op: "9" + children: [] + eclass: i64-15952540911656918845 + cost: 0 + getString-15952540911656918845: + op: getString + children: + - i64-15952540911656918845 + eclass: String-13999176396412444477 + cost: 1 + i64-3377577844511369682: + op: "10" + children: [] + eclass: i64-3377577844511369682 + cost: 0 + getString-3377577844511369682: + op: getString + children: + - i64-3377577844511369682 + eclass: String-5764174078010485202 + cost: 1 + test1-0: + op: test1 + children: [] + eclass: "0" + cost: 9223372036854776000 + T-17144903266680156499: + op: T + children: + - String-8150770311509600722 + - String-13999176396412444477 + eclass: "1" + cost: 1 + String-8548939647272503827: + op: "\"H0\"" + children: [] + eclass: String-8548939647272503827 + cost: 0 + T-3828771413392206835: + op: T + children: + - String-8548939647272503827 + - String-12045811881167970109 + eclass: "2" + cost: 1 + T-1293589485465454534: + op: T + children: + - String-3098702898132563177 + - String-14022551318073603175 + eclass: "3" + cost: 1 + T-13537892164449232072: + op: T + children: + - String-1845757586690957117 + - String-14022551318073603175 + eclass: "4" + cost: 1 + String-18339137145156034365: + op: "\"H11\"" + children: [] + eclass: String-18339137145156034365 + cost: 0 + T-2994503827742450628: + op: T + children: + - String-18339137145156034365 + - String-9682590569330013287 + eclass: "5" + cost: 1 + String-15975915833318077543: + op: "\"H3\"" + children: [] + eclass: String-15975915833318077543 + cost: 0 + T-5066758862541156673: + op: T + children: + - String-15975915833318077543 + - String-8970483904696565630 + eclass: "6" + cost: 1 + String-2136319993900342971: + op: "\"H10\"" + children: [] + eclass: String-2136319993900342971 + cost: 0 + T-15139977626647034397: + op: T + children: + - String-2136319993900342971 + - String-5764174078010485202 + eclass: "7" + cost: 1 + T-6732138773774815835: + op: T + children: + - String-3098702898132563177 + - String-5764174078010485202 + eclass: "8" + cost: 1 + T-17023076937514119005: + op: T + children: + - String-1845757586690957117 + - String-5764174078010485202 + eclass: "9" + cost: 1 + String-16385772629911559997: + op: "\"H4\"" + children: [] + eclass: String-16385772629911559997 + cost: 0 + String-3810809562766010834: + op: "\"]\"" + children: [] + eclass: String-3810809562766010834 + cost: 0 + T-11860242468977441006: + op: T + children: + - String-16385772629911559997 + - String-3810809562766010834 + eclass: "10" + cost: 1 + String-14853952372091147432: + op: "\"H1\"" + children: [] + eclass: String-14853952372091147432 + cost: 0 + Prod-12429448979527149223: + op: Prod + children: + - String-3098702898132563177 + - String-8548939647272503827 + - String-14853952372091147432 + eclass: Unit-0 + cost: 1 + Prod-7477076631530229353: + op: Prod + children: + - String-3098702898132563177 + - String-2278989304945598269 + - String-14853952372091147432 + eclass: Unit-0 + cost: 1 + Prod-6055220555749997347: + op: Prod + children: + - String-3098702898132563177 + - String-15975915833318077543 + - String-16385772629911559997 + eclass: Unit-0 + cost: 1 + String-6174030874603967656: + op: "\"H5\"" + children: [] + eclass: String-6174030874603967656 + cost: 0 + Prod-4866665062179759367: + op: Prod + children: + - String-3098702898132563177 + - String-6174030874603967656 + - String-16385772629911559997 + eclass: Unit-0 + cost: 1 + String-10923848419941039998: + op: "\"H6\"" + children: [] + eclass: String-10923848419941039998 + cost: 0 + Prod-14904433591509596411: + op: Prod + children: + - String-2688846101539080723 + - String-10923848419941039998 + - String-2688846101539080723 + eclass: Unit-0 + cost: 1 + Prod-1204630798424365285: + op: Prod + children: + - String-2688846101539080723 + - String-3400952766172528380 + - String-3098702898132563177 + eclass: Unit-0 + cost: 1 + Prod-1384773258010952990: + op: Prod + children: + - String-14420720653836506280 + - String-3400952766172528380 + - String-3098702898132563177 + eclass: Unit-0 + cost: 1 + Prod-12324591201326854254: + op: Prod + children: + - String-1845757586690957117 + - String-7017119389452091262 + - String-1845757586690957117 + eclass: Unit-0 + cost: 1 + Prod-9470472476404999529: + op: Prod + children: + - String-1845757586690957117 + - String-8548939647272503827 + - String-14853952372091147432 + eclass: Unit-0 + cost: 1 + Prod-5732534202318183167: + op: Prod + children: + - String-1845757586690957117 + - String-2278989304945598269 + - String-14853952372091147432 + eclass: Unit-0 + cost: 1 +root_eclasses: [] +class_data: + Unit-0: + type: Unit + i64-5871781006564002453: + type: i64 + i64-17147757364762811680: + type: i64 + String-8150770311509600722: + type: String + i64-13250620236881053665: + type: i64 + i64-16108815799063573221: + type: i64 + i64-10081113907175992806: + type: i64 + i64-4053412015288412391: + type: i64 + i64-7482786487199436520: + type: i64 + i64-1455084595311856105: + type: i64 + i64-13406718123246169834: + type: i64 + i64-17667493649174738220: + type: i64 + i64-2442583535694516531: + type: i64 + "0": + type: tree + i64-17823591535539854389: + type: i64 + String-3098702898132563177: + type: String + "1": + type: tree + "12": + type: tree + String-3400952766172528380: + type: String + "7": + type: tree + "5": + type: tree + "13": + type: tree + String-7017119389452091262: + type: String + "3": + type: tree + "14": + type: tree + "8": + type: tree + "15": + type: tree + String-1845757586690957117: + type: String + "9": + type: tree + "16": + type: tree + "17": + type: tree + String-2688846101539080723: + type: String + "18": + type: tree + "19": + type: tree + String-14420720653836506280: + type: String + "20": + type: tree + "21": + type: tree + String-2278989304945598269: + type: String + "2": + type: tree + String-5764174078010485202: + type: String + String-14022551318073603175: + type: String + String-4653898077614134440: + type: String + String-11635955084574487655: + type: String + String-10525679084178136893: + type: String + String-12045811881167970109: + type: String + i64-11743562013128004906: + type: i64 + String-9682590569330013287: + type: String + i64-17615343019692007359: + type: i64 + String-8970483904696565630: + type: String + i64-5040379952546458196: + type: i64 + i64-10912160959110460649: + type: i64 + i64-16783941965674463102: + type: i64 + i64-4208978898528913939: + type: i64 + i64-10080759905092916392: + type: i64 + String-13999176396412444477: + type: String + i64-15952540911656918845: + type: i64 + i64-3377577844511369682: + type: i64 + String-8548939647272503827: + type: String + "4": + type: tree + String-18339137145156034365: + type: String + "6": + type: tree + String-15975915833318077543: + type: String + String-2136319993900342971: + type: String + "10": + type: tree + String-16385772629911559997: + type: String + String-3810809562766010834: + type: String + String-14853952372091147432: + type: String + String-6174030874603967656: + type: String + String-10923848419941039998: + type: String + diff --git a/tests/snapshots/files__delete.snap b/tests/snapshots/files__delete.snap new file mode 100644 index 00000000..967d470b --- /dev/null +++ b/tests/snapshots/files__delete.snap @@ -0,0 +1,8 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: {} +root_eclasses: [] +class_data: {} + diff --git a/tests/snapshots/files__eqsolve.snap b/tests/snapshots/files__eqsolve.snap new file mode 100644 index 00000000..b992819f --- /dev/null +++ b/tests/snapshots/files__eqsolve.snap @@ -0,0 +1,431 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Add-5408770150503750205: + op: Add + children: [] + eclass: "4837" + cost: 1 + Add-5848835951988420660: + op: Add + children: [] + eclass: "6153" + cost: 1 + Add-4125571296366769009: + op: Add + children: + - Num-14237765175180637677 + eclass: "7836" + cost: 1 + Add-12127209062770441034: + op: Add + children: + - Mul-7410091823103675689 + - Num-9249358851075372135 + eclass: "7481" + cost: 1 + Add-4177190922724885249: + op: Add + children: + - Neg-2653310066123898459 + eclass: "7836" + cost: 1 + Add-4335058819505383488: + op: Add + children: + - Num-14237765175180637677 + - Mul-7410091823103675689 + eclass: "7505" + cost: 1 + Add-11215936905698579351: + op: Add + children: + - Add-7214972461234265960 + - Neg-8058213421924858061 + eclass: "7878" + cost: 1 + Add-18388063568799919121: + op: Add + children: + - Mul-11049130819194852504 + - Mul-7723703604166213683 + eclass: "7836" + cost: 1 + Add-8877774569269354474: + op: Add + children: + - Add-11215936905698579351 + eclass: "8025" + cost: 1 + Add-7214972461234265960: + op: Add + children: + - Num-6703182060581546710 + eclass: "7836" + cost: 1 + Neg-7898929516812054166: + op: Neg + children: [] + eclass: "8171" + cost: 1 + Neg-13718736894934863965: + op: Neg + children: [] + eclass: "8276" + cost: 1 + Neg-8058213421924858061: + op: Neg + children: + - Num-9249358851075372135 + eclass: "8179" + cost: 1 + Neg-3849234523395944122: + op: Neg + children: + - Mul-189120489567122716 + eclass: "8238" + cost: 1 + Neg-6237543417109271308: + op: Neg + children: + - Mul-5279350058056315082 + eclass: "8260" + cost: 1 + Neg-4472564062607179556: + op: Neg + children: + - Mul-18012535024065438898 + eclass: "8262" + cost: 1 + Neg-6809253329962390502: + op: Neg + children: + - Num-2494203162052632771 + eclass: "8374" + cost: 1 + Neg-14916785364705368112: + op: Neg + children: + - Mul-9437948337517880230 + eclass: "7024" + cost: 1 + Neg-15850363665189915607: + op: Neg + children: + - Neg-2653310066123898459 + eclass: "6447" + cost: 1 + Neg-2653310066123898459: + op: Neg + children: + - Mul-14998241575517803173 + eclass: "3515" + cost: 1 + i64-9249358851075372135: + op: "11" + children: [] + eclass: i64-9249358851075372135 + cost: 0 + Num-9249358851075372135: + op: Num + children: + - i64-9249358851075372135 + eclass: "8025" + cost: 1 + i64-14237765175180637677: + op: "-7" + children: [] + eclass: i64-14237765175180637677 + cost: 0 + Num-14237765175180637677: + op: Num + children: + - i64-14237765175180637677 + eclass: "3515" + cost: 1 + i64-15952540911656918845: + op: "9" + children: [] + eclass: i64-15952540911656918845 + cost: 0 + Num-15952540911656918845: + op: Num + children: + - i64-15952540911656918845 + eclass: "7836" + cost: 1 + i64-6703182060581546710: + op: "-2" + children: [] + eclass: i64-6703182060581546710 + cost: 0 + Num-6703182060581546710: + op: Num + children: + - i64-6703182060581546710 + eclass: "7878" + cost: 1 + i64-15069166229198181934: + op: "-10" + children: [] + eclass: i64-15069166229198181934 + cost: 0 + Num-15069166229198181934: + op: Num + children: + - i64-15069166229198181934 + eclass: "7572" + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + Num-5871781006564002453: + op: Num + children: + - i64-5871781006564002453 + eclass: "6459" + cost: 1 + i64-4208978898528913939: + op: "7" + children: [] + eclass: i64-4208978898528913939 + cost: 0 + Num-4208978898528913939: + op: Num + children: + - i64-4208978898528913939 + eclass: "6447" + cost: 1 + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + Num-0: + op: Num + children: + - i64-0 + eclass: "7024" + cost: 1 + i64-2494203162052632771: + op: "-9" + children: [] + eclass: i64-2494203162052632771 + cost: 0 + Num-2494203162052632771: + op: Num + children: + - i64-2494203162052632771 + eclass: "4302" + cost: 1 + i64-1662802108035088514: + op: "-6" + children: [] + eclass: i64-1662802108035088514 + cost: 0 + Num-1662802108035088514: + op: Num + children: + - i64-1662802108035088514 + eclass: "4220" + cost: 1 + Mul-18323845791587980201: + op: Mul + children: + - Mul-18323845791587980201 + - Num-5871781006564002453 + eclass: "6459" + cost: 1 + Mul-189120489567122716: + op: Mul + children: + - Mul-18323845791587980201 + - Mul-189120489567122716 + eclass: "8018" + cost: 1 + Mul-7723703604166213683: + op: Mul + children: + - Num-5871781006564002453 + - Num-9249358851075372135 + eclass: "8025" + cost: 1 + Mul-5279350058056315082: + op: Mul + children: + - Mul-18323845791587980201 + - Mul-5279350058056315082 + eclass: "4060" + cost: 1 + Mul-18012535024065438898: + op: Mul + children: + - Num-5871781006564002453 + - Num-15069166229198181934 + eclass: "7572" + cost: 1 + Mul-14998241575517803173: + op: Mul + children: + - Mul-18323845791587980201 + - Num-4208978898528913939 + eclass: "6447" + cost: 1 + Mul-16045610397009127243: + op: Mul + children: + - Mul-16045610397009127243 + - Num-5871781006564002453 + eclass: "6447" + cost: 1 + Mul-9437948337517880230: + op: Mul + children: + - Mul-18323845791587980201 + - Mul-9437948337517880230 + eclass: "7024" + cost: 1 + Mul-11049130819194852504: + op: Mul + children: + - Num-5871781006564002453 + - Num-6703182060581546710 + eclass: "7878" + cost: 1 + Mul-7410091823103675689: + op: Mul + children: + - Mul-18323845791587980201 + - Num-14237765175180637677 + eclass: "3515" + cost: 1 + String-17627030480522586708: + op: "\"y\"" + children: [] + eclass: String-17627030480522586708 + cost: 0 + Var-17627030480522586708: + op: Var + children: + - String-17627030480522586708 + eclass: "7925" + cost: 1 + String-1133650922057509460: + op: "\"z\"" + children: [] + eclass: String-1133650922057509460 + cost: 0 + Var-1133650922057509460: + op: Var + children: + - String-1133650922057509460 + eclass: "6094" + cost: 1 + String-1976739436905633066: + op: "\"x\"" + children: [] + eclass: String-1976739436905633066 + cost: 0 + Var-1976739436905633066: + op: Var + children: + - String-1976739436905633066 + eclass: "5922" + cost: 1 +root_eclasses: [] +class_data: + "4837": + type: Expr + "1193": + type: Expr + "1214": + type: Expr + "6153": + type: Expr + "7836": + type: Expr + "3515": + type: Expr + "4246": + type: Expr + "7481": + type: Expr + "8025": + type: Expr + "7494": + type: Expr + "7505": + type: Expr + "7878": + type: Expr + "8179": + type: Expr + "2070": + type: Expr + "2076": + type: Expr + "8171": + type: Expr + "8276": + type: Expr + "8238": + type: Expr + "8018": + type: Expr + "8260": + type: Expr + "4060": + type: Expr + "8262": + type: Expr + "7572": + type: Expr + "8374": + type: Expr + "4302": + type: Expr + "7024": + type: Expr + "6447": + type: Expr + i64-9249358851075372135: + type: i64 + i64-14237765175180637677: + type: i64 + i64-15952540911656918845: + type: i64 + i64-6703182060581546710: + type: i64 + i64-15069166229198181934: + type: i64 + "6459": + type: Expr + i64-5871781006564002453: + type: i64 + i64-4208978898528913939: + type: i64 + i64-0: + type: i64 + i64-2494203162052632771: + type: i64 + "4220": + type: Expr + i64-1662802108035088514: + type: i64 + "7925": + type: Expr + String-17627030480522586708: + type: String + "6094": + type: Expr + String-1133650922057509460: + type: String + "5922": + type: Expr + String-1976739436905633066: + type: String + diff --git a/tests/snapshots/files__extraction_cost.snap b/tests/snapshots/files__extraction_cost.snap new file mode 100644 index 00000000..33a917f4 --- /dev/null +++ b/tests/snapshots/files__extraction_cost.snap @@ -0,0 +1,48 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + y-0: + op: y + children: [] + eclass: "1" + cost: 9223372036854776000 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + Num-5871781006564002453: + op: Num + children: + - i64-5871781006564002453 + eclass: "0" + cost: 5 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + Num-11743562013128004906: + op: Num + children: + - i64-11743562013128004906 + eclass: "1" + cost: 5 + x-0: + op: x + children: [] + eclass: "0" + cost: 9223372036854776000 +root_eclasses: [] +class_data: + "1": + type: Expr + "0": + type: Expr + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + diff --git a/tests/snapshots/files__f64.snap b/tests/snapshots/files__f64.snap new file mode 100644 index 00000000..967d470b --- /dev/null +++ b/tests/snapshots/files__f64.snap @@ -0,0 +1,8 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: {} +root_eclasses: [] +class_data: {} + diff --git a/tests/snapshots/files__fail_wrong_assertion.snap b/tests/snapshots/files__fail_wrong_assertion.snap new file mode 100644 index 00000000..11d07f91 --- /dev/null +++ b/tests/snapshots/files__fail_wrong_assertion.snap @@ -0,0 +1,43 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + g-7659469028595837896: + op: g + children: + - i64-5871781006564002453 + - i64-11743562013128004906 + eclass: i64-17615343019692007359 + cost: 1 + g-1081172882011038115: + op: g + children: + - i64-11743562013128004906 + - i64-17615343019692007359 + eclass: i64-17615343019692007359 + cost: 1 +root_eclasses: [] +class_data: + i64-17615343019692007359: + type: i64 + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + diff --git a/tests/snapshots/files__fusion.snap b/tests/snapshots/files__fusion.snap new file mode 100644 index 00000000..556099d4 --- /dev/null +++ b/tests/snapshots/files__fusion.snap @@ -0,0 +1,528 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + String-18060262198777227860: + op: "\"xs\"" + children: [] + eclass: String-18060262198777227860 + cost: 0 + V-18060262198777227860: + op: V + children: + - String-18060262198777227860 + eclass: "2" + cost: 1 + String-13720301450033637972: + op: "\"x\"" + children: [] + eclass: String-13720301450033637972 + cost: 0 + V-13720301450033637972: + op: V + children: + - String-13720301450033637972 + eclass: "5" + cost: 1 + String-7005431928621511913: + op: "\"xs'\"" + children: [] + eclass: String-7005431928621511913 + cost: 0 + V-7005431928621511913: + op: V + children: + - String-7005431928621511913 + eclass: "6" + cost: 1 + String-3810809562766010834: + op: "\"expr\"" + children: [] + eclass: String-3810809562766010834 + cost: 0 + V-3810809562766010834: + op: V + children: + - String-3810809562766010834 + eclass: "24" + cost: 1 + Nil-0: + op: Nil + children: [] + eclass: "101" + cost: 9223372036854776000 + TVar-11743562013128004906: + op: TVar + children: + - V-18060262198777227860 + eclass: "3" + cost: 1 + TVar-10912160959110460649: + op: TVar + children: + - V-13720301450033637972 + eclass: "7" + cost: 1 + TVar-16783941965674463102: + op: TVar + children: + - V-7005431928621511913 + eclass: "49" + cost: 1 + TVar-11795535641569197560: + op: TVar + children: + - V-3810809562766010834 + eclass: "61" + cost: 1 + expr-0: + op: expr + children: [] + eclass: "27" + cost: 9223372036854776000 + CaseSplit-8174635090940519406: + op: CaseSplit + children: + - TVar-11743562013128004906 + - Nil-0 + - Lam-4677487583189070622 + eclass: "22" + cost: 1 + CaseSplit-9181409863044170873: + op: CaseSplit + children: + - TVar-11795535641569197560 + - Nil-0 + - Lam-4677487583189070622 + eclass: "57" + cost: 1 + CaseSplit-2624649561418607192: + op: CaseSplit + children: + - TVar-16783941965674463102 + - Add-8776779094546230048 + eclass: "38" + cost: 1 + CaseSplit-17566480396286232489: + op: CaseSplit + children: + - TVar-11743562013128004906 + - Add-8776779094546230048 + eclass: "73" + cost: 1 + CaseSplit-17590509516134278934: + op: CaseSplit + children: + - CaseSplit-8060042155302638058 + eclass: "95" + cost: 1 + CaseSplit-8060042155302638058: + op: CaseSplit + children: + - Nil-0 + - CaseSplit-8060042155302638058 + eclass: "125" + cost: 1 + CaseSplit-7586085145431835331: + op: CaseSplit + children: + - Cons-14648560101110232501 + - CaseSplit-8060042155302638058 + eclass: "38" + cost: 1 + CaseSplit-10272543124075594023: + op: CaseSplit + children: + - CaseSplit-9181409863044170873 + - CaseSplit-8060042155302638058 + eclass: "27" + cost: 1 + CaseSplit-17596592337882102518: + op: CaseSplit + children: + - TVar-11743562013128004906 + - CaseSplit-8060042155302638058 + eclass: "13" + cost: 1 + CaseSplit-1587023052056676120: + op: CaseSplit + children: + - TVar-16783941965674463102 + - CaseSplit-8060042155302638058 + eclass: "86" + cost: 1 + App-8056734486120824105: + op: App + children: + - Lam-6900980260133847914 + - TVar-11795535641569197560 + eclass: "57" + cost: 1 + App-5232342984458018594: + op: App + children: + - Lam-5238178152098759400 + - TVar-11795535641569197560 + eclass: "27" + cost: 1 + App-12081349616150673854: + op: App + children: + - TVar-11795535641569197560 + eclass: "27" + cost: 1 + App-8721467349264269792: + op: App + children: + - Lam-11006011901780376545 + - TVar-16783941965674463102 + eclass: "38" + cost: 1 + App-5431905279782075200: + op: App + children: + - Lam-12824734895139043021 + - CaseSplit-9181409863044170873 + eclass: "27" + cost: 1 + App-12031140083481236602: + op: App + children: + - Lam-12824734895139043021 + - Cons-14648560101110232501 + eclass: "38" + cost: 1 + App-15512665184874991592: + op: App + children: + - Lam-12824734895139043021 + - TVar-16783941965674463102 + eclass: "86" + cost: 1 + App-14062669728514453496: + op: App + children: + - Lam-11349634672443786299 + - Cons-14648560101110232501 + eclass: "78" + cost: 1 + App-191963031911560398: + op: App + children: + - Lam-5238178152098759400 + - TVar-16783941965674463102 + eclass: "95" + cost: 1 + App-17121729568697132050: + op: App + children: + - TVar-16783941965674463102 + eclass: "95" + cost: 1 + Lam-9842753449732275747: + op: Lam + children: + - V-7005431928621511913 + - Add-2225161735365161093 + eclass: "11" + cost: 1 + Lam-6900980260133847914: + op: Lam + children: + - V-18060262198777227860 + - CaseSplit-8174635090940519406 + eclass: "15" + cost: 1 + Lam-5238178152098759400: + op: Lam + children: + - V-18060262198777227860 + eclass: "29" + cost: 1 + Lam-18312684875231296279: + op: Lam + children: + - V-7005431928621511913 + - CaseSplit-2624649561418607192 + eclass: "39" + cost: 1 + Lam-4677487583189070622: + op: Lam + children: + - V-13720301450033637972 + - Lam-541420970215710958 + eclass: "66" + cost: 1 + Lam-11006011901780376545: + op: Lam + children: + - V-18060262198777227860 + - CaseSplit-17566480396286232489 + eclass: "74" + cost: 1 + Lam-16390014624990244495: + op: Lam + children: + - V-7005431928621511913 + - App-14062669728514453496 + eclass: "79" + cost: 1 + Lam-11349634672443786299: + op: Lam + children: + - V-7005431928621511913 + - Add-14596586472669039847 + eclass: "71" + cost: 1 + Lam-12824734895139043021: + op: Lam + children: + - V-18060262198777227860 + - CaseSplit-17596592337882102518 + eclass: "103" + cost: 1 + Lam-541420970215710958: + op: Lam + children: + - V-7005431928621511913 + - Cons-14648560101110232501 + eclass: "20" + cost: 1 + Add-2225161735365161093: + op: Add + children: + - TVar-10912160959110460649 + - App-15512665184874991592 + eclass: "10" + cost: 1 + Add-17090789634721672618: + op: Add + children: + - Add-7421462573235197251 + - App-191963031911560398 + eclass: "38" + cost: 1 + Add-14596586472669039847: + op: Add + children: + - Add-7421462573235197251 + - CaseSplit-1587023052056676120 + eclass: "82" + cost: 1 + Add-7421462573235197251: + op: Add + children: + - TVar-10912160959110460649 + eclass: "94" + cost: 1 + Add-8153272554293456407: + op: Add + children: + - Add-7421462573235197251 + - App-8721467349264269792 + eclass: "78" + cost: 1 + Add-8776779094546230048: + op: Add + children: + - Add-7421462573235197251 + - CaseSplit-8060042155302638058 + eclass: "119" + cost: 1 + Cons-14648560101110232501: + op: Cons + children: + - Add-7421462573235197251 + eclass: "107" + cost: 1 + StringSet-0: + op: StringSet + children: [] + eclass: StringSet-0 + cost: 0 + freer-14289738803621830331: + op: freer + children: + - Lam-6900980260133847914 + eclass: StringSet-0 + cost: 1 + freer-1714775736476281168: + op: freer + children: [] + eclass: StringSet-0 + cost: 1 + StringSet-11743562013128004906: + op: StringSet + children: + - V-18060262198777227860 + eclass: StringSet-11743562013128004906 + cost: 0 + freer-17615343019692007359: + op: freer + children: + - TVar-11743562013128004906 + eclass: StringSet-11743562013128004906 + cost: 1 + StringSet-5040379952546458196: + op: StringSet + children: + - V-13720301450033637972 + eclass: StringSet-5040379952546458196 + cost: 0 + freer-4208978898528913939: + op: freer + children: + - TVar-10912160959110460649 + eclass: StringSet-5040379952546458196 + cost: 1 + StringSet-5871781006564002453: + op: StringSet + children: + - V-3810809562766010834 + eclass: StringSet-5871781006564002453 + cost: 0 + freer-10964134587551653303: + op: freer + children: + - CaseSplit-10272543124075594023 + eclass: StringSet-5871781006564002453 + cost: 1 + StringSet-10912160959110460649: + op: StringSet + children: + - V-13720301450033637972 + - V-7005431928621511913 + eclass: StringSet-10912160959110460649 + cost: 0 + freer-3377577844511369682: + op: freer + children: + - Add-2225161735365161093 + eclass: StringSet-10912160959110460649 + cost: 1 + freer-1766749364917473822: + op: freer + children: + - App-12031140083481236602 + eclass: StringSet-10912160959110460649 + cost: 1 + freer-6755155689022739364: + op: freer + children: + - Lam-541420970215710958 + eclass: StringSet-5040379952546458196 + cost: 1 + freer-9249358851075372135: + op: freer + children: + - Lam-9842753449732275747 + eclass: StringSet-5040379952546458196 + cost: 1 + freer-7638530371481476275: + op: freer + children: + - Lam-18312684875231296279 + eclass: StringSet-5040379952546458196 + cost: 1 +root_eclasses: [] +class_data: + "2": + type: Var + String-18060262198777227860: + type: String + "5": + type: Var + String-13720301450033637972: + type: String + "6": + type: Var + String-7005431928621511913: + type: String + "24": + type: Var + String-3810809562766010834: + type: String + "101": + type: Term + "3": + type: Term + "7": + type: Term + "49": + type: Term + "61": + type: Term + "27": + type: Term + "22": + type: Term + "66": + type: Term + "57": + type: Term + "38": + type: Term + "119": + type: Term + "120": + type: Term + "73": + type: Term + "95": + type: Term + "124": + type: Term + "125": + type: Term + "126": + type: Term + "107": + type: Term + "13": + type: Term + "86": + type: Term + "15": + type: Term + "29": + type: Term + "31": + type: Term + "74": + type: Term + "103": + type: Term + "78": + type: Term + "71": + type: Term + "11": + type: Term + "10": + type: Term + "28": + type: Term + "39": + type: Term + "20": + type: Term + "79": + type: Term + "82": + type: Term + "94": + type: Term + "16": + type: Term + StringSet-0: + type: StringSet + StringSet-11743562013128004906: + type: StringSet + StringSet-5040379952546458196: + type: StringSet + StringSet-5871781006564002453: + type: StringSet + StringSet-10912160959110460649: + type: StringSet + diff --git a/tests/snapshots/files__herbie.snap b/tests/snapshots/files__herbie.snap new file mode 100644 index 00000000..4e94d5e9 --- /dev/null +++ b/tests/snapshots/files__herbie.snap @@ -0,0 +1,125 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + String-13720301450033637972: + op: "\"x\"" + children: [] + eclass: String-13720301450033637972 + cost: 0 + Var-13720301450033637972: + op: Var + children: + - String-13720301450033637972 + eclass: "5" + cost: 1 + Rational-11743562013128004906: + op: (rational 2 1) + children: [] + eclass: Rational-11743562013128004906 + cost: 0 + r-two-0: + op: r-two + children: [] + eclass: Rational-11743562013128004906 + cost: 9223372036854776000 + one-0: + op: one + children: [] + eclass: "1" + cost: 9223372036854776000 + three-0: + op: three + children: [] + eclass: "3" + cost: 9223372036854776000 + neg-one-0: + op: neg-one + children: [] + eclass: "4" + cost: 9223372036854776000 + Rational-0: + op: (rational 0 1) + children: [] + eclass: Rational-0 + cost: 0 + Num-0: + op: Num + children: + - Rational-0 + eclass: "0" + cost: 1 + Rational-5871781006564002453: + op: (rational 1 1) + children: [] + eclass: Rational-5871781006564002453 + cost: 0 + Num-5871781006564002453: + op: Num + children: + - Rational-5871781006564002453 + eclass: "1" + cost: 1 + Num-11743562013128004906: + op: Num + children: + - Rational-11743562013128004906 + eclass: "2" + cost: 1 + Rational-17615343019692007359: + op: (rational 3 1) + children: [] + eclass: Rational-17615343019692007359 + cost: 0 + Num-17615343019692007359: + op: Num + children: + - Rational-17615343019692007359 + eclass: "3" + cost: 1 + r-one-0: + op: r-one + children: [] + eclass: Rational-5871781006564002453 + cost: 9223372036854776000 + zero-0: + op: zero + children: [] + eclass: "0" + cost: 9223372036854776000 + two-0: + op: two + children: [] + eclass: "2" + cost: 9223372036854776000 + x-0: + op: x + children: [] + eclass: "5" + cost: 9223372036854776000 +root_eclasses: [] +class_data: + "5": + type: Math + String-13720301450033637972: + type: String + Rational-11743562013128004906: + type: Rational + "1": + type: Math + "3": + type: Math + "4": + type: Math + "0": + type: Math + Rational-0: + type: Rational + Rational-5871781006564002453: + type: Rational + "2": + type: Math + Rational-17615343019692007359: + type: Rational + diff --git a/tests/snapshots/files__herbie_tutorial.snap b/tests/snapshots/files__herbie_tutorial.snap new file mode 100644 index 00000000..71cda2cd --- /dev/null +++ b/tests/snapshots/files__herbie_tutorial.snap @@ -0,0 +1,297 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + zero-0: + op: zero + children: [] + eclass: "0" + cost: 9223372036854776000 + String-7848520443469635519: + op: "\"x\"" + children: [] + eclass: String-7848520443469635519 + cost: 0 + Var-7848520443469635519: + op: Var + children: + - String-7848520443469635519 + eclass: "4" + cost: 1 + one-two-0: + op: one-two + children: [] + eclass: "3" + cost: 9223372036854776000 + x-0: + op: x + children: [] + eclass: "4" + cost: 9223372036854776000 + Add-7659469028595837896: + op: Add + children: + - Num-5871781006564002453 + - Num-11743562013128004906 + eclass: "3" + cost: 1 + Add-6267377405668604861: + op: Add + children: + - x-0 + - Num-5871781006564002453 + eclass: "5" + cost: 1 + Add-5996666920560749382: + op: Add + children: + - Num-5871781006564002453 + - Var-7848520443469635519 + eclass: "5" + cost: 1 + Add-7784354942592584825: + op: Add + children: + - Num-11743562013128004906 + - Num-5871781006564002453 + eclass: "3" + cost: 1 + Rational-0: + op: (rational 0 1) + children: [] + eclass: Rational-0 + cost: 0 + Num-0: + op: Num + children: + - Rational-0 + eclass: "0" + cost: 1 + Rational-5871781006564002453: + op: (rational 1 1) + children: [] + eclass: Rational-5871781006564002453 + cost: 0 + Num-5871781006564002453: + op: Num + children: + - Rational-5871781006564002453 + eclass: "1" + cost: 1 + Rational-11743562013128004906: + op: (rational 2 1) + children: [] + eclass: Rational-11743562013128004906 + cost: 0 + Num-11743562013128004906: + op: Num + children: + - Rational-11743562013128004906 + eclass: "2" + cost: 1 + Rational-17615343019692007359: + op: (rational 3 1) + children: [] + eclass: Rational-17615343019692007359 + cost: 0 + Num-17615343019692007359: + op: Num + children: + - Rational-17615343019692007359 + eclass: "3" + cost: 1 + Rational-5040379952546458196: + op: (rational 200 201) + children: [] + eclass: Rational-5040379952546458196 + cost: 0 + lower-bound-5040379952546458196: + op: lower-bound + children: + - x-0 + eclass: Rational-5040379952546458196 + cost: 1 + lower-bound-5871781006564002453: + op: lower-bound + children: + - Num-5871781006564002453 + eclass: Rational-5871781006564002453 + cost: 1 + lower-bound-0: + op: lower-bound + children: + - Num-0 + eclass: Rational-0 + cost: 1 + lower-bound-11743562013128004906: + op: lower-bound + children: + - Num-11743562013128004906 + eclass: Rational-11743562013128004906 + cost: 1 + Rational-10912160959110460649: + op: (rational 401 201) + children: [] + eclass: Rational-10912160959110460649 + cost: 0 + lower-bound-10912160959110460649: + op: lower-bound + children: + - Add-6267377405668604861 + eclass: Rational-10912160959110460649 + cost: 1 + lower-bound-17615343019692007359: + op: lower-bound + children: + - Add-7659469028595837896 + eclass: Rational-17615343019692007359 + cost: 1 + upper-bound-5040379952546458196: + op: upper-bound + children: + - Var-7848520443469635519 + eclass: Rational-5040379952546458196 + cost: 1 + upper-bound-5871781006564002453: + op: upper-bound + children: + - Num-5871781006564002453 + eclass: Rational-5871781006564002453 + cost: 1 + upper-bound-0: + op: upper-bound + children: + - zero-0 + eclass: Rational-0 + cost: 1 + upper-bound-11743562013128004906: + op: upper-bound + children: + - Num-11743562013128004906 + eclass: Rational-11743562013128004906 + cost: 1 + upper-bound-10912160959110460649: + op: upper-bound + children: + - Add-5996666920560749382 + eclass: Rational-10912160959110460649 + cost: 1 + upper-bound-17615343019692007359: + op: upper-bound + children: + - Add-7784354942592584825 + eclass: Rational-17615343019692007359 + cost: 1 + x1-0: + op: x1 + children: [] + eclass: "5" + cost: 9223372036854776000 + f64-10858178701590265856: + op: "1.0" + children: [] + eclass: f64-10858178701590265856 + cost: 0 + true-value-5871781006564002453: + op: true-value + children: + - Num-5871781006564002453 + eclass: f64-10858178701590265856 + cost: 1 + f64-7253992486310880885: + op: "0.9950248756218906" + children: [] + eclass: f64-7253992486310880885 + cost: 0 + true-value-5040379952546458196: + op: true-value + children: + - x-0 + eclass: f64-7253992486310880885 + cost: 1 + f64-10711811713700724736: + op: "3.0" + children: [] + eclass: f64-10711811713700724736 + cost: 0 + true-value-17615343019692007359: + op: true-value + children: + - Num-17615343019692007359 + eclass: f64-10711811713700724736 + cost: 1 + f64-9097074444360470000: + op: "1.9950248756218905" + children: [] + eclass: f64-9097074444360470000 + cost: 0 + true-value-10912160959110460649: + op: true-value + children: + - Add-6267377405668604861 + eclass: f64-9097074444360470000 + cost: 1 + f64-0: + op: "0.0" + children: [] + eclass: f64-0 + cost: 0 + true-value-0: + op: true-value + children: + - Num-0 + eclass: f64-0 + cost: 1 + f64-4611686018427387904: + op: "2.0" + children: [] + eclass: f64-4611686018427387904 + cost: 0 + true-value-11743562013128004906: + op: true-value + children: + - Num-11743562013128004906 + eclass: f64-4611686018427387904 + cost: 1 +root_eclasses: [] +class_data: + "0": + type: Math + "4": + type: Math + String-7848520443469635519: + type: String + "3": + type: Math + "1": + type: Math + "2": + type: Math + "5": + type: Math + Rational-0: + type: Rational + Rational-5871781006564002453: + type: Rational + Rational-11743562013128004906: + type: Rational + Rational-17615343019692007359: + type: Rational + Rational-5040379952546458196: + type: Rational + Rational-10912160959110460649: + type: Rational + f64-10858178701590265856: + type: f64 + f64-7253992486310880885: + type: f64 + f64-10711811713700724736: + type: f64 + f64-9097074444360470000: + type: f64 + f64-0: + type: f64 + f64-4611686018427387904: + type: f64 + diff --git a/tests/snapshots/files__include.snap b/tests/snapshots/files__include.snap new file mode 100644 index 00000000..d3753a21 --- /dev/null +++ b/tests/snapshots/files__include.snap @@ -0,0 +1,106 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + i64-5040379952546458196: + op: "4" + children: [] + eclass: i64-5040379952546458196 + cost: 0 + path-16275225025205966978: + op: path + children: + - i64-17615343019692007359 + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + path-7659469028595837896: + op: path + children: + - i64-5871781006564002453 + - i64-11743562013128004906 + eclass: Unit-0 + cost: 1 + path-1081172882011038115: + op: path + children: + - i64-11743562013128004906 + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 + path-13531250035159840349: + op: path + children: + - i64-5871781006564002453 + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 + path-15318938057191675792: + op: path + children: + - i64-11743562013128004906 + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 + path-5996666920560749382: + op: path + children: + - i64-5871781006564002453 + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 + edge-7659469028595837896: + op: edge + children: + - i64-5871781006564002453 + - i64-11743562013128004906 + eclass: Unit-0 + cost: 1 + edge-1081172882011038115: + op: edge + children: + - i64-11743562013128004906 + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 + edge-16275225025205966978: + op: edge + children: + - i64-17615343019692007359 + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 +root_eclasses: [] +class_data: + Unit-0: + type: Unit + i64-17615343019692007359: + type: i64 + i64-5040379952546458196: + type: i64 + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + diff --git a/tests/snapshots/files__intersection.snap b/tests/snapshots/files__intersection.snap new file mode 100644 index 00000000..b18a4a2a --- /dev/null +++ b/tests/snapshots/files__intersection.snap @@ -0,0 +1,185 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + intersect-5871781006564002453: + op: intersect + children: + - a1-0 + - a2-0 + eclass: "2" + cost: 1 + intersect-16275225025205966978: + op: intersect + children: + - Var-7415288725214994367 + - Var-16095210222702174143 + eclass: "5" + cost: 1 + intersect-10674154503749820004: + op: intersect + children: [] + eclass: "13" + cost: 1 + intersect-3970972443168273294: + op: intersect + children: [] + eclass: "14" + cost: 1 + intersect-4043884728723827569: + op: intersect + children: + - t1-0 + - t2-0 + eclass: "15" + cost: 1 + b1-0: + op: b1 + children: [] + eclass: "3" + cost: 9223372036854776000 + b2-0: + op: b2 + children: [] + eclass: "4" + cost: 9223372036854776000 + t1-0: + op: t1 + children: [] + eclass: "7" + cost: 9223372036854776000 + String-1133650922057509460: + op: "\"a1\"" + children: [] + eclass: String-1133650922057509460 + cost: 0 + Var-1133650922057509460: + op: Var + children: + - String-1133650922057509460 + eclass: "0" + cost: 1 + String-17627030480522586708: + op: "\"a2\"" + children: [] + eclass: String-17627030480522586708 + cost: 0 + Var-17627030480522586708: + op: Var + children: + - String-17627030480522586708 + eclass: "1" + cost: 1 + String-5052067413377037545: + op: "\"a3\"" + children: [] + eclass: String-5052067413377037545 + cost: 0 + Var-5052067413377037545: + op: Var + children: + - String-5052067413377037545 + eclass: "2" + cost: 1 + String-7415288725214994367: + op: "\"b1\"" + children: [] + eclass: String-7415288725214994367 + cost: 0 + Var-7415288725214994367: + op: Var + children: + - String-7415288725214994367 + eclass: "3" + cost: 1 + String-16095210222702174143: + op: "\"b2\"" + children: [] + eclass: String-16095210222702174143 + cost: 0 + Var-16095210222702174143: + op: Var + children: + - String-16095210222702174143 + eclass: "4" + cost: 1 + String-13287069731778996820: + op: "\"b3\"" + children: [] + eclass: String-13287069731778996820 + cost: 0 + Var-13287069731778996820: + op: Var + children: + - String-13287069731778996820 + eclass: "5" + cost: 1 + t2-0: + op: t2 + children: [] + eclass: "10" + cost: 9223372036854776000 + a1-0: + op: a1 + children: [] + eclass: "0" + cost: 9223372036854776000 + a2-0: + op: a2 + children: [] + eclass: "1" + cost: 9223372036854776000 + b3-0: + op: b3 + children: [] + eclass: "5" + cost: 9223372036854776000 + t3-0: + op: t3 + children: [] + eclass: "15" + cost: 9223372036854776000 +root_eclasses: [] +class_data: + "2": + type: Expr + "0": + type: Expr + "1": + type: Expr + "5": + type: Expr + "3": + type: Expr + "4": + type: Expr + "13": + type: Expr + "6": + type: Expr + "9": + type: Expr + "14": + type: Expr + "11": + type: Expr + "15": + type: Expr + "7": + type: Expr + "10": + type: Expr + String-1133650922057509460: + type: String + String-17627030480522586708: + type: String + String-5052067413377037545: + type: String + String-7415288725214994367: + type: String + String-16095210222702174143: + type: String + String-13287069731778996820: + type: String + diff --git a/tests/snapshots/files__interval.snap b/tests/snapshots/files__interval.snap new file mode 100644 index 00000000..eaed1eaf --- /dev/null +++ b/tests/snapshots/files__interval.snap @@ -0,0 +1,81 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Rational-0: + op: (rational -10 1) + children: [] + eclass: Rational-0 + cost: 0 + lo-0: + op: lo + children: + - Var-7848520443469635519 + eclass: Rational-0 + cost: 1 + Rational-11743562013128004906: + op: (rational 100 1) + children: [] + eclass: Rational-11743562013128004906 + cost: 0 + lo-5871781006564002453: + op: lo + children: + - e-0 + eclass: Rational-11743562013128004906 + cost: 1 + Mul-0: + op: Mul + children: + - x-0 + - Var-7848520443469635519 + eclass: "1" + cost: 1 + x-0: + op: x + children: [] + eclass: "0" + cost: 9223372036854776000 + String-7848520443469635519: + op: "\"x\"" + children: [] + eclass: String-7848520443469635519 + cost: 0 + Var-7848520443469635519: + op: Var + children: + - String-7848520443469635519 + eclass: "0" + cost: 1 + e-0: + op: e + children: [] + eclass: "1" + cost: 9223372036854776000 + Rational-5871781006564002453: + op: (rational 10 1) + children: [] + eclass: Rational-5871781006564002453 + cost: 0 + hi-0: + op: hi + children: + - x-0 + eclass: Rational-5871781006564002453 + cost: 1 +root_eclasses: [] +class_data: + Rational-0: + type: Rational + "0": + type: Math + Rational-11743562013128004906: + type: Rational + "1": + type: Math + String-7848520443469635519: + type: String + Rational-5871781006564002453: + type: Rational + diff --git a/tests/snapshots/files__knapsack.snap b/tests/snapshots/files__knapsack.snap new file mode 100644 index 00000000..2ed1c5cf --- /dev/null +++ b/tests/snapshots/files__knapsack.snap @@ -0,0 +1,602 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Max-12767849128788070565: + op: Max + children: + - Add-12767849128788070565 + - test2-0 + eclass: "34" + cost: 1 + Max-4257709447480710592: + op: Max + children: + - Add-4257709447480710592 + - Num-0 + eclass: "42" + cost: 1 + Max-7689025016205028330: + op: Max + children: + - Add-7689025016205028330 + - test2-0 + eclass: "114" + cost: 1 + Max-17858451687665171008: + op: Max + children: + - Add-17858451687665171008 + - Num-0 + eclass: "86" + cost: 1 + Max-16090861256706902788: + op: Max + children: + - Num-10080759905092916392 + - Num-15121139857639374588 + eclass: "21" + cost: 1 + Max-15155512945806973223: + op: Max + children: + - Max-15155512945806973223 + - Knap-8055065427700440304 + eclass: "19" + cost: 1 + Max-17068086881835555595: + op: Max + children: + - Knap-9625685651485996723 + - Max-4257709447480710592 + eclass: "21" + cost: 1 + Max-12964724298609410765: + op: Max + children: + - Add-6688173608459297496 + - Knap-8761580567721237632 + eclass: "31" + cost: 1 + Max-5881049328396882462: + op: Max + children: + - Add-2191806714279895063 + - Max-17858451687665171008 + eclass: "55" + cost: 1 + Max-11431069251142797786: + op: Max + children: + - Add-5881049328396882462 + - Num-3377577844511369682 + eclass: "57" + cost: 1 + Nil-0: + op: Nil + children: [] + eclass: "0" + cost: 9223372036854776000 + test4-0: + op: test4 + children: [] + eclass: "17" + cost: 9223372036854776000 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + Num-5871781006564002453: + op: Num + children: + - i64-5871781006564002453 + eclass: "34" + cost: 1 + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + Num-0: + op: Num + children: + - i64-0 + eclass: "139" + cost: 1 + i64-10912160959110460649: + op: "5" + children: [] + eclass: i64-10912160959110460649 + cost: 0 + Num-10912160959110460649: + op: Num + children: + - i64-10912160959110460649 + eclass: "42" + cost: 1 + i64-15329034371404145204: + op: "100" + children: [] + eclass: i64-15329034371404145204 + cost: 0 + Num-15329034371404145204: + op: Num + children: + - i64-15329034371404145204 + eclass: "114" + cost: 1 + i64-3377577844511369682: + op: "10" + children: [] + eclass: i64-3377577844511369682 + cost: 0 + Num-3377577844511369682: + op: Num + children: + - i64-3377577844511369682 + eclass: "86" + cost: 1 + i64-10080759905092916392: + op: "8" + children: [] + eclass: i64-10080759905092916392 + cost: 0 + Num-10080759905092916392: + op: Num + children: + - i64-10080759905092916392 + eclass: "19" + cost: 1 + i64-15121139857639374588: + op: "12" + children: [] + eclass: i64-15121139857639374588 + cost: 0 + Num-15121139857639374588: + op: Num + children: + - i64-15121139857639374588 + eclass: "21" + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + Num-11743562013128004906: + op: Num + children: + - i64-11743562013128004906 + eclass: "31" + cost: 1 + i64-6755155689022739364: + op: "20" + children: [] + eclass: i64-6755155689022739364 + cost: 0 + Num-6755155689022739364: + op: Num + children: + - i64-6755155689022739364 + eclass: "55" + cost: 1 + i64-10132733533534109046: + op: "30" + children: [] + eclass: i64-10132733533534109046 + cost: 0 + Num-10132733533534109046: + op: Num + children: + - i64-10132733533534109046 + eclass: "57" + cost: 1 + Add-12767849128788070565: + op: Add + children: + - Add-12767849128788070565 + - Num-0 + eclass: "34" + cost: 1 + Add-4257709447480710592: + op: Add + children: + - Knap-8055065427700440304 + - test2-0 + eclass: "42" + cost: 1 + Add-7689025016205028330: + op: Add + children: + - Add-7689025016205028330 + - Num-0 + eclass: "114" + cost: 1 + Add-17858451687665171008: + op: Add + children: + - Num-3377577844511369682 + - test2-0 + eclass: "86" + cost: 1 + Add-9897319166324813206: + op: Add + children: + - Num-15121139857639374588 + - Num-0 + eclass: "21" + cost: 1 + Add-2191806714279895063: + op: Add + children: + - Add-2191806714279895063 + - test2-0 + eclass: "55" + cost: 1 + Add-6688173608459297496: + op: Add + children: + - Knap-8761580567721237632 + - Max-12767849128788070565 + eclass: "31" + cost: 1 + Add-5881049328396882462: + op: Add + children: + - Max-5881049328396882462 + - Add-17858451687665171008 + eclass: "57" + cost: 1 + Add-8920934607236954797: + op: Add + children: + - Max-17858451687665171008 + - Max-7689025016205028330 + eclass: "78" + cost: 1 + Add-12350391042838145532: + op: Add + children: + - Knap-322684113549048133 + - Knap-322684113549048133 + eclass: "25" + cost: 1 + Cons-10904137648156522009: + op: Cons + children: + - i64-10912160959110460649 + - i64-10912160959110460649 + - Nil-0 + eclass: "1" + cost: 1 + Cons-17586302948671646652: + op: Cons + children: + - i64-15121139857639374588 + - i64-15121139857639374588 + - Cons-10904137648156522009 + eclass: "2" + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + Cons-10851723037774575768: + op: Cons + children: + - i64-17615343019692007359 + - i64-17615343019692007359 + - Cons-17586302948671646652 + eclass: "3" + cost: 1 + Cons-16775918654720524462: + op: Cons + children: + - i64-10912160959110460649 + - i64-10912160959110460649 + - Cons-10851723037774575768 + eclass: "4" + cost: 1 + i64-16783941965674463102: + op: "6" + children: [] + eclass: i64-16783941965674463102 + cost: 0 + Cons-17052732317115183341: + op: Cons + children: + - i64-16783941965674463102 + - i64-16783941965674463102 + - Nil-0 + eclass: "6" + cost: 1 + Cons-11855281505717577415: + op: Cons + children: + - i64-5871781006564002453 + - i64-5871781006564002453 + - Nil-0 + eclass: "8" + cost: 1 + Cons-1774521600624661023: + op: Cons + children: + - i64-5871781006564002453 + - i64-5871781006564002453 + - Cons-11855281505717577415 + eclass: "9" + cost: 1 + Cons-14349484667770210186: + op: Cons + children: + - i64-5871781006564002453 + - i64-5871781006564002453 + - Cons-1774521600624661023 + eclass: "10" + cost: 1 + i64-5040379952546458196: + op: "4" + children: [] + eclass: i64-5040379952546458196 + cost: 0 + Cons-13999161699983863607: + op: Cons + children: + - i64-5040379952546458196 + - i64-15329034371404145204 + - Nil-0 + eclass: "12" + cost: 1 + Cons-16717132857405712227: + op: Cons + children: + - i64-5871781006564002453 + - i64-3377577844511369682 + - Cons-13999161699983863607 + eclass: "13" + cost: 1 + test2-0: + op: test2 + children: [] + eclass: "139" + cost: 9223372036854776000 + test3-0: + op: test3 + children: [] + eclass: "11" + cost: 9223372036854776000 + i64-2546176790493825425: + op: "13" + children: [] + eclass: i64-2546176790493825425 + cost: 0 + Knap-5416706752957082784: + op: Knap + children: + - i64-2546176790493825425 + - Cons-16775918654720524462 + eclass: "5" + cost: 1 + Knap-18135825332793356696: + op: Knap + children: + - i64-10912160959110460649 + - Cons-14349484667770210186 + eclass: "11" + cost: 1 + i64-14289738803621830331: + op: "15" + children: [] + eclass: i64-14289738803621830331 + cost: 0 + Knap-10654884905055842184: + op: Knap + children: + - i64-14289738803621830331 + eclass: "17" + cost: 1 + Knap-12534754811337209722: + op: Knap + children: + - i64-10080759905092916392 + - Cons-10851723037774575768 + eclass: "19" + cost: 1 + Knap-9625685651485996723: + op: Knap + children: + - i64-2546176790493825425 + - Cons-10851723037774575768 + eclass: "21" + cost: 1 + Knap-322684113549048133: + op: Knap + children: + - i64-17615343019692007359 + eclass: "24" + cost: 1 + Knap-17304424278775812439: + op: Knap + children: + - i64-10912160959110460649 + - Cons-1774521600624661023 + eclass: "31" + cost: 1 + Knap-8761580567721237632: + op: Knap + children: + - i64-5040379952546458196 + - Cons-11855281505717577415 + eclass: "34" + cost: 1 + Knap-8055065427700440304: + op: Knap + children: + - i64-10912160959110460649 + - Cons-17586302948671646652 + eclass: "42" + cost: 1 + Knap-626098628404118446: + op: Knap + children: + - i64-14289738803621830331 + eclass: "53" + cost: 1 + Unwrap-6807129317463932018: + op: Unwrap + children: + - Num-10912160959110460649 + eclass: i64-10912160959110460649 + cost: 1 + Unwrap-15173113486080567242: + op: Unwrap + children: + - Add-12767849128788070565 + eclass: i64-5871781006564002453 + cost: 1 + Unwrap-4520820669176069863: + op: Unwrap + children: + - test2-0 + eclass: i64-0 + cost: 1 + Unwrap-6911076574346317326: + op: Unwrap + children: + - Num-3377577844511369682 + eclass: i64-3377577844511369682 + cost: 1 + Unwrap-5300248094752421466: + op: Unwrap + children: + - Num-15329034371404145204 + eclass: i64-15329034371404145204 + cost: 1 + Unwrap-883374682458736911: + op: Unwrap + children: + - Max-15155512945806973223 + eclass: i64-10080759905092916392 + cost: 1 + Unwrap-12626936695586741817: + op: Unwrap + children: + - Knap-9625685651485996723 + eclass: i64-15121139857639374588 + cost: 1 + Unwrap-16004514540098111499: + op: Unwrap + children: + - Add-6688173608459297496 + eclass: i64-11743562013128004906 + cost: 1 + Unwrap-9353306107957757443: + op: Unwrap + children: + - Num-6755155689022739364 + eclass: i64-6755155689022739364 + cost: 1 + Unwrap-2650124047376210733: + op: Unwrap + children: + - Add-5881049328396882462 + eclass: i64-10132733533534109046 + cost: 1 +root_eclasses: [] +class_data: + "34": + type: expr + "139": + type: expr + "42": + type: expr + "114": + type: expr + "86": + type: expr + "21": + type: expr + "19": + type: expr + "31": + type: expr + "55": + type: expr + "57": + type: expr + "0": + type: objects + "17": + type: expr + i64-5871781006564002453: + type: i64 + i64-0: + type: i64 + i64-10912160959110460649: + type: i64 + i64-15329034371404145204: + type: i64 + i64-3377577844511369682: + type: i64 + i64-10080759905092916392: + type: i64 + i64-15121139857639374588: + type: i64 + i64-11743562013128004906: + type: i64 + i64-6755155689022739364: + type: i64 + i64-10132733533534109046: + type: i64 + "78": + type: expr + "25": + type: expr + "24": + type: expr + "1": + type: objects + "2": + type: objects + "3": + type: objects + i64-17615343019692007359: + type: i64 + "4": + type: objects + "6": + type: objects + i64-16783941965674463102: + type: i64 + "8": + type: objects + "9": + type: objects + "10": + type: objects + "12": + type: objects + i64-5040379952546458196: + type: i64 + "13": + type: objects + "11": + type: expr + "5": + type: expr + i64-2546176790493825425: + type: i64 + i64-14289738803621830331: + type: i64 + "16": + type: objects + "15": + type: objects + "53": + type: expr + "14": + type: objects + diff --git a/tests/snapshots/files__lambda.snap b/tests/snapshots/files__lambda.snap new file mode 100644 index 00000000..b6ab8889 --- /dev/null +++ b/tests/snapshots/files__lambda.snap @@ -0,0 +1,22 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + False-0: + op: "False" + children: [] + eclass: "1" + cost: 9223372036854776000 + True-0: + op: "True" + children: [] + eclass: "0" + cost: 9223372036854776000 +root_eclasses: [] +class_data: + "1": + type: Value + "0": + type: Value + diff --git a/tests/snapshots/files__levenshtein_distance.snap b/tests/snapshots/files__levenshtein_distance.snap new file mode 100644 index 00000000..913da745 --- /dev/null +++ b/tests/snapshots/files__levenshtein_distance.snap @@ -0,0 +1,489 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + IntentionStr-0: + op: IntentionStr + children: [] + eclass: "17" + cost: 9223372036854776000 + ExecutionStr-0: + op: ExecutionStr + children: [] + eclass: "22" + cost: 9223372036854776000 + Length-12626936695586741817: + op: Length + children: [] + eclass: "291" + cost: 1 + Length-0: + op: Length + children: [] + eclass: "172" + cost: 1 + Length-15952540911656918845: + op: Length + children: [] + eclass: "126" + cost: 1 + Length-16783941965674463102: + op: Length + children: [] + eclass: "126" + cost: 1 + Length-5871781006564002453: + op: Length + children: [] + eclass: "126" + cost: 1 + Length-6755155689022739364: + op: Length + children: [] + eclass: "236" + cost: 1 + Length-14289738803621830331: + op: Length + children: [] + eclass: "236" + cost: 1 + Length-8417957797057827878: + op: Length + children: [] + eclass: "212" + cost: 1 + Length-883374682458736911: + op: Length + children: [] + eclass: "212" + cost: 1 + Length-4208978898528913939: + op: Length + children: [] + eclass: "86" + cost: 1 + HorseStr-0: + op: HorseStr + children: [] + eclass: "5" + cost: 9223372036854776000 + i64-10080759905092916392: + op: "8" + children: [] + eclass: i64-10080759905092916392 + cost: 0 + Num-10080759905092916392: + op: Num + children: + - i64-10080759905092916392 + eclass: "291" + cost: 1 + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + Num-0: + op: Num + children: + - i64-0 + eclass: "172" + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + Num-5871781006564002453: + op: Num + children: + - i64-5871781006564002453 + eclass: "126" + cost: 1 + i64-4208978898528913939: + op: "7" + children: [] + eclass: i64-4208978898528913939 + cost: 0 + Num-4208978898528913939: + op: Num + children: + - i64-4208978898528913939 + eclass: "236" + cost: 1 + i64-16783941965674463102: + op: "6" + children: [] + eclass: i64-16783941965674463102 + cost: 0 + Num-16783941965674463102: + op: Num + children: + - i64-16783941965674463102 + eclass: "212" + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + Num-11743562013128004906: + op: Num + children: + - i64-11743562013128004906 + eclass: "86" + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + Num-17615343019692007359: + op: Num + children: + - i64-17615343019692007359 + eclass: "41" + cost: 1 + i64-5040379952546458196: + op: "4" + children: [] + eclass: i64-5040379952546458196 + cost: 0 + Num-5040379952546458196: + op: Num + children: + - i64-5040379952546458196 + eclass: "35" + cost: 1 + i64-10912160959110460649: + op: "5" + children: [] + eclass: i64-10912160959110460649 + cost: 0 + Num-10912160959110460649: + op: Num + children: + - i64-10912160959110460649 + eclass: "24" + cost: 1 + Add-12513083199194630299: + op: Add + children: + - Min-8555131253702428606 + - Min-5385447922955829540 + eclass: "126" + cost: 1 + Add-11941550287383049312: + op: Add + children: + - Min-7366768035319609182 + - Num-5040379952546458196 + eclass: "24" + cost: 1 + Add-5653980253289505627: + op: Add + children: + - EditDist-17918757534547077672 + - EditDist-5073083982293673030 + eclass: "291" + cost: 1 + Add-12305188685429859683: + op: Add + children: + - Length-15952540911656918845 + - Min-12575071639800866444 + eclass: "236" + cost: 1 + Add-9343399868448031233: + op: Add + children: + - Length-16783941965674463102 + - Length-5871781006564002453 + eclass: "86" + cost: 1 + Add-14279832564112104121: + op: Add + children: + - Num-5871781006564002453 + - Min-13153029961237770003 + eclass: "41" + cost: 1 + Add-15319128131894418994: + op: Add + children: + - Add-12513083199194630299 + - Num-17615343019692007359 + eclass: "35" + cost: 1 + Add-1029389328272588663: + op: Add + children: + - Min-3618698558038355718 + - Num-10912160959110460649 + eclass: "212" + cost: 1 + Min-11700490240027734953: + op: Min + children: + - EditDist-0 + - Min-8555131253702428606 + - Min-7366768035319609182 + eclass: "172" + cost: 1 + Min-12575071639800866444: + op: Min + children: + - Length-14289738803621830331 + - Length-883374682458736911 + - Length-12626936695586741817 + eclass: "212" + cost: 1 + Min-10304266648268463668: + op: Min + children: + - Length-4208978898528913939 + - Num-11743562013128004906 + - Add-9343399868448031233 + eclass: "86" + cost: 1 + Min-5385447922955829540: + op: Min + children: + - EditDist-17918757534547077672 + - Min-10304266648268463668 + - EditDist-2776679019793341463 + eclass: "172" + cost: 1 + Min-3618698558038355718: + op: Min + children: + - Length-16783941965674463102 + - Min-13153029961237770003 + - Min-12581497049426189016 + eclass: "126" + cost: 1 + Min-8555131253702428606: + op: Min + children: + - Num-5871781006564002453 + - Length-4208978898528913939 + - Add-12513083199194630299 + eclass: "126" + cost: 1 + Min-7366768035319609182: + op: Min + children: + - Min-8555131253702428606 + - Min-7366768035319609182 + - Num-11743562013128004906 + eclass: "126" + cost: 1 + Min-17319954900913062239: + op: Min + children: + - EditDist-17918757534547077672 + - EditDist-10113463934840131226 + - Add-9343399868448031233 + eclass: "172" + cost: 1 + Min-13153029961237770003: + op: Min + children: + - Min-13153029961237770003 + - Add-14279832564112104121 + - Min-12581497049426189016 + eclass: "86" + cost: 1 + Min-12581497049426189016: + op: Min + children: + - Num-11743562013128004906 + - Test1-0 + - Num-17615343019692007359 + eclass: "86" + cost: 1 + EditDist-6695677834520422103: + op: EditDist + children: + - IntentionStr-0 + - ExecutionStr-0 + eclass: "24" + cost: 1 + EditDist-14395355118924599440: + op: EditDist + children: [] + eclass: "212" + cost: 1 + EditDist-5073083982293673030: + op: EditDist + children: [] + eclass: "236" + cost: 1 + EditDist-12626936695586741817: + op: EditDist + children: [] + eclass: "291" + cost: 1 + EditDist-0: + op: EditDist + children: [] + eclass: "172" + cost: 1 + EditDist-7889971257895353934: + op: EditDist + children: [] + eclass: "172" + cost: 1 + EditDist-2776679019793341463: + op: EditDist + children: [] + eclass: "172" + cost: 1 + EditDist-8523574112360596987: + op: EditDist + children: [] + eclass: "172" + cost: 1 + EditDist-10113463934840131226: + op: EditDist + children: [] + eclass: "172" + cost: 1 + EditDist-17918757534547077672: + op: EditDist + children: [] + eclass: "126" + cost: 1 + Unwrap-13822153148692634652: + op: Unwrap + children: + - EditDist-0 + eclass: i64-0 + cost: 1 + Unwrap-11587818128845965151: + op: Unwrap + children: + - Add-5653980253289505627 + eclass: i64-10080759905092916392 + cost: 1 + Unwrap-1974643878682244438: + op: Unwrap + children: + - Length-16783941965674463102 + eclass: i64-5871781006564002453 + cost: 1 + Unwrap-2234512020888207708: + op: Unwrap + children: + - Add-12305188685429859683 + eclass: i64-4208978898528913939 + cost: 1 + Unwrap-8885720453028561764: + op: Unwrap + children: + - Add-1029389328272588663 + eclass: i64-16783941965674463102 + cost: 1 + Unwrap-6911076574346317326: + op: Unwrap + children: + - Add-9343399868448031233 + eclass: i64-11743562013128004906 + cost: 1 + Unwrap-935348310899929565: + op: Unwrap + children: + - Add-14279832564112104121 + eclass: i64-17615343019692007359 + cost: 1 + Unwrap-2598150418935018079: + op: Unwrap + children: + - Num-5040379952546458196 + eclass: i64-5040379952546458196 + cost: 1 + Unwrap-11795535641569197560: + op: Unwrap + children: + - EditDist-6695677834520422103 + eclass: i64-10912160959110460649 + cost: 1 + Test1-0: + op: Test1 + children: [] + eclass: "41" + cost: 9223372036854776000 +root_eclasses: [] +class_data: + "17": + type: str + "22": + type: str + "291": + type: expr + "21": + type: str + "172": + type: expr + "0": + type: str + "126": + type: expr + "9": + type: str + "6": + type: str + "1": + type: str + "236": + type: expr + "20": + type: str + "15": + type: str + "212": + type: expr + "14": + type: str + "19": + type: str + "86": + type: expr + "7": + type: str + "5": + type: str + i64-10080759905092916392: + type: i64 + i64-0: + type: i64 + i64-5871781006564002453: + type: i64 + i64-4208978898528913939: + type: i64 + i64-16783941965674463102: + type: i64 + i64-11743562013128004906: + type: i64 + "41": + type: expr + i64-17615343019692007359: + type: i64 + "35": + type: expr + i64-5040379952546458196: + type: i64 + "24": + type: expr + i64-10912160959110460649: + type: i64 + "10": + type: str + "12": + type: str + "11": + type: str + "18": + type: str + diff --git a/tests/snapshots/files__math.snap b/tests/snapshots/files__math.snap new file mode 100644 index 00000000..22a49764 --- /dev/null +++ b/tests/snapshots/files__math.snap @@ -0,0 +1,89 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + String-5052067413377037545: + op: "\"a\"" + children: [] + eclass: String-5052067413377037545 + cost: 0 + Var-5052067413377037545: + op: Var + children: + - String-5052067413377037545 + eclass: "1" + cost: 1 + Add-10912160959110460649: + op: Add + children: + - Const-0 + - Sub-5996666920560749382 + eclass: "6" + cost: 1 + Mul-8740641910606876011: + op: Mul + children: + - Sub-1912573936028582372 + - Var-5052067413377037545 + eclass: "4" + cost: 1 + Rational-0: + op: (rational 1 1) + children: [] + eclass: Rational-0 + cost: 0 + Const-0: + op: Const + children: + - Rational-0 + eclass: "0" + cost: 1 + Rational-5871781006564002453: + op: (rational 2 1) + children: [] + eclass: Rational-5871781006564002453 + cost: 0 + Const-5871781006564002453: + op: Const + children: + - Rational-5871781006564002453 + eclass: "2" + cost: 1 + Sub-1912573936028582372: + op: Sub + children: + - Const-5871781006564002453 + - Const-0 + eclass: "3" + cost: 1 + Sub-5996666920560749382: + op: Sub + children: + - Var-5052067413377037545 + - Mul-8740641910606876011 + eclass: "5" + cost: 1 +root_eclasses: [] +class_data: + "1": + type: Math + String-5052067413377037545: + type: String + "6": + type: Math + "0": + type: Math + "5": + type: Math + "4": + type: Math + "3": + type: Math + Rational-0: + type: Rational + "2": + type: Math + Rational-5871781006564002453: + type: Rational + diff --git a/tests/snapshots/files__matrix.snap b/tests/snapshots/files__matrix.snap new file mode 100644 index 00000000..b83a08bf --- /dev/null +++ b/tests/snapshots/files__matrix.snap @@ -0,0 +1,252 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Kron-18295084334957702260: + op: Kron + children: + - MMul-2045059113437825509 + - MMul-9274558654761462362 + eclass: "10" + cost: 1 + Kron-7916840120001827962: + op: Kron + children: + - Id-3429551472952562336 + - B-0 + eclass: "39" + cost: 1 + Kron-14865532862005139924: + op: Kron + children: + - MMul-2045059113437825509 + - Id-9301332479516564789 + eclass: "41" + cost: 1 + Kron-11346391592954390298: + op: Kron + children: + - MMul-9683589484919301784 + - MMul-17323788914821161860 + eclass: "60" + cost: 1 + Kron-8959473804624910437: + op: Kron + children: + - Id-16108461796980496807 + - C-0 + eclass: "69" + cost: 1 + m-0: + op: m + children: [] + eclass: "33" + cost: 9223372036854776000 + B-0: + op: B + children: [] + eclass: "26" + cost: 9223372036854776000 + C-0: + op: C + children: [] + eclass: "5" + cost: 9223372036854776000 + Times-16173041864095337072: + op: Times + children: + - NamedDim-5485299131631678697 + - NamedDim-5485299131631678697 + eclass: "78" + cost: 1 + Times-4775599672430715124: + op: Times + children: + - n-0 + - m-0 + eclass: "77" + cost: 1 + Times-10616345707667886544: + op: Times + children: + - NamedDim-13708613989203058623 + - NamedDim-9813572419544689236 + eclass: "77" + cost: 1 + MMul-17860948738465144212: + op: MMul + children: + - Kron-7916840120001827962 + - Kron-14865532862005139924 + eclass: "10" + cost: 1 + MMul-2045059113437825509: + op: MMul + children: + - Id-3429551472952562336 + - MMul-2045059113437825509 + eclass: "25" + cost: 1 + MMul-9274558654761462362: + op: MMul + children: + - MMul-9274558654761462362 + - Id-9301332479516564789 + eclass: "26" + cost: 1 + MMul-17323788914821161860: + op: MMul + children: + - Id-9301332479516564789 + - MMul-17323788914821161860 + eclass: "58" + cost: 1 + MMul-9683589484919301784: + op: MMul + children: + - Id-3429551472952562336 + - MMul-9683589484919301784 + eclass: "48" + cost: 1 + MMul-1960381455249418021: + op: MMul + children: + - Kron-7916840120001827962 + - Kron-11346391592954390298 + eclass: "39" + cost: 1 + MMul-9103629317315635186: + op: MMul + children: + - MMul-3283821939192825387 + - Kron-14865532862005139924 + eclass: "41" + cost: 1 + MMul-3283821939192825387: + op: MMul + children: + - MMul-3283821939192825387 + - Kron-11346391592954390298 + eclass: "60" + cost: 1 + MMul-1445829347140181091: + op: MMul + children: + - Kron-8959473804624910437 + - MMul-9103629317315635186 + eclass: "70" + cost: 1 + MMul-7265636725262990890: + op: MMul + children: + - Kron-8959473804624910437 + - MMul-3283821939192825387 + eclass: "73" + cost: 1 + ex1-0: + op: ex1 + children: [] + eclass: "10" + cost: 9223372036854776000 + String-9813572419544689236: + op: "\"n\"" + children: [] + eclass: String-9813572419544689236 + cost: 0 + NamedDim-9813572419544689236: + op: NamedDim + children: + - String-9813572419544689236 + eclass: "32" + cost: 1 + String-13708613989203058623: + op: "\"m\"" + children: [] + eclass: String-13708613989203058623 + cost: 0 + NamedDim-13708613989203058623: + op: NamedDim + children: + - String-13708613989203058623 + eclass: "33" + cost: 1 + String-5485299131631678697: + op: "\"p\"" + children: [] + eclass: String-5485299131631678697 + cost: 0 + NamedDim-5485299131631678697: + op: NamedDim + children: + - String-5485299131631678697 + eclass: "75" + cost: 1 + Id-3429551472952562336: + op: Id + children: + - NamedDim-9813572419544689236 + eclass: "48" + cost: 1 + Id-9301332479516564789: + op: Id + children: + - NamedDim-13708613989203058623 + eclass: "58" + cost: 1 + Id-16108461796980496807: + op: Id + children: + - NamedDim-5485299131631678697 + eclass: "68" + cost: 1 + n-0: + op: n + children: [] + eclass: "32" + cost: 9223372036854776000 +root_eclasses: [] +class_data: + "10": + type: MExpr + "25": + type: MExpr + "26": + type: MExpr + "39": + type: MExpr + "48": + type: MExpr + "41": + type: MExpr + "58": + type: MExpr + "60": + type: MExpr + "69": + type: MExpr + "68": + type: MExpr + "5": + type: MExpr + "33": + type: Dim + "78": + type: Dim + "75": + type: Dim + "77": + type: Dim + "32": + type: Dim + "70": + type: MExpr + "73": + type: MExpr + String-9813572419544689236: + type: String + String-13708613989203058623: + type: String + String-5485299131631678697: + type: String + diff --git a/tests/snapshots/files__merge_during_rebuild.snap b/tests/snapshots/files__merge_during_rebuild.snap new file mode 100644 index 00000000..46e22ba9 --- /dev/null +++ b/tests/snapshots/files__merge_during_rebuild.snap @@ -0,0 +1,91 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + x-0: + op: x + children: [] + eclass: "0" + cost: 9223372036854776000 + y-0: + op: y + children: [] + eclass: "1" + cost: 9223372036854776000 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + distance-5871781006564002453: + op: distance + children: + - Node-0 + - Node-5871781006564002453 + eclass: i64-5871781006564002453 + cost: 1 + a-0: + op: a + children: [] + eclass: "0" + cost: 9223372036854776000 + b-0: + op: b + children: [] + eclass: "1" + cost: 9223372036854776000 + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + Node-0: + op: Node + children: + - i64-0 + eclass: "0" + cost: 1 + Node-5871781006564002453: + op: Node + children: + - i64-5871781006564002453 + eclass: "1" + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + Node-11743562013128004906: + op: Node + children: + - i64-11743562013128004906 + eclass: "0" + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + Node-17615343019692007359: + op: Node + children: + - i64-17615343019692007359 + eclass: "1" + cost: 1 +root_eclasses: [] +class_data: + "0": + type: N + "1": + type: N + i64-5871781006564002453: + type: i64 + i64-0: + type: i64 + i64-11743562013128004906: + type: i64 + i64-17615343019692007359: + type: i64 + diff --git a/tests/snapshots/files__merge_saturates.snap b/tests/snapshots/files__merge_saturates.snap new file mode 100644 index 00000000..e6d4b28f --- /dev/null +++ b/tests/snapshots/files__merge_saturates.snap @@ -0,0 +1,155 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + bar-0: + op: bar + children: [] + eclass: i64-0 + cost: 1 + foo-0: + op: foo + children: [] + eclass: i64-0 + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + baz-11743562013128004906: + op: baz + children: + - i64-11743562013128004906 + eclass: i64-0 + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + baz-17615343019692007359: + op: baz + children: + - i64-17615343019692007359 + eclass: i64-0 + cost: 1 + i64-5040379952546458196: + op: "4" + children: [] + eclass: i64-5040379952546458196 + cost: 0 + baz-5040379952546458196: + op: baz + children: + - i64-5040379952546458196 + eclass: i64-0 + cost: 1 + i64-10912160959110460649: + op: "5" + children: [] + eclass: i64-10912160959110460649 + cost: 0 + baz-10912160959110460649: + op: baz + children: + - i64-10912160959110460649 + eclass: i64-0 + cost: 1 + i64-16783941965674463102: + op: "6" + children: [] + eclass: i64-16783941965674463102 + cost: 0 + baz-16783941965674463102: + op: baz + children: + - i64-16783941965674463102 + eclass: i64-0 + cost: 1 + i64-4208978898528913939: + op: "7" + children: [] + eclass: i64-4208978898528913939 + cost: 0 + baz-4208978898528913939: + op: baz + children: + - i64-4208978898528913939 + eclass: i64-0 + cost: 1 + i64-10080759905092916392: + op: "8" + children: [] + eclass: i64-10080759905092916392 + cost: 0 + baz-10080759905092916392: + op: baz + children: + - i64-10080759905092916392 + eclass: i64-0 + cost: 1 + i64-15952540911656918845: + op: "9" + children: [] + eclass: i64-15952540911656918845 + cost: 0 + baz-15952540911656918845: + op: baz + children: + - i64-15952540911656918845 + eclass: i64-0 + cost: 1 + i64-3377577844511369682: + op: "10" + children: [] + eclass: i64-3377577844511369682 + cost: 0 + baz-3377577844511369682: + op: baz + children: + - i64-3377577844511369682 + eclass: i64-0 + cost: 1 + i64-9249358851075372135: + op: "11" + children: [] + eclass: i64-9249358851075372135 + cost: 0 + baz-9249358851075372135: + op: baz + children: + - i64-9249358851075372135 + eclass: i64-0 + cost: 1 +root_eclasses: [] +class_data: + i64-0: + type: i64 + i64-11743562013128004906: + type: i64 + i64-17615343019692007359: + type: i64 + i64-5040379952546458196: + type: i64 + i64-10912160959110460649: + type: i64 + i64-16783941965674463102: + type: i64 + i64-4208978898528913939: + type: i64 + i64-10080759905092916392: + type: i64 + i64-15952540911656918845: + type: i64 + i64-3377577844511369682: + type: i64 + i64-9249358851075372135: + type: i64 + diff --git a/tests/snapshots/files__name_resolution.snap b/tests/snapshots/files__name_resolution.snap new file mode 100644 index 00000000..e18f0e29 --- /dev/null +++ b/tests/snapshots/files__name_resolution.snap @@ -0,0 +1,117 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + b-0: + op: b + children: [] + eclass: "5" + cost: 9223372036854776000 + c-0: + op: c + children: [] + eclass: "5" + cost: 9223372036854776000 + zero-0: + op: zero + children: [] + eclass: "0" + cost: 9223372036854776000 + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + Num-0: + op: Num + children: + - i64-0 + eclass: "0" + cost: 1 + i64-4208978898528913939: + op: "7" + children: [] + eclass: i64-4208978898528913939 + cost: 0 + Num-4208978898528913939: + op: Num + children: + - i64-4208978898528913939 + eclass: "3" + cost: 1 + i64-15952540911656918845: + op: "9" + children: [] + eclass: i64-15952540911656918845 + cost: 0 + Num-15952540911656918845: + op: Num + children: + - i64-15952540911656918845 + eclass: "4" + cost: 1 + i64-1714775736476281168: + op: "16" + children: [] + eclass: i64-1714775736476281168 + cost: 0 + Num-1714775736476281168: + op: Num + children: + - i64-1714775736476281168 + eclass: "5" + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + Num-17615343019692007359: + op: Num + children: + - i64-17615343019692007359 + eclass: "2" + cost: 1 + a-0: + op: a + children: [] + eclass: "2" + cost: 9223372036854776000 + Add-16275225025205966978: + op: Add + children: + - Num-4208978898528913939 + - Num-15952540911656918845 + eclass: "5" + cost: 1 + Add-11743562013128004906: + op: Add + children: + - Num-0 + - a-0 + eclass: "2" + cost: 1 +root_eclasses: [] +class_data: + "5": + type: Math + "0": + type: Math + i64-0: + type: i64 + "3": + type: Math + i64-4208978898528913939: + type: i64 + "4": + type: Math + i64-15952540911656918845: + type: i64 + i64-1714775736476281168: + type: i64 + "2": + type: Math + i64-17615343019692007359: + type: i64 + diff --git a/tests/snapshots/files__path.snap b/tests/snapshots/files__path.snap new file mode 100644 index 00000000..d3753a21 --- /dev/null +++ b/tests/snapshots/files__path.snap @@ -0,0 +1,106 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + i64-5040379952546458196: + op: "4" + children: [] + eclass: i64-5040379952546458196 + cost: 0 + path-16275225025205966978: + op: path + children: + - i64-17615343019692007359 + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + path-7659469028595837896: + op: path + children: + - i64-5871781006564002453 + - i64-11743562013128004906 + eclass: Unit-0 + cost: 1 + path-1081172882011038115: + op: path + children: + - i64-11743562013128004906 + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 + path-13531250035159840349: + op: path + children: + - i64-5871781006564002453 + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 + path-15318938057191675792: + op: path + children: + - i64-11743562013128004906 + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 + path-5996666920560749382: + op: path + children: + - i64-5871781006564002453 + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 + edge-7659469028595837896: + op: edge + children: + - i64-5871781006564002453 + - i64-11743562013128004906 + eclass: Unit-0 + cost: 1 + edge-1081172882011038115: + op: edge + children: + - i64-11743562013128004906 + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 + edge-16275225025205966978: + op: edge + children: + - i64-17615343019692007359 + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 +root_eclasses: [] +class_data: + Unit-0: + type: Unit + i64-17615343019692007359: + type: i64 + i64-5040379952546458196: + type: i64 + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + diff --git a/tests/snapshots/files__path_union.snap b/tests/snapshots/files__path_union.snap new file mode 100644 index 00000000..d4e94e1f --- /dev/null +++ b/tests/snapshots/files__path_union.snap @@ -0,0 +1,151 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + path-7659469028595837896: + op: path + children: + - mk-11743562013128004906 + - mk-10912160959110460649 + eclass: Unit-0 + cost: 1 + path-5871781006564002453: + op: path + children: + - mk-5871781006564002453 + - mk-11743562013128004906 + eclass: Unit-0 + cost: 1 + path-15318938057191675792: + op: path + children: + - mk-17615343019692007359 + - mk-16783941965674463102 + eclass: Unit-0 + cost: 1 + path-5996666920560749382: + op: path + children: + - mk-11743562013128004906 + - mk-16783941965674463102 + eclass: Unit-0 + cost: 1 + path-11743562013128004906: + op: path + children: + - mk-5871781006564002453 + - mk-10912160959110460649 + eclass: Unit-0 + cost: 1 + path-5040379952546458196: + op: path + children: + - mk-5871781006564002453 + - mk-16783941965674463102 + eclass: Unit-0 + cost: 1 + edge-5871781006564002453: + op: edge + children: + - mk-5871781006564002453 + - mk-11743562013128004906 + eclass: Unit-0 + cost: 1 + edge-7659469028595837896: + op: edge + children: + - mk-11743562013128004906 + - mk-17615343019692007359 + eclass: Unit-0 + cost: 1 + edge-15318938057191675792: + op: edge + children: + - mk-10912160959110460649 + - mk-16783941965674463102 + eclass: Unit-0 + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + mk-5871781006564002453: + op: mk + children: + - i64-5871781006564002453 + eclass: "0" + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + mk-11743562013128004906: + op: mk + children: + - i64-11743562013128004906 + eclass: "1" + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + mk-17615343019692007359: + op: mk + children: + - i64-17615343019692007359 + eclass: "2" + cost: 1 + i64-16783941965674463102: + op: "6" + children: [] + eclass: i64-16783941965674463102 + cost: 0 + mk-16783941965674463102: + op: mk + children: + - i64-16783941965674463102 + eclass: "4" + cost: 1 + i64-10912160959110460649: + op: "5" + children: [] + eclass: i64-10912160959110460649 + cost: 0 + mk-10912160959110460649: + op: mk + children: + - i64-10912160959110460649 + eclass: "2" + cost: 1 +root_eclasses: [] +class_data: + Unit-0: + type: Unit + "1": + type: Node + "2": + type: Node + "0": + type: Node + "4": + type: Node + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + i64-17615343019692007359: + type: i64 + i64-16783941965674463102: + type: i64 + i64-10912160959110460649: + type: i64 + diff --git a/tests/snapshots/files__pathproof.snap b/tests/snapshots/files__pathproof.snap new file mode 100644 index 00000000..c0c63460 --- /dev/null +++ b/tests/snapshots/files__pathproof.snap @@ -0,0 +1,210 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + Edge-7784354942592584825: + op: Edge + children: + - i64-11743562013128004906 + - i64-5871781006564002453 + eclass: "0" + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + Edge-9572042964624420268: + op: Edge + children: + - i64-17615343019692007359 + - i64-11743562013128004906 + eclass: "1" + cost: 1 + Edge-13531250035159840349: + op: Edge + children: + - i64-5871781006564002453 + - i64-17615343019692007359 + eclass: "2" + cost: 1 + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + path-10179312976275314481: + op: path + children: + - i64-11743562013128004906 + - i64-5871781006564002453 + - Edge-7784354942592584825 + eclass: Unit-0 + cost: 1 + path-9064035015742740325: + op: path + children: + - i64-17615343019692007359 + - i64-11743562013128004906 + - Edge-9572042964624420268 + eclass: Unit-0 + cost: 1 + path-1628697029513552473: + op: path + children: + - i64-5871781006564002453 + - i64-17615343019692007359 + - Edge-13531250035159840349 + eclass: Unit-0 + cost: 1 + path-14534116445915336970: + op: path + children: + - i64-11743562013128004906 + - i64-17615343019692007359 + - Trans-13656135949156587278 + eclass: Unit-0 + cost: 1 + path-3462964494286593351: + op: path + children: + - i64-17615343019692007359 + - i64-5871781006564002453 + - Trans-2868860904042873558 + eclass: Unit-0 + cost: 1 + path-1503811115516805544: + op: path + children: + - i64-5871781006564002453 + - i64-11743562013128004906 + - Trans-6828067974578293639 + eclass: Unit-0 + cost: 1 + path-12798402052324694181: + op: path + children: + - i64-11743562013128004906 + - i64-11743562013128004906 + - Trans-2743974990046126629 + eclass: Unit-0 + cost: 1 + path-3317139923175484801: + op: path + children: + - i64-17615343019692007359 + - i64-17615343019692007359 + - Trans-15443823971188422721 + eclass: Unit-0 + cost: 1 + path-1774521600624661023: + op: path + children: + - i64-5871781006564002453 + - i64-5871781006564002453 + - Trans-5996666920560749382 + eclass: Unit-0 + cost: 1 + Trans-13656135949156587278: + op: Trans + children: + - i64-11743562013128004906 + - Edge-13531250035159840349 + eclass: "3" + cost: 1 + Trans-2868860904042873558: + op: Trans + children: + - i64-17615343019692007359 + - Edge-7784354942592584825 + eclass: "4" + cost: 1 + Trans-6828067974578293639: + op: Trans + children: + - i64-5871781006564002453 + - Edge-9572042964624420268 + eclass: "5" + cost: 1 + Trans-2743974990046126629: + op: Trans + children: + - i64-11743562013128004906 + - Trans-6828067974578293639 + eclass: "6" + cost: 1 + Trans-15443823971188422721: + op: Trans + children: + - i64-17615343019692007359 + - Trans-13656135949156587278 + eclass: "7" + cost: 1 + Trans-5996666920560749382: + op: Trans + children: + - i64-5871781006564002453 + - Trans-2868860904042873558 + eclass: "8" + cost: 1 + edge-7784354942592584825: + op: edge + children: + - i64-11743562013128004906 + - i64-5871781006564002453 + eclass: Unit-0 + cost: 1 + edge-9572042964624420268: + op: edge + children: + - i64-17615343019692007359 + - i64-11743562013128004906 + eclass: Unit-0 + cost: 1 + edge-13531250035159840349: + op: edge + children: + - i64-5871781006564002453 + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 +root_eclasses: [] +class_data: + "0": + type: Proof + i64-11743562013128004906: + type: i64 + i64-5871781006564002453: + type: i64 + "1": + type: Proof + i64-17615343019692007359: + type: i64 + "2": + type: Proof + Unit-0: + type: Unit + "3": + type: Proof + "4": + type: Proof + "5": + type: Proof + "6": + type: Proof + "7": + type: Proof + "8": + type: Proof + diff --git a/tests/snapshots/files__points_to.snap b/tests/snapshots/files__points_to.snap new file mode 100644 index 00000000..3bd26097 --- /dev/null +++ b/tests/snapshots/files__points_to.snap @@ -0,0 +1,151 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + B-0: + op: B + children: [] + eclass: "1" + cost: 9223372036854776000 + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + String-5485299131631678697: + op: "\"o1\"" + children: [] + eclass: String-5485299131631678697 + cost: 0 + VarPointsTo-9932527350538244829: + op: VarPointsTo + children: + - String-5485299131631678697 + eclass: Unit-0 + cost: 1 + String-3508559694726045631: + op: "\"o2\"" + children: [] + eclass: String-3508559694726045631 + cost: 0 + VarPointsTo-17420663949869469555: + op: VarPointsTo + children: + - String-3508559694726045631 + - B-0 + eclass: Unit-0 + cost: 1 + String-14830577450429988734: + op: "\"o3\"" + children: [] + eclass: String-14830577450429988734 + cost: 0 + VarPointsTo-12836711084403263672: + op: VarPointsTo + children: + - String-14830577450429988734 + - B-0 + eclass: Unit-0 + cost: 1 + String-5052067413377037545: + op: "\"r\"" + children: [] + eclass: String-5052067413377037545 + cost: 0 + VarPointsTo-7787579480638031944: + op: VarPointsTo + children: + - String-5052067413377037545 + eclass: Unit-0 + cost: 1 + l2-0: + op: l2 + children: [] + eclass: "4" + cost: 9223372036854776000 + l3-0: + op: l3 + children: [] + eclass: "5" + cost: 9223372036854776000 + Store-1535405235853233058: + op: Store + children: + - String-3508559694726045631 + - Field-15673665965278112340 + - String-5485299131631678697 + eclass: "6" + cost: 1 + Assign-1793568275078127074: + op: Assign + children: + - String-14830577450429988734 + - String-3508559694726045631 + eclass: "5" + cost: 1 + l4-0: + op: l4 + children: [] + eclass: "6" + cost: 9223372036854776000 + String-15673665965278112340: + op: "\"f\"" + children: [] + eclass: String-15673665965278112340 + cost: 0 + Field-15673665965278112340: + op: Field + children: + - String-15673665965278112340 + eclass: "2" + cost: 1 + New-9932527350538244829: + op: New + children: + - String-5485299131631678697 + eclass: "3" + cost: 1 + New-17420663949869469555: + op: New + children: + - String-3508559694726045631 + - B-0 + eclass: "4" + cost: 1 + HeapPointsTo-12415972074627266193: + op: HeapPointsTo + children: + - B-0 + - Field-15673665965278112340 + eclass: Unit-0 + cost: 1 +root_eclasses: [] +class_data: + "1": + type: ClassT + Unit-0: + type: Unit + String-5485299131631678697: + type: String + "0": + type: ClassT + String-3508559694726045631: + type: String + String-14830577450429988734: + type: String + String-5052067413377037545: + type: String + "4": + type: Stmt + "5": + type: Stmt + "6": + type: Stmt + "2": + type: FieldT + String-15673665965278112340: + type: String + "3": + type: Stmt + diff --git a/tests/snapshots/files__primitives.snap b/tests/snapshots/files__primitives.snap new file mode 100644 index 00000000..967d470b --- /dev/null +++ b/tests/snapshots/files__primitives.snap @@ -0,0 +1,8 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: {} +root_eclasses: [] +class_data: {} + diff --git a/tests/snapshots/files__prims.snap b/tests/snapshots/files__prims.snap new file mode 100644 index 00000000..b93d4d72 --- /dev/null +++ b/tests/snapshots/files__prims.snap @@ -0,0 +1,276 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + i64-5535299385761720939: + op: "99999999" + children: [] + eclass: i64-5535299385761720939 + cost: 0 + infinity-0: + op: "infinity" + children: [] + eclass: i64-5535299385761720939 + cost: 9223372036854776000 + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + true-0: + op: "true" + children: [] + eclass: Unit-0 + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + vertex-included-5871781006564002453: + op: vertex-included + children: + - i64-5871781006564002453 + eclass: i64-5871781006564002453 + cost: 1 + i64-5040379952546458196: + op: "4" + children: [] + eclass: i64-5040379952546458196 + cost: 0 + vertex-included-5040379952546458196: + op: vertex-included + children: + - i64-5040379952546458196 + eclass: i64-5871781006564002453 + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + vertex-included-11743562013128004906: + op: vertex-included + children: + - i64-11743562013128004906 + eclass: i64-5871781006564002453 + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + vertex-included-17615343019692007359: + op: vertex-included + children: + - i64-17615343019692007359 + eclass: i64-5871781006564002453 + cost: 1 + current-iteration-0: + op: current-iteration + children: [] + eclass: i64-17615343019692007359 + cost: 1 + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + iteration-to-best-edge-0: + op: iteration-to-best-edge + children: + - i64-0 + eclass: "1" + cost: 1 + iteration-to-best-edge-5871781006564002453: + op: iteration-to-best-edge + children: + - i64-5871781006564002453 + eclass: "0" + cost: 1 + iteration-to-best-edge-11743562013128004906: + op: iteration-to-best-edge + children: + - i64-11743562013128004906 + eclass: "3" + cost: 1 + solution-3877830492085173579: + op: solution + children: + - i64-17615343019692007359 + - i64-5040379952546458196 + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 + solution-4591408876226341927: + op: solution + children: + - i64-5871781006564002453 + - i64-5040379952546458196 + - i64-5871781006564002453 + eclass: Unit-0 + cost: 1 + solution-5712790014045719483: + op: solution + children: + - i64-5871781006564002453 + - i64-11743562013128004906 + - i64-11743562013128004906 + eclass: Unit-0 + cost: 1 + iteration-to-best-edge-weight-0: + op: iteration-to-best-edge-weight + children: + - i64-0 + eclass: i64-5871781006564002453 + cost: 1 + iteration-to-best-edge-weight-5871781006564002453: + op: iteration-to-best-edge-weight + children: + - i64-5871781006564002453 + eclass: i64-11743562013128004906 + cost: 1 + iteration-to-best-edge-weight-11743562013128004906: + op: iteration-to-best-edge-weight + children: + - i64-11743562013128004906 + eclass: i64-17615343019692007359 + cost: 1 + iteration-to-best-edge-weight-17615343019692007359: + op: iteration-to-best-edge-weight + children: + - i64-17615343019692007359 + eclass: i64-5535299385761720939 + cost: 1 + edge-in-mst-5871781006564002453: + op: edge-in-mst + children: + - Edge-12184509778494182535 + eclass: Unit-0 + cost: 1 + edge-in-mst-0: + op: edge-in-mst + children: + - Edge-3476130915693767771 + eclass: Unit-0 + cost: 1 + edge-in-mst-17615343019692007359: + op: edge-in-mst + children: + - Edge-14928484768540309164 + eclass: Unit-0 + cost: 1 + edge-exists-0: + op: edge-exists + children: + - iteration-to-best-edge-5871781006564002453 + eclass: Unit-0 + cost: 1 + edge-exists-5871781006564002453: + op: edge-exists + children: + - iteration-to-best-edge-0 + eclass: Unit-0 + cost: 1 + edge-exists-11743562013128004906: + op: edge-exists + children: + - Edge-6437614685926927011 + eclass: Unit-0 + cost: 1 + edge-exists-17615343019692007359: + op: edge-exists + children: + - iteration-to-best-edge-11743562013128004906 + eclass: Unit-0 + cost: 1 + Edge-5712790014045719483: + op: Edge + children: + - i64-5871781006564002453 + - i64-11743562013128004906 + - i64-11743562013128004906 + eclass: "0" + cost: 1 + Edge-4591408876226341927: + op: Edge + children: + - i64-5871781006564002453 + - i64-5040379952546458196 + - i64-5871781006564002453 + eclass: "1" + cost: 1 + Edge-13088382136126527480: + op: Edge + children: + - i64-11743562013128004906 + - i64-5040379952546458196 + - i64-11743562013128004906 + eclass: "2" + cost: 1 + Edge-3877830492085173579: + op: Edge + children: + - i64-17615343019692007359 + - i64-5040379952546458196 + - i64-17615343019692007359 + eclass: "3" + cost: 1 + Edge-6437614685926927011: + op: Edge + children: + - i64-5040379952546458196 + - i64-11743562013128004906 + - i64-11743562013128004906 + eclass: "2" + cost: 1 + Edge-3476130915693767771: + op: Edge + children: + - i64-11743562013128004906 + - i64-5871781006564002453 + - i64-11743562013128004906 + eclass: "0" + cost: 1 + Edge-14928484768540309164: + op: Edge + children: + - i64-5040379952546458196 + - i64-17615343019692007359 + - i64-17615343019692007359 + eclass: "3" + cost: 1 + Edge-12184509778494182535: + op: Edge + children: + - i64-5040379952546458196 + - i64-5871781006564002453 + - i64-5871781006564002453 + eclass: "1" + cost: 1 +root_eclasses: [] +class_data: + i64-5535299385761720939: + type: i64 + Unit-0: + type: Unit + i64-5871781006564002453: + type: i64 + i64-5040379952546458196: + type: i64 + i64-11743562013128004906: + type: i64 + i64-17615343019692007359: + type: i64 + "1": + type: edge + i64-0: + type: i64 + "0": + type: edge + "3": + type: edge + "2": + type: edge + diff --git a/tests/snapshots/files__proofs.snap b/tests/snapshots/files__proofs.snap new file mode 100644 index 00000000..02f22866 --- /dev/null +++ b/tests/snapshots/files__proofs.snap @@ -0,0 +1,497 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Child1-2598150418935018079: + op: Child1 + children: [] + eclass: "36" + cost: 100000 + Child1-8469931425499020532: + op: Child1 + children: + - Child2-12055403783775160830 + eclass: "67" + cost: 100000 + Child1-13770179520251441998: + op: Child1 + children: + - AstAdd-3683774522220528002 + eclass: "151" + cost: 100000 + Child1-3741393243599718260: + op: Child1 + children: + - Child2-12003430155333968176 + eclass: "165" + cost: 100000 + Child1-4312926155411299247: + op: Child1 + children: [] + eclass: "164" + cost: 100000 + Child1-9613174250163720713: + op: Child1 + children: + - AstAdd-16971738888365666495 + eclass: "66" + cost: 100000 + Child1-5248274466311228812: + op: Child1 + children: + - AstAdd-16872052778055009793 + eclass: "91" + cost: 100000 + Child1-16264382682304074769: + op: Child1 + children: + - AstAdd-1634549299562345488 + eclass: "140" + cost: 100000 + Child1-1091269196223507527: + op: Child1 + children: + - AstAdd-13756935163900948186 + eclass: "106" + cost: 100000 + Child1-1195216453105892835: + op: Child1 + children: + - Child1-13770179520251441998 + eclass: "152" + cost: 100000 + add2x-0: + op: add2x + children: [] + eclass: "36" + cost: 9223372036854776000 + PrfOf-16783941965674463102: + op: PrfOf + children: + - VarRep-7017119389452091262 + eclass: "5" + cost: 100000 + PrfOf-15952540911656918845: + op: PrfOf + children: [] + eclass: "8" + cost: 100000 + PrfOf-2546176790493825425: + op: PrfOf + children: [] + eclass: "12" + cost: 100000 + PrfOf-12626936695586741817: + op: PrfOf + children: [] + eclass: "20" + cost: 100000 + PrfOf-10964134587551653303: + op: PrfOf + children: [] + eclass: "26" + cost: 100000 + PrfOf-15173113486080567242: + op: PrfOf + children: [] + eclass: "33" + cost: 100000 + PrfOf-16887889222556848410: + op: PrfOf + children: [] + eclass: "49" + cost: 100000 + PrfOf-6859102945905124672: + op: PrfOf + children: [] + eclass: "63" + cost: 100000 + PrfOf-8573878682381405840: + op: PrfOf + children: [] + eclass: "79" + cost: 100000 + PrfOf-16991836479439233718: + op: PrfOf + children: [] + eclass: "93" + cost: 100000 + Child2-8469931425499020532: + op: Child2 + children: + - Child1-2598150418935018079 + eclass: "66" + cost: 100000 + Child2-13770179520251441998: + op: Child2 + children: + - AstAdd-3683774522220528002 + eclass: "152" + cost: 100000 + Child2-9613174250163720713: + op: Child2 + children: + - Child1-3741393243599718260 + eclass: "67" + cost: 100000 + Child2-5248274466311228812: + op: Child2 + children: + - AstAdd-16872052778055009793 + eclass: "67" + cost: 100000 + Child2-12055403783775160830: + op: Child2 + children: [] + eclass: "36" + cost: 100000 + Child2-16264382682304074769: + op: Child2 + children: + - AstAdd-1634549299562345488 + eclass: "66" + cost: 100000 + Child2-17823237533456777975: + op: Child2 + children: + - Child1-5248274466311228812 + eclass: "66" + cost: 100000 + Child2-10392601675740072316: + op: Child2 + children: + - Child1-16264382682304074769 + eclass: "67" + cost: 100000 + Child2-12003430155333968176: + op: Child2 + children: + - AstAdd-9680441442781277384 + eclass: "164" + cost: 100000 + Child2-1091269196223507527: + op: Child2 + children: + - AstAdd-13756935163900948186 + eclass: "165" + cost: 100000 + GetProof-155920885323577962: + op: GetProof + children: + - Child1-9613174250163720713 + eclass: "5" + cost: 1000000000 + GetProof-6027701891887580415: + op: GetProof + children: + - Child2-9613174250163720713 + eclass: "8" + cost: 1000000000 + GetProof-16264382682304074769: + op: GetProof + children: + - AstAdd-1634549299562345488 + eclass: "142" + cost: 1000000000 + GetProof-9613174250163720713: + op: GetProof + children: + - AstAdd-16971738888365666495 + eclass: "12" + cost: 1000000000 + GetProof-1195216453105892835: + op: GetProof + children: + - AstAdd-15552222449345279837 + eclass: "79" + cost: 1000000000 + GetProof-3741393243599718260: + op: GetProof + children: + - Child2-12003430155333968176 + eclass: "20" + cost: 1000000000 + GetProof-1091269196223507527: + op: GetProof + children: + - AstAdd-13756935163900948186 + eclass: "108" + cost: 1000000000 + GetProof-5248274466311228812: + op: GetProof + children: + - AstAdd-16872052778055009793 + eclass: "93" + cost: 1000000000 + GetProof-8469931425499020532: + op: GetProof + children: + - Child2-12055403783775160830 + eclass: "26" + cost: 1000000000 + addzero-0: + op: addzero + children: [] + eclass: "164" + cost: 9223372036854776000 + AstAdd-7015864897269497032: + op: AstAdd + children: + - Child2-5248274466311228812 + - Child2-8469931425499020532 + eclass: "36" + cost: 1 + AstAdd-16872052778055009793: + op: AstAdd + children: + - AstAdd-16175728989598053478 + - Child2-10392601675740072316 + eclass: "92" + cost: 1 + AstAdd-1634549299562345488: + op: AstAdd + children: + - Child1-16264382682304074769 + - Child2-16264382682304074769 + eclass: "141" + cost: 1 + AstAdd-13756935163900948186: + op: AstAdd + children: + - Child1-1091269196223507527 + - Child1-3741393243599718260 + eclass: "107" + cost: 1 + AstAdd-16971738888365666495: + op: AstAdd + children: + - Child2-17823237533456777975 + - Child1-8469931425499020532 + eclass: "165" + cost: 1 + AstAdd-3683774522220528002: + op: AstAdd + children: + - Child1-13770179520251441998 + - Child2-13770179520251441998 + eclass: "150" + cost: 1 + AstAdd-9680441442781277384: + op: AstAdd + children: + - Child1-1195216453105892835 + - Child1-4312926155411299247 + eclass: "112" + cost: 1 + AstAdd-15552222449345279837: + op: AstAdd + children: + - Child2-13770179520251441998 + - AstAdd-16971738888365666495 + eclass: "151" + cost: 1 + AstAdd-16175728989598053478: + op: AstAdd + children: + - Child1-1195216453105892835 + - AstVar-7017119389452091262 + eclass: "91" + cost: 1 + AstAdd-7134264652287451959: + op: AstAdd + children: + - Child2-13770179520251441998 + - Child1-13770179520251441998 + eclass: "99" + cost: 1 + String-7017119389452091262: + op: "\"x\"" + children: [] + eclass: String-7017119389452091262 + cost: 0 + AstVar-7017119389452091262: + op: AstVar + children: + - String-7017119389452091262 + eclass: "66" + cost: 1 + ProofBetween-14660223427748781285: + op: ProofBetween + children: + - Child2-8469931425499020532 + - Child2-16264382682304074769 + - Child2-17823237533456777975 + eclass: "0" + cost: 100000 + ProofBetween-18406589706221332193: + op: ProofBetween + children: + - Child1-1195216453105892835 + - Child2-13770179520251441998 + - Child1-1195216453105892835 + eclass: "0" + cost: 100000 + ProofBetween-16555661497296228401: + op: ProofBetween + children: + - Child1-3741393243599718260 + - Child2-12003430155333968176 + - Child2-1091269196223507527 + eclass: "0" + cost: 100000 + ProofBetween-4520260267243263193: + op: ProofBetween + children: + - AstAdd-16971738888365666495 + - Child1-2598150418935018079 + - Child1-3741393243599718260 + eclass: "0" + cost: 100000 + ProofBetween-2872005694695115899: + op: ProofBetween + children: + - Child2-1091269196223507527 + - AstAdd-15552222449345279837 + - AstAdd-16971738888365666495 + eclass: "0" + cost: 100000 + ProofBetween-6935811013450972484: + op: ProofBetween + children: + - Child1-3741393243599718260 + - AstAdd-16872052778055009793 + - Child2-1091269196223507527 + eclass: "0" + cost: 100000 + ProofBetween-8816407285316904857: + op: ProofBetween + children: + - Child2-9613174250163720713 + - Child2-5248274466311228812 + - Child2-10392601675740072316 + eclass: "0" + cost: 100000 + ProofBetween-1195769155606790371: + op: ProofBetween + children: + - AstAdd-16971738888365666495 + - Child1-3741393243599718260 + - Child2-1091269196223507527 + eclass: "0" + cost: 100000 + ProofBetween-13770732222752339534: + op: ProofBetween + children: + - AstAdd-16971738888365666495 + - Child1-3741393243599718260 + - addzero-0 + eclass: "177" + cost: 100000 + ProofBetween-52526330942090190: + op: ProofBetween + children: + - Child2-1091269196223507527 + - AstAdd-16971738888365666495 + - add2x-0 + eclass: "179" + cost: 100000 + VarRep-7017119389452091262: + op: VarRep + children: + - String-7017119389452091262 + eclass: "6" + cost: 1 +root_eclasses: [] +class_data: + "36": + type: AstMath + "35": + type: AstMath + "67": + type: AstMath + "151": + type: AstMath + "150": + type: AstMath + "165": + type: AstMath + "164": + type: AstMath + "51": + type: AstMath + "66": + type: AstMath + "91": + type: AstMath + "92": + type: AstMath + "140": + type: AstMath + "141": + type: AstMath + "106": + type: AstMath + "107": + type: AstMath + "152": + type: AstMath + "5": + type: Proof + "6": + type: TrmPrf + "8": + type: Proof + "9": + type: TrmPrf + "12": + type: Proof + "13": + type: TrmPrf + "20": + type: Proof + "21": + type: TrmPrf + "26": + type: Proof + "27": + type: TrmPrf + "33": + type: Proof + "34": + type: TrmPrf + "49": + type: Proof + "50": + type: TrmPrf + "63": + type: Proof + "64": + type: TrmPrf + "79": + type: Proof + "80": + type: TrmPrf + "93": + type: Proof + "94": + type: TrmPrf + "134": + type: AstMath + "112": + type: AstMath + "142": + type: Proof + "108": + type: Proof + "99": + type: AstMath + String-7017119389452091262: + type: String + "0": + type: ProofList + "177": + type: ProofList + "179": + type: ProofList + diff --git a/tests/snapshots/files__push_pop.snap b/tests/snapshots/files__push_pop.snap new file mode 100644 index 00000000..61a39e43 --- /dev/null +++ b/tests/snapshots/files__push_pop.snap @@ -0,0 +1,20 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + foo-0: + op: foo + children: [] + eclass: i64-5871781006564002453 + cost: 1 +root_eclasses: [] +class_data: + i64-5871781006564002453: + type: i64 + diff --git a/tests/snapshots/files__repro_define.snap b/tests/snapshots/files__repro_define.snap new file mode 100644 index 00000000..6f0c0e46 --- /dev/null +++ b/tests/snapshots/files__repro_define.snap @@ -0,0 +1,42 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Zero-0: + op: Zero + children: [] + eclass: "0" + cost: 9223372036854776000 + S-0: + op: S + children: + - Zero-0 + eclass: "1" + cost: 1 + S-5871781006564002453: + op: S + children: + - S-0 + eclass: "2" + cost: 1 + S-11743562013128004906: + op: S + children: + - S-5871781006564002453 + eclass: "2" + cost: 1 + two-0: + op: two + children: [] + eclass: "2" + cost: 9223372036854776000 +root_eclasses: [] +class_data: + "0": + type: Nat + "1": + type: Nat + "2": + type: Nat + diff --git a/tests/snapshots/files__repro_noteqbug.snap b/tests/snapshots/files__repro_noteqbug.snap new file mode 100644 index 00000000..d18572a1 --- /dev/null +++ b/tests/snapshots/files__repro_noteqbug.snap @@ -0,0 +1,36 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + R-5871781006564002453: + op: R + children: + - i64-5871781006564002453 + eclass: "0" + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + R-11743562013128004906: + op: R + children: + - i64-11743562013128004906 + eclass: "0" + cost: 1 +root_eclasses: [] +class_data: + "0": + type: r + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + diff --git a/tests/snapshots/files__repro_querybug.snap b/tests/snapshots/files__repro_querybug.snap new file mode 100644 index 00000000..fae7bd94 --- /dev/null +++ b/tests/snapshots/files__repro_querybug.snap @@ -0,0 +1,57 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Empty-0: + op: Empty + children: [] + eclass: "0" + cost: 9223372036854776000 + mylist-0: + op: mylist + children: [] + eclass: "1" + cost: 9223372036854776000 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + Cons-956286968014291186: + op: Cons + children: + - i64-5871781006564002453 + - Empty-0 + eclass: "1" + cost: 1 + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + eq-0: + op: eq + children: + - Empty-0 + - Empty-0 + eclass: Unit-0 + cost: 1 + eq-6828067974578293639: + op: eq + children: + - Cons-956286968014291186 + - mylist-0 + eclass: Unit-0 + cost: 1 +root_eclasses: [] +class_data: + "0": + type: list + "1": + type: list + i64-5871781006564002453: + type: i64 + Unit-0: + type: Unit + diff --git a/tests/snapshots/files__repro_querybug2.snap b/tests/snapshots/files__repro_querybug2.snap new file mode 100644 index 00000000..5905a00d --- /dev/null +++ b/tests/snapshots/files__repro_querybug2.snap @@ -0,0 +1,29 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + Num-11743562013128004906: + op: Num + children: + - i64-11743562013128004906 + eclass: "1" + cost: 1 + OtherNum-11743562013128004906: + op: OtherNum + children: + - i64-11743562013128004906 + eclass: "1" + cost: 1 +root_eclasses: [] +class_data: + "1": + type: Nat + i64-11743562013128004906: + type: i64 + diff --git a/tests/snapshots/files__repro_querybug3.snap b/tests/snapshots/files__repro_querybug3.snap new file mode 100644 index 00000000..1be1f1e7 --- /dev/null +++ b/tests/snapshots/files__repro_querybug3.snap @@ -0,0 +1,213 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Add-16545935510313822457: + op: Add + children: + - Var-5040379952546458196 + - App-4208978898528913939 + eclass: "9" + cost: 1 + Var-5871781006564002453: + op: Var + children: + - V-18060262198777227860 + eclass: "2" + cost: 1 + Var-5040379952546458196: + op: Var + children: + - V-7848520443469635519 + eclass: "6" + cost: 1 + Var-10912160959110460649: + op: Var + children: + - V-12877212935185514366 + eclass: "7" + cost: 1 + App-4208978898528913939: + op: App + children: + - sum-0 + - Var-10912160959110460649 + eclass: "8" + cost: 1 + Lam-17304424278775812439: + op: Lam + children: + - V-12877212935185514366 + - Add-16545935510313822457 + eclass: "10" + cost: 1 + Lam-2058398507139690922: + op: Lam + children: + - V-7848520443469635519 + - Lam-17304424278775812439 + eclass: "11" + cost: 1 + Lam-14362651089177384606: + op: Lam + children: + - V-18060262198777227860 + - CaseSplit-6168132277298701746 + eclass: "0" + cost: 1 + CaseSplit-6168132277298701746: + op: CaseSplit + children: + - Var-5871781006564002453 + - Num-0 + - Lam-2058398507139690922 + eclass: "12" + cost: 1 + StringSet-0: + op: StringSet + children: [] + eclass: StringSet-0 + cost: 0 + freer-0: + op: freer + children: + - sum-0 + eclass: StringSet-0 + cost: 1 + StringSet-5871781006564002453: + op: StringSet + children: + - V-7848520443469635519 + eclass: StringSet-5871781006564002453 + cost: 0 + freer-16783941965674463102: + op: freer + children: + - Var-5040379952546458196 + eclass: StringSet-5871781006564002453 + cost: 1 + StringSet-11743562013128004906: + op: StringSet + children: + - V-12877212935185514366 + eclass: StringSet-11743562013128004906 + cost: 0 + freer-4208978898528913939: + op: freer + children: + - Var-10912160959110460649 + eclass: StringSet-11743562013128004906 + cost: 1 + StringSet-17615343019692007359: + op: StringSet + children: + - V-18060262198777227860 + eclass: StringSet-17615343019692007359 + cost: 0 + freer-11743562013128004906: + op: freer + children: + - Var-5871781006564002453 + eclass: StringSet-17615343019692007359 + cost: 1 + freer-10080759905092916392: + op: freer + children: + - App-4208978898528913939 + eclass: StringSet-11743562013128004906 + cost: 1 + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + Num-0: + op: Num + children: + - i64-0 + eclass: "3" + cost: 1 + String-18060262198777227860: + op: "\"xs\"" + children: [] + eclass: String-18060262198777227860 + cost: 0 + V-18060262198777227860: + op: V + children: + - String-18060262198777227860 + eclass: "1" + cost: 1 + String-7848520443469635519: + op: "\"x\"" + children: [] + eclass: String-7848520443469635519 + cost: 0 + V-7848520443469635519: + op: V + children: + - String-7848520443469635519 + eclass: "4" + cost: 1 + String-12877212935185514366: + op: "\"xs'\"" + children: [] + eclass: String-12877212935185514366 + cost: 0 + V-12877212935185514366: + op: V + children: + - String-12877212935185514366 + eclass: "5" + cost: 1 + sum-0: + op: sum + children: [] + eclass: "0" + cost: 1000 +root_eclasses: [] +class_data: + "9": + type: Term + "6": + type: Term + "8": + type: Term + "2": + type: Term + "1": + type: VarT + "4": + type: VarT + "7": + type: Term + "5": + type: VarT + "0": + type: Term + "10": + type: Term + "11": + type: Term + "12": + type: Term + "3": + type: Term + StringSet-0: + type: StringSet + StringSet-5871781006564002453: + type: StringSet + StringSet-11743562013128004906: + type: StringSet + StringSet-17615343019692007359: + type: StringSet + i64-0: + type: i64 + String-18060262198777227860: + type: String + String-7848520443469635519: + type: String + String-12877212935185514366: + type: String + diff --git a/tests/snapshots/files__repro_querybug4.snap b/tests/snapshots/files__repro_querybug4.snap new file mode 100644 index 00000000..5905a00d --- /dev/null +++ b/tests/snapshots/files__repro_querybug4.snap @@ -0,0 +1,29 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + Num-11743562013128004906: + op: Num + children: + - i64-11743562013128004906 + eclass: "1" + cost: 1 + OtherNum-11743562013128004906: + op: OtherNum + children: + - i64-11743562013128004906 + eclass: "1" + cost: 1 +root_eclasses: [] +class_data: + "1": + type: Nat + i64-11743562013128004906: + type: i64 + diff --git a/tests/snapshots/files__repro_should_saturate.snap b/tests/snapshots/files__repro_should_saturate.snap new file mode 100644 index 00000000..43f83c22 --- /dev/null +++ b/tests/snapshots/files__repro_should_saturate.snap @@ -0,0 +1,20 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + MyMap-0: + op: MyMap + children: [] + eclass: i64-5871781006564002453 + cost: 1 +root_eclasses: [] +class_data: + i64-5871781006564002453: + type: i64 + diff --git a/tests/snapshots/files__repro_silly_panic.snap b/tests/snapshots/files__repro_silly_panic.snap new file mode 100644 index 00000000..415e7dd0 --- /dev/null +++ b/tests/snapshots/files__repro_silly_panic.snap @@ -0,0 +1,27 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + q-0: + op: q + children: [] + eclass: "1" + cost: 9223372036854776000 + A-0: + op: A + children: [] + eclass: "1" + cost: 9223372036854776000 + par-6828067974578293639: + op: par + children: + - A-0 + - par-6828067974578293639 + eclass: "1" + cost: 1 +root_eclasses: [] +class_data: + "1": + type: KAT + diff --git a/tests/snapshots/files__repro_unsound.snap b/tests/snapshots/files__repro_unsound.snap new file mode 100644 index 00000000..ab2010e4 --- /dev/null +++ b/tests/snapshots/files__repro_unsound.snap @@ -0,0 +1,510 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Flip__-16212409053862882115: + op: Flip__ + children: [] + eclass: "121" + cost: 1 + Flip__-10444575304181264970: + op: Flip__ + children: [] + eclass: "164" + cost: 1 + Flip__-13926100405575019960: + op: Flip__ + children: [] + eclass: "218" + cost: 1 + Flip__-13146672979998668357: + op: Flip__ + children: [] + eclass: "243" + cost: 1 + Flip__-8210240284334595469: + op: Flip__ + children: [] + eclass: "283" + cost: 1 + Flip__-779604426617889810: + op: Flip__ + children: [] + eclass: "332" + cost: 1 + Flip__-6703359061623084917: + op: Flip__ + children: [] + eclass: "355" + cost: 1 + Flip__-11795712642610735767: + op: Flip__ + children: [] + eclass: "381" + cost: 1 + Flip__-7067174460711433495: + op: Flip__ + children: [] + eclass: "509" + cost: 1 + Flip__-8002522771611363060: + op: Flip__ + children: [] + eclass: "550" + cost: 1 + TrmOf__-9301332479516564789: + op: TrmOf__ + children: + - Repi64__-12574963067145549163 + eclass: "31" + cost: 1000000 + TrmOf__-10964134587551653303: + op: TrmOf__ + children: + - Repi64__-5040379952546458196 + eclass: "25" + cost: 1000000 + TrmOf__-3481525101393754990: + op: TrmOf__ + children: [] + eclass: "52" + cost: 1000000 + TrmOf__-12626936695586741817: + op: TrmOf__ + children: + - Repi64__-17615343019692007359 + eclass: "19" + cost: 1000000 + TrmOf__-14289738803621830331: + op: TrmOf__ + children: + - Repi64__-11743562013128004906 + eclass: "13" + cost: 1000000 + TrmOf__-15952540911656918845: + op: TrmOf__ + children: [] + eclass: "7" + cost: 1000000 + TrmOf__-8469931425499020532: + op: TrmOf__ + children: [] + eclass: "34" + cost: 1000000 + TrmOf__-17615343019692007359: + op: TrmOf__ + children: + - Repi64__-0 + eclass: "1" + cost: 1000000 + TrmOf__-13562285006486671382: + op: TrmOf__ + children: [] + eclass: "60" + cost: 1000000 + TrmOf__-10132733533534109046: + op: TrmOf__ + children: [] + eclass: "28" + cost: 1000000 + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + Repi64__-0: + op: Repi64__ + children: + - i64-0 + eclass: "3" + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + Repi64__-5871781006564002453: + op: Repi64__ + children: + - i64-5871781006564002453 + eclass: "6" + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + Repi64__-11743562013128004906: + op: Repi64__ + children: + - i64-11743562013128004906 + eclass: "15" + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + Repi64__-17615343019692007359: + op: Repi64__ + children: + - i64-17615343019692007359 + eclass: "21" + cost: 1 + i64-5040379952546458196: + op: "4" + children: [] + eclass: i64-5040379952546458196 + cost: 0 + Repi64__-5040379952546458196: + op: Repi64__ + children: + - i64-5040379952546458196 + eclass: "27" + cost: 1 + i64-12574963067145549163: + op: "-1" + children: [] + eclass: i64-12574963067145549163 + cost: 0 + Repi64__-12574963067145549163: + op: Repi64__ + children: + - i64-12574963067145549163 + eclass: "33" + cost: 1 + Rational-11743562013128004906: + op: (rational 2 1) + children: [] + eclass: Rational-11743562013128004906 + cost: 0 + r-two-0: + op: r-two + children: [] + eclass: Rational-11743562013128004906 + cost: 9223372036854776000 + AstIf_HerbieType_Math_Math_Math__-12757547884481145869: + op: AstIf_HerbieType_Math_Math_Math__ + children: + - GetChild__-17074017086827668002 + - TrmOf__-3481525101393754990 + eclass: "123" + cost: 1 + GetChild__-1465098945834158911: + op: GetChild__ + children: + - TrmOf__-13562285006486671382 + - i64-0 + eclass: "41" + cost: 1000000 + GetChild__-14040062012979708074: + op: GetChild__ + children: + - AstExpm1_HerbieType_Math__-15564543775964812645 + - i64-5871781006564002453 + eclass: "48" + cost: 1000000 + GetChild__-17074017086827668002: + op: GetChild__ + children: + - AstExpm1_HerbieType_Math__-2158179654801719225 + - i64-0 + eclass: "41" + cost: 1000000 + GetChild__-4499054019682118839: + op: GetChild__ + children: + - AstExpm1_HerbieType_Math__-2158179654801719225 + - i64-5871781006564002453 + eclass: "52" + cost: 1000000 + GetChild__-17279319512441093813: + op: GetChild__ + children: + - GetChild__-1465098945834158911 + - i64-0 + eclass: "37" + cost: 1000000 + GetChild__-5706686836758916083: + op: GetChild__ + children: + - TrmOf__-15952540911656918845 + - i64-0 + eclass: "1" + cost: 1000000 + GetChild__-18281649903904465246: + op: GetChild__ + children: + - TrmOf__-15952540911656918845 + - i64-5871781006564002453 + eclass: "4" + cost: 1000000 + GetChild__-5145996267849227305: + op: GetChild__ + children: + - i64-0 + eclass: "4" + cost: 1000000 + GetChild__-17720959334994776468: + op: GetChild__ + children: + - i64-5871781006564002453 + eclass: "4" + cost: 1000000 + GetChild__-15002184148634740066: + op: GetChild__ + children: + - TrmOf__-8469931425499020532 + - i64-0 + eclass: "31" + cost: 1000000 + AstExpm1_HerbieType_Math__-2158179654801719225: + op: AstExpm1_HerbieType_Math__ + children: + - GetChild__-17074017086827668002 + - TrmOf__-3481525101393754990 + eclass: "56" + cost: 1 + AstExpm1_HerbieType_Math__-15564543775964812645: + op: AstExpm1_HerbieType_Math__ + children: + - GetChild__-1465098945834158911 + - GetChild__-14040062012979708074 + eclass: "60" + cost: 1 + String-5342629820586423399: + op: "\"h0\"" + children: [] + eclass: String-5342629820586423399 + cost: 0 + Var-8311271872291325260: + op: Var + children: + - String-5342629820586423399 + eclass: "47" + cost: 1 + Fma-10050917237229058210: + op: Fma + children: [] + eclass: "63" + cost: 1 + Fma-10645116314950871453: + op: Fma + children: [] + eclass: "63" + cost: 1 + Fma-7529359344572618602: + op: Fma + children: [] + eclass: "5383" + cost: 1 + Fma-17301992692601812334: + op: Fma + children: [] + eclass: "6581" + cost: 1 + Fma-17135648761937485494: + op: Fma + children: [] + eclass: "63" + cost: 1 + Fma-4656402242138846898: + op: Fma + children: [] + eclass: "63" + cost: 1 + Fma-9421131195754156095: + op: Fma + children: [] + eclass: "1497" + cost: 1 + Fma-1115809564189179928: + op: Fma + children: [] + eclass: "1497" + cost: 1 + Fma-2770222625774018806: + op: Fma + children: [] + eclass: "63" + cost: 1 + Fma-13701072956726874872: + op: Fma + children: [] + eclass: "63" + cost: 1 + NotEq-11964306030268855396: + op: NotEq + children: [] + eclass: "84" + cost: 1 +root_eclasses: [] +class_data: + "121": + type: Proof__ + "119": + type: Proof__ + "164": + type: Proof__ + "162": + type: Proof__ + "218": + type: Proof__ + "216": + type: Proof__ + "243": + type: Proof__ + "241": + type: Proof__ + "283": + type: Proof__ + "281": + type: Proof__ + "332": + type: Proof__ + "330": + type: Proof__ + "355": + type: Proof__ + "353": + type: Proof__ + "381": + type: Proof__ + "379": + type: Proof__ + "509": + type: Proof__ + "507": + type: Proof__ + "550": + type: Proof__ + "548": + type: Proof__ + "31": + type: Ast__ + "33": + type: TrmPrf__ + "25": + type: Ast__ + "27": + type: TrmPrf__ + "52": + type: Ast__ + "54": + type: TrmPrf__ + "19": + type: Ast__ + "21": + type: TrmPrf__ + "13": + type: Ast__ + "15": + type: TrmPrf__ + "7": + type: Ast__ + "9": + type: TrmPrf__ + "34": + type: Ast__ + "36": + type: TrmPrf__ + "1": + type: Ast__ + "3": + type: TrmPrf__ + "60": + type: Ast__ + "62": + type: TrmPrf__ + "28": + type: Ast__ + "30": + type: TrmPrf__ + i64-0: + type: i64 + "6": + type: TrmPrf__ + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + i64-17615343019692007359: + type: i64 + i64-5040379952546458196: + type: i64 + i64-12574963067145549163: + type: i64 + Rational-11743562013128004906: + type: Rational + "123": + type: Ast__ + "41": + type: Ast__ + "95": + type: Ast__ + "104": + type: Ast__ + "48": + type: Ast__ + "56": + type: Ast__ + "37": + type: Ast__ + "4": + type: Ast__ + "10": + type: Ast__ + "47": + type: Math + "40": + type: HerbieType + String-5342629820586423399: + type: String + "63": + type: Math + "4077": + type: Math + "2334": + type: Math + "2737": + type: Math + "5383": + type: Math + "1495": + type: Math + "1498": + type: Math + "11075": + type: Math + "6581": + type: Math + "416": + type: Math + "11369": + type: Math + "10512": + type: Math + "833": + type: Math + "11909": + type: Math + "1497": + type: Math + "30497": + type: Math + "2608": + type: Math + "303": + type: Math + "2813": + type: Math + "39145": + type: Math + "9352": + type: Math + "84": + type: Math + "164617": + type: Math + diff --git a/tests/snapshots/files__resolution.snap b/tests/snapshots/files__resolution.snap new file mode 100644 index 00000000..6851382a --- /dev/null +++ b/tests/snapshots/files__resolution.snap @@ -0,0 +1,109 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + negate-14445659688945408293: + op: negate + children: + - or-5282742591830199048 + eclass: "41" + cost: 1 + negate-935348310899929565: + op: negate + children: + - or-1534673114548945584 + eclass: "81" + cost: 1 + or-5282742591830199048: + op: or + children: + - p-5871781006564002453 + - p-11743562013128004906 + eclass: "81" + cost: 1 + or-5074848078065428432: + op: or + children: + - False-0 + - negate-14445659688945408293 + eclass: "41" + cost: 1 + or-1534673114548945584: + op: or + children: + - or-1534673114548945584 + - p0-0 + eclass: "41" + cost: 1 + p1-0: + op: p1 + children: [] + eclass: "81" + cost: 9223372036854776000 + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + p-0: + op: p + children: + - i64-0 + eclass: "81" + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + p-5871781006564002453: + op: p + children: + - i64-5871781006564002453 + eclass: "81" + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + p-11743562013128004906: + op: p + children: + - i64-11743562013128004906 + eclass: "81" + cost: 1 + False-0: + op: "False" + children: [] + eclass: "81" + cost: 9223372036854776000 + p0-0: + op: p0 + children: [] + eclass: "81" + cost: 9223372036854776000 + p2-0: + op: p2 + children: [] + eclass: "81" + cost: 9223372036854776000 + True-0: + op: "True" + children: [] + eclass: "41" + cost: 9223372036854776000 +root_eclasses: [] +class_data: + "41": + type: Bool + "81": + type: Bool + i64-0: + type: i64 + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + diff --git a/tests/snapshots/files__rw_analysis.snap b/tests/snapshots/files__rw_analysis.snap new file mode 100644 index 00000000..6421b7af --- /dev/null +++ b/tests/snapshots/files__rw_analysis.snap @@ -0,0 +1,320 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + Bool-11743562013128004906: + op: Bool + children: + - False-0 + eclass: Unit-0 + cost: 1 + Bool-11899482898451582868: + op: Bool + children: + - True-0 + eclass: Unit-0 + cost: 1 + String-10502304162516978195: + op: "\"b\"" + children: [] + eclass: String-10502304162516978195 + cost: 0 + V-10502304162516978195: + op: V + children: + - String-10502304162516978195 + eclass: "6" + cost: 1 + String-15952540911656918845: + op: "\"ten\"" + children: [] + eclass: String-15952540911656918845 + cost: 0 + V-15952540911656918845: + op: V + children: + - String-15952540911656918845 + eclass: "11" + cost: 1 + String-14853952372091147432: + op: "\"one\"" + children: [] + eclass: String-14853952372091147432 + cost: 0 + V-14853952372091147432: + op: V + children: + - String-14853952372091147432 + eclass: "17" + cost: 1 + String-12455668677761452563: + op: "\"zero\"" + children: [] + eclass: String-12455668677761452563 + cost: 0 + V-12455668677761452563: + op: V + children: + - String-12455668677761452563 + eclass: "23" + cost: 1 + String-1976739436905633066: + op: "\"x\"" + children: [] + eclass: String-1976739436905633066 + cost: 0 + V-1976739436905633066: + op: V + children: + - String-1976739436905633066 + eclass: "29" + cost: 1 + String-16374085169080980648: + op: "\"cond\"" + children: [] + eclass: String-16374085169080980648 + cost: 0 + V-16374085169080980648: + op: V + children: + - String-16374085169080980648 + eclass: "37" + cost: 1 + String-3377577844511369682: + op: "\"DoSomething\"" + children: [] + eclass: String-3377577844511369682 + cost: 0 + V-3377577844511369682: + op: V + children: + - String-3377577844511369682 + eclass: "46" + cost: 1 + String-11345392677365101801: + op: "\"DoSomethingElse\"" + children: [] + eclass: String-11345392677365101801 + cost: 0 + V-11345392677365101801: + op: V + children: + - String-11345392677365101801 + eclass: "53" + cost: 1 + String-17627030480522586708: + op: "\"y\"" + children: [] + eclass: String-17627030480522586708 + cost: 0 + V-17627030480522586708: + op: V + children: + - String-17627030480522586708 + eclass: "62" + cost: 1 + Eq-243936660352753052: + op: Eq + children: + - V-1976739436905633066 + - V-15952540911656918845 + eclass: "38" + cost: 1 + False-0: + op: "False" + children: [] + eclass: "2" + cost: 9223372036854776000 + Top-0: + op: Top + children: [] + eclass: "0" + cost: 9223372036854776000 + True-0: + op: "True" + children: [] + eclass: "68" + cost: 9223372036854776000 + add-val-4116892051630753445: + op: add-val + children: + - add-val-4116892051630753445 + eclass: "70" + cost: 1 + Prog-5040379952546458196: + op: Prog + children: [] + eclass: "5" + cost: 1 + Prog-15952540911656918845: + op: Prog + children: [] + eclass: "10" + cost: 1 + Prog-14289738803621830331: + op: Prog + children: [] + eclass: "16" + cost: 1 + Prog-12626936695586741817: + op: Prog + children: [] + eclass: "22" + cost: 1 + Prog-10964134587551653303: + op: Prog + children: [] + eclass: "28" + cost: 1 + Prog-16004514540098111499: + op: Prog + children: [] + eclass: "32" + cost: 1 + Prog-9301332479516564789: + op: Prog + children: [] + eclass: "36" + cost: 1 + Prog-13510311378045478728: + op: Prog + children: [] + eclass: "41" + cost: 1 + Prog-6807129317463932018: + op: Prog + children: [] + eclass: "45" + cost: 1 + Prog-5144327209428843504: + op: Prog + children: [] + eclass: "49" + cost: 1 + Goto-16887889222556848410: + op: Goto + children: [] + eclass: "49" + cost: 1 + Goto-16004514540098111499: + op: Goto + children: [] + eclass: "59" + cost: 1 + Goto-6807129317463932018: + op: Goto + children: [] + eclass: "76" + cost: 1 + End-0: + op: End + children: [] + eclass: "66" + cost: 9223372036854776000 +root_eclasses: [] +class_data: + Unit-0: + type: Unit + "2": + type: Val + "68": + type: Val + "6": + type: VarT + String-10502304162516978195: + type: String + "11": + type: VarT + String-15952540911656918845: + type: String + "17": + type: VarT + String-14853952372091147432: + type: String + "23": + type: VarT + String-12455668677761452563: + type: String + "29": + type: VarT + String-1976739436905633066: + type: String + "37": + type: VarT + String-16374085169080980648: + type: String + "46": + type: VarT + String-3377577844511369682: + type: String + "53": + type: VarT + String-11345392677365101801: + type: String + "62": + type: VarT + String-17627030480522586708: + type: String + "38": + type: Exp + "0": + type: Val + "70": + type: Val + "24": + type: Val + "5": + type: ProgStmt + "4": + type: Loc + "10": + type: ProgStmt + "9": + type: Loc + "16": + type: ProgStmt + "15": + type: Loc + "22": + type: ProgStmt + "21": + type: Loc + "28": + type: ProgStmt + "27": + type: Loc + "32": + type: ProgStmt + "31": + type: Loc + "36": + type: ProgStmt + "33": + type: Loc + "41": + type: ProgStmt + "40": + type: Loc + "45": + type: ProgStmt + "42": + type: Loc + "49": + type: ProgStmt + "48": + type: Loc + "50": + type: Loc + "59": + type: ProgStmt + "76": + type: ProgStmt + "66": + type: ProgStmt + diff --git a/tests/snapshots/files__schedule_demo.snap b/tests/snapshots/files__schedule_demo.snap new file mode 100644 index 00000000..3d7fba99 --- /dev/null +++ b/tests/snapshots/files__schedule_demo.snap @@ -0,0 +1,205 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + left-0: + op: left + children: + - i64-0 + eclass: Unit-0 + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + left-5871781006564002453: + op: left + children: + - i64-5871781006564002453 + eclass: Unit-0 + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + left-11743562013128004906: + op: left + children: + - i64-11743562013128004906 + eclass: Unit-0 + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + left-17615343019692007359: + op: left + children: + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 + i64-5040379952546458196: + op: "4" + children: [] + eclass: i64-5040379952546458196 + cost: 0 + left-5040379952546458196: + op: left + children: + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 + i64-10912160959110460649: + op: "5" + children: [] + eclass: i64-10912160959110460649 + cost: 0 + left-10912160959110460649: + op: left + children: + - i64-10912160959110460649 + eclass: Unit-0 + cost: 1 + i64-16783941965674463102: + op: "6" + children: [] + eclass: i64-16783941965674463102 + cost: 0 + left-16783941965674463102: + op: left + children: + - i64-16783941965674463102 + eclass: Unit-0 + cost: 1 + i64-4208978898528913939: + op: "7" + children: [] + eclass: i64-4208978898528913939 + cost: 0 + left-4208978898528913939: + op: left + children: + - i64-4208978898528913939 + eclass: Unit-0 + cost: 1 + i64-10080759905092916392: + op: "8" + children: [] + eclass: i64-10080759905092916392 + cost: 0 + left-10080759905092916392: + op: left + children: + - i64-10080759905092916392 + eclass: Unit-0 + cost: 1 + i64-15952540911656918845: + op: "9" + children: [] + eclass: i64-15952540911656918845 + cost: 0 + left-15952540911656918845: + op: left + children: + - i64-15952540911656918845 + eclass: Unit-0 + cost: 1 + right-0: + op: right + children: + - i64-0 + eclass: Unit-0 + cost: 1 + right-5871781006564002453: + op: right + children: + - i64-5871781006564002453 + eclass: Unit-0 + cost: 1 + right-11743562013128004906: + op: right + children: + - i64-11743562013128004906 + eclass: Unit-0 + cost: 1 + right-17615343019692007359: + op: right + children: + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 + right-5040379952546458196: + op: right + children: + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 + right-10912160959110460649: + op: right + children: + - i64-10912160959110460649 + eclass: Unit-0 + cost: 1 + right-16783941965674463102: + op: right + children: + - i64-16783941965674463102 + eclass: Unit-0 + cost: 1 + right-4208978898528913939: + op: right + children: + - i64-4208978898528913939 + eclass: Unit-0 + cost: 1 + right-10080759905092916392: + op: right + children: + - i64-10080759905092916392 + eclass: Unit-0 + cost: 1 + right-15952540911656918845: + op: right + children: + - i64-15952540911656918845 + eclass: Unit-0 + cost: 1 +root_eclasses: [] +class_data: + Unit-0: + type: Unit + i64-0: + type: i64 + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + i64-17615343019692007359: + type: i64 + i64-5040379952546458196: + type: i64 + i64-10912160959110460649: + type: i64 + i64-16783941965674463102: + type: i64 + i64-4208978898528913939: + type: i64 + i64-10080759905092916392: + type: i64 + i64-15952540911656918845: + type: i64 + diff --git a/tests/snapshots/files__semi_naive_set_function.snap b/tests/snapshots/files__semi_naive_set_function.snap new file mode 100644 index 00000000..504d3cd4 --- /dev/null +++ b/tests/snapshots/files__semi_naive_set_function.snap @@ -0,0 +1,162 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + i64-0: + op: "0" + children: [] + eclass: i64-0 + cost: 0 + f-0: + op: f + children: + - i64-0 + eclass: i64-0 + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + f-17615343019692007359: + op: f + children: + - i64-17615343019692007359 + eclass: i64-0 + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + f-5871781006564002453: + op: f + children: + - i64-5871781006564002453 + eclass: i64-5871781006564002453 + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + f-11743562013128004906: + op: f + children: + - i64-11743562013128004906 + eclass: i64-11743562013128004906 + cost: 1 + g-0: + op: g + children: + - i64-0 + eclass: i64-0 + cost: 1 + g-5871781006564002453: + op: g + children: + - i64-5871781006564002453 + eclass: i64-5871781006564002453 + cost: 1 + g-11743562013128004906: + op: g + children: + - i64-11743562013128004906 + eclass: i64-11743562013128004906 + cost: 1 + g-17615343019692007359: + op: g + children: + - i64-17615343019692007359 + eclass: i64-17615343019692007359 + cost: 1 + i64-5040379952546458196: + op: "4" + children: [] + eclass: i64-5040379952546458196 + cost: 0 + g-5040379952546458196: + op: g + children: + - i64-5040379952546458196 + eclass: i64-5040379952546458196 + cost: 1 + i64-10912160959110460649: + op: "5" + children: [] + eclass: i64-10912160959110460649 + cost: 0 + g-10912160959110460649: + op: g + children: + - i64-10912160959110460649 + eclass: i64-10912160959110460649 + cost: 1 + i64-16783941965674463102: + op: "6" + children: [] + eclass: i64-16783941965674463102 + cost: 0 + g-16783941965674463102: + op: g + children: + - i64-16783941965674463102 + eclass: i64-16783941965674463102 + cost: 1 + i64-4208978898528913939: + op: "7" + children: [] + eclass: i64-4208978898528913939 + cost: 0 + g-4208978898528913939: + op: g + children: + - i64-4208978898528913939 + eclass: i64-4208978898528913939 + cost: 1 + i64-10080759905092916392: + op: "8" + children: [] + eclass: i64-10080759905092916392 + cost: 0 + g-10080759905092916392: + op: g + children: + - i64-10080759905092916392 + eclass: i64-10080759905092916392 + cost: 1 + i64-15952540911656918845: + op: "9" + children: [] + eclass: i64-15952540911656918845 + cost: 0 + g-15952540911656918845: + op: g + children: + - i64-15952540911656918845 + eclass: i64-15952540911656918845 + cost: 1 +root_eclasses: [] +class_data: + i64-0: + type: i64 + i64-17615343019692007359: + type: i64 + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + i64-5040379952546458196: + type: i64 + i64-10912160959110460649: + type: i64 + i64-16783941965674463102: + type: i64 + i64-4208978898528913939: + type: i64 + i64-10080759905092916392: + type: i64 + i64-15952540911656918845: + type: i64 + diff --git a/tests/snapshots/files__stratified.snap b/tests/snapshots/files__stratified.snap new file mode 100644 index 00000000..994f6c1a --- /dev/null +++ b/tests/snapshots/files__stratified.snap @@ -0,0 +1,120 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + edge-7659469028595837896: + op: edge + children: + - i64-5871781006564002453 + - i64-11743562013128004906 + eclass: Unit-0 + cost: 1 + i64-17615343019692007359: + op: "3" + children: [] + eclass: i64-17615343019692007359 + cost: 0 + edge-1081172882011038115: + op: edge + children: + - i64-11743562013128004906 + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 + i64-5040379952546458196: + op: "4" + children: [] + eclass: i64-5040379952546458196 + cost: 0 + edge-16275225025205966978: + op: edge + children: + - i64-17615343019692007359 + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 + i64-10080759905092916392: + op: "8" + children: [] + eclass: i64-10080759905092916392 + cost: 0 + edge-11234845072659508782: + op: edge + children: + - i64-17615343019692007359 + - i64-10080759905092916392 + eclass: Unit-0 + cost: 1 + path-16275225025205966978: + op: path + children: + - i64-17615343019692007359 + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 + path-7659469028595837896: + op: path + children: + - i64-5871781006564002453 + - i64-11743562013128004906 + eclass: Unit-0 + cost: 1 + path-1081172882011038115: + op: path + children: + - i64-11743562013128004906 + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 + path-13531250035159840349: + op: path + children: + - i64-5871781006564002453 + - i64-17615343019692007359 + eclass: Unit-0 + cost: 1 + path-15318938057191675792: + op: path + children: + - i64-11743562013128004906 + - i64-5040379952546458196 + eclass: Unit-0 + cost: 1 + path-11993333841121498764: + op: path + children: + - i64-11743562013128004906 + - i64-10080759905092916392 + eclass: Unit-0 + cost: 1 +root_eclasses: [] +class_data: + Unit-0: + type: Unit + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + i64-17615343019692007359: + type: i64 + i64-5040379952546458196: + type: i64 + i64-10080759905092916392: + type: i64 + diff --git a/tests/snapshots/files__string.snap b/tests/snapshots/files__string.snap new file mode 100644 index 00000000..967d470b --- /dev/null +++ b/tests/snapshots/files__string.snap @@ -0,0 +1,8 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: {} +root_eclasses: [] +class_data: {} + diff --git a/tests/snapshots/files__string_quotes.snap b/tests/snapshots/files__string_quotes.snap new file mode 100644 index 00000000..c6082292 --- /dev/null +++ b/tests/snapshots/files__string_quotes.snap @@ -0,0 +1,20 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + String-3508559694726045631: + op: "\"abc\"" + children: [] + eclass: String-3508559694726045631 + cost: 0 + f-0: + op: f + children: [] + eclass: String-3508559694726045631 + cost: 1 +root_eclasses: [] +class_data: + String-3508559694726045631: + type: String + diff --git a/tests/snapshots/files__typecheck.snap b/tests/snapshots/files__typecheck.snap new file mode 100644 index 00000000..8f9b7f38 --- /dev/null +++ b/tests/snapshots/files__typecheck.snap @@ -0,0 +1,230 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Nil-0: + op: Nil + children: [] + eclass: "2" + cost: 9223372036854776000 + TArr-6689842666879681297: + op: TArr + children: + - t-id-0 + - TUnit-0 + eclass: "33" + cost: 1 + TArr-2922503590904450013: + op: TArr + children: + - TUnit-0 + - TUnit-0 + eclass: "44" + cost: 1 + TArr-6300081435415819695: + op: TArr + children: + - TUnit-0 + eclass: "16" + cost: 1 + TArr-12899316239114981097: + op: TArr + children: + - TUnit-0 + - TArr-6689842666879681297 + eclass: "37" + cost: 1 + t-id-0: + op: t-id + children: [] + eclass: "44" + cost: 9223372036854776000 + TUnit-0: + op: TUnit + children: [] + eclass: "13" + cost: 9223372036854776000 + App-11307757358215063057: + op: App + children: [] + eclass: "6" + cost: 1 + App-791192798209204816: + op: App + children: + - Lam-3450455691695181537 + eclass: "11" + cost: 1 + App-9479861080374888173: + op: App + children: + - App-791192798209204816 + - Lam-15194017704823186443 + eclass: "12" + cost: 1 + t-free-2-0: + op: t-free-2 + children: [] + eclass: "37" + cost: 9223372036854776000 + String-15673665965278112340: + op: "\"f\"" + children: [] + eclass: String-15673665965278112340 + cost: 0 + Lam-11434045972000346481: + op: Lam + children: + - String-15673665965278112340 + - TArr-2922503590904450013 + - App-11307757358215063057 + eclass: "7" + cost: 1 + String-7848520443469635519: + op: "\"x\"" + children: [] + eclass: String-7848520443469635519 + cost: 0 + Lam-3450455691695181537: + op: Lam + children: + - String-7848520443469635519 + - TUnit-0 + - Lam-11434045972000346481 + eclass: "8" + cost: 1 + Lam-15194017704823186443: + op: Lam + children: + - String-7848520443469635519 + - TUnit-0 + eclass: "9" + cost: 1 + Lam-5944658853747814308: + op: Lam + children: + - String-7848520443469635519 + - TUnit-0 + eclass: "15" + cost: 1 + Cons-13148821708476627649: + op: Cons + children: + - String-15673665965278112340 + - t-id-0 + - Cons-10985038806294272504 + eclass: "41" + cost: 1 + String-5052067413377037545: + op: "\"y\"" + children: [] + eclass: String-5052067413377037545 + cost: 0 + Cons-11241755982477309596: + op: Cons + children: + - String-5052067413377037545 + - TUnit-0 + - Nil-0 + eclass: "17" + cost: 1 + Cons-10985038806294272504: + op: Cons + children: + - String-7848520443469635519 + - TUnit-0 + - Nil-0 + eclass: "22" + cost: 1 + Cons-7607460961782902822: + op: Cons + children: + - String-7848520443469635519 + - TUnit-0 + - Cons-9459903128086214959 + eclass: "25" + cost: 1 + Cons-8438862015800447079: + op: Cons + children: + - String-7848520443469635519 + - TUnit-0 + - Cons-11241755982477309596 + eclass: "28" + cost: 1 + Cons-9459903128086214959: + op: Cons + children: + - String-5052067413377037545 + - TArr-6689842666879681297 + - Nil-0 + eclass: "20" + cost: 1 + app-unit-id-0: + op: app-unit-id + children: [] + eclass: "12" + cost: 9223372036854776000 + free-0: + op: free + children: [] + eclass: "15" + cost: 9223372036854776000 +root_eclasses: [] +class_data: + "2": + type: Ctx + "33": + type: Type + "44": + type: Type + "13": + type: Type + "16": + type: Type + "23": + type: Type + "37": + type: Type + "6": + type: Expr + "4": + type: Expr + "5": + type: Expr + "11": + type: Expr + "8": + type: Expr + "1": + type: Expr + "12": + type: Expr + "9": + type: Expr + "7": + type: Expr + String-15673665965278112340: + type: String + String-7848520443469635519: + type: String + "15": + type: Expr + "14": + type: Expr + "41": + type: Ctx + "22": + type: Ctx + "17": + type: Ctx + String-5052067413377037545: + type: String + "25": + type: Ctx + "20": + type: Ctx + "28": + type: Ctx + diff --git a/tests/snapshots/files__typeinfer.snap b/tests/snapshots/files__typeinfer.snap new file mode 100644 index 00000000..ed567aae --- /dev/null +++ b/tests/snapshots/files__typeinfer.snap @@ -0,0 +1,54 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + TInt-0: + op: TInt + children: [] + eclass: "0" + cost: 1 + TBool-0: + op: TBool + children: [] + eclass: "1" + cost: 1 + TUnit-0: + op: TUnit + children: [] + eclass: "2" + cost: 1 + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + base-types-0: + op: base-types + children: + - TInt-0 + eclass: Unit-0 + cost: 1 + base-types-5871781006564002453: + op: base-types + children: + - TBool-0 + eclass: Unit-0 + cost: 1 + base-types-11743562013128004906: + op: base-types + children: + - TUnit-0 + eclass: Unit-0 + cost: 1 +root_eclasses: [] +class_data: + "0": + type: Type + "1": + type: Type + "2": + type: Type + Unit-0: + type: Unit + diff --git a/tests/snapshots/files__unbound.snap b/tests/snapshots/files__unbound.snap new file mode 100644 index 00000000..967d470b --- /dev/null +++ b/tests/snapshots/files__unbound.snap @@ -0,0 +1,8 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: {} +root_eclasses: [] +class_data: {} + diff --git a/tests/snapshots/files__unification_points_to.snap b/tests/snapshots/files__unification_points_to.snap new file mode 100644 index 00000000..a0088c43 --- /dev/null +++ b/tests/snapshots/files__unification_points_to.snap @@ -0,0 +1,440 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + store-17573655612157286265: + op: store + children: + - Stmt-7729226054085538919 + eclass: Unit-0 + cost: 1 + store-1865224333147811465: + op: store + children: + - Stmt-17217173683929104254 + eclass: Unit-0 + cost: 1 + store-12184852386770839161: + op: store + children: [] + eclass: Unit-0 + cost: 1 + store-956205528749505380: + op: store + children: [] + eclass: Unit-0 + cost: 1 + store-18235602976133918585: + op: store + children: [] + eclass: Unit-0 + cost: 1 + String-9380340701290048084: + op: "\"int **xp = &(r->x)\"" + children: [] + eclass: String-9380340701290048084 + cost: 0 + Stmt-9380340701290048084: + op: Stmt + children: + - String-9380340701290048084 + eclass: "4" + cost: 1 + String-15252121707854050537: + op: "\"int **yp = &(r->y)\"" + children: [] + eclass: String-15252121707854050537 + cost: 0 + Stmt-15252121707854050537: + op: Stmt + children: + - String-15252121707854050537 + eclass: "5" + cost: 1 + String-723794125464027006: + op: "\"int *z = *xp\"" + children: [] + eclass: String-723794125464027006 + cost: 0 + Stmt-723794125464027006: + op: Stmt + children: + - String-723794125464027006 + eclass: "6" + cost: 1 + String-11345392677365101801: + op: "\"int *w = *yp\"" + children: [] + eclass: String-11345392677365101801 + cost: 0 + Stmt-11345392677365101801: + op: Stmt + children: + - String-11345392677365101801 + eclass: "7" + cost: 1 + String-7729226054085538919: + op: "\"*xp = a\"" + children: [] + eclass: String-7729226054085538919 + cost: 0 + Stmt-7729226054085538919: + op: Stmt + children: + - String-7729226054085538919 + eclass: "8" + cost: 1 + String-17217173683929104254: + op: "\"*yp = b\"" + children: [] + eclass: String-17217173683929104254 + cost: 0 + Stmt-17217173683929104254: + op: Stmt + children: + - String-17217173683929104254 + eclass: "9" + cost: 1 + String-10092447365923495741: + op: "\"int **yp = &(r->x)\"" + children: [] + eclass: String-10092447365923495741 + cost: 0 + Stmt-10092447365923495741: + op: Stmt + children: + - String-10092447365923495741 + eclass: "13" + cost: 1 + String-15673665965278112340: + op: "\"int *a = *xp\"" + children: [] + eclass: String-15673665965278112340 + cost: 0 + Stmt-15673665965278112340: + op: Stmt + children: + - String-15673665965278112340 + eclass: "16" + cost: 1 + String-14420720653836506280: + op: "\"int *b = *yp\"" + children: [] + eclass: String-14420720653836506280 + cost: 0 + Stmt-14420720653836506280: + op: Stmt + children: + - String-14420720653836506280 + eclass: "20" + cost: 1 + String-1145338382888088809: + op: "\"struct s *sp = malloc(sizeof(struct s))\"" + children: [] + eclass: String-1145338382888088809 + cost: 0 + Stmt-1145338382888088809: + op: Stmt + children: + - String-1145338382888088809 + eclass: "28" + cost: 1 + String-7848520443469635519: + op: "\"x\"" + children: [] + eclass: String-7848520443469635519 + cost: 0 + Field-7848520443469635519: + op: Field + children: + - String-7848520443469635519 + eclass: "23" + cost: 1 + String-3389265305341949031: + op: "\"y\"" + children: [] + eclass: String-3389265305341949031 + cost: 0 + Field-3389265305341949031: + op: Field + children: + - String-3389265305341949031 + eclass: "24" + cost: 1 + expr-816392601895295043: + op: expr + children: [] + eclass: Unit-0 + cost: 1 + malloc-3852016734163638772: + op: malloc + children: [] + eclass: Unit-0 + cost: 1 + malloc-10701023365856294032: + op: malloc + children: [] + eclass: Unit-0 + cost: 1 + return-2593984309714661074: + op: return + children: [] + eclass: Unit-0 + cost: 1 + AllocVar-7638530371481476275: + op: AllocVar + children: [] + eclass: "58" + cost: 1 + AllocVar-935348310899929565: + op: AllocVar + children: [] + eclass: "66" + cost: 1 + AllocVar-12678910324027934471: + op: AllocVar + children: [] + eclass: "66" + cost: 1 + assign-18222003660328102155: + op: assign + children: + - Stmt-9380340701290048084 + eclass: Unit-0 + cost: 1 + assign-10140282458269866008: + op: assign + children: + - Stmt-10092447365923495741 + eclass: Unit-0 + cost: 1 + assign-2467654679282165353: + op: assign + children: + - Stmt-15673665965278112340 + eclass: Unit-0 + cost: 1 + assign-12422841196411474953: + op: assign + children: + - Stmt-14420720653836506280 + eclass: Unit-0 + cost: 1 + assign-4623924613765959467: + op: assign + children: + - Stmt-1145338382888088809 + eclass: Unit-0 + cost: 1 + assign-353931293295122599: + op: assign + children: [] + eclass: Unit-0 + cost: 1 + assign-18347501392879653187: + op: assign + children: [] + eclass: Unit-0 + cost: 1 + assign-16916369917496940299: + op: assign + children: [] + eclass: Unit-0 + cost: 1 + assign-4909578286815501508: + op: assign + children: [] + eclass: Unit-0 + cost: 1 + call-18039799676888087707: + op: call + children: [] + eclass: Unit-0 + cost: 1 + expr-points-to-5871781006564002453: + op: expr-points-to + children: [] + eclass: "58" + cost: 1 + expr-points-to-7638530371481476275: + op: expr-points-to + children: [] + eclass: "58" + cost: 1 + expr-points-to-8417957797057827878: + op: expr-points-to + children: [] + eclass: "66" + cost: 1 + expr-points-to-17719290276574392667: + op: expr-points-to + children: [] + eclass: "66" + cost: 1 + expr-points-to-103947256882385308: + op: expr-points-to + children: [] + eclass: "66" + cost: 1 + expr-points-to-935348310899929565: + op: expr-points-to + children: [] + eclass: "66" + cost: 1 + expr-points-to-12678910324027934471: + op: expr-points-to + children: [] + eclass: "66" + cost: 1 + expr-points-to-14289738803621830331: + op: expr-points-to + children: [] + eclass: "66" + cost: 1 + expr-points-to-15121139857639374588: + op: expr-points-to + children: [] + eclass: "66" + cost: 1 + expr-points-to-9249358851075372135: + op: expr-points-to + children: [] + eclass: "66" + cost: 1 +root_eclasses: [] +class_data: + Unit-0: + type: Unit + "8": + type: StmtT + "11": + type: ExprT + "18": + type: ExprT + "9": + type: StmtT + "14": + type: ExprT + "21": + type: ExprT + "31": + type: StmtT + "41": + type: ExprT + "26": + type: ExprT + "32": + type: StmtT + "43": + type: ExprT + "33": + type: StmtT + "39": + type: ExprT + "44": + type: ExprT + "4": + type: StmtT + String-9380340701290048084: + type: String + "5": + type: StmtT + String-15252121707854050537: + type: String + "6": + type: StmtT + String-723794125464027006: + type: String + "7": + type: StmtT + String-11345392677365101801: + type: String + String-7729226054085538919: + type: String + String-17217173683929104254: + type: String + "13": + type: StmtT + String-10092447365923495741: + type: String + "16": + type: StmtT + String-15673665965278112340: + type: String + "20": + type: StmtT + String-14420720653836506280: + type: String + "28": + type: StmtT + String-1145338382888088809: + type: String + "23": + type: FieldT + String-7848520443469635519: + type: String + "24": + type: FieldT + String-3389265305341949031: + type: String + "34": + type: StmtT + "45": + type: ExprT + "40": + type: ExprT + "51": + type: TypeT + "42": + type: ExprT + "27": + type: TypeT + "37": + type: StmtT + "50": + type: ExprT + "58": + type: AllocT + "66": + type: AllocT + "10": + type: TypeT + "12": + type: ExprT + "15": + type: ExprT + "17": + type: TypeT + "19": + type: ExprT + "22": + type: ExprT + "38": + type: TypeT + "29": + type: StmtT + "30": + type: StmtT + "35": + type: StmtT + "46": + type: ExprT + "47": + type: ExprT + "36": + type: StmtT + "48": + type: ExprT + "49": + type: ExprT + "0": + type: FuncT + "1": + type: ExprT + diff --git a/tests/snapshots/files__unify.snap b/tests/snapshots/files__unify.snap new file mode 100644 index 00000000..bdbb3b08 --- /dev/null +++ b/tests/snapshots/files__unify.snap @@ -0,0 +1,58 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + String-17627030480522586708: + op: "\"a\"" + children: [] + eclass: String-17627030480522586708 + cost: 0 + Var-17627030480522586708: + op: Var + children: + - String-17627030480522586708 + eclass: "0" + cost: 1 + i64-5871781006564002453: + op: "1" + children: [] + eclass: i64-5871781006564002453 + cost: 0 + Lit-5871781006564002453: + op: Lit + children: + - i64-5871781006564002453 + eclass: "0" + cost: 1 + i64-11743562013128004906: + op: "2" + children: [] + eclass: i64-11743562013128004906 + cost: 0 + Lit-11743562013128004906: + op: Lit + children: + - i64-11743562013128004906 + eclass: "0" + cost: 1 + Mul-0: + op: Mul + children: + - Lit-5871781006564002453 + - Lit-11743562013128004906 + eclass: "3" + cost: 1 +root_eclasses: [] +class_data: + "0": + type: Expr + String-17627030480522586708: + type: String + i64-5871781006564002453: + type: i64 + i64-11743562013128004906: + type: i64 + "3": + type: Expr + diff --git a/tests/snapshots/files__until.snap b/tests/snapshots/files__until.snap new file mode 100644 index 00000000..3084058b --- /dev/null +++ b/tests/snapshots/files__until.snap @@ -0,0 +1,155 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: + I-0: + op: I + children: [] + eclass: "5" + cost: 9223372036854776000 + A4-0: + op: A4 + children: [] + eclass: "5" + cost: 9223372036854776000 + A-0: + op: A + children: [] + eclass: "20" + cost: 9223372036854776000 + B-0: + op: B + children: [] + eclass: "2" + cost: 9223372036854776000 + A2-0: + op: A2 + children: [] + eclass: "11" + cost: 9223372036854776000 + A8-0: + op: A8 + children: [] + eclass: "5" + cost: 9223372036854776000 + Unit-0: + op: () + children: [] + eclass: Unit-0 + cost: 0 + allgs-16783941965674463102: + op: allgs + children: [] + eclass: Unit-0 + cost: 1 + allgs-14289738803621830331: + op: allgs + children: + - g*-8615755996610129082 + eclass: Unit-0 + cost: 1 + allgs-2598150418935018079: + op: allgs + children: + - g*-6121552834557496311 + eclass: Unit-0 + cost: 1 + allgs-6755155689022739364: + op: allgs + children: + - A-0 + eclass: Unit-0 + cost: 1 + g*-8615755996610129082: + op: g* + children: + - B-0 + eclass: "15" + cost: 1 + g*-6121552834557496311: + op: g* + children: + - B-0 + - g*-8615755996610129082 + eclass: "35" + cost: 1 + g*-13656135949156587278: + op: g* + children: + - B-0 + - B-0 + eclass: "53" + cost: 1 + g*-6511314066021357913: + op: g* + children: + - g*-6511314066021357913 + - g*-13721544008651016946 + eclass: "33" + cost: 1 + g*-4848511957986269399: + op: g* + children: + - g*-6914414691187084928 + - g*-4472185157575644811 + eclass: "20" + cost: 1 + g*-17371501396690625908: + op: g* + children: + - g*-6511314066021357913 + - A-0 + eclass: "5" + cost: 1 + g*-16488126714231888997: + op: g* + children: + - g*-6914414691187084928 + - g*-6511314066021357913 + eclass: "11" + cost: 1 + g*-4472185157575644811: + op: g* + children: + - g*-4848511957986269399 + - A-0 + eclass: "11" + cost: 1 + g*-6914414691187084928: + op: g* + children: + - g*-4848511957986269399 + - g*-4472185157575644811 + eclass: "33" + cost: 1 + g*-13721544008651016946: + op: g* + children: + - A-0 + - g*-6511314066021357913 + eclass: "5" + cost: 1 +root_eclasses: [] +class_data: + "5": + type: G + "20": + type: G + "2": + type: G + "11": + type: G + Unit-0: + type: Unit + "6": + type: G + "15": + type: G + "35": + type: G + "53": + type: G + "33": + type: G + diff --git a/tests/snapshots/files__vec.snap b/tests/snapshots/files__vec.snap new file mode 100644 index 00000000..967d470b --- /dev/null +++ b/tests/snapshots/files__vec.snap @@ -0,0 +1,8 @@ +--- +source: tests/files.rs +expression: serialized +--- +nodes: {} +root_eclasses: [] +class_data: {} +