File tree Expand file tree Collapse file tree
template/{{ cookiecutter.package_name }}/{{ cookiecutter.library_name }} Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767 "Lbl'UndsStar'Int'Unds'" , # *Int
6868 "Lbl'UndsSlsh'Int'Unds'" , # /Int
6969 "Lbl'Unds'modInt'Unds'" , # modInt
70+ "Lbl'UndsXor-Perc'Int'UndsUnds'" , # ^%Int
7071 "LblmaxInt'LParUndsCommUndsRParUnds'INT-COMMON'Unds'Int'Unds'Int'Unds'Int" , # maxInt
7172 "Lbl'Tild'Int'Unds'" , # ~Int
7273 "Lbl'Unds-LT-Eqls'Int'Unds'" , # <=Int
8788
8889_SYMBOL_OVERRIDES : Final = {
8990 'Lblite' : 'kite' ,
91+ 'Lblabs' : 'kabs' ,
9092}
9193
9294
Original file line number Diff line number Diff line change @@ -241,8 +241,13 @@ def «_-Int_» (x0 x1 : SortInt) : Option SortInt := some (x0 - x1)
241241def «_*Int_ » (x0 x1 : SortInt) : Option SortInt := some (x0 * x1)
242242def «_/Int_ » (x0 x1 : SortInt) : Option SortInt :=
243243 ite (x1 == 0 ) none (Int.tdiv x0 x1)
244- def _modInt_ (x0 : SortInt) ( x1 : SortInt) : Option SortInt :=
244+ def _modInt_ (x0 x1 : SortInt) : Option SortInt :=
245245 ite (x1 == 0 ) none (Int.emod x0 x1)
246+ def «_^%Int__ » (x0 x1 x2 : SortInt) : Option SortInt :=
247+ if x2 == 0 then none else
248+ match x1 with -- TODO: Revisit this implementation
249+ | .ofNat n => some (Int.emod (Int.pow x0 n) x2)
250+ | _ => none
246251def «maxInt(_,_)_INT-COMMON_Int_Int_Int » (x0 x1 : SortInt) :=
247252 some (ite (x0 < x1) x1 x0)
248253def «log2Int(_)_INT-COMMON_Int_Int » (x0 : SortInt) : Option SortInt :=
You can’t perform that action at this time.
0 commit comments