User:Push-f/invoked with & invocation returns
invoked with edit
Description | what the function, command, program or endpoint is invoked with |
---|---|
Data type | Item |
Domain | items that are instances of subroutine (Q190686), command (Q1079196), computer program (Q40056) or network resource (Q110854677), or a subclass of software (Q7397) |
Example 1 | strlen (Q1952837) → string (Q184754) |
Example 2 | time (Q284081) → command (Q1079196) |
Example 3 | curl (Q286306) → URL (Q42253) |
Example 4 | Q113956711 → Wikimedia interface namespace (Q6535237) |
Example 5 | search engine (Q19541) → search query (Q115215082) |
Example 6 | web search engine (Q4182287) → web query (Q995982) |
Example 7 | SPARQL query endpoint (Q115214349) → SPARQL query (Q114898838) |
See also | input device (P479), readable file format (P1072) |
Motivation edit
Instances of subroutine (Q190686), command (Q1079196) and command-line tool (Q115214659) often need to be invoked with specific inputs and often their invocation returns a specific output. Currently we do not have a fitting property to express these relations.
We do have input device (P479) and output device (P5196) but these denote something very different, e.g.
- Counter-Strike (Q163628)input device (P479)mouse (Q7987) & keyboard (Q1921606),
- Beat Saber (Q53998035)output device (P5196)Oculus Quest (Q63777286)
input device (P479) and output device (P5196) are used to denote supported hardware. It certainly would not make sense to broaden their scope to denote the inputs and outputs of functions and function-like software, because there is a big difference between using a device to continuously provide input / receive output and providing input once upon invocation and receiving output once after invocation.
Note that there also are the existing properties readable file format (P1072) and writable file format (P1073) but they again denote something different:
- Xreadable file format (P1072)HTML & LaTeX means that X can read both HTML and LaTeX but does not say anything about what the software has to be invoked with
- Xinvoked withHTML would be wrong because a language is an abstract concept, you cannot pass a language to a software (only e.g. an identifier for a language or a manifestation of the language)
- Xinvoked withHTML file would mean that the software has to be invoked with an HTML file ... however we obviously do not want to create a computer file (Q82753) subclass for every file format (Q235557), so instead I think we should use a qualifier:
- Xinvoked withcomputer file (Q82753)
file format (P2701)HTML (Q8811) would mean that the software has to be invoked with an HTML file - Xinvoked withcomputer file (Q82753)
file format (P2701)HTML (Q8811) & LaTeX (Q5310) would mean that the software has to be invoked with a file of the format HTML or LaTeX
This is obviously more powerful than readable file format (P1072) and writable file format (P1073) because we could e.g. express:
- xmllint (Q115215396)invoked withURL (Q42253)
file format (P2701)Extensible Markup Language (Q2115) - xmllint (Q115215396)invoked withURL (Q42253)
file format (P2701)Document Type Definition (Q212327) nature of statement (P5102)optional (Q59864995) - xmllint (Q115215396)invoked withURL (Q42253)
file format (P2701)XML Schema (Q16342) nature of statement (P5102)optional (Q59864995)
which is clearly more informative than xmllint (Q115215396)readable file format (P1072)Extensible Markup Language (Q2115) & Document Type Definition (Q212327) & XML Schema (Q16342).
We could even broaden the scope of has command line option (P4837) to allow using it as a qualifier:
- xmllint (Q115215396)invoked withURL (Q42253)
file format (P2701)Document Type Definition (Q212327) command-line option--dtdvalid nature of statement (P5102)optional (Q59864995) - xmllint (Q115215396)invoked withURL (Q42253)
file format (P2701)XML Schema (Q16342) command-line option--schema nature of statement (P5102)optional (Q59864995)
This proposal replaces a previous proposal of mine, which has been rightfully rejected because "input" and "output" are too vague as labels: this proposal hopes to remedy that and also better describes the differences of the proposed properties to the existing properties.
--Push-f (talk) 08:47, 15 November 2022 (UTC)
Discussion edit
This proposal is not yet ready for voting but you are more than welcome to discuss it at Wikidata talk:WikiProject Informatics#Modelling the input & output of functions and function-like software.
invocation returns edit
Description | what the invocation of the function, command, program or endpoint returns/yields |
---|---|
Data type | Item |
Domain | items that are instances of subroutine (Q190686), command (Q1079196), computer program (Q40056) or network resource (Q110854677), or a subclass of software (Q7397) |
Example 1 | quine (Q1047886)invocation returnsquine (Q1047886) |
Example 2 | strlen (Q1952837) → string length (Q110382671) |
Example 3 | time (Q284081) → duration (Q2199864) |
Example 4 | curl (Q286306) → payload (Q1424639) |
Example 5 | Q113956711 → HTTP redirect (Q110227941) |
Example 6 | search engine (Q19541) → search result (Q2686427) |
See also | output device (P5196), writable file format (P1073) |
See #invoked with for the motivation and discussion.