Skip to content

Commit 562cfdd

Browse files
committed
Feature/Incomplete: Add NW scaffold and language tests (failing)
1 parent b8f3fd4 commit 562cfdd

4 files changed

Lines changed: 1953 additions & 1 deletion

File tree

engine/src/main/coffee/extensions/all.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# (C) Uri Wilensky. https://github.com/NetLogo/Tortoise
22

3-
extensionPaths = ['array', 'bitmap', 'codap', 'csv', 'encode', 'dialog', 'export-the', 'fetch', 'fp', 'http-req', 'import-a', 'logging', 'matrix', 'mini-csv', 'nlmap', 'nt', 'palette', 'resource', 'send-to', 'sound', 'store', 'string', 'table']
3+
extensionPaths = ['array', 'bitmap', 'codap', 'csv', 'encode', 'dialog', 'export-the', 'fetch', 'fp', 'http-req', 'import-a', 'logging', 'matrix', 'mini-csv', 'nlmap', 'nt', 'nw', 'palette', 'resource', 'send-to', 'sound', 'store', 'string', 'table']
44

55
module.exports = {
66

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# (C) Uri Wilensky. https://github.com/NetLogo/Tortoise
2+
3+
{ exceptionFactory: exceptions } = require('util/exception')
4+
5+
notImplemented = (name) ->
6+
-> throw exceptions.extension("nw:#{name} is not yet implemented")
7+
8+
module.exports = {
9+
10+
init: (workspace) ->
11+
12+
{
13+
name: "nw"
14+
, prims: {
15+
"SET-CONTEXT": notImplemented("set-context")
16+
, "GET-CONTEXT": notImplemented("get-context")
17+
, "WITH-CONTEXT": notImplemented("with-context")
18+
, "TURTLES-IN-RADIUS": notImplemented("turtles-in-radius")
19+
, "TURTLES-IN-OUT-RADIUS": notImplemented("turtles-in-out-radius")
20+
, "TURTLES-IN-IN-RADIUS": notImplemented("turtles-in-in-radius")
21+
, "TURTLES-IN-REVERSE-RADIUS": notImplemented("turtles-in-reverse-radius")
22+
, "DISTANCE-TO": notImplemented("distance-to")
23+
, "PATH-TO": notImplemented("path-to")
24+
, "TURTLES-ON-PATH-TO": notImplemented("turtles-on-path-to")
25+
, "WEIGHTED-DISTANCE-TO": notImplemented("weighted-distance-to")
26+
, "WEIGHTED-PATH-TO": notImplemented("weighted-path-to")
27+
, "TURTLES-ON-WEIGHTED-PATH-TO": notImplemented("turtles-on-weighted-path-to")
28+
, "MEAN-PATH-LENGTH": notImplemented("mean-path-length")
29+
, "MEAN-WEIGHTED-PATH-LENGTH": notImplemented("mean-weighted-path-length")
30+
, "BETWEENNESS-CENTRALITY": notImplemented("betweenness-centrality")
31+
, "CLOSENESS-CENTRALITY": notImplemented("closeness-centrality")
32+
, "WEIGHTED-CLOSENESS-CENTRALITY": notImplemented("weighted-closeness-centrality")
33+
, "EIGENVECTOR-CENTRALITY": notImplemented("eigenvector-centrality")
34+
, "PAGE-RANK": notImplemented("page-rank")
35+
, "CLUSTERING-COEFFICIENT": notImplemented("clustering-coefficient")
36+
, "WEAK-COMPONENT-CLUSTERS": notImplemented("weak-component-clusters")
37+
, "LOUVAIN-COMMUNITIES": notImplemented("louvain-communities")
38+
, "MODULARITY": notImplemented("modularity")
39+
, "MAXIMAL-CLIQUES": notImplemented("maximal-cliques")
40+
, "BIGGEST-MAXIMAL-CLIQUES": notImplemented("biggest-maximal-cliques")
41+
, "GENERATE-PREFERENTIAL-ATTACHMENT": notImplemented("generate-preferential-attachment")
42+
, "GENERATE-RANDOM": notImplemented("generate-random")
43+
, "GENERATE-WATTS-STROGATZ": notImplemented("generate-watts-strogatz")
44+
, "SAVE-GRAPHML": notImplemented("save-graphml")
45+
, "LOAD-GRAPHML": notImplemented("load-graphml")
46+
, "SAVE-MATRIX": notImplemented("save-matrix")
47+
, "LOAD-MATRIX": notImplemented("load-matrix")
48+
, "SAVE-DL": notImplemented("save-dl")
49+
, "LOAD-DL": notImplemented("load-dl")
50+
, "SAVE-GDF": notImplemented("save-gdf")
51+
, "LOAD-GDF": notImplemented("load-gdf")
52+
, "SAVE-GEXF": notImplemented("save-gexf")
53+
, "LOAD-GEXF": notImplemented("load-gexf")
54+
, "SAVE-GML": notImplemented("save-gml")
55+
, "LOAD-GML": notImplemented("load-gml")
56+
, "SAVE-VNA": notImplemented("save-vna")
57+
, "LOAD-VNA": notImplemented("load-vna")
58+
, "SAVE": notImplemented("save")
59+
, "LOAD": notImplemented("load")
60+
}
61+
}
62+
63+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"name": "nw",
3+
"prims": [
4+
{ "name": "SET-CONTEXT", "argTypes": ["turtleset", "linkset"], "returnType": "unit" },
5+
{ "name": "GET-CONTEXT", "argTypes": [], "returnType": "list" },
6+
{ "name": "WITH-CONTEXT", "argTypes": ["turtleset", "linkset", "unit"], "returnType": "unit" },
7+
8+
{ "name": "TURTLES-IN-RADIUS", "argTypes": ["number"], "returnType": "turtleset" },
9+
{ "name": "TURTLES-IN-OUT-RADIUS", "argTypes": ["number"], "returnType": "turtleset" },
10+
{ "name": "TURTLES-IN-IN-RADIUS", "argTypes": ["number"], "returnType": "turtleset" },
11+
{ "name": "TURTLES-IN-REVERSE-RADIUS", "argTypes": ["number"], "returnType": "turtleset" },
12+
13+
{ "name": "DISTANCE-TO", "argTypes": ["wildcard"], "returnType": "wildcard" },
14+
{ "name": "PATH-TO", "argTypes": ["wildcard"], "returnType": "wildcard" },
15+
{ "name": "TURTLES-ON-PATH-TO", "argTypes": ["wildcard"], "returnType": "wildcard" },
16+
17+
{ "name": "WEIGHTED-DISTANCE-TO", "argTypes": ["wildcard", "string"], "returnType": "wildcard" },
18+
{ "name": "WEIGHTED-PATH-TO", "argTypes": ["wildcard", "string"], "returnType": "wildcard" },
19+
{ "name": "TURTLES-ON-WEIGHTED-PATH-TO", "argTypes": ["wildcard", "string"], "returnType": "wildcard" },
20+
21+
{ "name": "MEAN-PATH-LENGTH", "argTypes": [], "returnType": "wildcard" },
22+
{ "name": "MEAN-WEIGHTED-PATH-LENGTH", "argTypes": ["string"], "returnType": "wildcard" },
23+
24+
{ "name": "BETWEENNESS-CENTRALITY", "argTypes": [], "returnType": "number" },
25+
{ "name": "CLOSENESS-CENTRALITY", "argTypes": [], "returnType": "number" },
26+
{ "name": "WEIGHTED-CLOSENESS-CENTRALITY", "argTypes": ["string"], "returnType": "number" },
27+
{ "name": "EIGENVECTOR-CENTRALITY", "argTypes": [], "returnType": "number" },
28+
{ "name": "PAGE-RANK", "argTypes": [], "returnType": "number" },
29+
30+
{ "name": "CLUSTERING-COEFFICIENT", "argTypes": [], "returnType": "number" },
31+
{ "name": "WEAK-COMPONENT-CLUSTERS", "argTypes": [], "returnType": "list" },
32+
{ "name": "LOUVAIN-COMMUNITIES", "argTypes": [], "returnType": "list" },
33+
{ "name": "MODULARITY", "argTypes": ["list"], "returnType": "number" },
34+
{ "name": "MAXIMAL-CLIQUES", "argTypes": [], "returnType": "list" },
35+
{ "name": "BIGGEST-MAXIMAL-CLIQUES", "argTypes": [], "returnType": "list" },
36+
37+
{ "name": "GENERATE-PREFERENTIAL-ATTACHMENT", "argTypes": ["wildcard", "wildcard", "number"], "returnType": "unit" },
38+
{ "name": "GENERATE-RANDOM", "argTypes": ["wildcard", "wildcard", "number", "number"], "returnType": "unit" },
39+
{ "name": "GENERATE-WATTS-STROGATZ", "argTypes": ["wildcard", "wildcard", "number", "number", "number"], "returnType": "unit" },
40+
41+
{ "name": "SAVE-GRAPHML", "argTypes": ["string"], "returnType": "unit" },
42+
{ "name": "LOAD-GRAPHML", "argTypes": ["string"], "returnType": "unit" },
43+
{ "name": "SAVE-MATRIX", "argTypes": ["string"], "returnType": "unit" },
44+
{ "name": "LOAD-MATRIX", "argTypes": ["string"], "returnType": "unit" },
45+
{ "name": "SAVE-DL", "argTypes": ["string"], "returnType": "unit" },
46+
{ "name": "LOAD-DL", "argTypes": ["string"], "returnType": "unit" },
47+
{ "name": "SAVE-GDF", "argTypes": ["string"], "returnType": "unit" },
48+
{ "name": "LOAD-GDF", "argTypes": ["string"], "returnType": "unit" },
49+
{ "name": "SAVE-GEXF", "argTypes": ["string"], "returnType": "unit" },
50+
{ "name": "LOAD-GEXF", "argTypes": ["string"], "returnType": "unit" },
51+
{ "name": "SAVE-GML", "argTypes": ["string"], "returnType": "unit" },
52+
{ "name": "LOAD-GML", "argTypes": ["string"], "returnType": "unit" },
53+
{ "name": "SAVE-VNA", "argTypes": ["string"], "returnType": "unit" },
54+
{ "name": "LOAD-VNA", "argTypes": ["string"], "returnType": "unit" },
55+
{ "name": "SAVE", "argTypes": ["string"], "returnType": "unit" },
56+
{ "name": "LOAD", "argTypes": ["string"], "returnType": "unit" }
57+
]
58+
}

0 commit comments

Comments
 (0)