<commit_before>(declare (usual-integrations))
;;;; Analysis data structure

;;; An analysis binding is a statement about the current state of
;;; knowledge of the analysis, with regard to what the concrete
;;; interpreter would do starting from some point.  The point is
;;; determined by either an expression and an (abstract) environment,
;;; or two abstract values that are a procedure to apply and an
;;; argument to apply it to.  Either kind of point is also in a given
;;; world.  The world represents all accessible information that may
;;; change dynamically during a run of the program (namely, that which
;;; is not encapsulated in the state).  As such, the world contains
;;; one piece of information: the gensym number.  Everything known
;;; about the evaluation is the (abstract) value it returns and the
;;; effect it has on the world (namely, whether or not it creates new
;;; gensyms).

(define-structure (binding safe-accessors (constructor %make-binding))
  part1
  part2 ; Always an env for exp-env pairs, never an env for proc-arg pairs
  world
  value
  new-world
  ;; This notify slot is a list of bindings used to keep the analysis
  ;; work queue up to date.
  notify)

(define-structure (eval-state safe-accessors)
  exp
  env)

(define-structure (apply-state safe-accessors)
  proc
  arg)<commit_msg>I don't need these structures any more.<commit_after>(declare (usual-integrations))
;;;; Analysis data structure

;;; An analysis binding is a statement about the current state of
;;; knowledge of the analysis, with regard to what the concrete
;;; interpreter would do starting from some point.  The point is
;;; determined by either an expression and an (abstract) environment,
;;; or two abstract values that are a procedure to apply and an
;;; argument to apply it to.  Either kind of point is also in a given
;;; world.  The world represents all accessible information that may
;;; change dynamically during a run of the program (namely, that which
;;; is not encapsulated in the state).  As such, the world contains
;;; one piece of information: the gensym number.  Everything known
;;; about the evaluation is the (abstract) value it returns and the
;;; effect it has on the world (namely, whether or not it creates new
;;; gensyms).

(define-structure (binding safe-accessors (constructor %make-binding))
  part1
  part2 ; Always an env for exp-env pairs, never an env for proc-arg pairs
  world
  value
  new-world
  ;; This notify slot is a list of bindings used to keep the analysis
  ;; work queue up to date.
  notify)
{'fraction_non_alphanumeric': 0.07746478873239436, 'fraction_numerical': 0.001564945226917058, 'mean_word_length': 4.176113360323886, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2714800', 'n_tokens_mistral': 685, 'n_tokens_neox': 658, 'n_words': 369}