Scilab

1 program Added 2025-10-23T10:28:01Z Model: x-ai/grok-4-fastTemp: 0.4 Evidence Report issue View issues
Aliases: —
Provenance: commit 9ac83df711 · authored 2025-10-23T12:28:01+02:00 · model x-ai/grok-4-fast

Sources mentioning this language

8 sources · pl_id: pl/scilab
LLM (this repo) · 1PldbLinguistPygmentsWikipediaHyperpolyglotRosettacodeWikidata · Q828742

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.

Designed byDassault Systèmes
LicenseGPLv2, previously CeCILL
Homepagehttps://www.scilab.org

Extensions claimed by this language

6 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.scilinguistprimary174.2K files
.scipygmentsprimary174.2K files
.scelinguistsecondary208.2K files
.scepygmentssecondary208.2K files
.tstlinguistsecondary230.4K files
.tstpygmentssecondary230.4K files

Related languages

Scilla (0.33)Rlab (0.27)MATLAB (0.21)PZAB (0.17)Kodu (0.14)

LLM-contributed programs

Matrix multiplication example

Provenance: commit 9ac83df711 · authored 2025-10-23T12:28:01+02:00 · model x-ai/grok-4-fast · Temp 0.4
code.sci · added: 2025-10-23T10:28:01Z
a = [1 2; 3 4]
b = [1; 2]
c = a * b
disp(c)

Real programs from Software Heritage

4 samples mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
AST_ReadASTHeader.sci · 2479 B · ext .sci · seen 93× in SWH
via unique-primary
swh:1:cnt:7a52b1f26606b67f1f056a639ebb59cea03b2d3c;origin=https://github.com/siddhu8990/Scilab2C;anchor=swh:1:rev:6a320264c2de3d6dd8cc1d1327b3c30df4c8cb26;path=/2.3-1/macros/ASTManagement/AST_ReadASTHeader.sci
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
function ASTHeader = AST_ReadASTHeader(fidAST,ReportFileName)
// function ASTHeader = AST_ReadASTHeader(fidAST,ReportFileName)
// -----------------------------------------------------------------
// Reads the AST header
//  txt=['Program'
//       'Name   : '+p.name
//       'Outputs: '+strcat(objectlist2string(p.outputs),' ')
//       'Inputs : '+strcat(objectlist2string(p.inputs),' ')
//       'Statements '
//
// Input data:
// //NUT: add description here
//
//
// Output data:
// //NUT: add description here
//
//
// Status:
// 11-Apr-2007 -- Raffaele Nutricato: Author.
//
// Copyright 2007 Raffaele Nutricato.
// Contact: raffaele.nutricato@tiscali.it
// -----------------------------------------------------------------

// ------------------------------
// --- Check input arguments. ---
// ------------------------------
SCI2CNInArgCheck(argn(2),2,2);


ASTHeader = [];

tline = mgetl(fidAST,1);
AST_CheckLineLength(tline);
treeline = stripblanks(tline);
if STACKDEDUG == 1
   disp('Read AST Line: '+treeline);
end
if (SCI2Cstrncmps1size('Program',treeline) == %F)
   error(9999, 'Expected ""Program"" label in the AST');
end

tline = mgetl(fidAST,1);
AST_CheckLineLength(tline);
treeline = stripblanks(tline);
if STACKDEDUG == 1
   disp('Read AST Line: '+treeline);
end
if (SCI2Cstrncmps1size('Name   : ',treeline) == %F)
   error(9999, 'Expected ""Name   : "" label in the AST');
else
   ASTHeader.Name = stripblanks(part(treeline,length('Name   : ')+1:length(treeline)));
end

tline = mgetl(fidAST,1);
AST_CheckLineLength(tline);
treeline = stripblanks(tline);
if STACKDEDUG == 1
   disp('Read AST Line: '+treeline);
end
if (SCI2Cstrncmps1size('Outputs: ',treeline) == %F)
   error(9999, 'Expected ""Outputs: "" label in the AST');
else
   ASTHeader.Outputs = stripblanks(part(treeline,length('Outputs: ')+1:length(treeline)));
end

tline = mgetl(fidAST,1);
AST_CheckLineLength(tline);
treeline = stripblanks(tline);
if STACKDEDUG == 1
   disp('Read AST Line: '+treeline);
end
if (SCI2Cstrncmps1size('Inputs : ',treeline) == %F)
   error(9999, 'Expected ""Inputs : "" label in the AST');
else
   ASTHeader.Inputs = stripblanks(part(treeline,length('Inputs : ')+1:length(treeline)));
end

tline = mgetl(fidAST,1);
AST_CheckLineLength(tline);
treeline = stripblanks(tline);
if STACKDEDUG == 1
   disp('Read AST Line: '+treeline);
end
if (SCI2Cstrncmps1size('Statements ',treeline) == %F)
   error(9999, 'Expected ""Statements "" label in the AST');
end

endfunction
AST_HandleEOL.sci · 2990 B · ext .sci · seen 46× in SWH
via unique-primary
swh:1:cnt:0f55457e88ca45f50d3e9b159c7a759def331ec8;origin=https://github.com/FOSSEE-Internship/Scilab2C-Ashish-;anchor=swh:1:rev:6a320264c2de3d6dd8cc1d1327b3c30df4c8cb26;path=/2.3-1/macros/ASTManagement/AST_HandleEOL.sci
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
function AST_HandleEOL(FileInfo,SharedInfo)
// function AST_HandleEOL(FileInfo,SharedInfo)
// -----------------------------------------------------------------
// Handles the EOL tag of the AST.
//
// Input data:
// //NUT: add description here
//
// Output data:
// //NUT: add description here
//
// Status:
// 11-Apr-2007 -- Raffaele Nutricato: Author.
//
// Copyright 2007 Raffaele Nutricato.
// Contact: raffaele.nutricato@tiscali.it
// -----------------------------------------------------------------

// ------------------------------
// --- Check input arguments. ---
// ------------------------------
SCI2CNInArgCheck(argn(2),2,2);


//#RNU_RES_B
//NUT: questa parte e' molto interessante perche' ti puo' aiutare per fare confronti
//NUT: incrociati tra le annotazioni della funzione e gli argomenti in uscita.
//NUT: in particolare una volta messi nella tabella dei simboli anche gli argomenti
//NUT: di uscita puoi benissimo verificare che li stai utilizzando bene nel corpo della funzione stessa.
//#RNU_RES_E

// -----------------------
// --- Initialization. ---
// -----------------------
nxtscifunname   = SharedInfo.NextSCIFunName;
nxtscifunnumber = SharedInfo.NextSCIFunNumber;
ReportFileName  = FileInfo.Funct(nxtscifunnumber).ReportFileName;
CPass1FileName  = FileInfo.Funct(nxtscifunnumber).CPass1FileName;
SciFileFid      = FileInfo.Funct(nxtscifunnumber).SCICopyFileFid;
IndentLevel     = SharedInfo.NIndent;

PrintStepInfo('Handling EOL',ReportFileName,'file');
sciline = mgetl(SciFileFid,1);
   
// #RNU_RES_B
PrintStringInfo(' ',ReportFileName,'file','y','n');
PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n');
PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n');
PrintStringInfo('### Scilab code: '+sciline+' ###',ReportFileName,'file','y','n');
PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n');
PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n');
// #RNU_RES_E
PrintStringInfo(' ',CPass1FileName,'file','y');
// RNU BRUNO modeprintstringinfo MUST BE AN EXTERNAL PARAMETER!
modeprintstringinfo = 'both';
if (SharedInfo.CopySciCodeIntoCCode == 1)
   modeprintstringinfo = 'both';
end
PrintStringInfo(C_IndentBlanks(IndentLevel)+'/*SCI2C: #############'+'############'+'##############'+'###############'+'############',CPass1FileName,modeprintstringinfo,'y','n');
PrintStringInfo(C_IndentBlanks(IndentLevel)+'  SCI2C: '+sciline,CPass1FileName,modeprintstringinfo,'y','n');
PrintStringInfo(C_IndentBlanks(IndentLevel)+'  SCI2C: #############'+'############'+'##############'+'###############'+'############*/',CPass1FileName,modeprintstringinfo,'y','n');

endfunction
ls2_entail_ls_06.tst · 67 B · ext .tst · seen 11× in SWH
via default-rulerule h/linguist/.tst/1
swh:1:cnt:e1aafeea1260089d10ad4a2a77fdfc6502717fbb;origin=https://github.com/cyclist-org/cyclist;anchor=swh:1:rev:03fd40efbd97eff2dffe9b8e701cd657f07eb045;path=/benchmarks/sl/songbird/ls2_entail_ls_06.tst
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
ls2(x,u) * u->v * v->w * ls2(w,y)  |- ls(x,a') * ls(a',b') * b'->y
lsleftright_01.tst · 34 B · ext .tst · seen 11× in SWH
via default-rulerule h/linguist/.tst/1
swh:1:cnt:90e47e9d1844fd51459f905c132f0bb05f933365;origin=https://github.com/cyclist-org/cyclist;anchor=swh:1:rev:03fd40efbd97eff2dffe9b8e701cd657f07eb045;path=/benchmarks/sl/songbird/lsleftright_01.tst
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
lslr(x,v) * lsr(v,y) |- lslr(x,y)

Disambiguation rules

Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
RuleExtKindPredicates (truncated)
h/linguist/.tst/1.tstdefault[]

Contribute — propose a file extension

Tell us where to find evidence about Scilab (mapped to pl/scilab). 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/Scilab/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← scil-vp Scilla →