P

1 program Added 2025-10-22T15:10:17Z Model: meta-llama/llama-3.1-70b-instructTemp: 0.4 Evidence Report issue View issues
Aliases: —
Provenance: commit 3e81713e9b · authored 2025-10-22T17:10:17+02:00 · model meta-llama/llama-3.1-70b-instruct

Sources mentioning this language

5 sources · pl_id: pl/p
LLM (this repo) · 1PldbWikipediaEsolangWikidata · Q30599213

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 byAnkush Desai · Vivek Gupta · Ethan Jackson · Shaz Qadeer · Sriram Rajamani · Microsoft
First appeared2012
LicenseMIT License
Homepagehttps://p-org.github.io/P/

Extensions claimed by this language

1 claim. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.pwikidataprimary5.0M files

LLM-contributed programs

P Example

Provenance: commit 3e81713e9b · authored 2025-10-22T17:10:17+02:00 · model meta-llama/llama-3.1-70b-instruct · Temp 0.4
code.p · license: MIT · added: 2025-10-22T15:10:17Z
module Example1

// Define an event
event e1(x: int) =
  { print(0, "e1 triggered with x = ", x); }

// Define a machine
machine M
  { // Define the initial state
  state S0 =
    { // Define the initial action
      on e1(x) =>
        { print(0, "S0 received e1 with x = ", x); }
      // Define the initial invariant
      invariant x >= 0;
    }
  }

// Define the main
main
  {
    // Create an instance of machine M
    instance m: M;
    // Trigger event e1
    trigger e1(10);
  }

Real programs from Software Heritage

1 sample mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
nessus_translator.P · 2310 B · ext .p · seen 42× in SWH
via fallback
swh:1:cnt:8bd0acb72f6634648a52b82f1a345ca1ed7d9c77;origin=https://github.com/risksense/mulval;anchor=swh:1:rev:369f7484ea5263074f70464a7fada98b6e546df6;path=/src/adapter/nessus_translator.P
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source

:- import member/2 from lists.
hasEffect(privEscalation).

vulExists(Host, CVE, Prog):- 
  vuln_exists(Host, CVE, Prog, _Range, _Losstype, _Severity, _AC ).

vulExists(Host, CVE, Prog):- 
  vuln_exists(Host, CVE, Prog, _Range, _Losstype, _Severity, _AC, Port, Prot ).

vulProperty(CVE, localExploit, Effect):- 
  vuln_exists(_Host, CVE, _Prog, RangeList,Losstype, _Severity, _AC ),
  member(local,RangeList),
  lossTypetoEffect(Losstype, Effect).

vulProperty(CVE, remoteExploit, Effect, Port, Prot):- 
  vuln_exists(_Host, CVE, _Prog, RangeList,Losstype, _Severity, _AC, Port, Prot ),
  member(remoteExploit,RangeList),
  not  member(user_action_req,RangeList),
  lossTypetoEffect(Losstype, Effect).

vulProperty(CVE, remoteExploit, Effect):- 
  vuln_exists(_Host, CVE, _Prog, RangeList,Losstype, _Severity, _AC, _Port, _Prot ),
  member(remoteExploit,RangeList),
  not  member(user_action_req,RangeList),
  lossTypetoEffect(Losstype, Effect).


vulProperty(CVE, remoteClient, Effect):- 
  vuln_exists(_Host, CVE, _Prog, RangeList,Losstype, _Severity, _AC ),
  member(remoteExploit,RangeList),
  member(user_action_req,RangeList),
  lossTypetoEffect(Losstype, Effect).


lossTypetoEffect(Losstype, Effect):-
            member('data_modification', Losstype),
            hasEffect(Effect).

lossTypetoEffect(Losstype, Effect):-
            member('data_loss', Losstype),
            hasEffect(Effect).

cvss(CVE, AC):-
	vuln_exists(Host, CVE, Prog, _RangeList, _Losstype, _Severity, AC ).

cvss(CVE, AC):-
        vuln_exists(_Host, CVE, _Prog, RangeList,Losstype, _Severity, AC, Port, Prot ).

networkServiceInfo(Host, Program, Prot, Port, someUser) :-
	vulExists(Host, CVE, Program),
        vulProperty(CVE, remoteExploit, _Effect, Port, Prot).

%hacl(Host, internet, Prot, Port) :-
 %       vuln_exists(Host, CVE, _Prog, RangeList,Losstype, _Severity, _AC, Port, Prot ).

%hacl(internet, Host, Prot, Port) :-
 %      vuln_exists(Host, CVE, _Prog, RangeList,Losstype, _Severity, _AC, Port, Prot ).

%this is not corrent, because it binds the CVE Port and Prot together which couldn't be true.
%hacl(Host, Host2, Prot, Port) :-
 %      vuln_exists(Host, CVE, _Prog, RangeList,Losstype, _Severity, _AC, Port, Prot ),
  %     vuln_exists(Host2, CVE, _Prog, RangeList,Losstype, _Severity, _AC, Port, Prot ).

Contribute — propose a file extension

Tell us where to find evidence about P (mapped to pl/p). 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/P/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← O⟴o+vFuck P# →