haskell-te: 7b76d44ff2ae50465da9acf716ce0f2f292930fc

     1: { bash, genQuickspecRunner, lib, runCommand, testData, wrap }:
     2: 
     3: with rec {
     4:   inherit (builtins) attrNames filter getAttr listToAttrs readDir readFile
     5:                      toJSON;
     6:   inherit (lib) genAttrs hasSuffix nameValuePair removeSuffix;
     7: 
     8:   names = map (removeSuffix ".smt2")
     9:               (filter (hasSuffix ".smt2") (attrNames (readDir ./.)));
    10: 
    11:   benchmarks = listToAttrs (map (n: nameValuePair n (mkBench n)) names);
    12: 
    13:   mkBench = n:
    14:     with {
    15:       data = getAttr n testData.isabelle-theories;
    16:     };
    17:     {
    18:     content      = readFile (./. + "/${n}.smt2");
    19:     ground_truth = readFile (./ground-truth + "/${n}.smt2");
    20:     runner       = runCommand "quickspec-runner-${n}"
    21:       {
    22:         inherit (data) asts;
    23:         buildInputs = [ genQuickspecRunner ];
    24:         OUT_DIRS    = toJSON [data.nixed];
    25:       }
    26:       ''
    27:         X=$(genQuickspecRunner < "$asts")
    28:         ln -s "$X" "$out"
    29:       '';
    30: 
    31:     analyser = wrap {
    32:       name   = "analyser-${n}";
    33:       paths  = [ bash ];
    34:       vars   = rec {
    35:         GROUND_TRUTH = ./ground-truth + "/${n}.smt2";
    36:         TRUTH_SOURCE = GROUND_TRUTH;
    37:       };
    38:       script = ''
    39:         #!${bash}/bin/bash
    40:         set -e
    41:         set -o pipefail
    42:         precision_recall_eqs
    43:       '';
    44:     };
    45:   };
    46: };
    47: 
    48: toJSON benchmarks

Generated by git2html.