-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
116 lines (102 loc) · 4.37 KB
/
Copy pathbuild.xml
File metadata and controls
116 lines (102 loc) · 4.37 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="shape-recursion" default="type-check" basedir=".">
<!-- jena.lib.dir is the directory that stores all the Jena jar files. -->
<property name="jena.lib.dir" location="/Users/arthurryman/apache-jena-2.10.1/lib" />
<!-- jena.classpath is the CLASSPATH for Jena commands. -->
<path id="jena.classpath">
<fileset dir="${jena.lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<!-- fuzz is the path to the executable file of the fuzz type-checker for Z -->
<property name="fuzz" location="/Users/arthurryman/fuzz/fuzz-3.4.1/src/fuzz" />
<macrodef name="fuzz">
<attribute name="specification" />
<attribute name="imports" default="" />
<sequential>
<concat force="yes" destfile="@{specification}.prelude">
<filelist dir="." files="fuzzlib common.tex @{imports}" />
</concat>
<exec executable="${fuzz}" output="@{specification}.fuzz">
<arg line="-dl -p @{specification}.prelude @{specification}" />
</exec>
</sequential>
</macrodef>
<target name="type-check" description="Type-checks shape-recursion.tex">
<fuzz specification="shape-recursion" />
</target>
<!-- = = = = = = = = = = = = = = = = =
macrodef: ttl2xml - convert RDF Turtle to non-abbreviated RDF/XML
= = = = = = = = = = = = = = = = = -->
<macrodef name="ttl2xml">
<attribute name="model" />
<sequential>
<java classpathref="jena.classpath" classname="jena.rdfcopy" fork="true" maxmemory="1024m" output="@{model}.rdf">
<arg value="@{model}.ttl" />
<arg value="TURTLE" />
<arg value="RDF/XML" />
</java>
</sequential>
</macrodef>
<target name="validate" description="Validates all example RDF Turtle source files.">
<ttl2xml model="alice-contact" />
<ttl2xml model="bob-contact" />
<ttl2xml model="contact-shape" />
<ttl2xml model="associate-shape" />
<ttl2xml model="polentoni-shape" />
<ttl2xml model="polentoni-data" />
<ttl2xml model="polentoni-data-test" />
</target>
<target name="pim-shapes-graph" depends="validate" description="Catenates all PIM shapes into a single shapes graph file.">
<java classpathref="jena.classpath" classname="jena.rdfcat" fork="true" maxmemory="1024m" output="pim-shapes-graph.ttl">
<arg value="-out" />
<arg value="N3" />
<arg value="-n" />
<arg value="contact-shape.ttl" />
<arg value="associate-shape.ttl" />
</java>
</target>
<target name="query-pim-neighbour-arcs" depends="pim-shapes-graph" description="Extracts neighbour graph arcs from the PIM shapes graph.">
<java classpathref="jena.classpath" classname="arq.sparql" fork="true" maxmemory="1024m" output="pim-neighbour-arcs.txt">
<arg value="-query" />
<arg value="neighbour-arcs.rq" />
<arg value="-data" />
<arg value="pim-shapes-graph.ttl" />
</java>
</target>
<target name="query-polentoni-data" depends="validate" description="Finds all non-Polentoni people in the polentoni-data graph.">
<java classpathref="jena.classpath" classname="arq.sparql" fork="true" maxmemory="1024m" output="polentoni-data.txt">
<arg value="-query" />
<arg value="polentoni.rq" />
<arg value="-data" />
<arg value="polentoni-data.ttl" />
</java>
</target>
<target name="query-polentoni-data-test" depends="validate" description="Finds all non-Polentoni people in the polentoni-data-test graph.">
<java classpathref="jena.classpath" classname="arq.sparql" fork="true" maxmemory="1024m" output="polentoni-data-test.txt">
<arg value="-query" />
<arg value="polentoni.rq" />
<arg value="-data" />
<arg value="polentoni-data-test.ttl" />
</java>
</target>
<target name="arxiv" description="Creates a zip file for uploading to arxiv.">
<zip basedir="." destfile="arxiv.zip" includesfile="arxiv-manifest.txt" />
</target>
<target name="clean" description="Removes all generated files.">
<delete file="shape-recursion.fuzz" />
<delete file="shape-recursion.prelude" />
<delete file="alice-contact.rdf" />
<delete file="bob-contact.rdf" />
<delete file="contact-shape.rdf" />
<delete file="associate-shape.rdf" />
<delete file="polentoni-shape.rdf" />
<delete file="polentoni-data.txt" />
<delete file="polentoni-data.rdf" />
<delete file="polentoni-data-test.rdf" />
<delete file="polentoni-data-test.txt" />
<delete file="pim-shapes-graph.ttl" />
<delete file="pim-neighbour-arcs.txt" />
<delete file="arxiv.zip" />
</target>
</project>