-
Notifications
You must be signed in to change notification settings - Fork 0
/
statistics.rkt
33 lines (26 loc) · 958 Bytes
/
statistics.rkt
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
#lang racket
(require "heuristic-constants.rkt"
"struct-with-set.rkt")
(provide (all-defined-out))
(struct-with-set SAT-Stats (decision-level
assigned-order
conflicts-since-last-restart
forget-threshold restart-threshold
#;satisfied-clauses))
(define (inc-assigned-order stats)
(set-SAT-Stats-assigned-order stats (add1 (SAT-Stats-assigned-order stats))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Specialized setters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (init-stats)
(SAT-Stats 0
0
0
FORGET_THRESHOLD_INITIAL_PERCENTAGE
RESTART_INITIAL_THRESHOLD))
(define (reset-stats stats)
(SAT-Stats 0
0
0
(SAT-Stats-forget-threshold stats)
(SAT-Stats-restart-threshold stats)))