<commit_before>#lang rosette

(require "interp-enumerate.rkt")
(require "custom.rkt")

(define (benchmark)
  (let ((lines (file->lines "expressions5.txt" #:mode 'text)))
    (for/list ([line lines])
      (let* ((exp-types (read (open-input-string line)))
             (exp (car exp-types))
             (symbolics (parse-column-metadata (cadr exp-types)))
             (fs (test-custom (list exp) symbolics)))
        (for/list ([f fs])
          (println (car (cadr f)))
          (to-table f #t))))))

(define (benchmark-synthesis)
    (let ((lines (file->lines "expressions5.txt" #:mode 'text)))
    (for/list ([line lines])
      (println "parsing")
      (println line)
      (println "*****")
      (let* ((exp-types (read (open-input-string line)))
             (exp (car exp-types))<commit_msg>comment<commit_after>#lang rosette

(require "interp-enumerate.rkt")
(require "custom.rkt")

(define (benchmark)
  (let ((lines (file->lines "expressions5.txt" #:mode 'text)))
    (for/list ([line lines])
      (let* ((exp-types (read (open-input-string line)))
             (exp (car exp-types))
             (symbolics (parse-column-metadata (cadr exp-types)))
             (fs (test-custom (list exp) symbolics)))
        (for/list ([f fs])
          (println (car (cadr f)))
          (to-table f #t))))))

;; given the current benchmark5.txt file, if you run this you will sometimes see it generate (- (in 1) (sign (in 1)))
;; because all the generated data uses negative numbers.  It can then find a counterexample.  For other function that
;; get generated, they are correct (if overly complex) and so no counterexample exists
(define (benchmark-synthesis)
    (let ((lines (file->lines "expressions5.txt" #:mode 'text)))
    (for/list ([line lines])
      (println "parsing")
      (println line)
      (println "*****")
      (let* ((exp-types (read (open-input-string line)))
             (exp (car exp-types))
{'fraction_non_alphanumeric': 0.1684867394695788, 'fraction_numerical': 0.003640145605824233, 'mean_word_length': 2.848, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2676878', 'n_tokens_mistral': 619, 'n_tokens_neox': 610, 'n_words': 186}