diff options
| author | Eduardo Julian | 2022-12-02 19:33:00 -0400 | 
|---|---|---|
| committer | Eduardo Julian | 2022-12-02 19:33:00 -0400 | 
| commit | 94e5802f594a73245fce0fbd885103b8bf210d57 (patch) | |
| tree | 65e5799c0be40f5f015b39bfa6c87c9c27fd9424 /stdlib/source/specification/compositor | |
| parent | b491dfff00219d5206075ea65468e00ab657075d (diff) | |
Added some simple time-series handling machinery.
Diffstat (limited to '')
6 files changed, 14 insertions, 14 deletions
| diff --git a/stdlib/source/specification/compositor/common.lux b/stdlib/source/specification/compositor/common.lux index 9b3f398f4..6045d8db1 100644 --- a/stdlib/source/specification/compositor/common.lux +++ b/stdlib/source/specification/compositor/common.lux @@ -40,7 +40,7 @@                         (do phase.monad                           [_ runtime]                           (phase expressionS)))] -      (at host evaluate! evaluation_name expressionG)))) +      (of host evaluate! evaluation_name expressionG))))  (def (definer (open "[0]") state)    (Instancer Definer) @@ -54,7 +54,7 @@                            [host_name host_value host_declaration] (translation.define! lux_name expressionG)                            _ (translation.learn lux_name host_name)]                           (phase (synthesis.constant lux_name))))] -      (at host evaluate! "definer" definitionG)))) +      (of host evaluate! "definer" definitionG))))  (def .public (executors target expander platform                          analysis_bundle translation_bundle declaration_bundle diff --git a/stdlib/source/specification/compositor/generation/case.lux b/stdlib/source/specification/compositor/generation/case.lux index 8043bd2e0..5b36db339 100644 --- a/stdlib/source/specification/compositor/generation/case.lux +++ b/stdlib/source/specification/compositor/generation/case.lux @@ -34,7 +34,7 @@  (def size    (Random Nat) -  (|> r.nat (at r.monad each (|>> (n.% ..limit) (n.max 2))))) +  (|> r.nat (of r.monad each (|>> (n.% ..limit) (n.max 2)))))  (def (tail? size idx)    (-> Nat Nat Bit) @@ -69,7 +69,7 @@                       [(r.unicode 5) synthesis.text synthesis.path/text]))                 (do [! r.monad]                   [size ..size -                  idx (|> r.nat (at ! each (n.% size))) +                  idx (|> r.nat (of ! each (n.% size)))                    [subS subP] when                    .let [unitS (synthesis.text synthesis.unit)                          whenS (synthesis.tuple @@ -84,7 +84,7 @@                   (in [whenS whenP]))                 (do [! r.monad]                   [size ..size -                  idx (|> r.nat (at ! each (n.% size))) +                  idx (|> r.nat (of ! each (n.% size)))                    [subS subP] when                    .let [right? (tail? size idx)                          whenS (synthesis.variant @@ -248,7 +248,7 @@         (_.test "==="           (and (text#= (synthesis.%path special_path)                        (synthesis.%path special_pattern_path)) -              (at synthesis.path_equivalence = special_path special_pattern_path))) +              (of synthesis.path_equivalence = special_path special_pattern_path)))         (_.test "CODE"           (|> special_input               (run "special_input") diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux index a0d202a2e..acb782c1f 100644 --- a/stdlib/source/specification/compositor/generation/common.lux +++ b/stdlib/source/specification/compositor/generation/common.lux @@ -126,7 +126,7 @@  (def simple_frac    (Random Frac) -  (|> r.nat (at r.monad each (|>> (n.% 1000) .int i.frac)))) +  (|> r.nat (of r.monad each (|>> (n.% 1000) .int i.frac))))  (def (f64 run)    (-> Runner Test) @@ -174,12 +174,12 @@  (def (text run)    (-> Runner Test)    (do [! r.monad] -    [sample_size (|> r.nat (at ! each (|>> (n.% 10) (n.max 1)))) +    [sample_size (|> r.nat (of ! each (|>> (n.% 10) (n.max 1))))       sample_lower (r.lower_case_alpha sample_size)       sample_upper (r.upper_case_alpha sample_size)       sample_alpha (|> (r.alphabetic sample_size)                        (r.only (|>> (text#= sample_upper) not))) -     char_idx (|> r.nat (at ! each (n.% sample_size))) +     char_idx (|> r.nat (of ! each (n.% sample_size)))       .let [sample_lowerS (synthesis.text sample_lower)             sample_upperS (synthesis.text sample_upper)             sample_alphaS (synthesis.text sample_alpha) diff --git a/stdlib/source/specification/compositor/generation/function.lux b/stdlib/source/specification/compositor/generation/function.lux index 92d0bdaa2..63b025065 100644 --- a/stdlib/source/specification/compositor/generation/function.lux +++ b/stdlib/source/specification/compositor/generation/function.lux @@ -52,7 +52,7 @@    (-> Runner Test)    (do [! r.monad]      [[arity local functionS] ..function -     partial_arity (|> r.nat (at ! each (|>> (n.% arity) (n.max 1)))) +     partial_arity (|> r.nat (of ! each (|>> (n.% arity) (n.max 1))))       inputs (r.list arity r.safe_frac)       .let [expectation (maybe.trusted (list.item (-- local) inputs))             inputsS (list#each (|>> synthesis.f64) inputs)]] diff --git a/stdlib/source/specification/compositor/generation/reference.lux b/stdlib/source/specification/compositor/generation/reference.lux index ce0d00d1a..74c556d80 100644 --- a/stdlib/source/specification/compositor/generation/reference.lux +++ b/stdlib/source/specification/compositor/generation/reference.lux @@ -43,7 +43,7 @@  (def (variable run)    (-> Runner Test)    (do [! r.monad] -    [register (|> r.nat (at ! each (n.% 100))) +    [register (|> r.nat (of ! each (n.% 100)))       expected r.safe_frac]      (_.test "Local variables."        (|> (synthesis.branch/let [(synthesis.f64 expected) diff --git a/stdlib/source/specification/compositor/generation/structure.lux b/stdlib/source/specification/compositor/generation/structure.lux index acf9888e8..b28648520 100644 --- a/stdlib/source/specification/compositor/generation/structure.lux +++ b/stdlib/source/specification/compositor/generation/structure.lux @@ -33,8 +33,8 @@  (def (variant run)    (-> Runner Test)    (do [! r.monad] -    [num_tags (|> r.nat (at ! each (|>> (n.% 10) (n.max 2)))) -     tag_in (|> r.nat (at ! each (n.% num_tags))) +    [num_tags (|> r.nat (of ! each (|>> (n.% 10) (n.max 2)))) +     tag_in (|> r.nat (of ! each (n.% num_tags)))       .let [last?_in (|> num_tags -- (n.= tag_in))]       value_in r.i64]      (_.test (%.symbol (symbol synthesis.variant)) @@ -69,7 +69,7 @@  (def (tuple run)    (-> Runner Test)    (do [! r.monad] -    [size (|> r.nat (at ! each (|>> (n.% 10) (n.max 2)))) +    [size (|> r.nat (of ! each (|>> (n.% 10) (n.max 2))))       tuple_in (r.list size r.i64)]      (_.test (%.symbol (symbol synthesis.tuple))        (|> (synthesis.tuple (list#each (|>> synthesis.i64) tuple_in)) | 
