{"text": "program nwhilest;\nvar i, j, k : integer;\nbegin\n    i := 1;\n    while i < 10 do begin\n        j := 1;\n        while j < 10 do begin\n            k := 1;\n            while k < 10 do begin\n                if (k div 2) * 2 = k then\n                        k := k + 1\n                    end\n                else\n                        k := k + 1\n                    end\n            end;\n            j := j + 1;\n        end;\n        i := i + 1\n    end;\n    writeln('All End')\nend.", "meta": {"hexsha": "a6a4514f1bf8aebe602c4de8e7b70fd406a67c19", "size": 475, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "program2/answers/sample27.mpl", "max_stars_repo_name": "Hiroya-W/lang-processing", "max_stars_repo_head_hexsha": "c93ef2d5757e560c4df2335f07ac25552750140c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "program2/answers/sample27.mpl", "max_issues_repo_name": "Hiroya-W/lang-processing", "max_issues_repo_head_hexsha": "c93ef2d5757e560c4df2335f07ac25552750140c", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 14, "max_issues_repo_issues_event_min_datetime": "2020-10-04T11:15:32.000Z", "max_issues_repo_issues_event_max_datetime": "2021-01-20T02:11:14.000Z", "max_forks_repo_path": "program2/answers/sample27.mpl", "max_forks_repo_name": "Hiroya-W/lang-processing", "max_forks_repo_head_hexsha": "c93ef2d5757e560c4df2335f07ac25552750140c", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 21.5909090909, "max_line_length": 41, "alphanum_fraction": 0.3031578947, "num_tokens": 134, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5078118642792044, "lm_q2_score": 0.588889130767832, "lm_q1q2_score": 0.299044887348973}}
{"text": "export Improve := module ()\n    uses Domain_Type;\n    export Simplifiers := table();\n    export ModuleApply := proc(dom :: HDomain, $)::HDomain_mb;\n        local es := sort( [indices(Domain:-Improve:-Simplifiers,nolist) ]\n                          , key=(si->Simplifiers[si]:-SimplOrder))\n             , bnd, sh;\n        bnd, sh := op([1..2], dom);\n        sh := foldr(((f,q)->proc() cmp_simp_sh(f,q,args) end proc)\n                   ,(proc(_,b,$) b end proc), op(es))(bnd, sh);\n        DOMAIN(bnd, sh);\n    end proc;\n\n    local ModuleLoad := proc($)\n      LoadSimplifiers();\n      LoadSimplifiers := (proc() end proc);\n    end proc;#ModuleLoad\n\n    local LoadSimplifiers := proc($)\n      local lib_path, drs, improve_path, simpls_paths, simpl_path, names0, names1, new_names, nm;\n      unprotect(Simplifiers);\n      lib_path := LibraryTools:-FindLibrary(Hakaru);\n      if lib_path=NULL then error \"Hakaru library not found\"; end if;\n      lib_path := FileTools:-ParentDirectory(lib_path);\n      drs := kernelopts(dirsep);\n      improve_path := `cat`(lib_path,drs,\"Domain\",drs,\"Improve\");\n\n      simpls_paths := FileTools:-ListDirectory(improve_path);\n      for simpl_path in simpls_paths do\n        names0 := {anames(user)};\n        read(`cat`(improve_path,drs,simpl_path));\n        names1 := {anames(user)};\n        new_names := names1 minus names0;\n        for nm in new_names minus {entries(Simplifiers,nolist)} do\n          if nm :: `module`(SimplName,SimplOrder) then\n            if assigned(Simplifiers[nm:-SimplName])\n            and not Simplifiers[nm:-SimplName] = nm then\n              WARNING(\"overwriting old simplifier! (%1)\", Simplifiers[nm:-SimplName]):\n            end if;\n            Simplifiers[nm:-SimplName] := eval(nm);\n          else\n            WARNING(\"not recognized as a simplifier: %1\", nm);\n          end if;\n        end do;\n      end do;\n      protect(Simplifiers);\n    end proc;#LoadSimplifiers\n\n    local combine_errs := proc(err::DomNoSol, mb, $)\n        if mb :: DomNoSol then\n            DNoSol(op(err),op(mb));\n        else\n            mb\n        end if;\n    end proc;\n\n    # compose two simplifiers, combining errors if both fail\n    local cmp_simp_sh := proc(simp0, simp1, bnd, sh :: {DomShape,DomNoSol}, $)::{DomShape,DomNoSol};\n      local res, sh1; sh1 := Simplifiers[simp0](bnd, sh);\n      if not sh1 :: DomNoSol then\n          simp1(bnd, sh1);\n      else\n          combine_errs( sh1, simp1(bnd, sh) );\n      end if;\n    end proc;\nend module;\n", "meta": {"hexsha": "c228e647271167db7f286149b6158f2726076904", "size": 2486, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "maple/Domain/Improve.mpl", "max_stars_repo_name": "vmchale/hakaru", "max_stars_repo_head_hexsha": "78922e13876e449d6812a55a11bf84c8eb0af4d6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 327, "max_stars_repo_stars_event_min_datetime": "2015-01-03T08:56:51.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-24T12:12:06.000Z", "max_issues_repo_path": "maple/Domain/Improve.mpl", "max_issues_repo_name": "vmchale/hakaru", "max_issues_repo_head_hexsha": "78922e13876e449d6812a55a11bf84c8eb0af4d6", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": 155, "max_issues_repo_issues_event_min_datetime": "2015-05-05T17:57:22.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T15:43:39.000Z", "max_forks_repo_path": "maple/Domain/Improve.mpl", "max_forks_repo_name": "vmchale/hakaru", "max_forks_repo_head_hexsha": "78922e13876e449d6812a55a11bf84c8eb0af4d6", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": 38, "max_forks_repo_forks_event_min_datetime": "2015-01-23T16:25:37.000Z", "max_forks_repo_forks_event_max_datetime": "2021-03-14T15:09:12.000Z", "avg_line_length": 37.1044776119, "max_line_length": 100, "alphanum_fraction": 0.5848753017, "num_tokens": 681, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5621765008857981, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.29863342676099575}}
{"text": "#include \"utils.mpl\" // you can include mpl files\n$creepAmt:10 // just like normal CRPL\n$addPerTime:1\n$Delay:15\n$maxAmt:1000\n$incrementInterval:10\n\namt()inline, CRPL{<-creepAmt 1 add} // also you can create CRPL functions\n\nmain()inline{ // the function that calls every tick\n\t/*\n\trecommended to be inline.\n\tall inline function will be implaced to their calls.\n\t*/\n\tonce{\n\t\tRemoveImages(Self());\n\t\tSetImage(Self(), \"main\", \"CustomEmitter\");\n\t\tSetTextSize(0.6);\n\t\tSetTimer1(incrementInterval + 1);\n\t}\n\tif(GetTimer1() == 0){\n\t\tSetText(\"Amt \" $ creepAmt $ endl() $ \"Interval: \" $ round(Delay/30.0, 2));\n\t\tSetCreeper(CurrentCoords(), amt());\n\t\tSetTimer1(Delay);\n\t}\n\tif (GetTimer0()==1 && creepAmt < maxAmt){\n\t\tcreepAmt = creepAmt + addPerTime;\n\t\tSetTimer0(incrementInterval + 1);\n\t}\n\tif (GetTimer2() == 0){\n\t\tf(RandCoords());\n\t\tSetTimer2(60);\n\t}\n\telse if(creepAmt > maxAmt) once creepAmt = maxAmt;\n}\n", "meta": {"hexsha": "a5e663e5fb55688393347618abef40b8608a5217", "size": 895, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "examples/customEmitter.mpl", "max_stars_repo_name": "Arin112/mplLang", "max_stars_repo_head_hexsha": "e7d41648305462d70acb6c3716283f311dd89b42", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2019-07-22T19:04:29.000Z", "max_stars_repo_stars_event_max_datetime": "2019-07-22T19:04:29.000Z", "max_issues_repo_path": "examples/customEmitter.mpl", "max_issues_repo_name": "Arin112/mplLang", "max_issues_repo_head_hexsha": "e7d41648305462d70acb6c3716283f311dd89b42", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "examples/customEmitter.mpl", "max_forks_repo_name": "Arin112/mplLang", "max_forks_repo_head_hexsha": "e7d41648305462d70acb6c3716283f311dd89b42", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 24.8611111111, "max_line_length": 76, "alphanum_fraction": 0.6748603352, "num_tokens": 290, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.44939263446475963, "lm_q1q2_score": 0.2974632649907189}}
{"text": "var $g i32\nvar $h i32\nfunc $multiwayfunc ( var %n i32) i32 {\n multiway (dread i32 %n) @labdft {\n   (add i32 (dread i32 $g, dread i32 $h)): goto @lab0\n   (dread i32 $h): goto @lab1\n   (constval i32 888): goto @lab0\n   (constval i32 'Y'): goto @lab0\n   (neg i32 (dread i32 $h)) : goto @lab9 }\n@lab0\n return (constval i32 -3)\n@labdft\n return (constval i32 100)\n@lab9\n return (constval i32 9)\n@lab1\n return (constval i32 1) }\n # EXEC: %irbuild Main.mpl\n # EXEC: %irbuild Main.irb.mpl\n # EXEC: %cmp Main.irb.mpl Main.irb.irb.mpl\n", "meta": {"hexsha": "bf7891e3f110b036719a3e9487acf6baf492f50b", "size": 524, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "test/testsuite/irbuild_test/I0057-mapleall-irbuild-edge-multiway/Main.mpl", "max_stars_repo_name": "harmonyos-mirror/OpenArkCompiler-test", "max_stars_repo_head_hexsha": "1755550ea22eb185cbef8cc5864fa273caebf95a", "max_stars_repo_licenses": ["MulanPSL-1.0"], "max_stars_count": 796, "max_stars_repo_stars_event_min_datetime": "2019-08-30T16:20:33.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-25T14:45:06.000Z", "max_issues_repo_path": "test/testsuite/irbuild_test/I0057-mapleall-irbuild-edge-multiway/Main.mpl", "max_issues_repo_name": "harmonyos-mirror/OpenArkCompiler-test", "max_issues_repo_head_hexsha": "1755550ea22eb185cbef8cc5864fa273caebf95a", "max_issues_repo_licenses": ["MulanPSL-1.0"], "max_issues_count": 16, "max_issues_repo_issues_event_min_datetime": "2019-08-30T18:04:08.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-19T05:02:58.000Z", "max_forks_repo_path": "test/testsuite/irbuild_test/I0057-mapleall-irbuild-edge-multiway/Main.mpl", "max_forks_repo_name": "harmonyos-mirror/OpenArkCompiler-test", "max_forks_repo_head_hexsha": "1755550ea22eb185cbef8cc5864fa273caebf95a", "max_forks_repo_licenses": ["MulanPSL-1.0"], "max_forks_count": 326, "max_forks_repo_forks_event_min_datetime": "2019-08-30T16:11:29.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-26T12:31:17.000Z", "avg_line_length": 24.9523809524, "max_line_length": 53, "alphanum_fraction": 0.6450381679, "num_tokens": 221, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5350984286266116, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.29669627452019137}}
{"text": "go := module ()\n  local undoStack, sr;\n  export here, where, up, child, fac, trm, silent, undo, ModuleApply;\n\n  where := [];\n\n  up := proc()\n    here, where := op(1,where)(here),\n                   [op(2..-1,where)];\n  end proc;\n\n  child := proc(i :: integer)\n    local _;\n    here, where := op(i,here),\n                   [unapply(subsop(i=_,here), _), op(where)];\n  end proc;\n\n  sr := proc(operator, t :: type)\n    local s, r, _;\n    if here :: operator then\n      s, r := selectremove(type, here, t);\n      here, where := s, [unapply(operator(_,r), _), op(where)];\n    elif type(here, t) then\n      where := [(_->_), op(where)];\n    else\n      here, where := operator(), [unapply(operator(_,here), _), op(where)];\n    end if\n  end proc;\n\n  silent := proc()\n    local instr, _, j;\n    for instr in _passed do\n      if instr :: list then\n        thisproc(op(instr))\n      elif instr :: integer then\n        child(instr)\n      elif instr = up then\n        up()\n      elif instr :: all(anything) then\n        here, where := op(1,instr),\n                       [unapply(subsindets(here,identical(op(1,instr)),(x->_)),\n                                _),\n                        op(where)];\n      elif instr :: fac(type) then\n        sr(`*`, op(1,instr))\n      elif instr :: trm(type) then\n        sr(`+`, op(1,instr))\n      elif instr :: type then\n        j := [seq(`if`(op(j,here) :: instr, j, NULL), j=1..nops(here))];\n        if nops(j) = 1 then\n          child(op(1,j))\n        else\n          error \"not unique: %%\", op(map(op, j, here))\n        end if\n      elif instr :: procedure then\n        here := instr(here)\n      end if\n    end do\n  end proc;\n\n  undoStack := [];\n\n  undo := proc()\n    here, where := op(op(1,undoStack));\n    undoStack := [op(2..-1,undoStack)]:\n    here, where;\n  end proc;\n\n  ModuleApply := proc()\n    undoStack := [[here, where], op(undoStack)];\n    try silent(_passed);\n    finally print(here, where);\n    end\n  end proc;\nend module:\n", "meta": {"hexsha": "976919ef875fdf56daf871e2efc4325186a22964", "size": 1964, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "maple/Edit.mpl", "max_stars_repo_name": "vmchale/hakaru", "max_stars_repo_head_hexsha": "78922e13876e449d6812a55a11bf84c8eb0af4d6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 327, "max_stars_repo_stars_event_min_datetime": "2015-01-03T08:56:51.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-24T12:12:06.000Z", "max_issues_repo_path": "maple/Edit.mpl", "max_issues_repo_name": "zaxtax/hakaru", "max_issues_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": 155, "max_issues_repo_issues_event_min_datetime": "2015-05-05T17:57:22.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T15:43:39.000Z", "max_forks_repo_path": "maple/Edit.mpl", "max_forks_repo_name": "zaxtax/hakaru", "max_forks_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": 38, "max_forks_repo_forks_event_min_datetime": "2015-01-23T16:25:37.000Z", "max_forks_repo_forks_event_max_datetime": "2021-03-14T15:09:12.000Z", "avg_line_length": 25.8421052632, "max_line_length": 79, "alphanum_fraction": 0.5050916497, "num_tokens": 561, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5736784074525098, "lm_q2_score": 0.5117166047041652, "lm_q1q2_score": 0.293560766853691}}
{"text": "# convert from Gonnet's FPAccuracy data sets to mpfr format\n# http://www.inf.ethz.ch/personal/gonnet/FPAccuracy/all.tar.Z\n\n# 1 - cut the lines from (say) C/acos.c, remove the 3rd (eps) field,\n#     replace the commata ',' by spaces, and remove the final '};'\n#     (hint: cut -d\" \" -f1,2,4,5 /tmp/acos.c > /tmp/acos2.c)\n# 2 - edit the infile and outfile lines below, and run\n#     maple -q < gonnet.mpl \n\ninfile := \"/tmp/acos2.c\":\noutfile := \"acos\":\n\n###################### don't edit below this line #############################\n\nfoo := proc(arg_m, val_m, arg_e, val_e, fp)\n   fprintf (fp, \"53 53 n \", 53);\n   to_hex(arg_m, arg_e, fp);\n   fprintf (fp, \" \");\n   # warning: Gonnet stores -val_e\n   to_hex(val_m, -val_e, fp);\n   fprintf (fp, \"\\n\");\nend:\n\nto_hex := proc(m, e, fp)\n   if m<0 then fprintf (fp, \"-\") fi;\n   fprintf (fp, \"0x%sp%d\", convert(abs(m),hex), e);\nend:\n\ncopyright := proc(fp)\n   fprintf (fp, \"# This file was generated from the FPAccuracy package\\n# http://www.inf.ethz.ch/personal/gonnet/FPAccuracy/all.tar.Z:\\n# Copyright (C) Gaston H. Gonnet\\n# This program is free software; you can redistribute it and/or\\n# modify it under the terms of the GNU General Public License\\n# as published by the Free Software Foundation; either version 2\\n# of the License, or (at your option) any later version.\\n# This program is distributed in the hope that it will be useful,\\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n# GNU General Public License for more details.\\n# You should have received a copy of the GNU General Public License\\n# along with this program; if not, write to the Free Software\\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\\n\")\nend:\n\nfp := fopen (outfile, WRITE):\n\nl := readdata(infile, integer, 4):\ncopyright(fp):\nfor e in l do foo(op(e), fp) od:\n\nfclose (fp);\n\nquit;\n\n", "meta": {"hexsha": "34da9eabf0fd25e57e274a184be7de4995c60fd0", "size": 1920, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "LibSource/mpfr/tests/data/gonnet.mpl", "max_stars_repo_name": "ekzyis/CrypTool-2", "max_stars_repo_head_hexsha": "1af234b4f74486fbfeb3b3c49228cc36533a8c89", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 12, "max_stars_repo_stars_event_min_datetime": "2021-09-29T14:50:06.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T15:01:21.000Z", "max_issues_repo_path": "LibSource/mpfr/tests/data/gonnet.mpl", "max_issues_repo_name": "ekzyis/CrypTool-2", "max_issues_repo_head_hexsha": "1af234b4f74486fbfeb3b3c49228cc36533a8c89", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": 15, "max_issues_repo_issues_event_min_datetime": "2021-12-24T22:53:49.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-25T10:03:13.000Z", "max_forks_repo_path": "LibSource/mpfr/tests/data/gonnet.mpl", "max_forks_repo_name": "ekzyis/CrypTool-2", "max_forks_repo_head_hexsha": "1af234b4f74486fbfeb3b3c49228cc36533a8c89", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": 10, "max_forks_repo_forks_event_min_datetime": "2021-10-17T19:46:51.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-18T02:57:57.000Z", "avg_line_length": 44.6511627907, "max_line_length": 881, "alphanum_fraction": 0.6682291667, "num_tokens": 557, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5926665999540698, "lm_q2_score": 0.49218813572079556, "lm_q1q2_score": 0.29170346893537613}}
{"text": "######################################################################\n# Commutative operad\n\n`is_element/comm` := (A::set) -> (z) -> type(z,identical(0));\n\n`is_equal/comm` := (A::set) -> (x,y) -> true;\n\n`is_leq/comm` := (A::set) -> (x,y) -> true;\n\n`random_element/comm` := (A::set) -> () -> 0;\n\n`list_elements/comm` := (A::set) -> [0];\n\n`count_elements/comm` := (A::set) -> 1;\n\n`eta/comm` := (A::set) -> `if`(nops(A)=1,0,FAIL);\n\n`gamma/comm` := (A::set,B::set) -> (p) -> (z,zz) -> 0;\n\n", "meta": {"hexsha": "d132c3f1bacc71985357f0938d3a8d359fc7ab1a", "size": 485, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "lib/operads/comm.mpl", "max_stars_repo_name": "NeilStrickland/maple_lib", "max_stars_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/operads/comm.mpl", "max_issues_repo_name": "NeilStrickland/maple_lib", "max_issues_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/operads/comm.mpl", "max_forks_repo_name": "NeilStrickland/maple_lib", "max_forks_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 24.25, "max_line_length": 70, "alphanum_fraction": 0.4268041237, "num_tokens": 178, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.5774953797290152, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.2910034852974852}}
{"text": "# Checks if an expression has domain bounds/shape, and check for either one.\nexport Has := module ()\n    export ModuleApply := proc(e, $)::truefalse;\n        Bound(e) or Shape(e);\n    end proc;\n\n    export Bound := proc(e, $)::truefalse;\n        assigned(Domain:-ExtBound[op(0,e)]) and\n        evalb(e :: Domain:-ExtBound[op(0,e)]:-MapleType);\n    end proc;\n\n    export Shape := proc(e, $)::truefalse;\n        assigned(Domain:-ExtShape[op(0,e)]) and\n        evalb(e :: Domain:-ExtShape[op(0,e)]:-MapleType);\n    end proc;\nend module;\n", "meta": {"hexsha": "cd7c0e3795f216ecbd8edd57a250ba812b8b0c4d", "size": 534, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "maple/Domain/Has.mpl", "max_stars_repo_name": "zaxtax/hakaru", "max_stars_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 4, "max_stars_repo_stars_event_min_datetime": "2015-02-07T17:57:04.000Z", "max_stars_repo_stars_event_max_datetime": "2016-01-29T19:40:24.000Z", "max_issues_repo_path": "maple/Domain/Has.mpl", "max_issues_repo_name": "zaxtax/hakaru", "max_issues_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "maple/Domain/Has.mpl", "max_forks_repo_name": "zaxtax/hakaru", "max_forks_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 31.4117647059, "max_line_length": 76, "alphanum_fraction": 0.606741573, "num_tokens": 150, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.5544704796847396, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.29022113195147736}}
{"text": "3 + 5 ~\n\n5 - 4 ~\n\n\n5 * 5 ~\n2 / 3 ~\n\njedi ( 5 < 6 )\n{ 2 + 3 } \nsith \n{ 1 + 6 } ~\n\nx = 5 \n\nyell ( x < 6 )\n{ 6 + 6 } ~\njedi ( 5 > 6 )\n{ 2 + 3 } \nsith \n{ 1 + 6 } ~\nx = 3 ~\nyell ( x > 6 )\n{ 6 + 6 } ~\nquit", "meta": {"hexsha": "01b1b20c689c59dd5687122ee991fd1002677076", "size": 199, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "MPL/Example Inputs/errorTest.mpl", "max_stars_repo_name": "ytugba/My-Otiose-Projects", "max_stars_repo_head_hexsha": "b0703f5e0b18cee186e44d3e40b6b5c3b162d739", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2021-12-23T19:05:25.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-23T19:05:25.000Z", "max_issues_repo_path": "MPL/Example Inputs/errorTest.mpl", "max_issues_repo_name": "ytugba/My-Otiose-Projects", "max_issues_repo_head_hexsha": "b0703f5e0b18cee186e44d3e40b6b5c3b162d739", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "MPL/Example Inputs/errorTest.mpl", "max_forks_repo_name": "ytugba/My-Otiose-Projects", "max_forks_repo_head_hexsha": "b0703f5e0b18cee186e44d3e40b6b5c3b162d739", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 7.96, "max_line_length": 14, "alphanum_fraction": 0.3015075377, "num_tokens": 128, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6859494550081926, "lm_q2_score": 0.4186969093556867, "lm_q1q2_score": 0.2872049167861479}}
{"text": "repeat process ACV_teleportation {\n/scoreboard players reset @e ACV_TP_FROM\n/scoreboard players reset @e ACV_TP_UNEVEN\n/scoreboard players reset @e ACV_TP_TO\n\n/execute @e[type=area_effect_cloud,name=ACV_PortalIn] ~ ~ ~ scoreboard players operation @e[tag=!ACV_TpProof,dy=0] ACV_TP_FROM = @e[type=area_effect_cloud,name=ACV_PortalIn,r=0,c=1] ACV_COLOR\n\n// Calulate the target portal\n/execute @e[score_ACV_TP_FROM_min=0] ~ ~ ~ scoreboard players operation @e[score_ACV_TP_FROM_min=0,r=0,c=1] ACV_TP_TO = @e[score_ACV_TP_FROM_min=0,r=0,c=1] ACV_TP_FROM\n/execute @e[score_ACV_TP_FROM_min=0] ~ ~ ~ scoreboard players operation @e[score_ACV_TP_FROM_min=0,r=0,c=1] ACV_TP_UNEVEN = @e[score_ACV_TP_FROM_min=0,r=0,c=1] ACV_TP_FROM\n/scoreboard players operation @e[score_ACV_TP_FROM_min=0] ACV_TP_UNEVEN %= 2 ACV_CONSTANT\n/scoreboard players add @e[score_ACV_TP_UNEVEN_min=0,score_ACV_TP_UNEVEN=0] ACV_TP_TO 1\n/scoreboard players remove @e[score_ACV_TP_UNEVEN_min=1,score_ACV_TP_UNEVEN=1] ACV_TP_TO 1\n\n// Teleport the entity to the other portal\n/tp @e[score_ACV_TP_TO_min=0,score_ACV_TP_TO=0] @e[type=area_effect_cloud,name=ACV_PortalOut,score_ACV_COLOR_min=0,score_ACV_COLOR=0]\n/tp @e[score_ACV_TP_TO_min=1,score_ACV_TP_TO=1] @e[type=area_effect_cloud,name=ACV_PortalOut,score_ACV_COLOR_min=1,score_ACV_COLOR=1]\n/tp @e[score_ACV_TP_TO_min=2,score_ACV_TP_TO=2] @e[type=area_effect_cloud,name=ACV_PortalOut,score_ACV_COLOR_min=2,score_ACV_COLOR=2]\n/tp @e[score_ACV_TP_TO_min=3,score_ACV_TP_TO=3] @e[type=area_effect_cloud,name=ACV_PortalOut,score_ACV_COLOR_min=3,score_ACV_COLOR=3]\n}\n", "meta": {"hexsha": "8acace9a3192232e57478ebafdb813f969d6e8ad", "size": 1573, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "src/main/mpl/ACV_teleportation.mpl", "max_stars_repo_name": "Adrodoc55/ApertureCraftVanilla", "max_stars_repo_head_hexsha": "fe24660a2b0cf54cf68074f380f1ea49fa2c5bf9", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count": 12, "max_stars_repo_stars_event_min_datetime": "2015-11-20T19:39:28.000Z", "max_stars_repo_stars_event_max_datetime": "2018-03-01T22:23:05.000Z", "max_issues_repo_path": "src/main/mpl/ACV_teleportation.mpl", "max_issues_repo_name": "Adrodoc55/ApertureCraftVanilla", "max_issues_repo_head_hexsha": "fe24660a2b0cf54cf68074f380f1ea49fa2c5bf9", "max_issues_repo_licenses": ["CC-BY-4.0"], "max_issues_count": 19, "max_issues_repo_issues_event_min_datetime": "2015-11-19T23:21:14.000Z", "max_issues_repo_issues_event_max_datetime": "2017-11-10T18:08:50.000Z", "max_forks_repo_path": "src/main/mpl/ACV_teleportation.mpl", "max_forks_repo_name": "Adrodoc55/ApertureCraftVanilla", "max_forks_repo_head_hexsha": "fe24660a2b0cf54cf68074f380f1ea49fa2c5bf9", "max_forks_repo_licenses": ["CC-BY-4.0"], "max_forks_count": 3, "max_forks_repo_forks_event_min_datetime": "2016-04-15T19:09:04.000Z", "max_forks_repo_forks_event_max_datetime": "2016-11-23T22:15:50.000Z", "avg_line_length": 74.9047619048, "max_line_length": 191, "alphanum_fraction": 0.8181818182, "num_tokens": 575, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6442251201477016, "lm_q2_score": 0.4416730056646256, "lm_q1q2_score": 0.28453684514028993}}
{"text": "$ifndef _TSOLS_LIST_\n$define _TSOLS_LIST_\n\n$include \"Utils.mpl\"\n\nTsolsList:=module()\n    option object;\n    export\n            reps,\n            teqs,\n            torders,\n            tsols,\n            tcons,\n            ModuleApply::static,\n            sortTsolsList::static,\n            printTsolsList::static;\n\n    ModuleApply:=proc(ss::list(TeqSol))\n        local s;\n        s:=Object(TsolsList);\n        s:-reps:=map(x->getRep(x)$getNSols(x),ss);\n        s:-teqs:=map(x->x:-teq[x:-teqInd][],ss);\n        s:-torders:=map(x->x:-teqInd[],ss);\n        s:-tsols:=map(x->x:-tsols[],ss);\n        s:-tcons:=map(x->x:-tcons[],ss);\n        sortTsolsList(s);\n        return s;\n    end proc:\n\n    sortTsolsList:=proc(s::TsolsList)\n        local ind,n:=numelems(s:-reps);\n        ind:=map(x->`if`(x=[],1,0),s:-tsols)*n^3 # \u6709\u89e3\u7684\u6392\u5728\u65e0\u89e3\u7684\u524d\u9762\n            +numelems~(s:-tcons)*n^2             # \u7ea6\u675f\u6761\u4ef6\u5c11\u7684\u6392\u5728\u524d\u9762\n            +sortByComplexity(s:-tcons,index)*n; # \u7ea6\u675f\u6761\u4ef6\u7b80\u5355\u7684\u6392\u5728\u524d\u9762\n        ind:=sort(ind,output=permutation);\n        s:-reps:=s:-reps[ind];\n        s:-teqs:=s:-teqs[ind];\n        s:-torders:=s:-torders[ind];\n        s:-tsols:=s:-tsols[ind];\n        s:-tcons:=s:-tcons[ind];\n    end proc:\n\n    printTsolsList:=proc(s::TsolsList)\n        local i,n:=numelems(s:-reps);\n        printf(\"============================================\\n\");\n        for i from 1 to n do\n            printf(`if`(s:-torders[i]=1,\"\u6b63\u5411\\n\",\"\u9006\u5411\\n\"));\n            print(s:-reps[i]);\n            # print(s:-teqs[i]);\n            print(s:-tsols[i]);\n            print(s:-tcons[i]);\n        end do;\n        printf(\"============================================\\n\");\n        return;\n    end proc:\n\nend module:\n$endif", "meta": {"hexsha": "fff498ce727d744e1c80ed1d9226232df06db270", "size": 1663, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "InvClassify/TsolsList.mpl", "max_stars_repo_name": "yu961549745/InvariantClassify", "max_stars_repo_head_hexsha": "eeb14ca2b39679e5a2da0f23888681ec7e2edd84", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "InvClassify/TsolsList.mpl", "max_issues_repo_name": "yu961549745/InvariantClassify", "max_issues_repo_head_hexsha": "eeb14ca2b39679e5a2da0f23888681ec7e2edd84", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "InvClassify/TsolsList.mpl", "max_forks_repo_name": "yu961549745/InvariantClassify", "max_forks_repo_head_hexsha": "eeb14ca2b39679e5a2da0f23888681ec7e2edd84", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 28.6724137931, "max_line_length": 65, "alphanum_fraction": 0.4684305472, "num_tokens": 518, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5312093733737563, "lm_q2_score": 0.5312093733737562, "lm_q1q2_score": 0.2821833983601388}}
{"text": "(*\n * \u4fdd\u5b58\u4e0d\u53d8\u91cf\u5206\u7c7b\u72b6\u6001\u7684\u5bf9\u8c61\n * \n * \u72b6\u6001\u5206\u4e3a\uff1a\n *     1 \u7ebf\u6027\u504f\u5fae\u5206\u65b9\u7a0b\u7ec4\u6c42\u89e3\u5931\u8d25\n *     2 \u4e0d\u53d8\u91cf\u65b9\u7a0b\u7ec4\u6c42\u89e3\u5931\u8d25\n *     3 \u53d6\u7279\u89e3\u5931\u8d25\n *     4 \u53d8\u6362\u65b9\u7a0b\u6c42\u89e3\u5931\u8d25\n *     5 \u53d8\u6362\u65b9\u7a0b\u6c42\u89e3\u6210\u529f\uff0c\u7279\u89e3\u53ef\u80fd\u662f\u4ee3\u8868\u5143\uff0c\u662f\u5426\u662f\u4ee3\u8868\u5143\u7559\u7ed9\u4eba\u5de5\u5224\u65ad\n*)\n$ifndef _INVSOL_\n$define _INVSOL_\n\nInvSol:=module()\n    option object;\n    export\n        # \u5bfc\u51fa\u53d8\u91cf \n        stateCode::{1,2,3,4,5},     # \u72b6\u6001\u4ee3\u7801\n        oieq:={},                   # \u5bfc\u51fa\u65b0\u504f\u5fae\u5206\u65b9\u7a0b\u7684\u4e0d\u53d8\u91cf\u65b9\u7a0b\uff08\u5982\u679c\u5b58\u5728\u7684\u8bdd\uff09\n        oisol,                      # \u5bfc\u51fa\u65b0\u504f\u5fae\u5206\u65b9\u7a0b\u7684\u4e0d\u53d8\u91cf\u65b9\u7a0b\u7684\u89e3\uff08\u5982\u679c\u5b58\u5728\u7684\u8bdd\uff09\n        oeq::set,                   # \u5bfc\u51fa\u4e0d\u53d8\u91cf\u7684\u504f\u5fae\u5206\u65b9\u7a0b\n        Delta:=[],                  # \u4e0d\u53d8\u91cf\n        orders:=[],                 # \u4e0d\u53d8\u91cf\u5bf9\u5e94\u7684\u9636\u6570\n        ieqCode,                    # \u4e0d\u53d8\u91cf\u65b9\u7a0b\u7684\u4ee3\u7801\n        ieq::list,                  # \u4e0d\u53d8\u91cf\u65b9\u7a0b\n        isol,                       # \u4e0d\u53d8\u91cf\u65b9\u7a0b\u7684\u89e3\uff08\u4e00\u4e2aInvSol\u5bf9\u8c61\u53ea\u542b\u4e00\u4e2a\u89e3\uff09\n        icon::set,                  # \u4e0d\u53d8\u91cf\u65b9\u7a0b\u89e3\u7684\u6761\u4ef6\n        teq:=[[],[]],               # \u53d8\u6362\u65b9\u7a0b\uff08\u6709\u4e24\u4e2a\uff09\n        tsol:=[[],[]],              # \u53d8\u6362\u65b9\u7a0b\u7684\u89e3\uff0c\u6bcf\u4e2a\u65b9\u7a0b\u90fd\u6709\u53ef\u80fd\u6709\u591a\u4e2a\u89e3\n        tcon:=[[],[]],              # \u53d8\u6362\u65b9\u7a0b\u7684\u89e3\u5bf9\u4e8e\u7684\u6761\u4ef6\n        rep,                        # \u4ee3\u8868\u5143\u7684\u8868\u8fbe\u5f0f\u5f62\u5f0f\n        rvec,                       # \u4ee3\u8868\u5143\u7684\u7cfb\u6570\u77e9\u9635\u5f62\u5f0f\n        vars,                       # \u504f\u5fae\u5206\u65b9\u7a0b\u4e2d\u7684\u5269\u4f59\u81ea\u7531\u53d8\u91cf\uff0c\u521d\u59cb\u65f6\u4e3aa[1]..a[nvars]\n        nvars,                      # \u751f\u6210\u5143\u7684\u4e2a\u6570\n        As::static,                 # \u6bcf\u4e2a\u751f\u6210\u5143\u7684\u4f34\u968f\u77e9\u9635\n        A::static,                  # \u603b\u7684\u4f34\u968f\u53d8\u6362\u77e9\u9635\n        # \u5bfc\u51fa\u51fd\u6570\n        ## \u8f93\u51fa\u76f8\u5173\n        getDisplayIeq::static,      # \u7b80\u5316\u663e\u793a\u7684\u4e0d\u53d8\u91cf\u65b9\u7a0b\uff0c\u5c06\u4e0d\u53d8\u91cf\u7684\u5b9e\u9645\u8868\u8fbe\u5f0f\u7b80\u5199\u4e3aDelta\n        getDisplayDelta::static,    # \u8f93\u51fa\u4e0d\u53d8\u91cf\n        getDesc::static,            # \u83b7\u53d6\u5bf9\u8c61\u7684\u7279\u5f81\u63cf\u8ff0\n        ModulePrint::static,        # \u6253\u5370\u548c\u663e\u793a\u5bf9\u8c61\u7684\u503c\n        printSol::static,           # \u8be6\u7ec6\u663e\u793a\u5bf9\u8c61\u4fe1\u606f\n        printTeq::static,           # \u663e\u793a\u53d8\u6362\u65b9\u7a0b\u7684\u7ed3\u679c\n        ## \u8bbe\u7f6e\u76f8\u5173\n        setRep::static,             # \u91cd\u65b0\u53d6\u4ee3\u8868\u5143\n        setIsol::static,            # \u91cd\u65b0\u5bf9\u4e0d\u53d8\u91cf\u65b9\u7a0b\u53d6\u89e3\n        getRep::static;             # \u83b7\u53d6\u4ee3\u8868\u5143\uff0c\u8f6c\u5316\u4e3aglobal\u5bf9\u8c61\u4fbf\u4e8e\u6bd4\u8f83\n\n    # \u91cd\u65b0\u53d6\u4ee3\u8868\u5143\n    setRep:=proc(s::InvSol,rvec::list,{nocheck::boolean:=false})\n        local v,r;\n        if not nocheck then\n            # \u89e3\u7684\u68c0\u9a8c\n            r:=eval(subs(seq(a[i]=rvec[i],i=1..numelems(rvec)),s:-ieq));\n            if not andmap(evalb,r) then\n                error \"\u4e0d\u662f\u4e0d\u53d8\u91cf\u65b9\u7a0b\u7684\u89e3\uff0c\u4ee3\u5165\u7ed3\u679c\u4e3a%1\",r;\n            end if;\n        end if;\n        s:-stateCode:=4;\n        s:-rvec:=Matrix(rvec);\n        s:-rep:=add(rvec[i]*v[i],i=1..numelems(rvec));\n        return;\n    end proc:\n\n    # \u91cd\u65b0\u5bf9\u4e0d\u53d8\u91cf\u65b9\u7a0b\u53d6\u89e3\n    setIsol:=proc(s::InvSol,isol,{nocheck::boolean:=false})\n        local r;\n        if not nocheck then\n            # \u89e3\u7684\u68c0\u9a8c\n            r:=RealDomain:-simplify(subs(isol[],s:-ieq));\n            if not andmap(evalb,r) then\n                error \"\u4e0d\u662f\u4e0d\u53d8\u91cf\u65b9\u7a0b\u7684\u89e3\uff0c\u4ee3\u5165\u7ed3\u679c\u4e3a%1\",r;\n            end if;\n        end if;\n        s:-stateCode:=3;\n        s:-isol:=isol;\n        s:-icon:=findSolutionDomain(isol);\n        return;\n    end proc:\n\n    # \u83b7\u53d6\u4ee3\u8868\u5143\uff0c\u8f6c\u5316\u4e3aglobal\u5bf9\u8c61\u4fbf\u4e8e\u6bd4\u8f83\n    getRep:=proc(s::InvSol)\n        return convert(s:-rep,`global`);\n    end proc:\n\n    # \u7b80\u5316\u663e\u793a\u7684\u4e0d\u53d8\u91cf\u65b9\u7a0b\uff0c\u5c06\u4e0d\u53d8\u91cf\u7684\u5b9e\u9645\u8868\u8fbe\u5f0f\u7b80\u5199\u4e3aDelta\n    getDisplayIeq:=proc(self::InvSol)\n        local Delta;\n        return {seq(Delta[i]=rhs(self:-ieq[i]),i=1..numelems(self:-Delta))};\n    end proc:\n\n    # \u8f93\u51fa\u4e0d\u53d8\u91cf\n    getDisplayDelta:=proc(self::InvSol)\n        local Delta;\n        return [seq(Delta[i]=self:-Delta[i],i=1..numelems(self:-Delta))];\n    end proc:\n\n    # \u83b7\u53d6\u5bf9\u8c61\u7684\u7279\u5f81\u63cf\u8ff0\n    getDesc:=proc(s)\n        if   (s:-stateCode=1) then\n            return s:-oeq;\n        elif (s:-stateCode=2) then\n            return getDisplayIeq(s);\n        elif (s:-stateCode=3) then\n            return s:-isol;\n        elif (s:-stateCode=4) then\n            return s:-rep;\n        elif (s:-stateCode=5) then\n            return s:-rep;\n        end if;\n    end proc:\n\n    # \u6253\u5370\u548c\u663e\u793a\u5bf9\u8c61\u7684\u503c\n    ModulePrint:=proc(s)\n        return getDesc(s);\n    end proc:\n\n    # \u8f93\u51fa\u89e3\n    printSol:=proc(s::InvSol)\n        printf(\"---------------------------------------------------------\");\n        if     (s:-stateCode=1) then\n            printf(\"\u65b0\u7684\u4e0d\u53d8\u91cf\u6c42\u89e3\u5931\u8d25\uff0c\u72b6\u6001\u4ee3\u78011\");\n            print(s:-oieq);\n            printf(\"\u53d6\u89e3\");\n            print(s:-oisol);\n            printf(\"\u6c42\u89e3\u5931\u8d25\u7684\u504f\u5fae\u5206\u65b9\u7a0b\u4e3a\");\n            print(s:-oeq);\n        elif    (s:-stateCode=2) then\n            printf(\"\u4e0d\u53d8\u91cf\u65b9\u7a0b\u6c42\u89e3\u5931\u8d25\uff0c\u72b6\u6001\u4ee3\u78012\");\n            print(getDisplayIeq(s));\n        elif    (s:-stateCode=3) then\n            printf(\"\u53d6\u4ee3\u8868\u5143\u5931\u8d25\uff0c\u72b6\u6001\u4ee3\u78013\");\n            print(getDisplayIeq(s));\n            printf(\"\u53d6\u89e3\");\n            print(s:-isol);\n        elif    (s:-stateCode=4) then\n            printf(\"\u53d8\u6362\u65b9\u7a0b\u6c42\u89e3\u5931\u8d25\uff0c\u72b6\u6001\u4ee3\u78014\");\n            print(getDisplayIeq(s));\n            printf(\"\u53d6\u89e3\");\n            print(s:-isol);\n            printf(\"\u5177\u6709\u7ea6\u675f\");\n            print(s:-icon);\n            printf(\"\u53d6\u4ee3\u8868\u5143\");\n            print(s:-rep);\n            printf(\"\u6c42\u89e3\u5931\u8d25\u7684\u4e24\u4e2a\u53d8\u6362\u65b9\u7a0b\u4e3a\");\n            print~(s:-teq);\n        elif    (s:-stateCode=5) then\n            printf(\"\u53d8\u6362\u65b9\u7a0b\u6c42\u89e3\u6210\u529f\uff0c\u72b6\u6001\u4ee3\u78015\");\n            print(getDisplayIeq(s));\n            printf(\"\u53d6\u89e3\");\n            print(s:-isol);\n            printf(\"\u5177\u6709\u7ea6\u675f\");\n            print(s:-icon);\n            printf(\"\u53d6\u4ee3\u8868\u5143\");\n            print(s:-rep);\n            printf(\"\u53d8\u6362\u65b9\u7a0b\u6709\u89e3\");\n            printTeq(s,1);\n            printTeq(s,2);\n        end if;\n        printf(\"---------------------------------------------------------\");\n        return;\n    end proc:\n\n    # \u8f93\u51fa\u53d8\u6362\u65b9\u7a0b\u548c\u89e3\n    printTeq:=proc(sol,pos)\n        if (sol:-tsol[pos]=[]) then\n            printf(\"\u53d8\u6362\u65b9\u7a0b %d \u65e0\u89e3\",pos);\n            printf(\"\u65b9\u7a0b\u4e3a\");\n            print(sol:-teq[pos]);\n        else\n            printf(\"\u53d8\u6362\u65b9\u7a0b %d \u6709\u89e3\",pos);\n            printf(\"\u65b9\u7a0b\u4e3a\");\n            print(sol:-teq[pos]);\n            printf(\"\u6709\u89e3\");\n            print(sol:-tsol[pos]);\n            printf(\"\u5177\u6709\u6761\u4ef6\");\n            print(sol:-tcon[pos]);\n        end if;\n    end proc:\nend module:\n\n$endif", "meta": {"hexsha": "6201db3758556a31278aabbc3c8e74cb79b70770", "size": 5489, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "old/InvSol.mpl", "max_stars_repo_name": "yu961549745/InvariantClassify", "max_stars_repo_head_hexsha": "eeb14ca2b39679e5a2da0f23888681ec7e2edd84", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "old/InvSol.mpl", "max_issues_repo_name": "yu961549745/InvariantClassify", "max_issues_repo_head_hexsha": "eeb14ca2b39679e5a2da0f23888681ec7e2edd84", "max_issues_repo_licenses": ["Apache-2.0"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "old/InvSol.mpl", "max_forks_repo_name": "yu961549745/InvariantClassify", "max_forks_repo_head_hexsha": "eeb14ca2b39679e5a2da0f23888681ec7e2edd84", "max_forks_repo_licenses": ["Apache-2.0"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 29.9945355191, "max_line_length": 76, "alphanum_fraction": 0.4454363272, "num_tokens": 1894, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5428632831725052, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.27991112031852666}}
{"text": "# Apply a domain to an expression.\n# Apply will perform certain 'simplifications' to make sure the\n# domain application is well-formed. e.g.,\n#   DOMAIN( DBound( [x,y], [xt,yt] ), DConstrain(..) )\n#      is the same as\n#   DOMAIN(        ..               , DInto(x,xt,DInto(y,yt,DConstrain(..))) )\n# basically, when we see an 'unbound' variable in the 'RHS' , we should bind\n# it with the default 'DInto'.\nexport Apply := module ()\n       export ModuleApply :=\n         proc(dom :: HDomain_mb, kb0 :: t_kb\n             ,f_into := \"default\"\n             ,f_body := \"default\", $)\n           local vs, sh, ctx;\n           if dom :: DomNoSol then\n               error \"cannot apply %1\", dom;\n           end if;\n           vs, sh := op(dom);\n           vs := Domain:-Bound:-withVarsIxs(vs);\n           ctx := [ kb0,\n              `if`(f_into=\"default\",`do_mk`,f_into),\n              `if`(f_body=\"default\",`do_body`,f_body) ];\n           (e->do_apply({}, e, vs, sh, ctx));\n       end proc;\n\n       export Shape := proc(dsh :: DomShape, e, $) ModuleApply( DOMAIN( [], dsh ), e ) end proc;\n       export Bound := proc(dbn :: DomBound, e, $) ModuleApply( DOMAIN( dbn, DConstrain() ), e ) end proc;\n\n       # main loop of the apply function\n       # done_  := variables already integrated\n       # e      := expr\n       # vs     := domain bounds\n       # sh     := domain shape\n       # ctx[0] := KB (context for f_into/f_body)\n       # f_into := how to make a DomInto\n       # f_body := how to make the expression body\n       local do_apply := proc(done__, e, vs, sh_, ctx, $)\n           local sh := sh_, done_ := done__\n               , r, cond, cond_outer, vn, vt, shv, vars, deps, ctx1, rn;\n           # If the solution is a constraint, and the constraint is true,\n           # then just produce the expression. If it isn't necessarily true\n           # (i.e. trivial) then produce a Partition with the constraint as a\n           # guard.\n           if sh :: DomConstrain then\n               vars := Domain:-Bound:-varsOf(vs,\"set\") minus done_;\n               cond, cond_outer := select_cond_outer(sh, vars);\n               # if there are still integrals which have not been applied, apply\n               # them now\n               do_constrain(cond_outer)(do_mks(e, (r,kb1) -> do_constrain(cond)(op(3,ctx)(r, kb1)), vars, vs, ctx))\n           # if the solution is a sum of solutions, produce the algebraic sum\n           # of each summand of the solution applied to the expression.\n           elif sh :: DomSum then\n               `+`(seq(do_apply(done_, e, vs, s, ctx), s=sh))\n           # if the solution is a split solution, just make `do_apply' over\n           # the values of the Partition (the subsolutions)\n           elif sh :: DomSplit then\n               Partition:-Amap(\n                 [ (c,_)->c\n                 , (p,c)->do_apply(done_, e, vs, p, applyop(kb->KB:-assert(c,kb),1,ctx))\n                 , c->c ], op(1, sh) );\n           # performs the 'make' on the expression after recursively\n           # applying the solution\n           elif sh :: DomInto then\n               # deconstruction\n               vn, vt, shv := op(sh);\n               # extract bounds which have not been applied upon which this\n               # bound depends. Those are applied after this one, so are not\n               # in 'scope' in the recursive call\n               vars := Domain:-Bound:-varsOf(vs,\"set\");\n               deps := (indets(vt, DomBoundVar) intersect vars) minus done_ ;\n               deps := `union`(deps, {vn});\n               done_ := `union`(done_, deps) ;\n\n               shv, cond_outer := select_cond_outer(shv, done_);\n\n               # build this integral, and the other this one depended on, then\n               # recursively apply\n               do_constrain(cond_outer)(\n                 do_mks(e, (r,kb1) -> do_apply(done_, r, vs, shv, subsop(1=kb1,ctx)),\n                      deps, Domain:-Bound:-upd(vs, vn, vt), ctx));\n           else\n               error \"don't know how to apply %1\", sh\n           end if;\n       end proc;\n\n       export do_mk := proc(mk, e, vn, ty_, _kb)\n           Domain:-ExtBound[mk]:-DoMk(e, vn, ty_);\n       end proc;\n\n       export do_body := proc(e, _kb) e end proc;\n\n       local do_constrain := proc(cond0::{list,set,DomConstrain},$)\n         local mk_cond, cond := cond0;\n         if nops(cond)=0 then\n           mk_cond := x->x;\n         else\n           cond := bool_And(op(cond));\n           mk_cond := x->PARTITION([Piece(cond,x), Piece(Not(cond),0)]);\n         end if;\n         mk_cond;\n       end proc;\n\n       # A very cute way of pulling constraints out over other constructors\n       # which relies on the fact that constraints are required to be innermost;\n       # i.e. DomShape is a sum of products; i.e. this could also be called\n       # 'factoring'.\n       local select_cond_outer := proc(sh::DomShape, vars0::set({name,list(name)}), $)\n         local csd, cs0, cs, ots, sh1, ins, vars := vars0;\n         vars := map(v->`if`(v::list,v,[v])[],vars);\n         csd := [op(indets(sh, And(DomConstrain,Not(satisfies(x->has(x,vars))))))];\n         cs0 := map(x->{op(x)},csd);\n         if cs0=[] then return sh, {}; end if;\n         cs := map(x->[selectremove(z->andmap(c->z in c,cs0),x)], cs0);\n         ots := op([1,1],cs); ins := map(curry(op,2), cs);\n         sh1 := subs(zip(`=`, csd, map(DConstrain@op,ins)), sh);\n         userinfo(3, Domain, printf(\"select_cond_outer(%a, %a) = %a, %a\\n\", sh, vars, sh1, ots));\n         sh1, ots;\n       end proc;\n\n       # Move into an integral by augmenting the KB with the variables bound by\n       # that integral.\n       local into_mk := proc(dbnd::DomBound, vn, vt, ctx, $)\n           local kb, v_i, v_k, vn_, kb1, rn;\n           kb := op(1,ctx); if kb :: t_not_a_kb then return KB:-NotAKB() end if;\n\n           v_i := Domain:-Bound:-varIx(dbnd, vn);\n           v_k := op([1,v_i,3], dbnd);\n           vn_, kb1 := Domain:-ExtBound[v_k]:-MakeKB(vn, Domain:-ExtBound[v_k]:-SplitRange(vt), kb);\n\n           rn := `if`(evalb(vn=vn_), [], [vn=vn_]);\n           subsop(1=kb1, ctx), rn;\n       end proc;\n\n       local do_mks := proc(e, kont, todo::({list,set})(DomBoundVar), dbnd :: DomBound, ctx, $)\n           local vs, v_td, i, vt, kb0, v_mk, _, ctx1, rn, r := e;\n\n           if todo :: set then\n             vs := select(v->v in todo,Domain:-Bound:-varsOf(dbnd));\n             vs := ListTools[Reverse](vs);\n           else\n             vs := todo;\n           end if;\n\n           if nops(vs)=0 then\n             return kont(r,op(1,ctx));\n           end if;\n\n           v_td := op(1,vs);\n           vs   := subsop(1=NULL,vs);\n           i    := Domain:-Bound:-varIx(dbnd, v_td);\n           _,vt,v_mk := op(op([1,i], dbnd));\n\n           ctx1, rn := into_mk(dbnd, v_td, vt, ctx);\n           if rn <> [] then\n             r := subs(rn,r);\n           end if;\n\n           r := do_mks(r, kont, vs, dbnd, ctx1);\n           op(2,ctx)(v_mk, r, v_td, vt, op(1,ctx));\n       end proc;\nend module;\n", "meta": {"hexsha": "f512326c9e66483af9184d35e99e59a6d1577b67", "size": 6989, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "maple/Domain/Apply.mpl", "max_stars_repo_name": "zaxtax/hakaru", "max_stars_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 4, "max_stars_repo_stars_event_min_datetime": "2015-02-07T17:57:04.000Z", "max_stars_repo_stars_event_max_datetime": "2016-01-29T19:40:24.000Z", "max_issues_repo_path": "maple/Domain/Apply.mpl", "max_issues_repo_name": "zaxtax/hakaru", "max_issues_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "maple/Domain/Apply.mpl", "max_forks_repo_name": "zaxtax/hakaru", "max_forks_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 43.1419753086, "max_line_length": 115, "alphanum_fraction": 0.5196737731, "num_tokens": 1932, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6224593312018545, "lm_q2_score": 0.44939263446475963, "lm_q1q2_score": 0.27972863869597375}}
{"text": "type $atyp <[10] f32>\nvar $fff <i32> = 7789\nfunc $foo ( var %i i32 )i32 \ntype $i32ty <struct {\n      @FF1 i32,\n      @FF2 f64 }>\n\nfunc $fact (\n var %n i32, var %m f32) i32 {\n var %alocal <$i32ty>\n dassign %alocal (constval i32 999)\n if (ne i32 i32 (dread i32 %n, constval i32 1)) {\n    eval (dread i32 %n)\n    call &foo(\n      add i32 (dread i32 %n, constval i32 1))\n    return (regread i32 %%retval)}\n   else {\n     return (constval i32 1) } }\n # EXEC: %irbuild Main.mpl\n # EXEC: %irbuild Main.irb.mpl\n # EXEC: %cmp Main.irb.mpl Main.irb.irb.mpl", "meta": {"hexsha": "7d4bd99632214a9fe0305f2eab1400df55637c22", "size": 546, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "testsuite/irbuild_test/I0043-mapleall-irbuild-edge-if_then_else/Main.mpl", "max_stars_repo_name": "MapleSystem/OpenArkCompiler", "max_stars_repo_head_hexsha": "fc250857642ca38ac8b83ae7486513fadf3ab742", "max_stars_repo_licenses": ["MulanPSL-1.0"], "max_stars_count": 5, "max_stars_repo_stars_event_min_datetime": "2019-09-02T04:44:52.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-08T12:23:51.000Z", "max_issues_repo_path": "testsuite/irbuild_test/I0043-mapleall-irbuild-edge-if_then_else/Main.mpl", "max_issues_repo_name": "MapleSystem/OpenArkCompiler", "max_issues_repo_head_hexsha": "fc250857642ca38ac8b83ae7486513fadf3ab742", "max_issues_repo_licenses": ["MulanPSL-1.0"], "max_issues_count": 2, "max_issues_repo_issues_event_min_datetime": "2020-07-21T01:22:01.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-06T08:07:16.000Z", "max_forks_repo_path": "testsuite/irbuild_test/I0043-mapleall-irbuild-edge-if_then_else/Main.mpl", "max_forks_repo_name": "MapleSystem/OpenArkCompiler", "max_forks_repo_head_hexsha": "fc250857642ca38ac8b83ae7486513fadf3ab742", "max_forks_repo_licenses": ["MulanPSL-1.0"], "max_forks_count": 4, "max_forks_repo_forks_event_min_datetime": "2019-09-02T04:46:52.000Z", "max_forks_repo_forks_event_max_datetime": "2020-09-10T11:30:03.000Z", "avg_line_length": 26.0, "max_line_length": 49, "alphanum_fraction": 0.5989010989, "num_tokens": 221, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.538983220687684, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.27580666368281753}}
{"text": "# \u5b57\u7b26\u4e32\u7f16\u7801\nstr_encode:=s->sprintf(\"'%s'\",HTTP:-URLEncode(s));\n\n# \u6587\u4ef6\u8ba1\u6570\u5668\nFileCounter:=module()\n    local k:=0;\n    export next_file,curr_file;\n\n    curr_file:=proc()\n        return sprintf(\"imgs/fig%03d\",k);\n    end proc:\n\n    next_file:=proc()\n        k:=k+1;\n        return sprintf(\"imgs/fig%03d\",k);\n    end proc:\nend module:\n\n# \u6253\u5f00 MATLAB \u5e76\u8bbe\u7f6e\u8def\u5f84\nMatlab:-openlink();\nMatlab:-evalM(\n    sprintf(\"cd(char(java.net.URLDecoder.decode(%s,'UTF8')))\",str_encode(currentdir()))\n);\n\n# \u5904\u7406\u5750\u6807\u540d\u79f0\nlabel_str:=x->str_encode(`if`(type(x,string),x,latex(x,output=string)));\n\n# 3D\u66f2\u9762\u7ed8\u56fe\u63a5\u53e3\nplot3dm:=proc(_eq,{x::range:=0..1,y::range:=0..1,title::string:=\"\",grid::list:=[100,100],labels::list:=[x,y,z],extcmd::string:=\"\",\n        view::{range,list(range)}:=[x,y,-infinity..infinity]})\n    uses ImageTools;\n    local eq,_view,plot3d_args;\n    if type(view,range) then\n        _view:=[x,y,view];\n    else\n        _view:=view;\n    end if;\n    eq:=simplify(_eq);\n    plot3d_args:=remove(x->type(x,equation) and lhs(x)=:-extcmd,[_passed]);\n    print(old_plot3d(plot3d_args[]));\n    Matlab:-evalM(sprintf(\"plot3dm(%s,{%f,%f,%d},{%f,%f,%d},[%f,%f,%f,%f,%f,%f],%s,{%s,%s,%s},%s,%s)\",\n        str_encode( sprintf(\"%a\",eq) ),\n        op(1,x),op(2,x),grid[1],\n        op(1,y),op(2,y),grid[2],\n        map(t->(op(1,t),op(2,t)),_view)[],\n        str_encode(title),\n        label_str(labels[1]),label_str(labels[2]),label_str(labels[3]),\n        str_encode(extcmd),\n        str_encode(FileCounter:-next_file())\n    ));\n    Embed(Read(sprintf(\"%s.png\",FileCounter:-curr_file())));\nend proc:\n\n# \u91cd\u8f7dplot3d\u51fd\u6570\nold_plot3d:=copy(plot3d,deep);\nunprotect(plot3d);\nplot3d:=plot3dm;", "meta": {"hexsha": "d57bd418bf1c3e9bc95dd367391dbce4437beb7a", "size": 1629, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "mplot.mpl", "max_stars_repo_name": "yu961549745/mmplot", "max_stars_repo_head_hexsha": "32dd4206bdb6f43ace9996370157090aa0194638", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "mplot.mpl", "max_issues_repo_name": "yu961549745/mmplot", "max_issues_repo_head_hexsha": "32dd4206bdb6f43ace9996370157090aa0194638", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "mplot.mpl", "max_forks_repo_name": "yu961549745/mmplot", "max_forks_repo_head_hexsha": "32dd4206bdb6f43ace9996370157090aa0194638", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 28.5789473684, "max_line_length": 130, "alphanum_fraction": 0.5966850829, "num_tokens": 566, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5195213368305398, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.27395218515898534}}
{"text": "######################################################################\n\n`eta/full_trees` := (A::set) -> `eta/trees`(A);\n\n`gamma/full_trees` := (A::set,B::set) -> (p) -> (TT,UU) ->\n  `gamma/trees`(A,B)(p)(TT,UU);\n\n", "meta": {"hexsha": "1745e8a132f1204787555cf63a7b789aec4c550f", "size": 213, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "lib/operads/full_trees.mpl", "max_stars_repo_name": "NeilStrickland/maple_lib", "max_stars_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/operads/full_trees.mpl", "max_issues_repo_name": "NeilStrickland/maple_lib", "max_issues_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/operads/full_trees.mpl", "max_forks_repo_name": "NeilStrickland/maple_lib", "max_forks_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 26.625, "max_line_length": 70, "alphanum_fraction": 0.3333333333, "num_tokens": 62, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.5039061705290806, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.27159697071616123}}
{"text": "\n$include <binomsums.mpl>\n\n$ifdef BUILD_MLA\nsavelib(BinomSums);\n$endif\n\n\n\n\n", "meta": {"hexsha": "7f70e4b92b4f6fc00eb8fd24153daa45d30d3621", "size": 75, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "src/pack.mpl", "max_stars_repo_name": "lairez/binomsum", "max_stars_repo_head_hexsha": "95086f8a51dc450cedc8556c54e40cc7ba04e927", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "max_stars_repo_stars_event_min_datetime": "2015-10-28T00:00:41.000Z", "max_stars_repo_stars_event_max_datetime": "2021-05-27T07:47:59.000Z", "max_issues_repo_path": "src/pack.mpl", "max_issues_repo_name": "lairez/binomsum", "max_issues_repo_head_hexsha": "95086f8a51dc450cedc8556c54e40cc7ba04e927", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/pack.mpl", "max_forks_repo_name": "lairez/binomsum", "max_forks_repo_head_hexsha": "95086f8a51dc450cedc8556c54e40cc7ba04e927", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 6.8181818182, "max_line_length": 24, "alphanum_fraction": 0.72, "num_tokens": 29, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.5117166047041652, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.26983662094819666}}
{"text": "with(Threads:-Task):\nfun:=proc()\n    Continue(passed,x,Task=[`+`,1,2,3],y,Tasks=[`*`,[1,2],[2,3,3]],z);\nend proc:\nStart(passed,x,Task=[fun],Tasks=[`+`,[2,3,3],[6,6,6]]);", "meta": {"hexsha": "ac635d8aac34ce1601841865502ded64affcc9a5", "size": 169, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "Task/continue.mpl", "max_stars_repo_name": "yu961549745/MapleParallel", "max_stars_repo_head_hexsha": "6fe9ceb7766e0803761ab7368caa9b3f856dcf5b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Task/continue.mpl", "max_issues_repo_name": "yu961549745/MapleParallel", "max_issues_repo_head_hexsha": "6fe9ceb7766e0803761ab7368caa9b3f856dcf5b", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Task/continue.mpl", "max_forks_repo_name": "yu961549745/MapleParallel", "max_forks_repo_head_hexsha": "6fe9ceb7766e0803761ab7368caa9b3f856dcf5b", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 33.8, "max_line_length": 70, "alphanum_fraction": 0.550295858, "num_tokens": 78, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6150878414043816, "lm_q2_score": 0.4378234991142019, "lm_q1q2_score": 0.2692999109862676}}
{"text": "# This module forms part of NewSLO and is `$include`d there\n\nRoundTrip := proc(e, t::t_type)\n  local result;\n  interface(screenwidth=9999, prettyprint=0, warnlevel=0,\n    showassumed=0,quiet=true);\n  kernelopts(assertlevel=0);\n  result := eval(ToInert(Simplify(_passed)), _Inert_ATTRIBUTE=NULL);\n  lprint(result)\nend proc;\n\nSimplify := proc(e, t::t_type, {ctx :: list := []}, $)\n  subsindets(SimplifyKB(value(e), t, build_kb(ctx, \"Simplify\")),\n             And({t_sum, t_product}, anyfunc(anything, anything=range)),\n             e -> subsop(0 = `if`(e::t_sum, SumIE, ProductIE),\n                         applyop(`+`, [2,2,2], e, 1)))\nend proc;\n\nSimplifyKB_ := proc(e, t::t_type, kb::t_kb, $)\n  local patterns, x, kb1, ex;\n  if t :: HMeasure(anything) then\n    %fromLO(%improve(%toLO(e), _ctx=kb), _ctx=kb);\n  elif t :: HFunction(anything, anything) then\n    patterns := htype_patterns(op(1,t));\n    if patterns :: Branches(Branch(PVar(name),anything)) then\n      # Eta-expand the function type\n      x := `if`(e::lam(name,anything,anything), op(1,e),\n                op([1,1,1],patterns));\n      x, kb1 := genType(x, op(1,t), kb, e);\n      ex := app(e,x);\n      lam(x, op(1,t), SimplifyKB_(ex, op(2,t), kb1))\n    else\n      # Eta-expand the function type and the sum-of-product argument-type\n      x := `if`(e::lam(name,anything,anything), op(1,e), d);\n      if depends([e,t,kb], x) then x := gensym(x) end if;\n      ex := app(e,x);\n      lam(x, op(1,t), 'case'(x,\n        map(proc(branch)\n            local eSubst, pSubst, p1, binds, y, kb1, i, pSubst1;\n              eSubst, pSubst := pattern_match([x,e], x, op(1,branch));\n              p1 := subs(pSubst, op(1,branch));\n              binds := [pattern_binds(p1)];\n              kb1 := kb;\n              pSubst1 := table();\n              for i from 1 to nops(binds) do\n                y, kb1 := genType(op(i,binds), op([2,i],branch), kb1);\n                pSubst1[op(i,binds)] := y;\n              end do;\n              pSubst1 := op(op(pSubst1));\n              Branch(subs(pSubst1, p1),\n                     SimplifyKB_(eval(eval(ex,eSubst),pSubst1), op(2,t), kb1))\n            end proc,\n            patterns)))\n    end if\n  else\n    %simplify_assuming(e, kb)\n  end if\nend proc;\n\nSimplifyKB := proc(e, t::t_type, kb::t_kb, $)\n    eval(SimplifyKB_(args), [%fromLO=fromLO,%improve=improve,%toLO=toLO,%simplify_assuming=simplify_assuming]);\nend proc;\n\n# Testing\n\nTestSimplify := proc(m, t, n::algebraic:=m, {verify:=simplify})\n  local s, r;\n  # How to pass keyword argument {ctx::list:=[]} on to Simplify?\n  s, r := selectremove(type, [_rest], 'identical(ctx)=anything');\n  CodeTools[Test](Simplify(m,t,op(s)), n, measure(verify), op(r))\nend proc;\n\nTestHakaru := proc(m, n::{set(algebraic),algebraic}:=m,\n                   {simp:=improve, verify:=simplify, ctx::list:=[]})\n  local kb := build_kb(ctx, \"TestHakaru\"), ver := measure(verify);\n  ver := `if`(n::set, 'member'(ver), ver);\n\n  CodeTools[Test](fromLO(simp(toLO(m), _ctx=kb), _ctx=kb), n,\n    ver, _rest)\nend proc;\n\nTestDisint := module()\n    export ModuleApply := proc(\n      M::{t_Hakaru, list(anything)}, #args to disint, or just 1st arg\n      n::set({t_Hakaru, identical(NULL)}), #desired return\n      ctx::t_kb_atoms:= [], #context: assumptions, \"knowledge\"\n      TLim::{positive, identical(-1)}:= 80 #timelimit\n    )\n      local disint_args, disint_var, expected := n;\n      if M :: list then\n        disint_args := [op(M),ctx];\n      else\n        disint_var := gensym('t');\n        disint_args := [M,disint_var,ctx];\n        expected := subs(:-`t`=disint_var,expected);\n      end if;\n      try\n        do_test(disint_args, copy(expected), TLim, _rest);\n      catch \"time expired\":\n        error \"Time expired while running: disint(%1)\", disint_args;\n      end try;\n    end proc;\n\n    # This is necessary because CodeTools seems to forgot the value\n    # of our local variables (but only the `expected result' arg)\n    # unless that arg is precisely a formal parameter, and we `copy' the\n    # input to this function.\n    local do_test := proc(disint_args, expected, tlim)\n      timelimit( tlim, CodeTools[Test]\n                 ( {disint(op(disint_args))}\n                 , expected\n                 , '`subset`(measure(simplify))'\n                 , _rest));\n    end proc;\nend module;\n\nTestEfficient := proc(e, t::t_type, t_kb := KB:-empty, {label::string := \"Test\" })\n  local done_, result, todo;\n  todo := SimplifyKB_(args[1..3]);\n  done_ := eval(todo, [%fromLO=fromLO,%improve=improve,%toLO=toLO,%simplify_assuming=simplify_assuming]);\n\n  _Env_TestTools_Try_printf := false;\n  result := TestTools[Try](label, Efficient(done_),true);\n  if result = NULL then\n    printf(\"%s passed.\\n\", label);\n  else\n    error sprintf(\"%s FAILED.\\n\"\n                  \"The result of\\n\\t%a\\n\\tis not efficient.\\n\"\n                 , label, todo );\n  end if;\nend proc;\n\n# Test roughly for \"efficient\" Hakaru measure terms,\n# i.e., those we want simplification to produce.\nEfficient := proc(mm, $)\n  local m, n;\n  m := mm;\n  if has(m, 'undefined') then\n    return false;\n  end if;\n  while m :: '{lam(name, anything, anything),\n               Context(anything, anything),\n               case(anything, Branches(Branch(anything, anything))),\n               And(specfunc(piecewise)\n                  ,{anyfunc(anything, anything, Msum())\n                   ,anyfunc(anything, anything, anything, Msum())})}' do\n    m := op(`if`(op(0,m)='lam',3,`if`(op(0,m)='case',[2,1,2],2)),m);\n  end do;\n  if m :: 'Weight(anything, anything)' then m := op(2,m) end if;\n  if has(m, '{infinity, Lebesgue, int, Int, Beta, GAMMA}') then\n    return false;\n  end if;\n  for n in `if`(m :: 'specfunc(Msum)', m, [m]) do\n    if n :: 'Weight(anything, anything)' then n := op(2,n) end if;\n    if has(subsindets(n, 'specfunc(Weight(anything, anything), Msum)',\n                      s -> `if`(Testzero(`+`(op(map2(op, 1, s))) - 1),\n                                map2(op, 2, s), s)),\n           '{Msum, Weight}') then\n      return false;\n    end if;\n  end do;\n  return true;\nend proc;\n\n# Load a file in concrete Hakaru syntax (using the \"momiji\" command)\n# and return its term (in which Sum and Product are inert) and type.\nConcrete := proc(path::string, $)\n  local cmd, res, dangerous_chars;\n  cmd := FileTools:-AbsolutePath(path,\n    (FileTools:-ParentDirectory@@2)(LibraryTools:-FindLibrary(Hakaru)));\n  dangerous_chars := [ \" \", \"'\", \"\"\"\", `if`(kernelopts(platform)=\"windows\", [], [\"\\\\\"])[] ];\n  if ormap((c->StringTools:-Has(cmd,c)), dangerous_chars) then\n    error \"Dangerous characters in path: %1\", cmd;\n  end if;\n  cmd := cat(\"momiji \", cmd);\n  res := ssystem(cmd);\n  if res :: [0, string] then\n    parse(cat(\"use Hakaru in \", op(2,res), \" end use\"));\n  else\n    error \"ssystem %1: %2\", cmd, res;\n  end if;\nend proc;\n", "meta": {"hexsha": "390a01760c33ce05c149a75d6962b67241782774", "size": 6798, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "maple/NewSLO/Interface.mpl", "max_stars_repo_name": "zaxtax/hakaru", "max_stars_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 4, "max_stars_repo_stars_event_min_datetime": "2015-02-07T17:57:04.000Z", "max_stars_repo_stars_event_max_datetime": "2016-01-29T19:40:24.000Z", "max_issues_repo_path": "maple/NewSLO/Interface.mpl", "max_issues_repo_name": "zaxtax/hakaru", "max_issues_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "maple/NewSLO/Interface.mpl", "max_forks_repo_name": "zaxtax/hakaru", "max_forks_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 37.1475409836, "max_line_length": 111, "alphanum_fraction": 0.5817887614, "num_tokens": 2046, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5736783928749126, "lm_q2_score": 0.46879062662624377, "lm_q1q2_score": 0.26893505327776673}}
{"text": " func $selecti32 (\n  var %i i32,\n   var %j i32,\n   var %k i32) i32 { \n   return (\n     select i32 (\n      dread i32 %i, \n      dread i32 %j, \n      dread i32 %k))}\n\n func $selecti64 (\n  var %i i32,\n   var %j i64,\n   var %k i64) i64 { \n   return (\n     select i64 (\n      dread i32 %i, \n      dread i64 %j, \n      dread i64 %k))}\n\n func $selectf32 (\n  var %i i32,\n   var %j f32,\n   var %k f32) f32 { \n   return (\n     select f32 (\n      dread i32 %i, \n      dread f32 %j, \n      dread f32 %k))}\n\n func $selectf64 (\n  var %i i32,\n   var %j f64,\n   var %k f64) f64 { \n   return (\n     select f64 (\n      dread i32 %i, \n      dread f64 %j, \n      dread f64 %k))}\n # EXEC: %irbuild Main.mpl\n # EXEC: %irbuild Main.irb.mpl\n # EXEC: %cmp Main.irb.mpl Main.irb.irb.mpl\n", "meta": {"hexsha": "6a5e4beebaa091088129cf5c4f9b621a9cbfe697", "size": 761, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "test/testsuite/irbuild_test/I0066-mapleall-irbuild-edge-select/Main.mpl", "max_stars_repo_name": "harmonyos-mirror/OpenArkCompiler-test", "max_stars_repo_head_hexsha": "1755550ea22eb185cbef8cc5864fa273caebf95a", "max_stars_repo_licenses": ["MulanPSL-1.0"], "max_stars_count": 796, "max_stars_repo_stars_event_min_datetime": "2019-08-30T16:20:33.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-25T14:45:06.000Z", "max_issues_repo_path": "test/testsuite/irbuild_test/I0066-mapleall-irbuild-edge-select/Main.mpl", "max_issues_repo_name": "harmonyos-mirror/OpenArkCompiler-test", "max_issues_repo_head_hexsha": "1755550ea22eb185cbef8cc5864fa273caebf95a", "max_issues_repo_licenses": ["MulanPSL-1.0"], "max_issues_count": 16, "max_issues_repo_issues_event_min_datetime": "2019-08-30T18:04:08.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-19T05:02:58.000Z", "max_forks_repo_path": "test/testsuite/irbuild_test/I0066-mapleall-irbuild-edge-select/Main.mpl", "max_forks_repo_name": "harmonyos-mirror/OpenArkCompiler-test", "max_forks_repo_head_hexsha": "1755550ea22eb185cbef8cc5864fa273caebf95a", "max_forks_repo_licenses": ["MulanPSL-1.0"], "max_forks_count": 326, "max_forks_repo_forks_event_min_datetime": "2019-08-30T16:11:29.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-26T12:31:17.000Z", "avg_line_length": 17.6976744186, "max_line_length": 43, "alphanum_fraction": 0.505913272, "num_tokens": 291, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.523420348936324, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.26579906319502644}}
{"text": "# Extract a domain from an expression\nexport Extract := module ()\n  uses Domain_Type, Utilities;\n  export ModuleApply := proc(e, kb, $) :: [ HDomain, anything, list(`=`) ];\n    local b, eb, s, es, kb1, rn, ws;\n    b, eb, ws := op(Bound(e));\n    kb1, rn := Domain:-Bound:-toKB(b)[];\n    b, eb, ws := subs(rn,[b,eb,ws])[];\n    s, es := op(Shape(eb, kb1));\n    [ DOMAIN(b, s), es, ws ];\n  end proc;\n\n  # Extract a domain bound from an expression\n  # This pops off the integration constructors recursively, keeping\n  # track of the bounds in a KB (which literally become the DBound).\n  export Bound := module ()\n    export ModuleApply := proc(e, $) :: [ DomBound, anything, list(`=`) ];\n      local arg, vars, kb, ws, w0;\n      arg, vars, ws := do_extract(e)[];\n      vars := Domain:-Bound:-withVarsIxs(DBound(vars));\n      ws := map(`*`@op,ws);\n      w0 := op(1,ws); ws := subsop(1=NULL,ws);\n      if not(nops(ws)=nops(op(1,vars))) then\n        error \"number of outer weights doesn't match number of vars: %1, %2\",\n              op(1,vars), ws;\n      end if;\n      [ vars , w0*arg, zip(`=`,map2(op,1,op(1,vars)),ws) ];\n    end proc;\n\n    local do_extract_arg := proc(kind, arg_)\n      local x0, x, vars, ws,\n            arg := op(1,arg_),\n            rest := op(2..-1,arg_),\n            rng;\n      x0  := ExtBound[kind]:-ExtractVar(rest);   # variable name\n      rng := ExtBound[kind]:-ExtractRange(rest); # variable range\n      x   := DInto(x0, rng, kind);               # the variable spec\n      arg, vars, ws := do_extract(arg)[];\n      [ arg, [ op(vars), x ], [ op(ws), [] ]];\n    end proc;\n\n    local do_extract := proc(arg, $)\n      local sub, prod, svars, vs, ssum, ws, wc;\n      if arg :: `*` then\n        sub := map(do_extract, [op(arg)]);\n        prod, svars := selectremove(x->op(2,x)=[],sub);\n        if nops(svars) = 1 then\n          [   op([1,1],svars)\n            , op([1,2],svars)\n            , applyop(w-> [op(w),op(map2(op,1,prod))], -1,\n                      op([1,3],svars)) ];\n        else\n          [ arg, [], [[]] ];\n        end if;\n      elif arg :: `+` then\n        sub := map(do_extract, [op(arg)]);\n        svars := map2(op,2,sub);\n        if the(map(nops,svars)) then\n          vs[0] := map(sv->map2(op,1,sv), svars);      # a list of lists of variables\n          vs[1] := map2(op,1, op(1,svars));            # a list of 'fresh' variables\n          vs[2] := map(v->zip(`=`,v,vs[1]), vs[0]);    # variable renamings\n          svars := zip(subs,vs[2], svars);             # dombounds renamed\n          if the(svars) then\n            ssum := zip(subs,vs[2],map2(op,1,sub));    # sub-arg summands\n            ws   := zip(subs,vs[2],map2(op,3,sub));    # sub-arg weights\n            # factor out common weight\n            ws   := map(x->{op(map(op,x))}, ws);\n            wc   := `intersect`(op(ws));\n            ws   := [op(map(w -> w minus wc, ws))];\n            ws   := map(`[]`@op, ws);\n            wc   := [op(wc)];\n            # non-common weights are pushed down\n            ssum := zip(((s,w)->`*`(s,op(w))), ssum, ws);\n            [ `+`(op(ssum)),\n              op(1, svars),\n              [ wc$(nops(op(1,svars))), [] ] ];\n          else\n            [ arg, [], [[]] ]\n          end if;\n        else\n          [ arg, [], [[]] ]\n        end if;\n      elif Domain:-Has:-Bound(arg) then\n        do_extract_arg(op(0,arg), [op(arg)]);\n      else\n        [ arg, [], [[]] ]\n      end if;\n    end proc;\n  end module;\n\n  # Extract a domain shape from an expression\n  # This extracts the domain shape from individual multiplicands of\n  # expressions, and multiplies the subexpressions back together.\n  # essentially this assumes a distributive law (of domain shapes over\n  # products)\n  export Shape := module ()\n    export ModuleApply := proc(e, kb:=KB:-empty) :: [ anything, anything ];\n      local ixs, w, e1;\n      ixs := [indices(ExtShape, 'nolist')];\n      w, e1 := do_gets(ixs, true, e, kb) [];\n      if not ('no_simpl' in {_rest}) then\n        w := simpl_shape(w);\n      end if;\n      [ w, e1 ];\n    end proc;\n\n    local do_get := proc(f, f_ty, e, kb, $)\n      local sub, inds, rest;\n      if e::`*` then\n        sub := map(x->do_get(f, f_ty,x,kb), [op(e)]);\n        [ `And`(op(map2(op,1,sub))), `*`(op(map2(op,2,sub))) ]\n      elif e::`^` then\n        inds, rest := do_get(f, f_ty, op(1,e), kb) [] ;\n        [ inds, subsop(1=rest, e) ]\n      elif e:: f_ty then\n        f(e,((z,kb1)->ModuleApply(z,kb1,'no_simpl')),kb)\n      else\n        [ true, e ]\n      end if\n    end proc;\n\n    # apply a list of extractors, in order, until all fail to produce\n    # any output .\n    local do_gets := proc(todo::list, w, e, kb, $)\n      local t0, ts, w1, e1;\n      if nops(todo) = 0 then\n        [ w, e ]\n      else\n        t0 := op(1, todo);\n        ts := op(subsop(1=NULL, todo));\n        w1, e1 := do_get(ExtShape[t0]:-MakeCtx\n                         ,ExtShape[t0]:-MapleType\n                         ,e,kb) [] ;\n        ts := `if`(is(w1), [ts], [ts, t0]);\n        do_gets( ts, bool_And(w1, w), e1, kb );\n      end if;\n    end proc;\n\n    # todo: simplify the shape\n    local simpl_shape := proc(e0,$)\n      local e := simpl_relation(e0);\n      e := subsindets(e, specfunc(`Or`) , x->DSum(op(x)));\n      e := subsindets(e, specfunc(`And`), x->DConstrain(op(x)));\n      e;\n    end proc;\n  end module;\nend module;\n", "meta": {"hexsha": "3034fb1cfd85d5cd3936c283479795b406d13130", "size": 5328, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "maple/Domain/Extract.mpl", "max_stars_repo_name": "vmchale/hakaru", "max_stars_repo_head_hexsha": "78922e13876e449d6812a55a11bf84c8eb0af4d6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 327, "max_stars_repo_stars_event_min_datetime": "2015-01-03T08:56:51.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-24T12:12:06.000Z", "max_issues_repo_path": "maple/Domain/Extract.mpl", "max_issues_repo_name": "vmchale/hakaru", "max_issues_repo_head_hexsha": "78922e13876e449d6812a55a11bf84c8eb0af4d6", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": 155, "max_issues_repo_issues_event_min_datetime": "2015-05-05T17:57:22.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T15:43:39.000Z", "max_forks_repo_path": "maple/Domain/Extract.mpl", "max_forks_repo_name": "vmchale/hakaru", "max_forks_repo_head_hexsha": "78922e13876e449d6812a55a11bf84c8eb0af4d6", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": 38, "max_forks_repo_forks_event_min_datetime": "2015-01-23T16:25:37.000Z", "max_forks_repo_forks_event_max_datetime": "2021-03-14T15:09:12.000Z", "avg_line_length": 36.0, "max_line_length": 85, "alphanum_fraction": 0.4934309309, "num_tokens": 1668, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5544704649604273, "lm_q2_score": 0.4687906266262438, "lm_q1q2_score": 0.25993055671454346}}
{"text": "var $p <* i32>\nfunc $Foo (var %i i32) void {\n iassign <* i32>(\n    dread a64 $p,\n    add i32(\n     iread i32 <* i32> ( dread a64 $p ), \n     dread i32 %i))\n  return() \n}\n # EXEC: %irbuild Main.mpl\n # EXEC: %irbuild Main.irb.mpl\n # EXEC: %cmp Main.irb.mpl Main.irb.irb.mpl\n", "meta": {"hexsha": "743f6913fa4ad0756e9812d8b312871e93ca51e4", "size": 272, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "test/testsuite/irbuild_test/I0045-mapleall-irbuild-edge-indirect/Main.mpl", "max_stars_repo_name": "harmonyos-mirror/OpenArkCompiler-test", "max_stars_repo_head_hexsha": "1755550ea22eb185cbef8cc5864fa273caebf95a", "max_stars_repo_licenses": ["MulanPSL-1.0"], "max_stars_count": 796, "max_stars_repo_stars_event_min_datetime": "2019-08-30T16:20:33.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-25T14:45:06.000Z", "max_issues_repo_path": "test/testsuite/irbuild_test/I0045-mapleall-irbuild-edge-indirect/Main.mpl", "max_issues_repo_name": "harmonyos-mirror/OpenArkCompiler-test", "max_issues_repo_head_hexsha": "1755550ea22eb185cbef8cc5864fa273caebf95a", "max_issues_repo_licenses": ["MulanPSL-1.0"], "max_issues_count": 16, "max_issues_repo_issues_event_min_datetime": "2019-08-30T18:04:08.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-19T05:02:58.000Z", "max_forks_repo_path": "test/testsuite/irbuild_test/I0045-mapleall-irbuild-edge-indirect/Main.mpl", "max_forks_repo_name": "harmonyos-mirror/OpenArkCompiler-test", "max_forks_repo_head_hexsha": "1755550ea22eb185cbef8cc5864fa273caebf95a", "max_forks_repo_licenses": ["MulanPSL-1.0"], "max_forks_count": 326, "max_forks_repo_forks_event_min_datetime": "2019-08-30T16:11:29.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-26T12:31:17.000Z", "avg_line_length": 20.9230769231, "max_line_length": 43, "alphanum_fraction": 0.5661764706, "num_tokens": 106, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.5078118642792044, "lm_q2_score": 0.5039061705290806, "lm_q1q2_score": 0.2558895318781671}}
{"text": "redundant_DIntos := module()\n  export ModuleApply := proc(vs :: DomBound, sh :: DomShape, $)\n    # This 'simplification' removes redundant information, but it is\n    # entirely pointless as the result should be the same anyways. This\n    # is mainly here as an assertion that Apply properly\n    # re-applies integrals when the domain shape does not explicitly\n    # state them.\n    subsindets( sh, DomInto\n              , proc (x, $)\n                  local x_vn, x_t0, x_rest, x_t, x_mk;\n                  x_vn, x_t0, x_rest := op(x);\n                  x_t, x_mk := Domain:-Bound:-get(vs, x_vn);\n                  if x_t = x_t0 then\n                      x_rest\n                  else\n                      x\n                  end if;\n                end proc );\n  end proc;\n\n  export SimplName  := \"Obviously redundant 'DInto's\";\n  export SimplOrder := 2;\nend module;\n\n\nempty_DIntos := module()\n  uses Domain;\n\n  export ModuleApply := proc(vs,sh,$)\n    subsindets(sh, satisfies(is_empty), _->DSum());\n  end proc;\n\n  local is_empty := proc(e,$)\n    evalb(e = DSum()) or (evalb(op(0,e) = DInto) and is_empty(op(3,e)));\n  end proc;\n\n  export SimplName  := \"Empty DIntos\";\n  export SimplOrder := 15;\nend module;\n", "meta": {"hexsha": "7aff6bc6558b547af2fc067527a15b9bb916cbb0", "size": 1210, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "maple/Domain/Improve/Integrals.mpl", "max_stars_repo_name": "zaxtax/hakaru", "max_stars_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 4, "max_stars_repo_stars_event_min_datetime": "2015-02-07T17:57:04.000Z", "max_stars_repo_stars_event_max_datetime": "2016-01-29T19:40:24.000Z", "max_issues_repo_path": "maple/Domain/Improve/Integrals.mpl", "max_issues_repo_name": "zaxtax/hakaru", "max_issues_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_issues_repo_licenses": ["BSD-3-Clause"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "maple/Domain/Improve/Integrals.mpl", "max_forks_repo_name": "zaxtax/hakaru", "max_forks_repo_head_hexsha": "03ac5b645815e99437e28d228e6c668753b2640e", "max_forks_repo_licenses": ["BSD-3-Clause"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 30.25, "max_line_length": 72, "alphanum_fraction": 0.5685950413, "num_tokens": 324, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5273165233795672, "lm_q2_score": 0.4843800842769844, "lm_q1q2_score": 0.2554216220352412}}
{"text": "######################################################################\n#\n# General circle operad framework.\n\n`check_semi_circ_args` := proc(i,m,n,U,V,is_el_CC)\n global reason;\n\n if not (type(i,posint) and\n         type(m,nonnegint) and\n\t type(n,nonnegint) and\n\t i <= m) then\n  reason := [convert(procname,string),\n   \"numbers (i,m,n) do not satisfy 0 < i <= m; 0 <= n\",i,m,n];\n  return false;\n fi;\n\n if not is_el_CC(m)(U) then\n  reason := [convert(procname,string),\"U is not in C(m)\",eval(U),m];\n  return false;\n fi;\n\n if not is_el_CC(n)(U) then\n  reason := [convert(procname,string),\"V is not in C(n)\",eval(V),n];\n  return false;\n fi;\n\n return true;\nend;\n\n######################################################################\n\n`check_semi_circ_axiom_nested` :=\n proc(i,j,l,m,n,U,V,W,is_el_CC,is_equal_CC,circ_CC)\n local UV,VW,UVW0,UVW1;\n global reason;\n\n if not (type(i,posint) and\n         type(j,posint) and\n\t type(l,nonnegint) and\n\t type(m,nonnegint) and\n\t type(n,nonnegint) and\n\t i <= l and\n\t j <= m) then \n  reason := [convert(procname,string),\n   \"numbers (i,j,l,m,n) do not satisfy 0 < i <= l; 0 < j <= m; 0 <= n\",\n   i,j,l,m,n];\n  return false;\n fi;\n\n if not is_el_CC(l)(U) then\n  reason := [convert(procname,string),\"U is not in O(l)\",l,eval(U)];\n  return false;\n fi;\n\n if not is_el_CC(m)(V) then\n  reason := [convert(procname,string),\"V is not in O(m)\",m,eval(V)];\n  return false;\n fi;\n\n if not is_el_CC(n)(W) then\n  reason := [convert(procname,string),\"W is not in O(n)\",n,eval(W)];\n  return false;\n fi;\n\n UV := circ_CC(i,l,m)(U,V);\n\n if not is_el_CC(l+m-1)(UV) then\n  reason := [convert(procname,string),\"U o_i V is not in O(l+m-1)\",i,l,m,eval(U),eval(V),eval(UV)];\n  return false;\n fi;\n\n VW := circ_CC(j,m,n)(V,W);\n\n if not is_el_CC(m+n-1)(VW) then\n  reason := [convert(procname,string),\"V o_j W is not in O(m+n-1)\",j,m,n,eval(VW)];\n  return false;\n fi;\n\n UVW0 := circ_CC(i,l,m+n-1)(U,VW);\n\n if not is_el_CC(l+m+n-2)(UVW0) then\n  reason := [convert(procname,string),\"U o_i (V o_j W) is not in O(l+m+n-2)\",i,j,l,m,n,eval(UVW0)];\n  return false;\n fi;\n\n UVW1 := circ_CC(i+j-1,l+m-1,n)(UV,W);\n\n if not is_el_CC(l+m+n-2)(UVW1) then\n  reason := [convert(procname,string),\"(U o_i V) o_(i+j-1) W is not in O(l+m+n-2)\",i,j,l,m,n,eval(UVW1)];\n  return false;\n fi;\n\n if not is_equal_CC(l+m+n-2)(UVW0,UVW1) then\n  reason := [convert(procname,string),\"UVW0 != UVW1\",eval(UVW0),eval(UVW1)];\n  return false;\n fi;\n\n return true;\nend;\n\n`check_semi_circ_axiom_disjoint` :=\n proc(i,k,l,m,n,U,V,W,is_el_CC,is_equal_CC,circ_CC)\n local UV,UW,UVW,UWV;\n global reason;\n\n if not (type(i,posint) and\n         type(k,posint) and\n\t type(l,nonnegint) and\n\t type(m,nonnegint) and\n\t type(n,nonnegint) and\n\t i < k and\n\t k <= l) then \n  reason := [convert(procname,string),\n   \"numbers (i,k,l,m,n) do not satisfy 0 < i < k <= l; 0 < j <= m; 0 <= n\",\n   i,k,l,m,n];\n  return false;\n fi;\n\n if not is_el_CC(l)(U) then\n  reason := [convert(procname,string),\"U is not in O(l)\",l,eval(U)];\n  return false;\n fi;\n\n if not is_el_CC(m)(V) then\n  reason := [convert(procname,string),\"V is not in O(m)\",m,eval(V)];\n  return false;\n fi;\n\n if not is_el_CC(n)(W) then\n  reason := [convert(procname,string),\"W is not in O(n)\",n,eval(W)];\n  return false;\n fi;\n\n UV := circ_CC(i,l,m)(U,V);\n\n if not is_el_CC(l+m-1)(UV) then\n  reason := [convert(procname,string),\"U o_i V is not in O(l+m-1)\",i,l,m,eval(U),eval(V),eval(UV)];\n  return false;\n fi;\n\n UW := circ_CC(k,l,n)(U,W);\n\n if not is_el_CC(l+n-1)(UW) then\n  reason := [convert(procname,string),\"U o_k W is not in O(l+n-1)\",k,l,n,eval(UW)];\n  return false;\n fi;\n\n UVW := circ_CC(k+m-1,l+m-1,n)(UV,W);\n\n if not is_el_CC(l+m+n-2)(UVW) then\n  reason := [convert(procname,string),\"(U o_i V) o_(k+m-1) W is not in O(l+m+n-2)\",i,k,l,m,n,eval(UVW)];\n  return false;\n fi;\n\n UWV := circ_CC(i,l+n-1,m)(UW,V);\n\n if not is_el_CC(l+m+n-2)(UWV) then\n  reason := [convert(procname,string),\"(U o_k W) o_i V is not in O(l+m+n-2)\",i,k,l,m,n,eval(UWV)];\n  return false;\n fi;\n\n if not is_equal_CC(l+m+n-2)(UVW,UWV) then\n  reason := [convert(procname,string),\"UVW != UWV\",eval(UVW),eval(UWV)];\n  return false;\n fi;\n\n return true;\nend;\n\n\n", "meta": {"hexsha": "1c0de01ca1ac1e6aaa15b702a82a26521985f19e", "size": 4131, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "lib/semioperads/circ.mpl", "max_stars_repo_name": "NeilStrickland/maple_lib", "max_stars_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/semioperads/circ.mpl", "max_issues_repo_name": "NeilStrickland/maple_lib", "max_issues_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/semioperads/circ.mpl", "max_forks_repo_name": "NeilStrickland/maple_lib", "max_forks_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 24.1578947368, "max_line_length": 105, "alphanum_fraction": 0.5964657468, "num_tokens": 1449, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5660185205547239, "lm_q2_score": 0.44939263446475963, "lm_q1q2_score": 0.25436455410793307}}
{"text": "standard_colour_list := \n map(u -> ColorTools[Color](u /~ 255.),[\n  [255,  0,  0], [229,122,  0], [ 76,115,  0], [ 64,255, 89],\n  [ 38,145,153], [  0, 41,153], [213,128,255], [230,115,161],\n  [ 89,  0,  0], [ 89, 58, 22], [204,197,102], [ 51,102, 58],\n  [  0,204,255], [115,130,230], [ 96, 57,115], [242,  0, 65],\n  [191, 67, 48], [178,137, 89], [255,238,  0], [ 45,179, 98],\n  [  0, 68,128], [ 36,  0, 89], [204,  0,163], [127, 64, 72],\n  [255,162,128], [102, 82,  0], [195,255,128], [128,255,246],\n  [ 77,117,153], [136,  0,204], [102,  0, 54]\n ]):\n\nstandard_colour := proc(i)\n local n;\n n := nops(standard_colour_list);\n standard_colour_list[modp(i-1,n)+1];\nend:\n", "meta": {"hexsha": "09b4e8b9a5f4761c3e2156d2a6849aa26625e132", "size": 666, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "lib/colours.mpl", "max_stars_repo_name": "NeilStrickland/maple_lib", "max_stars_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/colours.mpl", "max_issues_repo_name": "NeilStrickland/maple_lib", "max_issues_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/colours.mpl", "max_forks_repo_name": "NeilStrickland/maple_lib", "max_forks_repo_head_hexsha": "afdc262a183c56959a7c013e38a166824f7fc3d5", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 37.0, "max_line_length": 61, "alphanum_fraction": 0.518018018, "num_tokens": 339, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5467381519846138, "lm_q2_score": 0.46101677931231594, "lm_q1q2_score": 0.2520554619551142}}
