-
Notifications
You must be signed in to change notification settings - Fork 0
/
FUNCTIONS.json
154 lines (153 loc) · 5.21 KB
/
FUNCTIONS.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
{
"http://ns.nuke24.net/TOGVM/Functions/BooleanNegate": {},
"http://ns.nuke24.net/TOGVM/Functions/Exponentiate": {},
"http://ns.nuke24.net/TOGVM/Functions/Multiply": {
"argumentsAreHomogeneous": true,
"notes": [
"argumentsAreHomogeneous' means:",
"- takes an arbitrarily long (0..*) list of arguments",
"- each argument has the same role",
"it does not necessarily mean commutative or associative"
],
"isCommutative": true,
"isAssociative": true
},
"http://ns.nuke24.net/TOGVM/Functions/Divide": {},
"http://ns.nuke24.net/TOGVM/Functions/FlooredDivisionModulo": {
"arguments": [
{
"name": "dividend",
"description": "value to be moduloed"
},
{
"name": "divisor"
}
],
"notes": [
"Reduces the dividend modulo the divisor.",
"'modulo' is not a verb, but programmers treat it like one,",
"and 'FlooredDivisionReduceModulo' felt excessively wordy."
]
},
"http://ns.nuke24.net/TOGVM/Functions/Add": {
"argumentsAreHomogeneous": true,
"isCommutative": true,
"isAssociative": true
},
"http://ns.nuke24.net/TOGVM/Functions/Clamp": {
"arguments": [
{
"description": "value to be clamped"
},
{
"description": "minimum"
},
{
"description": "maximum"
}
]
},
"http://ns.nuke24.net/TOGVM/Functions/Min": {
"notes": [
"Returns the lowest-value argument, or +infinity if no arguments are given",
"Defined for numbers, or any other type that defines order."
]
},
"http://ns.nuke24.net/TOGVM/Functions/Max": {
"notes": [
"Returns the highest-value argument, or -infinity if no arguments are given.",
"Defined for numbers, or any other type that defines order."
]
},
"http://ns.nuke24.net/TOGVM/Functions/Subtract": {},
"http://ns.nuke24.net/TOGVM/Functions/ConstructArray": {
"argumentsAreHomogeneous": true,
"arguments": {
"item": {
"description": "An item to be included in the resulting array ('list', 'finite sequence', whatever)."
}
},
"notes": {
"Creates a sequence of items of any type."
}
},
"http://ns.nuke24.net/TOGVM/Functions/Concatenate": {
"argumentsAreHomogeneous": true,
"notes": [
"Concatenates several sequences of the same or compatible item types.",
"e.g. strings, byte arrays, arrays of objects.",
"Concatenating character and byte sequences results in a byte sequence.",
"",
"May (and should) be lazy to the point that a program that concatenates",
"a bunch of strings and then outputs them would actually just output",
"directly rather than actually build up anything in memory,",
"and concatenating infinite sequences should not block."
],
"isAssociative": true
},
"http://ns.nuke24.net/TOGVM/Functions/IsGreaterThanOrEqualTo": {},
"http://ns.nuke24.net/TOGVM/Functions/IsLesserThanOrEqualTo": {},
"http://ns.nuke24.net/TOGVM/Functions/IsGreaterThan": {},
"http://ns.nuke24.net/TOGVM/Functions/IsLesserThan": {},
"http://ns.nuke24.net/TOGVM/Functions/AreNotEqual": {},
"http://ns.nuke24.net/TOGVM/Functions/AreEqual": {},
"http://ns.nuke24.net/TOGVM/Functions/IsNull": {},
"http://ns.nuke24.net/TOGVM/Functions/And": {
"argumentsAreHomogeneous": true,
"isAssociative": true,
"notes": [
"Logical and.",
"Arguments and return values are booleans."
]
},
"http://ns.nuke24.net/TOGVM/Functions/Or": {
"argumentsAreHomogeneous": true,
"isAssociative": true
},
"http://ns.nuke24.net/TOGVM/Functions/Coalesce": {
"argumentsAreHomogeneous": true,
"isAssociative": true,
"notes": [
"Returns the value of the first non-null argument.",
"Should be lazy."
]
},
"http://ns.nuke24.net/TOGVM/Functions/InterpretData": {
"arguments": [
{
"name": "data",
"description": "The data that is to be interpreted somehow, to produce a conceptual value"
},
{
"name": "datatype",
"description": "The datatype, which is probably a URI reference, e.g. to http://www.w3.org/2001/XMLSchema#decimal"
},
{
"name": "Datatypes",
"description": "A list of datatypes, in decode order. Alternative to 'datatype'"
},
{
"name": "fragmentId",
"description": "Optional (default is empty string) fragment identifier"
}
],
"notes": [
"Returns the a value based on the given 'lexical representation' ('data') and RDF (which borrows the concept from XML) 'datatype'.",
"This is equivalent to an http://ns.nuke24.net/TOGVM/Expression/DataInterpretation expression",
"or a TS34Encoded string,",
"but is here for use in contexts (like active URIs) where function applications are representable",
"but arbitrary TOGVM expressions are not.",
"",
"In contexts where multiple same-named arguments can be provided and have defined order,",
"multiple 'datatype' arguments can be provided as an alternative to constructing a list,",
"and passing it as 'datatypes', and in those cases it may even be acceptable for both",
"'datatype' and 'datatypes' arguments to be provided -- the lists will simply be concatenated together.",
"It is probably better not to rely on this, and certainly best to throw an error in cases",
"where the order is at all ambiguous.",
"",
"For info on the 'datatype' concept, see:",
"- http://infolab.stanford.edu/~melnik/rdf/datatyping/#s-p",
"- https://www.w3.org/TR/rdf-primer/#rdfvalue"
]
}
}