Wolfram Language

1 program Added 2025-10-22T09:44:40Z Model: anthropic/claude-3.5-sonnetTemp: 0.4 Evidence Report issue View issues
Aliases: Mathematica, WL
Provenance: commit 5949cafaab · authored 2025-10-22T11:44:40+02:00 · model anthropic/claude-3.5-sonnet

Sources mentioning this language

7 sources · pl_id: pl/wolfram-language
LLM (this repo) · 1LinguistPygmentsWikipediaHyperpolyglotRosettacodeWikidata · Q15241057

Wikipedia infobox ↗

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsmulti-paradigm: term-rewriting · functional · procedural · array
Typingdynamic, strong
Designed byWolfram Research · Stephen Wolfram
First appeared1988
Influenced byAPL · C · C++ · FORTRAN · Lisp · Pascal · Prolog · Schoonschip · Simula · Smalltalk · SMP
LicenseProprietary
Homepagehttps://www.wolfram.com/language/

Extensions claimed by this language

19 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.cdfwikidataprimary117.4K files
.mwikidataprimary52.6M files
.mathematicalinguistprimary9.7K files
.nbpygmentsprimary497.9K files
.nbwikidataprimary497.9K files
.wlwikidataprimary59.3K files
.wlswikidataprimary9.8K files
.cdflinguistsecondary117.4K files
.cdfpygmentssecondary117.4K files
.mlinguistsecondary52.6M files
.malinguistsecondary205.8K files
.mapygmentssecondary205.8K files
.mtlinguistsecondary49.4K files
.nblinguistsecondary497.9K files
.nbplinguistsecondary759 files
.nbppygmentssecondary759 files
.wllinguistsecondary59.3K files
.wlslinguistsecondary9.8K files
.wltlinguistsecondary7.6K files

Related languages

Wolfram (0.82)Mathematica (0.51)MPL (0.36)AMPL (0.33)GNU MathProg (0.30)

Real programs from Software Heritage

8 samples mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
FeynCalcToLaTeX.m · 3014 B · ext .m · SWH occurrences unknown
via swh_study:m (judge:claude-sonnet-4.6; judge:gemini-3.8-flash)
swh:1:cnt:a6dfae61490f1767ae6f6e199d66774a92c70260;origin=https://github.com/awantae/feyncalc;path=/FeynCalc/Kernel/fcPackages/general/FeynCalcToLaTeX.m
Open in SWH · Raw bytes (SWH)
Reviews (2 LLM)
Ground truth · how?
🤖 anthropic-claude-sonnet-4.6 m-judge/1 → pl/wolfram-language (high) 2026-09-30
Mathematica/Wolfram Language (FeynCalc package)
🤖 google-gemini-3.8-flash m-judge/1 → pl/wolfram-language (high) 2026-09-30
Wolfram Language (Mathematica package)
Show source
(* :Title: FeynCalcToLaTeX *)

(* :Author: Rolf Mertig *)

(* ------------------------------------------------------------------------ *)
(* :History: useful for documentation, but probably also otherwise *)
(* ------------------------------------------------------------------------ *)

(* ------------------------------------------------------------------------ *)

BeginPackage["HighEnergyPhysics`general`FeynCalcToLaTeX`",{"HighEnergyPhysics`FeynCalc`"}];

FeynCalcToLaTeX::usage="FeynCalcToLaTeX[expr] generates LaTeX with line-breaking 
for expr.
FeynCalcToLaTeX[expr, 500] generates LaTeX for expr with 500 being the Window width
 setting for the Mathematica frontend. Increasing its value will generate less
line breaks.";

F2L::usage="F2L is the same as FeynCalcToLaTeX.";

Begin["`Private`"];

MakeContext[StringChomp];

F2L = FeynCalcToLaTeX;

FeynCalcToLaTeX[expr_, width_:500] := If[!$Notebooks,
   Needs["JLink`"];
   JLink`InstallJava[];
   JLink`UseFrontEnd[f2tex[expr, width]],
   f2tex[expr,width]
];

(* this is of course heuristics; should change to java.util.regexp or so ... *)

f2tex[expr_, width_:500] := Module[{r, n, w,y,z}, 
  r = Cell[BoxData[FormBox[(MakeBoxes[#1, TraditionalForm] & )[expr], TraditionalForm]], 
     "Output"];
  n = NotebookPut[Notebook[{r}, WindowSize -> {width, Inherited}, 
     Visible -> False]];
  o = StringJoin[$TemporaryPrefix, ToString[Random[Integer, 10^8]], 
    "fc2latex.tex"];
  If[$VersionNumber<=5.1, TeXSave[o, n], Export[o, r, "TeX"]];
  t = Import[o, "Text"];
  w = If[(tt=StringPosition[t, "dispSFoutmath"])!={},
        StringDrop[StringChomp[
          StringReplace[
            StringDrop[t, 
              StringPosition[t, "dispSFoutmath"][[1,1]] + 13],
        {"\\end{document}" -> "", 
         "\\MathBegin{MathArray}{l}"->"",
         "\\MathBegin{MathArray}[p]{l}"->"",
         "\\MathEnd{MathArray}"->"",
         "\\NoBreak" -> ""}
         ]], -2],
      StringChomp[
        StringReplace[
          t,
        {"\\end{document}" -> "", 
         "\\MathBegin{MathArray}{l}"->"",
         "\\MathBegin{MathArray}[p]{l}"->"",
         "\\MathEnd{MathArray}"->"",
         "\\NoBreak" -> ""}
         ]]
      ];
  DeleteFile[o];
  NotebookClose[n];
  y = StringChomp[StringReplace[StringJoin@@(Characters[
        w]//.{in___,"\\",_,"s","p","a","c","e","{",___,"}",
          fi___}\[RuleDelayed]
        {in,fi}) ,"\\noalign{}"->""]];
  z = StringReplace[FixedPoint[StringReplace[#, "  "->" "]&,y],"\n \n"->"\n"];
  z = StringReplace[StringReplace[z,"\\\\\n"->"\n\\\\\n"],"\n\n"->""];
  z = StringReplace[z,"\n\\\\ (\n"-> "\n\\\\ \n( "];
  If[StringMatchQ[z,"*\\\\"], z = StringDrop[z,-2]];
  If[StringLength[z]>1,
    If[StringTake[z,1]==="{" && StringTake[z,-1]==="}", 
      z = StringDrop[StringDrop[z, 1], -1]
    ]
  ];
  (*z = "$\n"<>z<>"\n$";*)
  (*not always useful, comment it out for now
  CellPrint[Cell[z, "Program"]]
  ;*)
  z
]

End[];


If[$VeryVerbose > 0,WriteString["stdout", "FeynCalcToLaTeX| \n "]];
Null


00621-model.m · 2499 B · ext .m · SWH occurrences unknown
via swh_study:m (judge:claude-sonnet-4.6; judge:gemini-3.8-flash)
swh:1:cnt:3d9ad03bdcbbc129a49c23fc04917bd8856e0b90;origin=https://svn.code.sf.net/p/sbml/code;path=/trunk/test-suite/cases/semantic/00621/00621-model.m
Open in SWH · Raw bytes (SWH)
Reviews (2 LLM)
Ground truth · how?
🤖 anthropic-claude-sonnet-4.6 m-judge/1 → pl/wolfram-language (high) 2026-09-30
Wolfram Mathematica / MathSBML DSL
🤖 google-gemini-3.8-flash m-judge/1 → pl/wolfram-language (high) 2026-09-30
Wolfram Language (Mathematica / SBML Test Suite DSL)
Show source
(* 

category:      Test
synopsis:      Basic single forward reaction with three species in one
compartment using an assignmentRule to vary one species.
componentTags: Compartment, Species, Reaction, Parameter, AssignmentRule, EventNoDelay  
testTags:      Amount, InitialValueReassigned
testType:      TimeCourse
levels:        2.1, 2.2, 2.3, 2.4, 3.1
generatedBy:   Numeric

The model contains one compartment called C.  There are three
species called S1, S2 and S3 and two parameters called k1 and k2.  The model
contains one reaction defined as:

[{width:30em,margin-left:5em}|  *Reaction*  |  *Rate*  |
| S1 -> S2 | $C * k2 * S1$  |]

The model contains one rule which assigns value to species S3:

[{width:30em,margin-left:5em}|  *Type*  |  *Variable*  |  *Formula*  |
 | Assignment | S3 | $k1 * S2$  |]

In this case the initial value declared for species S3 is inconsistent with
the value calculated by the assignmentRule.  Note that since this
assignmentRule must always remain true, it should be considered during
simulation.

The model contains one event that assigns a value to species S2:

[{width:30em,margin-left:5em}| | *Trigger*    | *Delay* | *Assignments* |
 | Event1 | $S1 < 0.1$ | $-$   | $S2 = 1$    |]

The initial conditions are as follows:

[{width:30em,margin-left:5em}|       |*Value*         |*Units*  |
|Initial amount of S1                |$            1$ |mole                      |
|Initial amount of S2                |$            0$ |mole                      |
|Initial amount of S3                |$        3.75$ |mole                      |
|Value of parameter k1               |$         0.75$ |dimensionless |
|Value of parameter k2               |$            5$ |second^-1^ |
|Volume of compartment C |$            1$ |litre                     |]

The species values are given as amounts of substance to make it easier to
use the model in a discrete stochastic simulator, but (as per usual SBML
principles) their symbols represent their values in concentration units
where they appear in expressions.

*)

newcase[ "00621" ];

addCompartment[ C, size -> 1];
addSpecies[ S1, initialAmount->1 ];
addSpecies[ S2, initialAmount -> 0.5 ];
addSpecies[ S3, initialAmount -> 3.75];
addParameter[ k1, value -> 0.75 ];
addParameter[ k2, value -> 5 ];
addRule[ type->AssignmentRule, variable -> S3, math ->k1 * S2];
addReaction[ S1 -> S2, reversible -> False,
	     kineticLaw -> C * k2 * S1];
addEvent[ trigger -> S1 < 0.1, eventAssignment -> S2->1 ];

makemodel[]
SimpleTensor.m · 2244 B · ext .m · SWH occurrences unknown
via swh_study:m (judge:claude-sonnet-4.6; judge:gemini-3.8-flash; human:mathieu-acher)
swh:1:cnt:2aa25faa042945a4cdca9b8365ef885c25aa51b4;origin=https://github.com/gharib85/SpinorsExtras;path=/SpinorsExtras/SimpleTensor.m
Open in SWH · Raw bytes (SWH)
Reviews (1 human, 2 LLM)
Ground truth · how?
👤 mathieu-acher → pl/wolfram-language (medium) 2026-10-01
🤖 anthropic-claude-sonnet-4.6 m-judge/1 → pl/wolfram-language (high) 2026-09-29
Wolfram Mathematica Package (.m)
🤖 google-gemini-3.8-flash m-judge/1 → pl/wolfram-language (high) 2026-09-29
Wolfram Language (Mathematica package)
Show source
(* ::Package:: *)

BeginPackage["SpinorsExtras`SimpleTensor`", {"Spinors`"}]


(* ::Section:: *)
(*Usage messages*)


SimpleTensorQ::usage =
"\
SimpleTensorQ[expr] \
returns True if expr represents simple tensor e.g. |a>[b|. Returns False \
otherwise."


SimpleTensorGetBLabel::usage =
"\
SimpleTensorGetBLabel[expr] \
returns label of B spinor from simple tensor expr."


SimpleTensorGetALabel::usage =
"\
SimpleTensorGetALabel[expr] \
returns label of A spinor from simple tensor expr."


(* ::Section:: *)
(*Implementation*)


(* Unprotect all public symbols in this context. *)
Unprotect["`*"];


Begin["`Private`"]


Needs["ProtectionUtilities`"] (* ProtectContextNonVariables *)


(* ::Subsection:: *)
(*SimpleTensorQ*)


SimpleTensorQ[expr_] := MatchQ[
	expr
	,
	_Sm | (_Sm __) | _SmBA | (_SmBA __) |
		HoldPattern @ Plus[
			(Sm[a_] | (Sm[a_] __) | SmBA[a_, _] | (SmBA[a_, _] __))..
		] |
		HoldPattern @ Plus[
			(Sm[a_] | (Sm[a_] __) | SmBA[_, a_] | (SmBA[_, a_] __))..
		]
]


(* ::Subsection:: *)
(*SimpleTensorGetBLabel*)


SimpleTensorGetBLabel[Sm[a_]] := a

SimpleTensorGetBLabel[SmBA[b_, _]] := b

SimpleTensorGetBLabel[
	HoldPattern @ Plus[
		(Sm[b_] | (Sm[b_] __) | SmBA[b_, _] | (SmBA[b_, _] __))..
	]
] := b

SimpleTensorGetBLabel[expr:(_Plus|_Times)] := SimpleTensorGetBLabel /@ expr

SimpleTensorGetBLabel[expr_] := expr


(* ::Subsection:: *)
(*SimpleTensorGetALabel*)


Options[SimpleTensorGetALabel] = {
	"GetCoefficient" -> False
}


SimpleTensorGetALabel[Sm[a_], OptionsPattern[]] := a

SimpleTensorGetALabel[Sm[a_] C__, OptionsPattern[]] :=
	If[OptionValue["GetCoefficient"],
		Times[a, C]
	(* else *),
		a
	]

SimpleTensorGetALabel[SmBA[_, a_], OptionsPattern[]] := a

SimpleTensorGetALabel[SmBA[_, a_] C__, OptionsPattern[]] :=
	If[OptionValue["GetCoefficient"],
		Times[a, C]
	(* else *),
		a
	]

SimpleTensorGetALabel[
	HoldPattern @ Plus[
		(Sm[a_] | (Sm[a_] __) | SmBA[_, a_] | (SmBA[_, a_] __))..
	]
	,
	OptionsPattern[]
] := a

SimpleTensorGetALabel[expr:_Plus, OptionsPattern[]] :=
	SimpleTensorGetALabel[#, "GetCoefficient" -> True]& /@ expr

SimpleTensorGetALabel[expr_, OptionsPattern[]] := expr


End[]


(* ::Subsection:: *)
(*Public symbols protection*)


ProtectContextNonVariables[];


EndPackage[]
Transfer_08-09-20_NC_Prot_opt_da0_G_a-1040_P6.m · 2295 B · ext .m · SWH occurrences unknown
via swh_study:m (judge:claude-sonnet-4.6; judge:gemini-3.8-flash; human:mathieu-acher)
swh:1:cnt:7e0992b8030593deb2497a0b7dcabb4d06ba8f32;origin=https://github.com/walee-1/TransportFunction;path=/MergerTransport/MergerTransport/NC_Prot_opt_da0/a-1040/Transfer_08-09-20_NC_Prot_opt_da0_G_a-1040_P6.m
Open in SWH · Raw bytes (SWH)
Reviews (1 human, 2 LLM)
Ground truth · how?
👤 mathieu-acher → pl/wolfram-language (medium) 2026-10-01
(* Wolfram Language package *) as part of the source code (comment) and yes, clearly Wolfram wrt syntax
🤖 anthropic-claude-sonnet-4.6 m-judge/1 → pl/wolfram-language (high) 2026-09-29
Wolfram Language / Mathematica package script
🤖 google-gemini-3.8-flash m-judge/1 → pl/wolfram-language (high) 2026-09-29
Wolfram Language / Mathematica
Show source
(* ::Package:: *)

(* Wolfram Language package *)
t0=AbsoluteTime[];
SetDirectory["C:/Users/smi/Desktop/WaleedTransport/"];

Print["Configured Kernels: ",$ConfiguredKernels];
Print["Processor Count: ",$ProcessorCount];

(*BackScatterBoole = True;*)

a=-0.104;
Bins = {155, 178};

Get["MergerTransport/Merger2DProton.m"];
Print["Modules loaded ..."];

kernels=6
LaunchKernels[kernels];
Print[kernels," Kernels launched ..."];

{{MeanX, MeanY}, {ApertX, ApertY}, {BDV}, {BF}, {BA}, {BRxB}, {BDet}}={{0.0301277, 1.00623}, {0.01, 
  0.035}, {0.220899}, {0.451107}, {0.219769}, {0.219722}, {0.207816}};
  
ApertXOff = 0.03; 
ApertYOff = 0.;

(*CenterfitG1=0.96907;
CenterfitG2=0.973888;*)
BlinefitG1=0.965547;
BlinefitG2=0.974009;

rF = BF/BDV;
rA = BA/BDV;
rRxB = BRxB/BDV;
rDet = BDet/BRxB;

(*AlphaFromBlines = 178.20869281586448`/180*Pi;*)

AlphaFromBlinesCorr = 180.11/180.*Pi;

(*BfromCenter=0.221032;*)

BfromCentralBline=0.219679;

XAShift = 0.0;YAShift = 0.007188045691239971`;YRxBShift = 0.00677284727516161`;YDetShift = 0.015928000000000164`;
XRxBShift = 0.;XDetShift = 0.;

R = 0.999002;

xStart=0.02;
xEnd=0.14;
yStart=-0.03;
yEnd=0.04;
xyBins=bin2DGen[xStart,xEnd,yStart,yEnd,24,11];
 
IntMethod = {"GlobalAdaptive", Method -> "MultidimensionalRule"};

Print["Run started at ",DateString[],", Bins: ",Bins];
  
BinwYShiftPrec44OriginalBinsb0NewBGrad = 
 ParallelMap[
  AbsoluteTiming[
    BinIntShift[
     a, #, 
     {AlphaFromBlinesCorr, BfromCentralBline, rF, rRxB, rA, rDet, BlinefitG1, BlinefitG2}, {XAShift, YAShift, YRxBShift, XDetShift, YDetShift}, 
     {0.06, 0.059, 0.9, 0., -0.9, 0.1, 0.099, 0.9, 0., -0.9}, {ApertX, ApertY, ApertXOff, ApertYOff},
     {IntMethod, 4, 2, 0, 3}, {IntMethod, 4, 2, 0, 2}, {IntMethod, 3, 6, 0, 1}
     ]] &, xyBins[[Bins[[1]] ;; Bins[[2]]]], 
  Method -> "FinestGrained"];

Export["MergerTransport/NC_Prot_opt_da0/a"<>ToString[IntegerPart[a*10000]]<>"/TransferResult_08-09-20_NC_opt_G_da0_a"<>ToString[IntegerPart[a*10000]]<>"_"<>ToString[Bins[[1]]]<>"-"<>ToString[Bins[[2]]]<>".txt",BinwYShiftPrec44OriginalBinsb0NewBGrad,"Table"];
 
Print["a = ",IntegerPart[a*10000],"e-4"];
Print["Time consumption: ",(AbsoluteTime[]-t0)/3600.];
Print["MaxMemUse :",MaxMemoryUsed[]/1024/1024.," MB"];
CloseKernels[];
Quit[];

(* Wolfram Language package *)
symb01ValsRec.m · 1830 B · ext .m · SWH occurrences unknown
via swh_study:m (judge:claude-sonnet-4.6; judge:gemini-3.8-flash; human:mathieu-acher)
swh:1:cnt:a9e039af425c8cac9a9087d0c0290a880e386b52;origin=https://github.com/es335mathwiz/ProjectionMethodTools;path=/ProjectionMethodToolsJava/code/symb01ValsRec.m
Open in SWH · Raw bytes (SWH)
Reviews (1 human, 2 LLM)
Ground truth · how?
👤 mathieu-acher → pl/wolfram-language (medium) 2026-10-01
README gives a strong justification "Mathematica code for computing projection method solutions for DSGE models"
🤖 anthropic-claude-sonnet-4.6 m-judge/1 → pl/wolfram-language (high) 2026-09-29
Wolfram Mathematica package (.m)
🤖 google-gemini-3.8-flash m-judge/1 → pl/wolfram-language (high) 2026-09-29
Wolfram Language / Mathematica Package
Show source
BeginPackage["symb01ValsRec`",{"labDocPrep`","ProjectionInterface`"}]
Print["reading symb01ValsRec package"]

(*compute z0 for time zero constraint only *)

Print["for one"]

aPath01ValsRec=genPath[1]

try01ValsRec={
(aPath01ValsRec[[5,1]]>=2/100&&Global`zzz$0$1[Global`t]==0)||
(aPath01ValsRec[[5,1]]==2/100&&Global`zzz$0$1[Global`t]>=0)
}
Export["try01ValsRecA.pdf",try01ValsRec[[1,1]]]
Export["try01ValsRecB.pdf",try01ValsRec[[1,2]]]

Print["first solve"]
{symb01ValsRecFirstSecs,ig01ValsRec}=Timing[slv01ValsRec=Solve[try01ValsRec,{Global`zzz$0$1[Global`t]},Reals]//FullSimplify//Chop]
Print["second solve"]
{symb01ValsRecSecondSecs,ig01ValsRec}=Timing[slv01ValsRec=Solve[try01ValsRec,{Global`zzz$0$1[Global`t]},Reals]//FullSimplify//Chop]
Print["construct zzz$0$1Func"]
Global`zzz$0$1PreInterpFunc= Function @@ {{Global`qtm1,Global`rutm1,Global`eps},Piecewise[List @@@ (Last/@Flatten[slv01ValsRec])]}
Splice["symb01ValsRecSecs.mtex"]

Print["construct interpolation"]
Global`zzz$0$1InterpFunc=Global`makeInterpFunc[Global`zzz$0$1PreInterpFunc]



(*
Plot3D @@ 
{Global`zzz$0$1InterpFunc[Global`qq,Global`ru,0]-Global`zzz$0$1Func[Global`qq,Global`ru,0],
{Global`qq,Global`qLow,Global`qHigh}//.Global`lucaSubs//N,
{Global`ru,Global`ruLow,Global`ruHigh}//.Global`lucaSubs//N,PlotRange->All}

Abs[Global`zzz$0$1InterpFunc[Global`qq,Global`ru,Global`ep]-Global`zzz$0$1Func[Global`qq,Global`ru,Global`ep]]

(*{io,1,5},{ip,5,50,5}*)
not really near zero norm  for (1,30)
Plot3D @@ 
{interOneVals[[3,-1]][Global`qq,Global`ru,0],
{Global`qq,Global`qLow,Global`qHigh}//.Global`lucaSubs//N,
{Global`ru,Global`ruLow,Global`ruHigh}//.Global`lucaSubs//N,PlotRange->All}
*)
(*
Timing[interOneVals=experOrd[]]
Splice["interpOneCalcs.mtex"]
Sort[experOrd[],#1[[2,1]]>#2[[2,1]]&]
*)


EndPackage[]
Print["done reading symb01ValsRec package"]

00504-model.m · 2565 B · ext .m · SWH occurrences unknown
via swh_study:m (judge:claude-sonnet-4.6; judge:gemini-3.8-flash)
swh:1:cnt:edf3b6ddb3bfbb3b71cfb2bb100945c0631e32fa;origin=https://github.com/sbmlteam/test-suite;path=/trunk/test-suite/cases/semantic/00504/00504-model.m
Open in SWH · Raw bytes (SWH)
Reviews (2 LLM)
Ground truth · how?
🤖 anthropic-claude-sonnet-4.6 m-judge/1 → pl/wolfram-language (high) 2026-09-30
Wolfram Mathematica (SBML Test Suite model definition)
🤖 google-gemini-3.8-flash m-judge/1 → pl/wolfram-language (high) 2026-09-30
Mathematica (SBML Test Suite DSL)
Show source
(* 

category:      Test
synopsis:      Basic two reactions with four species in a compartment using 
initialAssignment to set the initial value of one species.
componentTags: Compartment, Species, Reaction, Parameter, InitialAssignment 
testTags:      InitialAmount, ConstantSpecies
testType:      TimeCourse
levels:        2.2, 2.3, 2.4, 3.1
generatedBy:   Numeric

The model contains one compartment called C.  There are four species called 
S1, S2, S3 and S4 and three parameters called k1, k2 and p1.  Species S4 is labeled 
as a constant species.   The model contains two reactions defined as:

[{width:30em,margin-left:5em}|  *Reaction*  |  *Rate*  |
| S1 + S2 -> S3 | $k1 * S1 * S4 * C$  |
| S3 -> S1 + S2 | $k2 * S3 * C$  |]

  The model contains one initialAssignment:

[{width:30em,margin-left:5em}| Variable | Formula |
 | S4 | $p1 * 2$  |]

Note: SBML's InitialAssignment construct override any declared initial
values.  In this model, the initial value for the species S4 has not been
explicitly declared and must be calculated using the InitialAssignment.

The initial conditions are as follows:

[{width 30em,margin-left 5em}| |*Value*        |*Units*  |
|Initial amount of S1        |$0.25 \x 10^-1$ |mole                      |
|Initial amount of S2        |$2.0 \x 10^-1$  |mole                      |
|Initial amount of S3        |$1.0 \x 10^-1$  |mole                      |
|Initial amount of S4        |$undeclared$     |mole                      |
|Value of parameter k1       |$0.75$           |litre mole^-1^ second^-1^ |
|Value of parameter k2       |$0.25$           |second^-1^                |
|Value of parameter p1       |$5 \x 10^-2$    |mole                |
|Volume of compartment C     |$1$              |litre                  |]

The species values are given as amounts of substance to make it easier to
use the model in a discrete stochastic simulator, but (as per usual SBML
principles) they must be treated as concentrations where they appear in
expressions.

*)

newcase[ "00504" ];

addCompartment[ C, size -> 1 ];
addSpecies[ S1, initialAmount -> 0.25 10^-1];
addSpecies[ S2, initialAmount -> 2.0 10^-1];
addSpecies[ S3, initialAmount -> 1.0 10^-1];
addSpecies[ S4, constant -> True]
addParameter[ k1, value -> 0.75 ];
addParameter[ k2, value -> 0.25 ];
addParameter[ p1, value -> 0.5 10^-1 ];
addInitialAssignment[ S4, math -> p1*2];
addReaction[ S1 + S2 -> S3, reversible -> False,
	     kineticLaw -> k1 * S1 * S4 * C ];
addReaction[ S3 -> S1 + S2, reversible -> False,
	     kineticLaw -> k2 * S3 * C ];

makemodel[]
Transfer_08-09-20_SC_Prot_opt_dG2_C_a-1045_P1.m · 1957 B · ext .m · SWH occurrences unknown
via swh_study:m (judge:claude-sonnet-4.6; judge:gemini-3.8-flash; human:mathieu-acher)
swh:1:cnt:4f03314fe6578a77c385ddb07ed170d6a0d7c116;origin=https://github.com/walee-1/TransportFunction;path=/MergerTransport/MergerTransport/SC_Prot_opt_dG2/a-1045/Transfer_08-09-20_SC_Prot_opt_dG2_C_a-1045_P1.m
Open in SWH · Raw bytes (SWH)
Reviews (1 human, 2 LLM)
Ground truth · how?
👤 mathieu-acher → pl/wolfram-language (medium) 2026-10-01
sounds Mathematica
🤖 anthropic-claude-sonnet-4.6 m-judge/1 → pl/wolfram-language (high) 2026-09-29
Wolfram Language / Mathematica package script
🤖 google-gemini-3.8-flash m-judge/1 → pl/wolfram-language (high) 2026-09-29
Wolfram Language / Mathematica
Show source
(* ::Package:: *)

(* Wolfram Language package *)
t0=AbsoluteTime[];
SetDirectory["/users/waleed.khalid/Mma/"];

Print["Configured Kernels: ",$ConfiguredKernels];
Print["Processor Count: ",$ProcessorCount];

(*BackScatterBoole = True;*)

a=-0.1045;
Bins = {50, 98};

Get["MergerTransport/Merger2DProton.m"];
Print["Modules loaded ..."];

kernels=8
LaunchKernels[kernels];
Print[kernels," Kernels launched ..."];

rFSC=2.036;
rASC=0.937;
rRxBSC=0.902;
bRxBSC=0.976;
g1SC=1.29;
g2SC=1.792;
alphaSC=180.03*Pi/180;
rDSC=0.88;
xAShiftSC=0;
yAShiftSC=2.873/1000;
yRxBShiftSC=1.518/1000;
xDShiftSC=0;
yDShiftSC=6.234/1000;
xAASC=10/1000;
yAASC=35/1000;
xAOffSC=30/1000;
yAOffSC=0;
wnxSC=10/100;
wnySC=6/100;
pnxSC=9/100;
pnySC=5/100;
kx1SC=0.9;
ky1SC=0.9;
kx2SC=0;
ky2SC=0;
kx3SC=-0.9;
ky3SC=-0.9;

xStart=0.02;
xEnd=0.065;
yStart=-0.03;
yEnd=0.04;
xyBins=bin2DGen[xStart,xEnd,yStart,yEnd,24,11];
 
IntMethod = {"GlobalAdaptive", Method -> "MultidimensionalRule"};

Print["Run started at ",DateString[],", Bins: ",Bins];
  
BinwYShiftPrec44OriginalBinsb0NewBGrad = 
 ParallelMap[
  AbsoluteTiming[
    BinIntShift[
     a, #, 
     {alphaSC, bRxBSC, rFSC, rRxBSC, rASC, rDSC, g1SC, g2SC+g2SC*10^-4}, {xAShiftSC, yAShiftSC, yRxBShiftSC, xDShiftSC, yDShiftSC}, 
     {wnxSC, pnxSC, kx1SC, kx2SC, kx3SC, wnySC, pnySC, ky1SC, ky2SC, ky3SC}, {xAASC, yAASC, xAOffSC, yAOffSC},
     {IntMethod, 4, 2, 0, 2}, {IntMethod, 4, 2, 0, 2}, {IntMethod, 3, 6, 0, 1}
     ]] &, xyBins[[Bins[[1]] ;; Bins[[2]]]], 
  Method -> "FinestGrained"];

Export["MergerTransport/SC_Prot_opt_dG2/a"<>ToString[IntegerPart[a*10000]]<>"/TransferResult_08-09-20_SC_opt_C_dG2_a"<>ToString[IntegerPart[a*10000]]<>"_"<>ToString[Bins[[1]]]<>"-"<>ToString[Bins[[2]]]<>".txt",BinwYShiftPrec44OriginalBinsb0NewBGrad,"Table"];
 
Print["a = ",IntegerPart[a*10000],"e-4"];
Print["Time consumption: ",(AbsoluteTime[]-t0)/3600.];
Print["MaxMemUse :",MaxMemoryUsed[]/1024/1024.," MB"];
CloseKernels[];
Quit[];
XSetModifierMapping.m · 13796 B · ext .m · SWH occurrences unknown
via manual-request
swh:1:cnt:f851a314d7b2dfc8949028f3671dba8f268ac4ee;origin=https://gitlab.freedesktop.org/xorg/test/xts;anchor=swh:1:rev:497a0865d1fa51adbba53c5c1c930dd18beacc4e;path=/xts5/tset/Xlib13/XSetModifierMapping/XSetModifierMapping.m
Open in SWH · Raw bytes (SWH)
Reviews (1 human)
Ground truth · how?
👤 mathieu-acher → pl/new:xlib-and-x-protocol-test-suite (medium) amended 2026-06-12
X Test Suite (XTS), test file for X11 https://www.freedesktop.org/software/fontconfig/xtest/progguide.pdf
Show source
Copyright (c) 2005 X.Org Foundation L.L.C.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
$Header: /cvs/xtest/xtest/xts5/tset/Xlib13/XSetModifierMapping/XSetModifierMapping.m,v 1.2 2005-11-03 08:42:41 jmichael Exp $

Copyright (c) Applied Testing and Technology, Inc. 1995
All Rights Reserved.

>># Project: VSW5
>># 
>># File: xts5/tset/Xlib13/XSetModifierMapping/XSetModifierMapping.m
>># 
>># Description:
>># 	Tests for XSetModifierMapping()
>># 
>># Modifications:
>># $Log: stmdfrmppn.m,v $
>># Revision 1.2  2005-11-03 08:42:41  jmichael
>># clean up all vsw5 paths to use xts5 instead.
>>#
>># Revision 1.1.1.2  2005/04/15 14:05:19  anderson
>># Reimport of the base with the legal name in the copyright fixed.
>>#
>># Revision 8.0  1998/12/23 23:33:43  mar
>># Branch point for Release 5.0.2
>>#
>># Revision 7.0  1998/10/30 22:55:28  mar
>># Branch point for Release 5.0.2b1
>>#
>># Revision 6.0  1998/03/02 05:25:07  tbr
>># Branch point for Release 5.0.1
>>#
>># Revision 5.0  1998/01/26 03:21:39  tbr
>># Branch point for Release 5.0.1b1
>>#
>># Revision 4.0  1995/12/15 09:08:39  tbr
>># Branch point for Release 5.0.0
>>#
>># Revision 3.1  1995/12/15  01:10:04  andy
>># Prepare for GA Release
>>#
/*
Portions of this software are based on Xlib and X Protocol Test Suite.
We have used this material under the terms of its copyright, which grants
free use, subject to the conditions below.  Note however that those
portions of this software that are based on the original Test Suite have
been significantly revised and that all such revisions are copyright (c)
1995 Applied Testing and Technology, Inc.  Insomuch as the proprietary
revisions cannot be separated from the freely copyable material, the net
result is that use of this software is governed by the ApTest copyright.

Copyright (c) 1990, 1991  X Consortium

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.

Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of UniSoft not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.  UniSoft
makes no representations about the suitability of this software for any
purpose.  It is provided "as is" without express or implied warranty.
*/
>>TITLE XSetModifierMapping Xlib13
int
xname
Display	*display = Dsp;
XModifierKeymap	*modmap;
>>SET return-value MappingSuccess
>>EXTERN

static	XModifierKeymap	*origmap;

static	int	Minkc, Maxkc;

>>SET startup savemap
static void
savemap()
{
	startup();
	if(Dsp) {
		origmap = XGetModifierMapping(Dsp);
		XDisplayKeycodes(Dsp, &Minkc, &Maxkc);
	}
}

>>SET cleanup cleanmap
static void
cleanmap()
{
	if(Dsp)
		XSetModifierMapping(Dsp, origmap);
	cleanup();
}

>>ASSERTION Good A
A succesful call to xname
specifies the KeyCodes of the keys that are to be used
as modifiers and returns
.S MappingSuccess .
>>STRATEGY
Set up a modifier map.
Call xname to set servers map.
Verify that MappingSuccess is returned.
Get current map with XGetModifierMapping.
Verify that the mapping has been set correctly.
>>CODE
int 	i;
int 	kpm;
XModifierKeymap	*newmap;

	/*
	 * Because some keycodes may not be usable as modifiers in a server
	 * dependent fashion, then we must take steps to avoid this.
	 * Therefore: get current modifiers and rearrange them.
	 */
	kpm = origmap->max_keypermod;
	modmap = XNewModifiermap(kpm);
	if (modmap == 0) {
		delete("Could not create new map");
		return;
	}

	for (i = 0; i < kpm*8; i++)
		modmap->modifiermap[i] = origmap->modifiermap[kpm*8-1 - i];

	XCALL;

	newmap = XGetModifierMapping(display);

	if (newmap->max_keypermod == modmap->max_keypermod)
		CHECK;
	else {
		report("max_keypermod was %d, expecting %d", newmap->max_keypermod,
			modmap->max_keypermod);
		FAIL;
	}
	for (i = 0; i < kpm*8; i++) {
		if (modmap->modifiermap[i] == newmap->modifiermap[i])
			CHECK;
		else {
			report("Modifier map was not set correctly");
			FAIL;
			break;
		}
	}
	CHECKPASS(1+kpm*8);

	XFreeModifiermap(newmap);
>>ASSERTION Good A
When a call to xname succeeds, then a
.S MappingNotify
event is generated.
>>STRATEGY
Call xname to set mapping.
Verify that a MappingNotify event is generated.
>>CODE
int 	n;
XEvent	ev;
XMappingEvent	good;

	modmap = origmap;

	XCALL;

	defsetevent(good, display, MappingNotify);
	good.window = None;	/* unused */
	good.request = MappingModifier;
	/* rest not used */

	n = getevent(display, &ev);
	if (n == 0 || ev.type != MappingNotify) {
		report("Expecting a MappingNotify event");
		FAIL;
		return;
	} else
		CHECK;

	if (checkevent((XEvent*)&good, &ev))
		FAIL;
	else
		CHECK;

	CHECKPASS(2);
>>ASSERTION def
The
.M modifiermap
member of the
.S XModifierKeymap
structure contains eight sets of
.M max_keypermod
KeyCodes, one for each modifier in the order
.S Shift ,
.S Lock ,
.S Control ,
.S Mod1 ,
.S Mod2 ,
.S Mod3 ,
.S Mod4 ,
and
.S Mod5 .
>>ASSERTION Good A
When a zero KeyCode occurs in a set, then it is ignored.
>>STRATEGY
>># This is not really true in any sense that we can test.
>># Check that 0 does not generate BadValue when used multiple times.
Set up a mapping with all keycodes zero.
Set mapping with xname.
Verify no BadValue error.
>># Verify that mapping did not change.
>>CODE
XModifierKeymap	*oldmap;
int 	i;

	oldmap = XGetModifierMapping(display);
	if (oldmap == 0) {
		delete("Could not get the old map");
		return;
	}

	modmap = XNewModifiermap(1);
	for (i = 0; i < 8; i++)
		modmap->modifiermap[i] = 0;

	XCALL;

	if (geterr() == Success)
		CHECK;

	CHECKPASS(1);

>>ASSERTION Bad C
When an implementation restriction on which keys can be used
as modifiers is violated,
then a call to xname returns
.S MappingFailed
and none of the modifiers are changed.
>>STRATEGY
Try in turn all possible keycodes.
If all return MappingSuccess:
  Report unsupported.
else
  Verify that MappingFailed is returned.
  Verify that modifier has not been set to this keycode.
>>CODE
int 	i;
int 	ret;
int 	found;
XModifierKeymap *newmap;
unsigned int	kc;

	if ((modmap = XNewModifiermap(1)) == 0) {
		delete("Failed to create new modifier map");
		return;
	}

	for (i = 0; i < 8; i++)
		modmap->modifiermap[i] = 0;

	found = 0;
	for (kc = Minkc; kc <= Maxkc; kc++) {
		modmap->modifiermap[0] = (KeyCode)kc;

		ret = XCALL;

		if (ret != MappingSuccess) {

			found = True;

			if (ret != MappingFailed) {
				report("Return value was %d, expecting MappingFailure", ret);
				FAIL;
				break;
			}
			newmap = XGetModifierMapping(display);

			if (newmap->modifiermap[0] == (KeyCode)kc) {
				report("An invalid keycode (%u) was set into the map", kc);
				FAIL;
				break;
			} else
				CHECK;
		} else
			CHECK;
	}

	if (!found)
		unsupported("All keycodes are acceptable as modifiers for this server");
	else
		CHECKPASS(Maxkc-Minkc+1);

>>ASSERTION Bad B 3
When the new KeyCodes specified for a modifier differ from those
currently defined and any of the
current or new keys for that modifier are
in the logically down state, then a call to xname returns
.S MappingBusy
and none of the modifiers are changed.
>>STRATEGY
If extension available:
  Get current modifier mapping (other tests may have changed it from origmap).
  Make a new modifier map by permuting the old.
  Check there is at least one non-zero keycode in it.
  Simulate pressing this key using extension.
  Call xname to set the new mod. map.
  Expect MappingBusy
  Release all keys.
  Get current mapping with XGetModifierMapping.
  Compare with that got at first.
  Remove key from map.
  Simulate pressing key not in the map.
  Call xname.
  Expect MappingBusy as one of current (at time of xname call) mod keys pressed.
  Release all keys.
  Call xname to set up map to not include this key.
  Expect MappingSuccess.
  Simulate pressing key not in the map.
  Call xname.
  Expect !MappingBusy as key not in current or new maps (at time of xname call).
  Release all keys.
else
  Report untested.
>>CODE
int 	i;
int 	kpm;
int	modkc;
XModifierKeymap	*newmap;
XModifierKeymap	*oldmap;
int	ret;
KeyCode *kcp;

	if (noext(0))
		return;
	else
		CHECK;

	oldmap = XGetModifierMapping(display);

	/*
	 * Because some keycodes may not be usable as modifiers in a server
	 * dependent fashion, then we must take steps to avoid this.
	 * Therefore: get current modifiers and rearrange them.
	 */
	kpm = oldmap->max_keypermod;
	modmap = XNewModifiermap(kpm);
	if (modmap == 0) {
		delete("Could not create new map");
		XFreeModifiermap(oldmap);
		return;
	}

	modkc = 0;
	for (i = 0; i < kpm*8; i++) {
		KeyCode kc = modmap->modifiermap[i] = oldmap->modifiermap[kpm*8-1 - i];

		if (!modkc && kc) {
			modkc = kc;
			kcp = &(modmap->modifiermap[i]);
		}
	}

	if (!modkc) {
		delete("Can't find a usable modifier key code.");
		XFreeModifiermap(oldmap);
		XFreeModifiermap(modmap);
		return;
	} else
		CHECK;

	keypress(display, modkc);

	ret = XCALL;

	relalldev();

	if (ret == MappingBusy)
		CHECK;
	else {
		report("Key %d did not cause MappingBusy when pressed.", modkc);
		FAIL;
	}
	/* now check no change occurred */
	newmap = XGetModifierMapping(display);

	if (newmap->max_keypermod == oldmap->max_keypermod)
		CHECK;
	else {
		report("max_keypermod was %d, expecting %d", newmap->max_keypermod,
			oldmap->max_keypermod);
		FAIL;
	}
	for (i = 0; i < kpm*8; i++) {
		if (oldmap->modifiermap[i] == newmap->modifiermap[i])
			CHECK;
		else {
			report("Modifier map was not set correctly");
			FAIL;
			break;
		}
	}

	/* use a key not in new map, but in current, and expect MappingBusy */
	*kcp = 0; /* remove modkc from map */
	keypress(display, modkc);
	ret = XCALL;
	relalldev();

	if (ret == MappingBusy)
		CHECK;
	else {
		report("Pressing key %d caused %s, not MappingBusy, though in old map.",
			modkc, (ret==MappingSuccess)?"MappingSuccess":"MappingFailed");
		FAIL;
	}
	/* make sure that key is not in map, now */
	ret = XCALL;
	if (ret != MappingSuccess) {
		delete("Can't install new mod. map not including key %d.", modkc);
		XFreeModifiermap(modmap);
		XFreeModifiermap(oldmap);
		XFreeModifiermap(newmap);
		return;
	} else
		CHECK;
	/* use a key not in the new or current map and expect other than MappingBusy */
	keypress(display, modkc);
	ret = XCALL;
	relalldev();

	if (ret != MappingBusy)
		CHECK;
	else {
		report("Pressing key %d caused MappingBusy though not in new or old map.", modkc);
		FAIL;
	}

	XFreeModifiermap(modmap);
	XFreeModifiermap(oldmap);
	XFreeModifiermap(newmap);

	CHECKPASS(7 + kpm*8);
>>SET return-value MappingSuccess
>>ASSERTION Bad B 3
.ER BadAlloc
>>ASSERTION Bad A
When a KeyCode is not in the range returned by
>># This was an error not spotted in the assertion reviews.
>># .F XDisplayCodes ,
.F XDisplayKeycodes ,
then a
.S BadValue
error occurs.
>>STRATEGY
Call XDisplayKeycodes to get range of valid keycodes.
Set up map with keycode less than the minimum value.
Call xname.
Verify that a BadValue error occurs.

Set up map with keycode greater than the maximum value (if possible).
Call xname.
Verify that a BadValue error occurs.
>>CODE BadValue
>>SET return-value MappingFailed
int 	i;

	modmap = XNewModifiermap(1);
	for (i = 0; i < 8*modmap->max_keypermod; i++)
		modmap->modifiermap[i] = 0;

	modmap->modifiermap[0] = Minkc-1;
	XCALL;

	if (geterr() == BadValue)
		CHECK;
	else
		FAIL;

	if (Maxkc+1 < 0xff) {
		modmap->modifiermap[0] = Maxkc+1;
		XCALL;

		if (geterr() == BadValue)
			CHECK;
		else
			FAIL;
	} else
		CHECK;

	CHECKPASS(2);

Programs collected by LLM agents experimental · unverified

Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.

Mandelbrot Set Visualization

Provenance: commit 5949cafaab · authored 2025-10-22T11:44:40+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
code.wl · license: MIT · added: 2025-10-22T09:44:40Z
mandelbrotSet[c_] := NestWhileList[#^2 + c &, 0, Abs[#] <= 2 &, 1, 50];
MandelbrotPlot[n_] := DensityPlot[
Length[mandelbrotSet[x + I y]], {x, -2, 1}, {y, -1.5, 1.5},
PlotPoints -> n,
ColorFunction -> (GrayLevel[1 - #] &),
Frame -> False,
PlotRangePadding -> None
]

Disambiguation rules

Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
RuleExtKindPredicates (truncated)
h/linguist/.m/4.mpredicates[{"kind": "any", "regexes": ["\\(\\*"]}, {"kind": "any", "regexes": ["\\*\\)$"]}]

Contribute — propose a file extension

Tell us where to find evidence about Wolfram Language (mapped to pl/wolfram-language). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Wolfram Language/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Wolfram Wollok →