如何在COQ中使用持久状态建模?
在我们的大学任务中,我们被要求在谓词和命题逻辑中对我们选择的对象进行建模。我的小组参加了555个计时器集成电路。目前,我们面临着建模该对象的行为的问题,该对象(尤其是SR-LATCH部分)。
这个问题似乎源于以下事实:SR-Latch使用组合逻辑无法描述。
我们不确定手头的任务是否可能发生,并且希望获得一些建议,以及在这种情况下使用的技术是否可能。
到目前为止,我们的描述就像是这样:
Require Import BenB.
(* time elapsed from some point in past in microseconds as real numbers *)
Definition T := R.
(* durations in microseconds as real numbers *)
Definition D := R.
(* some arbitrary constant duration time-delta representing the oscialltion period / 2 *)
Variable td: D.
(* a type representing the io pins of the 555 IC *)
Inductive Pin: Type :=
| output : Pin
| voltage : Pin
| trigger : Pin
| threshold : Pin
| reset : Pin
| ground : Pin
| control : Pin
| discharge : Pin
.
(* predicate representing the logical state of the pin at certain time *)
Variable isHigh : T -> Pin -> Prop.
(* represents the if the current can flow through the 555 IC *)
Definition ICPowered (t:T) :=
(isHigh t voltage)
/\
~(isHigh t ground)
.
Definition srLatch (t: T) :=
(isHigh t reset)
/\
.
Definition initialConditions :=
ICPowered
.
(* Definition describing the expected oscillating behaviour of the output signal *)
Definition oscillationObligation :=
forall t: T,
((isHigh t output) -> ~(isHigh (t+d) output))
/\
(~(isHigh t output) -> (isHigh (t+d) output))
.
Definition correctnessTheorem :=
initialConditions -> oscillationObligation
.
PS我们假设我们可以使用论坛作为学习资源,毫无疑问,将提及工作中使用的所有来源,包括我们可能会夺回的任何答案。
In our university assignment we were asked to model the object of our choice in predicate and propositional logic. My group went for the 555 timer integrated circuit. We currently face the issue of modeling the behavior of the said object, the sr-latch part in particular.
The issue seem to originate from the fact that sr-latch is not describable using combinational logic.
We are not sure if the task at hand is possible and were hoping to get some advice whether its possible and, if so, on the techniques used in such cases.
Our description so far is like so:
Require Import BenB.
(* time elapsed from some point in past in microseconds as real numbers *)
Definition T := R.
(* durations in microseconds as real numbers *)
Definition D := R.
(* some arbitrary constant duration time-delta representing the oscialltion period / 2 *)
Variable td: D.
(* a type representing the io pins of the 555 IC *)
Inductive Pin: Type :=
| output : Pin
| voltage : Pin
| trigger : Pin
| threshold : Pin
| reset : Pin
| ground : Pin
| control : Pin
| discharge : Pin
.
(* predicate representing the logical state of the pin at certain time *)
Variable isHigh : T -> Pin -> Prop.
(* represents the if the current can flow through the 555 IC *)
Definition ICPowered (t:T) :=
(isHigh t voltage)
/\
~(isHigh t ground)
.
Definition srLatch (t: T) :=
(isHigh t reset)
/\
.
Definition initialConditions :=
ICPowered
.
(* Definition describing the expected oscillating behaviour of the output signal *)
Definition oscillationObligation :=
forall t: T,
((isHigh t output) -> ~(isHigh (t+d) output))
/\
(~(isHigh t output) -> (isHigh (t+d) output))
.
Definition correctnessTheorem :=
initialConditions -> oscillationObligation
.
P.S. We assume that we are allowed to use forums as learning resource, and without a doubt will mention all the sources used in the work including any answer we may recive.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论