File: rate-4-alpha-17-tests.lisp

package info (click to toggle)
acl2 8.6%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 1,111,420 kB
  • sloc: lisp: 17,818,294; java: 125,359; python: 28,122; javascript: 23,458; cpp: 18,851; ansic: 11,569; perl: 7,678; xml: 5,591; sh: 3,976; makefile: 3,833; ruby: 2,633; yacc: 1,126; ml: 763; awk: 295; csh: 233; lex: 197; php: 178; tcl: 49; asm: 23; haskell: 17
file content (70 lines) | stat: -rw-r--r-- 2,895 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
; Poseidon Library
;
;    Copyright 2024 Provable Inc.
;
;    Licensed under the Apache License, Version 2.0 (the "License");
;    you may not use this file except in compliance with the License.
;    You may obtain a copy of the License at
;
;      http://www.apache.org/licenses/LICENSE-2.0
;
;    Unless required by applicable law or agreed to in writing, software
;    distributed under the License is distributed on an "AS IS" BASIS,
;    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;    See the License for the specific language governing permissions and
;    limitations under the License.

; Authors: Alessandro Coglio (www.alessandrocoglio.info)
;          Eric McCarthy (bendyarm on GitHub)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(in-package "POSEIDON")

(include-book "rate-4-alpha-17")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Tests.
; Checked against the snarkVM console Rust implementation.

(assert-equal
 (hash4 '())
 1044346838034619416100171813313106342224256770546574686139345274096660160611)

(assert-equal
 (hash4 '(0))
 6531918078649604677267704629524208386557917803204512136246020129886969612813)

(assert-equal
 (hash4 '(1))
 4426996492654533614386079842002262353437097961897230015892590642692830916891)

(assert-equal
 (hash4 '(0 1))
 3515567246660071748861271187713830429704652891229797018766869690557265012151)

(assert-equal
 (hash4 '(7 6))
 6569866994757293255004300918458370975674559167201047636575858551784982288595)

(assert-equal
 (hash4 '(3801852864665033841774715284518384682376829752661853198612247855579120198106
          8354898322875240371401674517397790035008442020361740574117886421279083828480
          4810388512520169167962815122521832339992376865086300759308552937986944510606))
 87141345289194987249335251035288105774877062220257664575645549134632926482)

(assert-equal
 (hash4 '(3801852864665033841774715284518384682376829752661853198612247855579120198106
          8354898322875240371401674517397790035008442020361740574117886421279083828480
          4810388512520169167962815122521832339992376865086300759308552937986944510606
          1806278863067630397941269234951941896370617486625414347832536440203404317871))
 7213538381157479600695819072074313481664544179359574938537072092346114865618)

(assert-equal
 (hash4 '(3801852864665033841774715284518384682376829752661853198612247855579120198106
          8354898322875240371401674517397790035008442020361740574117886421279083828480
          4810388512520169167962815122521832339992376865086300759308552937986944510606
          1806278863067630397941269234951941896370617486625414347832536440203404317871
          4017177598231920767921734423139954103557056461408532722673217828464276314809))
 5481099192588700791287898101517060190977970633110857260811993991553610949275)