Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jon Shahen
mohawk-2.0
Commits
77460bbd
Commit
77460bbd
authored
Dec 29, 2014
by
Jonathan Shahen
Browse files
fixed NuSMV default path
parent
4f022868
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
build.xml
View file @
77460bbd
...
...
@@ -5,59 +5,61 @@
<description>
Mohawk Tool Implementation.
</description>
<!-- set global properties for this build -->
<property
name=
"src"
location=
"src"
/>
<property
name=
"lib"
location=
"lib"
/>
<property
name=
"src"
location=
"src"
/>
<property
name=
"lib"
location=
"lib"
/>
<property
name=
"bin"
location=
"bin"
/>
<property
name=
"data"
location=
"data"
/>
<property
name=
"build"
location=
"${bin}/build"
/>
<property
name=
"dist"
location=
"${bin}/dist"
/>
<property
name=
"qtest"
location=
"${data}/testcases"
/>
<property
name=
"mohawksrc"
location=
"${src}/mohawk"
/>
<property
name=
"rbac"
location=
"${mohawksrc}/rbac/generated"
/>
<property
name=
"data"
location=
"data"
/>
<property
name=
"build"
location=
"${bin}/build"
/>
<property
name=
"dist"
location=
"${bin}/dist"
/>
<property
name=
"qtest"
location=
"${data}/testcases"
/>
<property
name=
"mohawksrc"
location=
"${src}/mohawk"
/>
<property
name=
"template"
location=
"${mohawksrc}/output"
/>
<property
name=
"rbac"
location=
"${mohawksrc}/rbac/generated"
/>
<property
name=
"antlr"
location=
"${lib}/antlr-3.2.jar"
/>
<target
name=
"init"
>
<!-- create the bin directory -->
<mkdir
dir=
"${bin}"
/>
<mkdir
dir=
"${bin}"
/>
<!-- create the build directory -->
<mkdir
dir=
"${build}"
/>
<mkdir
dir=
"${build}"
/>
<!-- create the distribution directory -->
<mkdir
dir=
"${dist}"
/>
<mkdir
dir=
"${dist}"
/>
</target>
<target
name=
"parser"
depends=
"init"
description=
"generate parser files"
>
<target
name=
"parser"
depends=
"init"
description=
"generate parser files"
>
<!-- Create the parser files -->
<antlr
target=
"${
lib
}/rbac.g"
outputdirectory=
"${rbac}"
>
<antlr
target=
"${
rbac
}/rbac.g"
outputdirectory=
"${rbac}"
>
<classpath>
<pathelement
location=
"${
lib}/antlr-3.2.jar
"
/>
<pathelement
location=
"${
antlr}
"
/>
</classpath>
</antlr>
</target>
<target
name=
"compile"
depends=
"parser"
description=
"compile the source "
>
<target
name=
"compile"
depends=
"parser"
description=
"compile the source "
>
<!-- compile the java code from ${src} into ${build} -->
<javac
srcdir=
"${src}"
destdir=
"${build}"
debug=
"on"
deprecation=
"true"
>
<classpath>
<fileset
dir=
"${lib}"
>
<include
name=
"**/*.jar"
/>
<include
name=
"**/*.jar"
/>
</fileset>
</classpath>
</javac>
<!--
<copy file="${
lib
}/smvtemplate.st" todir="${build}/mohawk" />
<copy file="${
lib
}/transitions.st" todir="${build}/mohawk" />
<copy file="${
lib
}/rbac.st" todir="${build}/mohawk
" /> --
>
<copy
file=
"${
template
}/smvtemplate.st"
todir=
"${build}/mohawk
/output
"
/>
<copy
file=
"${
template
}/transitions.st"
todir=
"${build}/mohawk
/output
"
/>
<copy
file=
"${
template
}/rbac.st"
todir=
"${build}/mohawk
/output"
/
>
</target>
<target
name=
"dist"
depends=
"compile"
description=
"generate the distribution"
>
<target
name=
"dist"
depends=
"compile"
description=
"generate the distribution"
>
<!-- put everything in ${build} into the jar file -->
<jar
destfile=
"${dist}/${ant.project.name}.jar"
basedir=
"${build}"
>
<manifest>
<attribute
name=
"Built-By"
value=
"${user.name}"
/>
<attribute
name=
"Built-By"
value=
"${user.name}"
/>
<attribute
name=
"Main-Class"
value=
"mohawk.Mohawk"
/>
<attribute
name=
"Class-Path"
value=
"."
/>
<attribute
name=
"Class-Path"
value=
"."
/>
</manifest>
<fileset
dir=
"${build}"
/>
<zipfileset
src=
"${lib}/stringtemplate.jar"
/>
<zipfileset
src=
"${
lib}/antlr-3.2.jar
"
/>
<zipfileset
src=
"${
antlr}
"
/>
<zipfileset
src=
"${lib}/commons-cli-1.2.jar"
/>
<zipfileset
src=
"${lib}/commons-lang3-3.3.2.jar"
/>
<zipfileset
src=
"${lib}/hamcrest-core-1.3.jar"
/>
...
...
@@ -65,27 +67,26 @@
</jar>
</target>
<target
name=
"qtest"
depends=
"
compile
"
description=
"generate a JAR file that will be placed close to the data for quick testing"
>
<target
name=
"qtest"
depends=
"
dist
"
description=
"generate a JAR file that will be placed close to the data for quick testing"
>
<!-- @author Jonathan Shahen -->
<!-- put everything in ${build} into the jar file -->
<jar
destfile=
"${qtest}/${ant.project.name}.jar"
basedir=
"${build}"
>
<manifest>
<attribute
name=
"Built-By"
value=
"${user.name}"
/>
<attribute
name=
"Main-Class"
value=
"mohawk.MohawkMain"
/>
<attribute
name=
"Class-Path"
value=
"."
/>
</manifest>
<fileset
dir=
"${build}"
/>
<zipfileset
src=
"${lib}/stringtemplate.jar"
/>
<zipfileset
src=
"${lib}/antlr-3.2.jar"
/>
</jar>
<copy
file=
"${dist}/${ant.project.name}.jar"
tofile=
""
/>
</target>
<target
name=
"regression"
depends=
"dist"
description=
"Performs a regression test"
>
<!-- @author Jonathan Shahen -->
<exec
executable=
"cmd"
dir=
"${dist}"
>
<arg
value=
"/c"
/>
<arg
value=
"java -jar mohawk.jar -mode bmc -run all -rbacspec ../../data/regressiontests/positive1.spec"
/>
</exec>
</target>
<target
name=
"clean"
description=
"clean up"
>
<!-- delete the ${build} and ${dist} directory trees -->
<delete
dir=
"${bin}"
/>
<delete
dir=
"${bin}"
/>
<delete>
<fileset
dir=
"."
defaultexcludes=
"no"
>
<include
name=
"**/*.*~"
/>
<include
name=
"**/*.*~"
/>
</fileset>
</delete>
</target>
...
...
src/mohawk/MohawkInstance.java
View file @
77460bbd
This diff is collapsed.
Click to expand it.
lib
/rbac.g
→
src/mohawk/rbac/generated
/rbac.g
View file @
77460bbd
File moved
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment