博客首页
注册
建议与交流
排行榜
加入友情链接
推荐
投诉
搜索:
帮助
好好学习
bilbo.cublog.cn
管理博客
发表文章
留言
收藏夹
· Compiler
· Unix_Linux
博客圈
音乐
相册
文章
· AutoHotKey
· C/C++
· Caml
· Perl
· Tcl & Expect
· 其他编程语言
· Visual Language
· Compiler Engineering
· Embedded System
· FieldBus
· Networking
· Hardware Desing
· Safety System
· Unix_Linux
· Software Engineering
· GSM/GSM-R
· 技术幽默
· 读书时间
· Good Resource
· 关注社会
· 胡言乱语
首页
关于作者
姓名:你知道 职业:IT 年龄:每年大一岁 位置:地球 个性介绍:挺笨 Email: bilbo0214@163.com
||
<<
>>
||
我的分类
最新照片
上一张
下一张
幻灯片
停止播放
最新文章
·
(转)One-Day Compilers
·
(转)电子工程术语与定义
·
没啥用的程序
·
(转)安全系统设计12原则
·
闲话安全关键系统系统(四)
最新留言
·
bilbo0214
一切照旧,谢谢。
·
nmap
好长时间没来你博客了,都..
·
shihongyuan
我们正在做一个安全系统的..
·
xliu
i do all the things real..
·
yyllssm
我感觉你涉及面好广呀,软..
最新评论
·
中文原文地址:
http://j..
·
支持下。
·
王兄,那个几率数据有统计..
·
文风不错。呵呵。文章写得..
·
呵呵,safety和security确..
最新收藏
·
Caml语言
·
OCaml China
·
Objective CAML Tutorial
·
Dan Bricklin
·
Pick the Brain
统计信息
·
总访问量:199653
·
文章个数:249
·
评论条数:82
·
留言条数:5
·
网友推荐:
(转)One-Day Compilers
<br><table style="border-collapse: collapse;" align="center" border="1" bordercolor="#dddddd" cellpadding="0" cellspacing="0" width="360"> <tbody><tr height="60"><td align="center" width="60"><img src="/fileicon/rar.gif" alt="" border="0"></td><td> <table style="border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr height="20"><td align="center" width="40">文件:</td><td>One-Day Compilers.rar</td></tr> <tr height="20"><td align="center" width="40">大小:</td><td>49KB</td></tr> <tr height="20"><td align="center" width="40">下载:</td><td><a href="http://blogimg.chinaunix.net/blog/upfile2/080817220014.rar">下载</a></td></tr> </tbody></table> </td></tr> </tbody></table><br>一个介绍用ocaml工具集制作DSL(domain-specific language)编译器的讲义。<br>
查看全文
发表于:2008-08-17 ┆
阅读(34)
┆
评论(0)
(转)电子工程术语与定义
<table style="border-collapse: collapse;" align="center" border="1" bordercolor="#dddddd" cellpadding="0" cellspacing="0" width="360"> <tbody><tr height="60"><td align="center" width="60"><img src="/fileicon/pdf.gif" alt="" border="0"></td><td> <table style="border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr height="20"><td align="center" width="40">文件:</td><td>电子工程术语与定义列表.pdf</td></tr> <tr height="20"><td align="center" width="40">大小:</td><td>407KB</td></tr> <tr height="20"><td align="center" width="40">下载:</td><td><a href="http://blogimg.chinaunix.net/blog/upfile2/080817215718.pdf">下载</a></td></tr> </tbody></table> </td></tr> </tbody></table>
查看全文
发表于:2008-08-17 ┆
阅读(32)
┆
评论(0)
没啥用的程序
<div align="center"><img src="http://blogimg.chinaunix.net/blog/upfile2/080817215534.jpg" onload="javascript:if(this.width>500)this.width=500;" border="0"><br><br><div style="text-align: left;">没什么主要功能的程序,主要是把从autohotkey论坛上看到的一些代码集成在一起试验一下。<br><br>源代码如下:<br><table style="border-collapse: collapse;" align="center" border="1" bordercolor="#dddddd" cellpadding="0" cellspacing="0" width="360"> <tbody><tr height="60"><td align="center" width="60"><img src="/fileicon/rar.gif" alt="" border="0"></td><td> <table style="border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr height="20"><td align="center" width="40">文件:</td><td>NoUseDemo.rar</td></tr> <tr height="20"><td align="center" width="40">大小:</td><td>393KB</td></tr> <tr height="20"><td align="center" width="40">下载:</td><td><a href="http://blogimg.chinaunix.net/blog/upfile2/080817220340.rar">下载</a></td></tr> </tbody></table> </td></t……
查看全文
发表于:2008-08-17 ┆
阅读(38)
┆
评论(0)
(转)安全系统设计12原则
Twelve Principles for the Design of Safety-Critical Real-Time Systems<br><br>1.Regard the Safety Case as a Design Driver<br>2.Start with a Precise Specification of the Design Hypotheses<br>3.Ensure Error Containment<br>4.Establish a Consistent Notion of Time and State<br>5.Partition the System along well-specified LIFs<br>6.Make Certain that Components Fail Independently<br>7.Follow the Self-Confidence Principle<br>8.Hide the Fault-Tolerance Mechanisms <br>9.Design for Diagnosis<br>10.Create an Intuitive and Forgiving Man-Machine Interface<br>11.Record Every Single Anomaly<br>12.Provide a Never Give-Up Strategy
查看全文
发表于:2008-08-17 ┆
阅读(39)
┆
评论(0)
闲话安全关键系统系统(四)
闲话安全关键系统系统(四)<br><br>这一篇,咱们说说功能安全(Functional Safety)。这个概念是IEC 61508标准最关注的。<br><br>啥是功能安全?简单的说,就是系统中与安全有关的系统功能。<br><br>既然有功能安全,就有非功能安全。这么说还是不好理解,举个例子。城市里有火车,很多火车是要经过城区的,这样会与普通的道路有交叉,在交叉口的地方一般都会设置道口进行管理,那里有护栏,当有火车接近的时候,护栏就回放下,相应的信号灯会变红,禁止车辆和行人通过。当列车通过以后,护栏又会抬起,信号灯变绿,允许车辆和行人通过。有时候也会设有警笛提示。我高中时所在的县城里就有这样的东西,每天上学放学都要经过。不过,我们那里的是人工手动操作的。<br>不过可以设想一下,有这样一套系统它可以完成这些功能,即操作信号灯和护栏。对于这样的系统,功能安全主要关注以下方面:当列车接近道口的时候,护栏有没有可能不能落下?当列车接近道口的时候,信号灯和警笛能否正常工作?当信号灯或护栏发生故障的时候,操作人员如何知道?护栏放下以后,路上的车辆能否注意到它? 等等。<br><br>而非功能安全可能关注:制作护栏的材料是否有毒?护栏的润滑油是否有毒?会不会……
查看全文
发表于:2008-08-17 ┆
阅读(53)
┆
评论(0)
(转)Basic FTP Commands
<table> <tbody><tr><td align="left"> <img src="http://www.cs.colostate.edu/helpdocs/Figures/csbanner7.gif" alt="Colorado State University "> </td><td align="right"> <h1 align="right"> <font color="NAVY"> Basic FTP Commands </font></h1> </td></tr><tr> </tr></tbody></table> <hr color="NAVY" noshade="noshade"> <hr color="NAVY" noshade="noshade"> <dl><h3>What is FTP?</h3><dd>The FTP (<b>F</b>ile <b>T</b>ransfer <b>P</b>rotocol) utility program is commonly used for copying files to and from other computers. These computers may be at the same site or at different sites thousands of miles apart. FTP is a general protocol that works on UNIX systems as well as a variety of other (non-UNIX) systems. <br><br> </dd><dd>For the purposes of this Web page, the <em>local</em> machine refers to the machine you are initially logged into, the one on which you type the <b>ftp</b> command. The <em>remote</em> machine is the other one, the one that is the argument of t……
查看全文
发表于:2008-08-15 ┆
阅读(30)
┆
评论(0)
real programmer
<div align="center"><img src="http://blogimg.chinaunix.net/blog/upfile2/080815110304.jpg" onload="javascript:if(this.width>500)this.width=500;" border="0"></div>
查看全文
发表于:2008-08-15 ┆
阅读(58)
┆
评论(0)
纹波和浪涌
一、纹波(ripple)的定义<br> <br>1. 纹波(ripple)的定义 <br> <br> 由于直流稳定电源一般是由交流电源经整流稳压等环节而形成的,这就不可避免地在直流稳定量中多少带有一些交流成份,这种叠加在直流稳定量上的交流分量就称之为纹波。纹波的成分较为复杂,它的形态一般为频率高于工频的类似正弦波的谐波,另一种则是宽度很窄的脉冲波。对于不同的场合,对纹波的要求各不一样。对于电容器老练来说,无论是那一种纹波,只要不是太大,一般对电容器老练质量不会构成影响。而对程控机电源或音响设备中所使用的电源,由于宽度很窄的脉冲没有足够的能量来推动喇叭的纸盆或话机的听筒而形成杂音。因此对于这种窄脉冲的要求可以放宽。 <br> 而对于音频范围内的类似正弦波的纹波信号,虽然其幅度不是太高,但其能量却使喇叭或听筒发生嗡嗡的杂音。因此对这种形态的纹波应有一定的要求,而对于用于一些控制的场合,由于窄脉冲达到一定的高度会干扰数字或逻辑控制部件,使设备运行的可靠性降低,因此对这种窄脉冲的幅度应有一定的限制,而对类似正弦波的纹波,一般由于其幅度较低,对控制部件的干扰不大。 <br> &……
查看全文
发表于:2008-08-15 ┆
阅读(30)
┆
评论(0)
(转)How to wrap C functions to OCaml
<div> This document is a small tutorial that introduces how to call C functions from OCaml. Which is usefull if you want to make a mixed C and OCaml application, if you want to call some functions you need from a C library, or to write a complete binding to a C library. </div><br><hr> <h3><span>Contents</span></h3> <ul><li><a href="http://www.linux-nantes.org/%7Efmonnier/OCaml/ocaml-wrapping-c.php#ref_quick_start"><span>Quick start</span></a></li><li><a href="http://www.linux-nantes.org/%7Efmonnier/OCaml/ocaml-wrapping-c.php#ref_compile"><span>Compiling C and OCaml together</span></a></li><li><a href="http://www.linux-nantes.org/%7Efmonnier/OCaml/ocaml-wrapping-c.php#ref_basic_types"><span>Returning Basic Types</span></a></li><li><a href="http://www.linux-nantes.org/%7Efmonnier/OCaml/ocaml-wrapping-c.php#ref_tuple_access"><span>Accessing Tuples</span></a></li><li><a href="http://www.linux-nantes.org/%7Efmonnier/OCaml/ocaml-wrapping-c.php#……
查看全文
发表于:2008-08-01 ┆
阅读(50)
┆
评论(0)
(转)Win32 DLL from OCaml lib
<div class="content"> <div> <div class="intro"> <div class="title">ODLL</div> <p> If you're having a boss asking you to write C librairies but if you prefer to write them in OCaml, this tool is for you ! ODLL is creating a Win32 DLL from an OCaml library, and automatically generating the C stubs needed to interface the OCaml code and the C code and the .H interface. Simply run ODLL with you CMA/CMXA and one or several CMI interfaces and ODLL will do the job for you.</p> </div> <h2>Installation</h2> <p> Since ODLL require one part of the OCaml sources, you'll need to get them from the INRIA CVS if you want to recompile ODLL. For convenience, a precompiled version is included in the distribution, which only require OCaml to be installed. You only need the odll.exe file to use odll. A sample is provided in the /sample directory. </p> <h2>Usage</h2> <ul><li>First, create an OCaml library (CMA or CMXA) using ocaml compilers (ocamlc or ocamlopt).</li>……
查看全文
发表于:2008-08-01 ┆
阅读(50)
┆
评论(0)
(转)OCaml数据类型和匹配
<div id="post-96" class="hentry p1 page publish author-shiningray category-diary tag-ocaml tag-%e6%95%b0%e6%8d%ae%e7%b1%bb%e5%9e%8b y2007 m12 d28 h20"> <h2 class="entry-title">数据类型和匹配</h2> <div class="entry-content"> <p>原文地址:<a href="http://www.ocaml-tutorial.org/data_types_and_matching" rel="external">http://www.ocaml-tutorial.org/data_types_and_matching</a> 翻译:<a href="http://wiki.nirvanastudio.org/wiki/ShiningRay">ShiningRay</a></p> <h2><a name="Linked_lists" id="Linked_lists">链表(Linked List)</a></h2> <p class="first_para">和Perl一样,OCaml也将对列表的支持直接内建在语言中了。OCaml中一个列表的所有元素的类型必须一致。使用以下格式来写列表:</p> <pre class="code" lang="ocaml">[1; 2; 3]<br></pre> <p class="first_para">(注意是分号,不是逗号)。</p> <p><code>[]</code> 表示空列表。</p> <p>一个列表有一个“<strong>头</strong>”(第一个元素)和一个“<strong>尾</strong>”(剩下的元素)。头是一个元素,而尾则是一个列表,所以前面的例子中,表头是整数<code>1</cod……
查看全文
发表于:2008-07-31 ┆
阅读(44)
┆
评论(0)
A good tutorial for PROFIBUS-DP
在网络上闲逛,发现这个PDF很短但讲的又很清楚,难得。<br><br><table style="border-collapse: collapse;" align="center" border="1" bordercolor="#dddddd" cellpadding="0" cellspacing="0" width="360"> <tbody><tr height="60"><td align="center" width="60"><img src="/fileicon/rar.gif" alt="" border="0"></td><td> <table style="border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr height="20"><td align="center" width="40">文件:</td><td>Protocol.rar</td></tr> <tr height="20"><td align="center" width="40">大小:</td><td>471KB</td></tr> <tr height="20"><td align="center" width="40">下载:</td><td><a href="http://blogimg.chinaunix.net/blog/upfile2/080731165709.rar">下载</a></td></tr> </tbody></table> </td></tr> </tbody></table><br><br>我是从一个叫鼎实创新的公司的网站上下的,这个公司看上去比较有意思,只做Profibus相关的产品,国内我还没有发现其它类似的公司。http://www.c-profibus.com.cn/company/company.htm<br>
查看全文
发表于:2008-07-31 ┆
阅读(53)
┆
评论(0)
2008年7月读书
<div align="center"><img src="http://blogimg.chinaunix.net/blog/upfile2/080727225641.jpg" onload="javascript:if(this.width>500)this.width=500;" border="0"><br><br><div style="text-align: left;">以前读它的C语言版,没读两章就因为种种原因放弃了,现在因为自学OCaml,所以又借来读读。<br></div></div>
查看全文
发表于:2008-07-27 ┆
阅读(63)
┆
评论(1)
(转)Ada in the French TGV (High-Speed Rail) System
<h1><p class="pagetitleheader">Ada in the French TGV (High-Speed Rail) System</p></h1> <p> </p><p class="nestedheader"><b>On-board with Safety Critical Software: Implementing Safety Critical Software for High-Speed Railway Transportation</b></p> <p class="bodyblack"> By Marc Richard-Foy, Alsys, and Gilles Legoff, CSEE-Transport <br> (source: Alsys World Dialogue, vol. 8, no. 2, Summer 1994) </p><p> </p><p class="nestedheader"><b>Background</b></p> <p class="bodyblack"> As computer control becomes more and more extensive in our everyday lives, safety critical software systems are taking on increasing importance. Hospitals, avionics, and ground transportation systems rely on safety critical practices to supply their clients with safe, reliable products and services that inspire confidence. </p><p class="bodyblack">While software solutions for critical applications are attractive for their flexibility, they also bring the chance of error. Positive measur……
查看全文
发表于:2008-07-27 ┆
阅读(46)
┆
评论(0)
(转)When is risk acceptable?
<center><div style="text-align: left;"> 这是一篇关于可接受的风险的标准的讨论的文章,有关于ALARP、GAME和MEM的讲述。<br></div><h1 style="text-align: left;"><br> </h1><h1><font color="#000080"><font size="+4">When is risk acceptable?</font></font></h1></center> <center><b><font color="#000080"><font size="+1"><a href="mailto:odd.nordland@informatics.sintef.no">Odd Nordland</a></font></font></b> <br><font color="#000080"><a href="http://www.sintef.no/">SINTEF Telecom and Informatics</a></font> <br><font color="#000080"><a href="http://www.informatics.sintef.no/">Systems Engineering and Telematics</a></font> <br><font color="#000080">NO-7465 Trondheim</font> <p><font color="#000080">E-mail: <a href="mailto:Odd.Nordland@informatics.sintef.no">Odd.Nordland@informatics.sintef.no</a></font> <br><font color="#000080">URL: <a href="http://www.informatics.sintef.no/%7Enordland">www.informatics.sintef.no/~nordland</a></font></p></center> <dir><font color="#000080"><b><u>Abstract:</u……
查看全文
发表于:2008-07-27 ┆
阅读(67)
┆
评论(0)
闲话安全关键系统系统(三)
闲话安全关键系统系统(三)<br><br>自从有了网络以后,我觉得自己无法再长时间专注于某一件事情,用我高中老师的话说就是“三分钟热情”。一转眼有半个月没有写safety-critical的文章了。借口总是可以找到的,不过还是该坚持把这件事情做下去。<br><br>1. hazard与risk<br>好了,不废话了,让我们回到上次未讨论完的hazard这个概念上吧。hazard的简单定义参考如下:“A state or set of conditions that, together with other conditions in the environment, will lead to an accident (loss event).”hazard是所有安全问题的起源,因此我们要研究safety,就必须先研究hazard,也就是常说的hazard analysis。<br>我们经常遇到一个词叫风险(risk),在安全领域,它与hazard紧密相关,实际上,它是“The hazard level combined with the likelihood of the hazard leading to an accident plus exposure (or duration) of the hazard.”,与之对应的工作叫risk analysis(风险分析)。<br><br>hazard analysis和risk analysis有什么区别呢?<br>hazard analysis是一系列技术,每种技术都是从不同的角度给人们提供了一个深入了解系统的方法。它是整个安全系统过程的核心。……
查看全文
发表于:2008-07-27 ┆
阅读(62)
┆
评论(2)
(转)Reading C type declarations
<p> Even relatively new C programmers have no trouble reading simple C declarations such as </p> <pre class="codeblock"><span class="decl">int foo[5]; </span>// <i>foo is an array of 5 ints</i><br><span class="decl">char *foo; </span>// <i>foo is a pointer to char</i><br><span class="decl">double foo(); </span>// <i>foo is a function returning a double</i> </pre> <p> but as the declarations get a bit more involved, it's more difficult to know exactly what you're looking at. </p> <pre class="codeblock"><span class="decl">char *(*(**foo[][8])())[]; </span>// <i>huh ?????</i> </pre> <p> It turns out that the rules for reading an arbitrarily-complex C variable declaration are easily learned by even beginning programmers (though how to actually <i>use</i> the variable so declared may be well out of reach). </p> <p> This Tech Tip shows how to do it. </p> <h1 id="types">Basic and Derived Types</h1> <p> In addition to one variable n……
查看全文
发表于:2008-07-23 ┆
阅读(64)
┆
评论(0)
"Portability"
<h1>What is "Portability"?</h1> <p> The notion of "portability" is widely used, and it's often attached to software inappropriately. Software is only "portable" if it can actually be moved to a <i>different</i> platform, and these are some of the issues that are considered when a port is imminent. </p> <dl class="defnlist"><dt>CPU Architecture Portability </dt><dd>The differences underlying CPU architecture exposes itself in many ways to the C programmer, and these can erupt in surprising and disturbing ways. We can touch on a few of these here: <dl><dt><b>Wordsize</b> </dt><dd><img src="http://www.unixwiz.net/images/port-wordsize.gif" alt="[Wordsize]" align="right" height="72" width="216"> Modern machines are typically 16, 32 or 64 bits for their "natural" words, and the scalar variables <tt>short</tt>, <tt>int</tt> and <tt>long</tt> have varying sizes. Portable software does not typically rely on an integer being larger than 16 bits: a <tt>long</tt> must be……
查看全文
发表于:2008-07-23 ┆
阅读(71)
┆
评论(0)
终端匹配电阻的成本
你觉得一个Profibus-DP的终端匹配的电阻的成本是多少?<br><br>我告诉你,至少5000元以上,因此,<br>成本=来回路费(飞机)+住宿费+伙食费+3个工程师的工时费+电话费。<br><br>这就是我最近经历的,最后查到的问题就是没有加这个终端匹配电阻,MYGOD,简直比金子还金子,比钻石还钻石。<br>
查看全文
发表于:2008-07-23 ┆
阅读(65)
┆
评论(0)
line counter in OCaml
<pre><code><span style="font-family: Courier New; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><span class="cpp1-symbol">(*<br> line counter in OCaml.<br> <br> Jun </span><span class="cpp1-number">17</span><span class="cpp1-symbol">, </span><span class="cpp1-number">2008<br></span><span class="cpp1-space"> <br> command to build </span><span class="cpp1-reservedword">this</span><span class="cpp1-space"> program:<br> ocamllex count.mll<br> ocamlc count.ml -o count.exe<br> <br> command to test </span><span class="cpp1-reservedword">this</span><span class="cpp1-space"> program:<br> count < count.mll<br>*)<br><br>{<br> let num_lines = ref </span><span class="cpp1-number">0<br></span><span class="cpp1-space"> let num_chars = ref </span><span class="cpp1-number">0<br></span><span class="cpp1-symbol">}<br><br>rule count = parse<br> | '\n' ……
查看全文
发表于:2008-07-17 ┆
阅读(79)
┆
评论(0)