




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、JPF 安装提示1. 是关于JPF的官方网站,里面由关于JPF的相关资料。2. 下载JPF需要到Sourceforge网站上,网址为:3. 下载javapathfinder-src-libs-1.0-7-oct-05.zip文件到本地解压缩。4. 将解压缩的项目Import到eclipse workspace。5. 更改Project Properties a. Java Build Path -> Source -> Add Folder (env/jpf 和env/jvm和examples加进来)
2、 a. Java Build Path -> Lib -> Add JARs (将位于build-tools/lib & lib 下的所有jar包添加进来) c. Java Compiler -> Compiler Compliance level & Generated Class. file compatibility & source file compatibility 全设为1.4(这样就允许target code中包含assert之类的信息了)6. 进入ANT View启动A
3、NT命令:compile(default)ANT脚本需要适当修改才能保证编译后的项目可以运行,修改后的脚本粘贴在下面了,覆盖原有脚本即可 项目上右键菜单Run-> Add Arguments (添加你想检查的目标代码,如 deadlock.Deadlock) 点击Wizard中的Run按钮8. 观察Console,会出现运行结果!如有不明白之处,可以发邮件向我咨询:lianggt08sei (梁广泰)附:build.xml<?xml version="1.0&
4、quot; ?><!- build.xml - the global JPF build system configuration targets: clean remove the files that have been generated by the build process compile compile JPF and its specific (modeled) environment libraries compile-env-jpf compile exclusive JPF classes for (modeled) environment compile-e
5、nv-jvm compile native method peer classes for (modeled) environment compile-examples compile all the examples compile-jpf compile all JPF classes compile-tests compile all the tests for JPF dist generate the compressed distribution tar files dist-src generate the compressed source distribution tar f
6、iles docs-javadoc create javadoc documentation init common task/target initialization jar create jar archives for JPF, its JVM and their environment models run-tests run all JPF tests-><project name="nasa-jpf" default="compile" basedir="."> <!- = COMMON SECT
7、ION = -> <!- this is where platform specific settings come in (note this has to be read first in case you want to override props) -> <property file="perties"/> <property file="$perties"/> <!- this is where we get static things like the ve
8、rsion from (but make sure they don't collide) -> <property file="perties"/> <!- our required global properties -> <property name="" value="open-jpf" /> <!- Project directories -> <property name="bin.dir" val
9、ue="bin" /> <property name="build.dir" value="build" /> <property name= value="$build.dir/dist" /> <property name= value="$build.dir" /> <property name= value= /> <property name= value= /> <property name= value=&qu
10、ot;$build.dir/jpf" /> <property name= value="$build.dir/jpf" /> <property name= value="$build.dir/lib" /> <property name= value="$build.dir/test" /> <property name="build-tools.dir" value="build-tools" /> <property
11、name= value="$build-tools.dir/bin" /> <property name= value="$build-tools.dir/lib" /> <property name="doc.dir" value="doc"/> <property name= value="$doc.dir/api"/> <property name= value="$doc.dir/images"/> <pro
12、perty name="env.dir" value="env"/> <property name= value="$env.dir/jpf"/> <property name= value="$env.dir/jvm"/> <property name="examples.dir" value="examples" /> <property name="lib.dir" value="lib&qu
13、ot; /> <property name="src.dir" value="src" /> <property name="test.dir" value="test" /> <property name="ext.dir" value="extensions" /> <property name="packages" value=/> <property name="debug&qu
14、ot; value="on"/> <property name="deprecation" value="on"/> <property name="jar" value="jar" /> <!- just more or less educated fallback guesses, use perties -> <property name="junit.jar" value=/> <!- ge
15、neric classpath settings (collecting all libs under extensions) -> <path id="lib.path"> <fileset dir="."> <include name="$lib.dir/*.jar"/> </fileset> <fileset dir="."> <include name="$lib.dir/*.zip"/> </files
16、et> <fileset dir="$ext.dir"> <include name="*/$lib.dir/*.jar"/> </fileset> </path> <!- we need to do this trick to avoid Ant recompiling all our sources (it needs to get exact srddirs) -> <path id="esd"> <pathelement location=&q
17、uot;$src.dir"/> <dirset dir="$ext.dir"> <include name="*/src"/> </dirset> </path> <property name= refid="esd"/> <!-* * init: common tasks, mainly to setup directories and check what other * tasks can be executed *-> <target
18、 name="init" description="common task/target initialization"> <tstamp/> <echo>* JPF build system *current dir: $user.diruser home dir: $user.home java version: $java.versionOS: $-$os.arch-$os.version </echo> <echo>NOTE - if property values are pr
19、inted with brackets (e.g. '$bla'), it means they are NOT defined. This is a 'echo' task itch. </echo> <available file="perties" property=/> <echo message= /> <echo message="NOTE - some targets might be skipped if you don't have a '
20、perties' file" /> <echo/> <echo message="- creating build directories."/> <mkdir dir="$build.dir"/> <mkdir dir=/> <mkdir dir=/> <mkdir dir=/> <mkdir dir=/> <mkdir dir=/> <echo/> <echo message="- ch
21、ecking for external libraries."/> <condition property=> <!- we currently don't use other test tools than junit -> <available classname=/> </condition> <available classname= property=/> <echo message=/> </target> <!-* * compile-jpf: compile JPF
22、 core classes *-> <target name="compile-jpf" depends="init" description="compile JPF core classes"> <javac srcdir="$src.dir" destdir= debug="$debug" source="1.4" listfiles="Yes" deprecation="$deprecation">
23、 <classpath> <path refid="lib.path"/> </classpath> </javac> <copy file="perties" todir=/> </target> <!-* * compile-ext: compile JPF extension classes *-> <target name="compile-ext" depends="compile-jpf" d
24、escription="compile optional extension classes"> <javac srcdir= destdir= debug="$debug" source="1.4" listfiles="Yes" deprecation="$deprecation"> <classpath> <path refid="lib.path"/> </classpath> </javac> <
25、;/target> <!-* * compile: compile MJI native peer class environment *-> <target name="compile-env-jvm" depends="compile-jpf" description="compile MJI native peer classes"> <javac srcdir= destdir= debug="$debug" source="1.4" deprecat
26、ion="$deprecation"> <classpath> <path refid="lib.path"/> <pathelement path=/> </classpath> </javac> </target> <!-* * compile: compile standard MJI model classes *-> <target name="compile-env-jpf" depends="compile-jpf&
27、quot; description="compile MJI model classes"> <javac srcdir= destdir= debug="$debug" source="1.4" deprecation="$deprecation"> <classpath> <path refid="lib.path"/> <pathelement path=/> <pathelement path=/> </classp
28、ath> </javac> </target> <!-* * compile: compile JPF and its modeled environment libraries *-> <target name="compile" depends="compile-jpf, compile-ext, compile-env-jvm, compile-env-jpf" description="compile JPF and its specific (modeled) environment l
29、ibraries"> </target> <!-= EXAMPLES SECTION =-> <!-* * compile-examples: optional Compile the examples *-> <target name="compile-examples" depends="compile" description="compile examples"> <!- Create the build/examples directory -> &
30、lt;mkdir dir=/> <javac srcdir="$examples.dir" destdir= debug="$debug" source="1.4" deprecation="$deprecation"> <classpath> <path refid="lib.path"/> <pathelement path=/> <pathelement path=/> <pathelement path=/>
31、</classpath> </javac> <!- Copy *.ltl, *.properties to the build/examples directory. -> <copy todir=> <fileset dir="$examples.dir" includes="*/*.ltl, */*.properties"/> </copy> </target> <!-= TEST SECTION =-> <!-* * compile-tests:
32、optional compile all the tests for JPF *-> <target name="compile-tests" depends="compile" description="compile all the tests for JPF"> <javac srcdir="$test.dir" destdir= debug="$debug" source="1.4" deprecation="$deprecation
33、"> <classpath> <path refid="lib.path"/> <pathelement location="$junit.jar"/> <pathelement path=/> <pathelement path=/> <pathelement path=/> </classpath> </javac> <!- Copy *.ltl, *.properties to the build/test directory. -
34、> <copy todir=> <fileset dir="$test.dir" includes="*/*.ltl, */*.properties"/> </copy> </target> <!-* * run-tests: optional run all JPF tests *-> <target name="run-tests" depends="compile-tests" if= description="run all
35、JPF tests"> <echo message= /> <junit printsummary="on" showoutput="off"> <formatter type="plain"/> <classpath id="test.path"> <!- we need to add the system classpath if we run junit forked (otherwise it won't find the ant
36、 stuff itself) -> <pathelement path=/> <path refid="lib.path"/> <pathelement location="$junit.jar"/> <pathelement path=/> <pathelement path=/> <pathelement path=/> <pathelement path=/> </classpath> <batchtest fork="yes&qu
37、ot; todir=> <fileset dir=> <!- until we have the Ant AbstractFileSet patch (#12060), we have to explicitly name the tests -> <include name="*/jvm/TestJavaLangClassJPF.class"/> <include name="*/jvm/TestAssertJPF.class"/> <include name="*/jvm/Test
38、ExceptionJPF.class"/> <include name="*/jvm/TestArrayJPF.class"/> <include name="*/jvm/TestNativePeerJPF.class"/> <include name="*/jvm/TestCastJPF.class"/> <include name="*/jvm/TestFieldJPF.class"/> <include name="*/jvm/T
39、estMethodJPF.class"/> <include name="*/jvm/TestThreadJPF.class"/> <include name="*/jvm/TestWaitJPF.class"/> <include name="*/mc/TestVMDeadlockJPF.class"/> <include name="*/mc/TestRandomJPF.class"/> <include name="*/mc/Te
40、stCrossingJPF.class"/> <include name="*/mc/TestOldClassicJPF.class"/> </fileset> </batchtest> </junit> </target> <!-= DOCUMENTATION AND FORMAT SECTION =-> <!-* * docs-javadoc: create API documentation with javadoc *-> <target name="
41、docs-javadoc" depends="init" description="create javadoc documentation"> <mkdir dir=/> <echo message="- running javadoc to create documentation."/> <javadoc packagenames="$packages" sourcepath="$src.dir" destdir= author="t
42、rue" version="true" use="true" source="1.4" windowtitle="$ API" doctitle="$"> <classpath> <path refid="lib.path"/> </classpath> </javadoc> </target> <!-= DISTRIBUTION AND ARCHIVING SE
43、CTION =-> <!-* * jar: build jars with all JPF binaries *-> <target name="jar" depends="compile" description="create jar archives for JPF, its JVM and their environment models"> <mkdir dir=/> <copy todir=> <fileset dir="$user.dir"&
44、gt; <include name="perties"/> <include name="perties"/> </fileset> </copy> <jar jarfile= basedir=/> <jar jarfile= basedir= /> <jar jarfile= basedir= /> </target> <!-* * dist: create a binary distribution *->
45、<target name="dist" description="generate the compressed distribution tar files"> <!- Create the distribution directory -> <mkdir dir=/> <!- Create the compressed distribution file in the distribution directory -> <tar destfile= compression="gzip"> <tarfileset dir="$src.dir" prefix="$-$jpf.version/$src.dir" /> <tarfileset dir="$test.dir" prefix="$-$jpf.version/$test.dir" /> <t
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 乐理初级考试题及答案
- 课件显示全屏快捷键
- 课件时间显示问题
- 冷却筛分工培训考核试卷及答案
- 酒类分级考试题及答案
- 2025年教师招聘之《幼儿教师招聘》通关试题库及答案详解(历年真题)
- 教师招聘之《幼儿教师招聘》通关考试题库附参考答案详解(研优卷)
- 甘油水处理工质量管控考核试卷及答案
- 金箔制作工突发故障应对考核试卷及答案
- 采购员设备调试考核试卷及答案
- 龙虎山正一日诵早晚课
- 米粉及杂粮类制品课件
- 楔形平板产生的等厚干涉
- 骨髓腔穿刺在急诊急救中的应用课件
- 机械动力学PPT完整全套教学课件
- 年产2.03万吨高端精细化学品及5G新材料项目环评报告书
- 群众文化副高答辩问题及答案
- GB/T 41972-2022铸铁件铸造缺陷分类及命名
- 主编-孙晓岭组织行为学-课件
- 中医刮痧法诊疗操作评分标准
- 《师范生教师职业能力证书》样式及说明
评论
0/150
提交评论