;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@143 Helper function to compile a TRAVERSAL. This is useful for mapping a compiler macro over a list of traversal specifications. (fn TRAVERSAL) (defalias 'symex--compile-traversal-helper #[257 "\300D\207" [symex-traversal] 3 (#$ . 88)]) #@111 Compile a protocol from Symex DSL -> Lisp. OPTIONS - see underlying Lisp implementation. (fn &rest OPTIONS) (defalias 'symex--compile-protocol '(macro . #[128 "\300\301\302\"B\207" [symex-make-protocol mapcar symex--compile-traversal-helper] 5 (#$ . 331)])) #@109 Compile a maneuver from Symex DSL -> Lisp. PHASES - see underlying Lisp implementation. (fn &rest PHASES) (defalias 'symex--compile-maneuver '(macro . #[128 "\300\301\302\"B\207" [symex-make-maneuver mapcar symex--compile-traversal-helper] 5 (#$ . 599)])) #@173 Compile a detour from Symex DSL -> Lisp. REORIENTATION - see underlying Lisp implementation. TRAVERSAL - see underlying Lisp implementation. (fn REORIENTATION TRAVERSAL) (defalias 'symex--compile-detour '(macro . #[514 "\300\301D\301DE\207" [symex-make-detour symex-traversal] 6 (#$ . 865)])) #@168 Compile a circuit from Symex DSL -> Lisp. TRAVERSAL - see underlying Lisp implementation. TIMES - see underlying Lisp implementation. (fn TRAVERSAL &optional TIMES) (defalias 'symex--compile-circuit '(macro . #[513 "\300\301DE\207" [symex-make-circuit symex-traversal] 5 (#$ . 1169)])) #@268 Rewrite a condition expression into a lambda expression. CONDITION - a condition specified in DSL syntax, which is to be rewritten into a lambda expression in terms of an existing predicate procedure, or left unmodified if it is already a procedure. (fn CONDITION) (defalias 'symex--rewrite-condition #[257 "\2119\203\211\300\267\207\301\207\302\207\303\207\304\207\305\207\207\211@\306=\203(\307\310\306\311\312A@!DDE\207\211@\313=\2035\312A@!\207\207" [#s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (final 9 initial 11 first 13 last 15 root 17)) 'symex--point-at-final-symex-p 'symex--point-at-initial-symex-p 'symex--point-at-first-symex-p 'symex--point-at-last-symex-p 'symex--point-at-root-symex-p not lambda nil funcall symex--rewrite-condition at] 7 (#$ . 1466)]) #@211 Rewrite DSL syntax to Lisp syntax in a precaution specification. CONDITION-SPEC - a condition written in DSL syntax. See underlying Lisp implementation for more on precaution conditions. (fn CONDITION-SPEC) (defalias 'symex--rewrite-precaution-condition-spec #[257 "\211@\300=\204\211@\301=\203\302\303A@!D\207\211@\304=\204$\211@\305=\205+\306\303A@!D\207" [before beforehand :pre-condition symex--rewrite-condition after afterwards :post-condition] 4 (#$ . 2291)]) #@1030 Compile a precaution from Symex DSL -> Lisp. TRAVERSAL - see underlying Lisp implementation. CONDITION-SPECS - conditions to be checked either before or after executing the traversal -- see underlying Lisp implementation. The conditions may either be specified purely using the DSL, or could also include custom lambdas which will be used verbatim. Conditions to be checked before executing the traversal are specified as: (beforehand ...) Conditions to be checked after executing the traversal are specified as: (afterwards ...) Checking that we are at a particular node is done via: (at root/first/last/initial/final) where root is the root of the current tree, first and last are the first and last symexes at the current level, and initial and final refer to the first and last symex in the buffer. These conditions may also be negated: (not (at ...)). Alternatively, if a custom condition is desired, it may be specified directly, e.g.: (beforehand ). (fn TRAVERSAL &rest CONDITION-SPECS) (defalias 'symex--compile-precaution '(macro . #[385 "\300\301\302DD\303\300\304\305\"\"\"\207" [append symex-make-precaution symex-traversal apply mapcar symex--rewrite-precaution-condition-spec] 9 (#$ . 2777)])) #@821 Compile a decision from Symex DSL -> Lisp. CONDITION - The condition on which the decision to choose either the CONSEQUENT or the ALTERNATIVE traversal is based (see underlying Lisp implementation). The conditions may either be specified purely using the DSL, or could also include custom lambdas which will be used verbatim. Checking that we are at a particular node is done via: (at root/first/last/initial/final) where root is the root of the current tree, first and last are the first and last symexes at the current level, and initial and final refer to the first and last symex in the buffer. These conditions may also be negated: (not (at ...)). Alternatively, if a custom condition is desired, it may be specified directly, e.g.: (decision ...). (fn CONDITION CONSEQUENT ALTERNATIVE) (defalias 'symex--compile-decision '(macro . #[771 "\300\301!\302D\302DF\207" [symex-make-decision symex--rewrite-condition symex-traversal] 8 (#$ . 4030)])) #@150 Compile a move from Symex DSL -> Lisp. DIRECTION - the direction to move in, which could be one of: forward, backward, up, or down. (fn DIRECTION) (defalias 'symex--compile-move '(macro . #[257 "\211\300\267\202\301\207\302\207\303\207\304\207\305\207" [#s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (forward 6 backward 8 up 10 down 12)) (symex-make-move 1 0) (symex-make-move -1 0) (symex-make-move 0 1) (symex-make-move 0 -1) nil] 3 (#$ . 5018)])) #@397 Compile a traversal from Symex DSL -> Lisp. This defines an anonymous traversal, much like `lambda` defines an anonymous function. To give the traversal a name, either assign it to a variable, or use the `deftraversal` form (analogous to `defun`). TRAVERSAL could be any traversal specification, e.g. a maneuver, a detour, a move, etc., which is specified using the Symex DSL. (fn TRAVERSAL) (defalias 'symex-traversal '(macro . #[257 "\211<\204\207\211@\300=\203\301AB\207\211@\302=\203\303AB\207\211@\304=\203*\305AB\207\211@\306=\2036\307AB\207\211@\310=\203B\311AB\207\211@\312=\203N\313AB\207\211@\314=\203Z\315AB\207\207" [protocol symex--compile-protocol maneuver symex--compile-maneuver detour symex--compile-detour circuit symex--compile-circuit precaution symex--compile-precaution decision symex--compile-decision move symex--compile-move] 3 (#$ . 5518)])) #@496 Define a symex traversal using the Symex DSL. NAME is the name of the traversal. The defined traversal will be assigned to a variable with this name. TRAVERSAL is the specification of the traversal in the Symex DSL. This can be thought of as the 'program' written in the DSL, which will be compiled into Lisp and can be executed when needed. An optional DOCSTRING will be used as documentation for the variable NAME to which the traversal is assigned. (fn NAME TRAVERSAL &optional DOCSTRING) (defalias 'deftraversal '(macro . #[770 "\300\301DF\207" [defvar symex-traversal] 7 (#$ . 6415)])) (provide 'symex-dsl)