File tree 10 files changed +214
-1
lines changed
plutus-benchmark/script-contexts/test/V1
plutus-ledger-api/test-plugin/Spec/Data/ScriptContext/9.6
10 files changed +214
-1
lines changed Original file line number Diff line number Diff line change
1
+ An error has occurred:
2
+ The machine terminated because of an error, either from a built-in function or from an explicit use of 'error'.
3
+ Final budget: ({cpu: 38313498
4
+ | mem: 144663})
5
+ Logs: Odd number of outputs
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ testCheckSOPSc1 = testGroup "checkScriptContext1"
47
47
compiledCodeToTerm $ SOP.SC. mkCheckScriptContext1Code (SOP.SC. mkScriptContext 4 )
48
48
, testCase " fails on 5" . assertFailed $
49
49
compiledCodeToTerm $ SOP.SC. mkCheckScriptContext1Code (SOP.SC. mkScriptContext 5 )
50
- , runTestGhcSOP [ Tx. goldenBudget " checkScriptContext1" $
50
+ , runTestGhcSOP [ Tx. goldenSize " checkScriptContext1" $
51
51
SOP.SC. mkCheckScriptContext1Code (SOP.SC. mkScriptContext 1 )
52
52
, Tx. goldenPirReadable " checkScriptContext1" $
53
53
SOP.SC. mkCheckScriptContext1Code (SOP.SC. mkScriptContext 1 )
Original file line number Diff line number Diff line change
1
+ let
2
+ data Bool | Bool_match where
3
+ True : Bool
4
+ False : Bool
5
+ data Unit | Unit_match where
6
+ Unit : Unit
7
+ in
8
+ \(d : data) -> ()
Original file line number Diff line number Diff line change
1
+ (program 1.1.0 (\d -> ()))
Original file line number Diff line number Diff line change
1
+ let
2
+ data (Maybe :: * -> *) a | Maybe_match where
3
+ Just : a -> Maybe a
4
+ Nothing : Maybe a
5
+ data Bool | Bool_match where
6
+ True : Bool
7
+ False : Bool
8
+ data Unit | Unit_match where
9
+ Unit : Unit
10
+ !traceError : all a. string -> a
11
+ = /\a ->
12
+ \(str : string) -> let !x : Unit = trace {Unit} str Unit in error {a}
13
+ in
14
+ \(d : data) ->
15
+ Bool_match
16
+ (let
17
+ !tup : pair integer (list data)
18
+ = unConstrData
19
+ (headList
20
+ {data}
21
+ (tailList
22
+ {data}
23
+ (tailList
24
+ {data}
25
+ (sndPair {integer} {list data} (unConstrData d)))))
26
+ in
27
+ Bool_match
28
+ (ifThenElse
29
+ {Bool}
30
+ (equalsInteger 1 (fstPair {integer} {list data} tup))
31
+ True
32
+ False)
33
+ {all dead. Bool}
34
+ (/\dead ->
35
+ let
36
+ !l : list data = sndPair {integer} {list data} tup
37
+ in
38
+ Maybe_match
39
+ {data}
40
+ (let
41
+ !tup : pair integer (list data)
42
+ = unConstrData (headList {data} (tailList {data} l))
43
+ !index : integer = fstPair {integer} {list data} tup
44
+ !args : list data = sndPair {integer} {list data} tup
45
+ in
46
+ Bool_match
47
+ (ifThenElse {Bool} (equalsInteger 1 index) True False)
48
+ {all dead. Maybe data}
49
+ (/\dead -> Nothing {data})
50
+ (/\dead ->
51
+ Bool_match
52
+ (ifThenElse {Bool} (equalsInteger 0 index) True False)
53
+ {all dead. Maybe data}
54
+ (/\dead -> Just {data} (headList {data} args))
55
+ (/\dead -> traceError {Maybe data} "PT1")
56
+ {all dead. dead})
57
+ {all dead. dead})
58
+ {all dead. Bool}
59
+ (\(ds : data) -> /\dead -> True)
60
+ (/\dead -> False)
61
+ {all dead. dead})
62
+ (/\dead -> False)
63
+ {all dead. dead})
64
+ {all dead. unit}
65
+ (/\dead -> ())
66
+ (/\dead -> traceError {unit} "PT5")
67
+ {all dead. dead}
Original file line number Diff line number Diff line change
1
+ (program
2
+ 1.1.0
3
+ (\d ->
4
+ force
5
+ ((\traceError ->
6
+ case
7
+ ((\tup ->
8
+ force
9
+ (force ifThenElse
10
+ (equalsInteger 1 (force (force fstPair) tup))
11
+ (delay
12
+ (force
13
+ (case
14
+ ((\tup ->
15
+ (\index ->
16
+ (\args ->
17
+ force
18
+ (force ifThenElse
19
+ (equalsInteger 1 index)
20
+ (delay (constr 1 []))
21
+ (delay
22
+ (force
23
+ (force ifThenElse
24
+ (equalsInteger 0 index)
25
+ (delay
26
+ (constr 0
27
+ [ (force headList
28
+ args) ]))
29
+ (delay
30
+ (traceError
31
+ "PT1")))))))
32
+ (force (force sndPair) tup))
33
+ (force (force fstPair) tup))
34
+ (unConstrData
35
+ (force headList
36
+ (force tailList
37
+ (force (force sndPair) tup)))))
38
+ [ (\ds -> delay (constr 0 []))
39
+ , (delay (constr 1 [])) ])))
40
+ (delay (constr 1 []))))
41
+ (unConstrData
42
+ (force headList
43
+ (force tailList
44
+ (force tailList
45
+ (force (force sndPair) (unConstrData d)))))))
46
+ [(delay ()), (delay (traceError "PT5"))])
47
+ (\str -> (\x -> error) (force trace str (constr 0 []))))))
Original file line number Diff line number Diff line change
1
+ cpu: 597469
2
+ mem: 2006
3
+ size: 19
Original file line number Diff line number Diff line change
1
+ (let
2
+ data Unit | Unit_match where
3
+ Unit : Unit
4
+ data Bool | Bool_match where
5
+ True : Bool
6
+ False : Bool
7
+ data (Tuple2 :: * -> * -> *) a b | Tuple2_match where
8
+ Tuple2 : a -> b -> Tuple2 a b
9
+ in
10
+ \(ds : (\a -> data) integer) ->
11
+ Tuple2_match
12
+ {integer}
13
+ {list data}
14
+ ((let
15
+ b = list data
16
+ in
17
+ \(tup : pair integer b) ->
18
+ Tuple2
19
+ {integer}
20
+ {b}
21
+ (fstPair {integer} {b} tup)
22
+ (sndPair {integer} {b} tup))
23
+ (unConstrData ds))
24
+ {integer}
25
+ (\(ds : integer) (ds : list data) ->
26
+ Bool_match
27
+ (ifThenElse {Bool} (equalsInteger 0 ds) True False)
28
+ {all dead. integer}
29
+ (/\dead -> unIData (headList {data} ds))
30
+ (/\dead ->
31
+ Tuple2_match
32
+ {integer}
33
+ {list data}
34
+ ((let
35
+ b = list data
36
+ in
37
+ \(tup : pair integer b) ->
38
+ Tuple2
39
+ {integer}
40
+ {b}
41
+ (fstPair {integer} {b} tup)
42
+ (sndPair {integer} {b} tup))
43
+ (unConstrData ds))
44
+ {integer}
45
+ (\(ds : integer) (ds : list data) ->
46
+ Bool_match
47
+ (ifThenElse {Bool} (equalsInteger 1 ds) True False)
48
+ {all dead. integer}
49
+ (/\dead -> 1)
50
+ (/\dead ->
51
+ Unit_match (error {Unit}) {integer} (error {integer}))
52
+ {all dead. dead}))
53
+ {all dead. dead}))
54
+ (Constr 0 [I 1])
Original file line number Diff line number Diff line change
1
+ (program
2
+ 1.1.0
3
+ ((\ds ->
4
+ case
5
+ ((\tup ->
6
+ constr 0
7
+ [(force (force fstPair) tup), (force (force sndPair) tup)])
8
+ (unConstrData ds))
9
+ [ (\ds ds ->
10
+ force
11
+ (force ifThenElse
12
+ (equalsInteger 0 ds)
13
+ (delay (unIData (force headList ds)))
14
+ (delay
15
+ (case
16
+ ((\tup ->
17
+ constr 0
18
+ [ (force (force fstPair) tup)
19
+ , (force (force sndPair) tup) ])
20
+ (unConstrData ds))
21
+ [ (\ds ds ->
22
+ force
23
+ (force ifThenElse
24
+ (equalsInteger 1 ds)
25
+ (delay 1)
26
+ (delay (case error [error])))) ])))) ])
27
+ (Constr 0 [I 1])))
Original file line number Diff line number Diff line change
1
+ (con integer -2469135780)
You can’t perform that action at this time.
0 commit comments