exception handling for vm model
This commit is contained in:
parent
9bb9f2b150
commit
4612775a75
|
@ -443,13 +443,9 @@
|
||||||
(with-handlers
|
(with-handlers
|
||||||
([exn:fail? (λ (exc)
|
([exn:fail? (λ (exc)
|
||||||
(unless
|
(unless
|
||||||
(or
|
|
||||||
(regexp-match?
|
(regexp-match?
|
||||||
#rx"^counterexample"
|
#"counterexample|domain|clauses"
|
||||||
(exn-message exc))
|
(exn-message exc))
|
||||||
(regexp-match?
|
|
||||||
#rx"domain"
|
|
||||||
(exn-message exc)))
|
|
||||||
(printf "exception on ~s\n~s\n" e
|
(printf "exception on ~s\n~s\n" e
|
||||||
(exn-message exc)))
|
(exn-message exc)))
|
||||||
#f)])
|
#f)])
|
||||||
|
@ -481,6 +477,7 @@
|
||||||
(generate-term bytecode e #:i-th index)
|
(generate-term bytecode e #:i-th index)
|
||||||
(set! index (add1 index))))))
|
(set! index (add1 index))))))
|
||||||
|
|
||||||
|
(define fixed '())
|
||||||
(test-equal
|
(test-equal
|
||||||
(bytecode-ok?
|
(bytecode-ok?
|
||||||
'(let-one 'x
|
'(let-one 'x
|
||||||
|
@ -488,4 +485,3 @@
|
||||||
'x)))
|
'x)))
|
||||||
#t)
|
#t)
|
||||||
|
|
||||||
(define fixed '())
|
|
||||||
|
|
|
@ -440,13 +440,9 @@
|
||||||
(with-handlers
|
(with-handlers
|
||||||
([exn:fail? (λ (exc)
|
([exn:fail? (λ (exc)
|
||||||
(unless
|
(unless
|
||||||
(or
|
|
||||||
(regexp-match?
|
(regexp-match?
|
||||||
#rx"^counterexample"
|
#"counterexample|domain|clauses"
|
||||||
(exn-message exc))
|
(exn-message exc))
|
||||||
(regexp-match?
|
|
||||||
#rx"domain"
|
|
||||||
(exn-message exc)))
|
|
||||||
(printf "exception on ~s\n~s\n" e
|
(printf "exception on ~s\n~s\n" e
|
||||||
(exn-message exc)))
|
(exn-message exc)))
|
||||||
#f)])
|
#f)])
|
||||||
|
@ -478,6 +474,7 @@
|
||||||
(generate-term bytecode e #:i-th index)
|
(generate-term bytecode e #:i-th index)
|
||||||
(set! index (add1 index))))))
|
(set! index (add1 index))))))
|
||||||
|
|
||||||
|
(define fixed '())
|
||||||
(test-equal
|
(test-equal
|
||||||
(bytecode-ok?
|
(bytecode-ok?
|
||||||
'(let-one 42
|
'(let-one 42
|
||||||
|
@ -486,4 +483,3 @@
|
||||||
(loc-box 1)))))
|
(loc-box 1)))))
|
||||||
#t)
|
#t)
|
||||||
|
|
||||||
(define fixed '())
|
|
||||||
|
|
|
@ -438,13 +438,9 @@
|
||||||
(with-handlers
|
(with-handlers
|
||||||
([exn:fail? (λ (exc)
|
([exn:fail? (λ (exc)
|
||||||
(unless
|
(unless
|
||||||
(or
|
|
||||||
(regexp-match?
|
(regexp-match?
|
||||||
#rx"^counterexample"
|
#"counterexample|domain|clauses"
|
||||||
(exn-message exc))
|
(exn-message exc))
|
||||||
(regexp-match?
|
|
||||||
#rx"domain"
|
|
||||||
(exn-message exc)))
|
|
||||||
(printf "exception on ~s\n~s\n" e
|
(printf "exception on ~s\n~s\n" e
|
||||||
(exn-message exc)))
|
(exn-message exc)))
|
||||||
#f)])
|
#f)])
|
||||||
|
@ -476,6 +472,7 @@
|
||||||
(generate-term bytecode e #:i-th index)
|
(generate-term bytecode e #:i-th index)
|
||||||
(set! index (add1 index))))))
|
(set! index (add1 index))))))
|
||||||
|
|
||||||
|
(define fixed '())
|
||||||
(test-equal
|
(test-equal
|
||||||
(bytecode-ok?
|
(bytecode-ok?
|
||||||
'(application
|
'(application
|
||||||
|
@ -484,4 +481,3 @@
|
||||||
(install-value 0 'y (boxenv 0 'z))))
|
(install-value 0 'y (boxenv 0 'z))))
|
||||||
#t)
|
#t)
|
||||||
|
|
||||||
(define fixed '())
|
|
||||||
|
|
|
@ -439,13 +439,9 @@
|
||||||
(with-handlers
|
(with-handlers
|
||||||
([exn:fail? (λ (exc)
|
([exn:fail? (λ (exc)
|
||||||
(unless
|
(unless
|
||||||
(or
|
|
||||||
(regexp-match?
|
(regexp-match?
|
||||||
#rx"^counterexample"
|
#"counterexample|domain|clauses"
|
||||||
(exn-message exc))
|
(exn-message exc))
|
||||||
(regexp-match?
|
|
||||||
#rx"domain"
|
|
||||||
(exn-message exc)))
|
|
||||||
(printf "exception on ~s\n~s\n" e
|
(printf "exception on ~s\n~s\n" e
|
||||||
(exn-message exc)))
|
(exn-message exc)))
|
||||||
#f)])
|
#f)])
|
||||||
|
@ -477,10 +473,10 @@
|
||||||
(generate-term bytecode e #:i-th index)
|
(generate-term bytecode e #:i-th index)
|
||||||
(set! index (add1 index))))))
|
(set! index (add1 index))))))
|
||||||
|
|
||||||
|
(define fixed '())
|
||||||
(test-equal
|
(test-equal
|
||||||
(bytecode-ok?
|
(bytecode-ok?
|
||||||
'(let-one 'x
|
'(let-one 'x
|
||||||
(branch #f (boxenv 0 'y) (loc-box 0))))
|
(branch #f (boxenv 0 'y) (loc-box 0))))
|
||||||
#t)
|
#t)
|
||||||
|
|
||||||
(define fixed '())
|
|
||||||
|
|
|
@ -439,13 +439,9 @@
|
||||||
(with-handlers
|
(with-handlers
|
||||||
([exn:fail? (λ (exc)
|
([exn:fail? (λ (exc)
|
||||||
(unless
|
(unless
|
||||||
(or
|
|
||||||
(regexp-match?
|
(regexp-match?
|
||||||
#rx"^counterexample"
|
#"counterexample|domain|clauses"
|
||||||
(exn-message exc))
|
(exn-message exc))
|
||||||
(regexp-match?
|
|
||||||
#rx"domain"
|
|
||||||
(exn-message exc)))
|
|
||||||
(printf "exception on ~s\n~s\n" e
|
(printf "exception on ~s\n~s\n" e
|
||||||
(exn-message exc)))
|
(exn-message exc)))
|
||||||
#f)])
|
#f)])
|
||||||
|
@ -477,6 +473,7 @@
|
||||||
(generate-term bytecode e #:i-th index)
|
(generate-term bytecode e #:i-th index)
|
||||||
(set! index (add1 index))))))
|
(set! index (add1 index))))))
|
||||||
|
|
||||||
|
(define fixed '())
|
||||||
(test-equal
|
(test-equal
|
||||||
(bytecode-ok?
|
(bytecode-ok?
|
||||||
'(let-void 1
|
'(let-void 1
|
||||||
|
@ -485,4 +482,3 @@
|
||||||
(loc-noclr 0))))
|
(loc-noclr 0))))
|
||||||
#t)
|
#t)
|
||||||
|
|
||||||
(define fixed '())
|
|
||||||
|
|
|
@ -438,13 +438,9 @@
|
||||||
(with-handlers
|
(with-handlers
|
||||||
([exn:fail? (λ (exc)
|
([exn:fail? (λ (exc)
|
||||||
(unless
|
(unless
|
||||||
(or
|
|
||||||
(regexp-match?
|
(regexp-match?
|
||||||
#rx"^counterexample"
|
#"counterexample|domain|clauses"
|
||||||
(exn-message exc))
|
(exn-message exc))
|
||||||
(regexp-match?
|
|
||||||
#rx"domain"
|
|
||||||
(exn-message exc)))
|
|
||||||
(printf "exception on ~s\n~s\n" e
|
(printf "exception on ~s\n~s\n" e
|
||||||
(exn-message exc)))
|
(exn-message exc)))
|
||||||
#f)])
|
#f)])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user