资源简介
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存储模拟器部署安装
相关资源
- UPPAAL-4.0.14
- ToolsofRadioAstronomy.pdf
- Electronically_Scanned_Arrays
- 强名称工具Strong.Name.Helper.v1.7-whoknow
- Essential Electronic Design Automation
- electron中文文档 pdf版
- RF MICROELECTRONICS课后习题答案
- VWAS6.0 中控协议 - 201604.pdf
- RF MICROELECTRONICS Second Edition
- electron node-ffi编译通过的源码,无需编
- 微电子电路答案 全 第五版Microelectr
- Practical Electronics for Inventors, Fourth
- Metronic - Admin Dashboard Template 1.5.5
- Microelectronic Circuits 6th edition
- MicroElectronic Circuit Design
- 基础拓扑学+M.A.Armstrong编著_.pdf
- POWER ELECTRONICS CONVERTERSAPPLICATIONSAND DE
- 电子电路分析与设计 /全文本美Donal
- Microelectronics 第五章习题答案
- [Jean_Meeus]_Astronomical_algorithms(2nd).
- The Art Of Electronics 3rd
- Astronomical Algorithms Jean Meeus 天文算法英
- Electronic Principles 8th
- Interferometry and Synthesis in Radio Astronom
- Metronic v5.5.5 - ThemeForest 销量第一的后
- electron-v9.1.2-win32-x64.zip
- [最新5.1.7]Metronic V5.1.7-bootstrap版本 (
- Netron-Setup-4.5.0.zip
- Transmission Electron Microscopy - A Textbook
- Principles of Electronic Communication Systems
评论
共有 条评论