资源简介
Uppaal TRON 是一种基于Uppaal engine的在线测试工具, 它适用于对实时系统(主要是对实时嵌入式软件)的黑盒一致性测试,。本文介绍了Uppaal TRON的构成、特征以及优缺点,语法, 语义和语用, 列举了它的几种扩展形式, 并归纳了其应用及研究现状.

代码片段和文件信息
package smartlamp;
import java.awt.frame;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.util.linkedList;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.Condition;
import tron.*;
public class AutoOffLightController extends VirtualThread
implements MouseListener WindowListener LevelListener
{
/**
* Controls whether the debug information should be produced into err
* stream. true enables and false disables debug output.
* This variable can be set via environment variable DEBUG_AUTOOFF.
*/
public static boolean DBG = (System.getenv(“DEBUG_AUTOOFF“)!=null);
private enum Loc { Off On };
private Loc location;
boolean alive = false;
long startTime;
long aTime; //time of activation
Dimmer dimmer = null;
Lock lock = null;
Condition cond = null;
final int mutant levelCount;
final int Tsw=2000; //2 seconds
Reporter reporter = null;// sends output
TestInputHandler testInputHandler = null;// receives input via reporter
public AutoOffLightController(int mutant int levelCount)
{
super(“AutoOffLightController“);
assert(levelCount>0);
location = Loc.Off;
this.mutant = mutant;
this.levelCount = levelCount;
testInputHandler = new TestInputHandler();
reporter = new Reporter(testInputHandler 9999);
//Dimmer is only used to manage graphics easily
dimmer = new Dimmer(aTime levelCount mutant);
dimmer.addLevelListener(this);
dimmer.start();
}
public void run()
{
// wait for dimmer to initialize:
try { synchronized(dimmer) { while (!dimmer.alive) dimmer.wait(); }}
catch(InterruptedException e){ System.err.println(e); System.exit(1);}
lock = new VirtualLock(“LCLock“);
cond = lock.newCondition();
lock.lock();
// notify that LC is ready:
synchronized (this) { alive = true; notifyAll(); }
System.out.println(“AutoOff Init: “+location);
aTime = getTimeMillis();
while (alive) {
System.out.println(“AutoOff State: “+location);
switch (location) {
case Off:
try { cond.await(); }
catch(InterruptedException e) { alive = false; }
//do nothing
break;
case On:
System.out.println(“AutoOff before wait: “+location);
boolean stillWaiting=true;
try { stillWaiting=cond.await(Tsw TimeUnit.MILLISECONDS); }
catch(InterruptedException e) { alive = false; }
System.out.println(“AutoOff after cond.wait: “+location);
if(stillWaiting){
//the light was touched before time out
//so just wait for a fresh interval
} else {
if (location == Loc.On) {
dimmer.setLevel(0);
location=Loc.Off;
}
}
break;
default:
alive = false;
}
}
System.out.println(“IFace interrupted in “+location);
dimmer.interrupt();
reporter.d
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2008-04-14 15:14 uppaal-tron-1.4b5-win32\
目录 0 2008-04-14 15:14 uppaal-tron-1.4b5-win32\compressor\
文件 1020 2008-04-14 15:14 uppaal-tron-1.4b5-win32\compressor\emulateCompressor.trc
文件 192 2008-04-14 15:14 uppaal-tron-1.4b5-win32\compressor\monitorCompressor.trc
文件 209 2008-04-14 15:14 uppaal-tron-1.4b5-win32\compressor\simpleCompressor.trc
文件 78 2008-04-14 15:14 uppaal-tron-1.4b5-win32\compressor\simpleCompressor.trn
文件 10443 2008-04-14 15:14 uppaal-tron-1.4b5-win32\compressor\simpleCompressor.xm
文件 207 2008-04-14 15:14 uppaal-tron-1.4b5-win32\compressor\swapCompressor.trc
文件 78 2008-04-14 15:14 uppaal-tron-1.4b5-win32\compressor\swapCompressor.trn
目录 0 2008-04-14 15:14 uppaal-tron-1.4b5-win32\include\
文件 1210 2008-04-14 15:14 uppaal-tron-1.4b5-win32\include\console.h
文件 1650 2008-04-14 15:14 uppaal-tron-1.4b5-win32\include\dialog.h
文件 1765 2008-04-14 15:14 uppaal-tron-1.4b5-win32\include\sampleadapter.h
文件 8561 2008-04-14 15:14 uppaal-tron-1.4b5-win32\include\tcpcomm.h
目录 0 2008-04-14 15:14 uppaal-tron-1.4b5-win32\include\tron\
文件 3427 2008-04-14 15:14 uppaal-tron-1.4b5-win32\include\tron\adapter.h
文件 3739 2008-04-14 15:14 uppaal-tron-1.4b5-win32\include\tron\Executable.h
文件 2930 2008-04-14 15:14 uppaal-tron-1.4b5-win32\include\tron\sockets.h
文件 4398 2008-04-14 15:14 uppaal-tron-1.4b5-win32\include\tron\timeutil.h
文件 3154 2008-04-14 15:14 uppaal-tron-1.4b5-win32\include\tron\timing.h
文件 7220 2008-04-14 15:14 uppaal-tron-1.4b5-win32\include\troncodec.h
目录 0 2008-04-14 15:14 uppaal-tron-1.4b5-win32\java\
文件 3580 2008-04-14 15:14 uppaal-tron-1.4b5-win32\java\autoOffLight.xm
目录 0 2008-04-14 15:14 uppaal-tron-1.4b5-win32\java\doc\
文件 1987 2008-04-14 15:14 uppaal-tron-1.4b5-win32\java\doc\allclasses-fr
文件 1727 2008-04-14 15:14 uppaal-tron-1.4b5-win32\java\doc\allclasses-nofr
文件 8467 2008-04-14 15:14 uppaal-tron-1.4b5-win32\java\doc\constant-values.html
文件 4960 2008-04-14 15:14 uppaal-tron-1.4b5-win32\java\doc\deprecated-list.html
文件 9059 2008-04-14 15:14 uppaal-tron-1.4b5-win32\java\doc\help-doc.html
文件 44878 2008-04-14 15:14 uppaal-tron-1.4b5-win32\java\doc\index-all.html
文件 1342 2008-04-14 15:14 uppaal-tron-1.4b5-win32\java\doc\index.html
............此处省略153个文件信息
- 上一篇:IDL入门教程详细案例
- 下一篇:netapp存储模拟器部署安装
相关资源
- Sinusoid envelope voltammetry - A novel voltam
- STM32F103VCT6TR - High-density performance lin
- Temperature dependence of electron-spin cohere
- Photoluminescence and photoabsorbance blue shi
- STMicroelectronics 所有封装集成库intlib格
- netron2009
- 《TheArtofElectronics》电子学第二版吴利
- Bigger leaner stronger
- Cimatron西门子专用后处理
- centos7搭建基于strongswan ipsec的 l2tp服务
- Study on the Pyrolysis of methyl tert-butyl et
- HiggsBounds-4:针对来自LEP,Tevatron和L
- 微波(雷达)感应模块原理调试
- Electron mobility in strained wurtzite AlGaN/G
- winCodeSign-2.5.0.7z
- Building Cross-Platform Desktop Applications w
- Microelectronics - Circuit Analysis and Design
- Behzad Razavi RF Microelectronics.pdf
- netron源代码v2.1
- automotive electronic architectures of integra
- the theory and technique of electronic music 电
- 基于 StarterWare 的 TMS320C6748 裸机开发入
- 深入理解Neutron-- OpenStack 网络实现-
- 互斥进程的uppaal模型
- 射频微电子答案 RF Microelectronics
- Razavi RF Microelectronics 2nd 原版PDF
- Sitronix ST7920 12864液晶资料
- 深入浅出openstack-neutron
- Foundations_of_Analog_and_Digital_Electronic_C
- crestron 学习
评论
共有 条评论