English 中文(简体)
Alloy的言论没有打字
原标题:Alloy expression failed to be typechecked

I’m a beginner in Alloy (specification language) and need to do some further work based on a case study, which can be found here (code is on page 5). Relevant code:

open util/ordering[Time] as T0

pred Eavesdropping() {   
  some pro:Process | some m:Protected_Msg |  
  some t: (Time - T0/last) - T0/prev[T0/last] |   let t  = T0/t.next |
  let t   = T0/t .next |   !HasReadAccess[pro,m] && (m->t in pro.knows)
  &&   (m.contents->t not in pro.knows) &&   (m.contents->t   in
  pro.knows) && IsUnique(m.contents) }

在纠正一些辛塔克斯之后,我收到了这一错误信息:“这一表述没有被打上打字”,它突出了<代码>t in let t = T0/t.next。 如何打字?

最佳回答

这里的错误是,下一个功能是T0提及的模块中的一种功能,因此,关于特许使用地的表述应为t.T0/next,而不是T0/t.next。 但是,实际上,你不需要<代码>T0,因为Alloy可以确定哪些模块正在被提及。 因此,仅删除所有提及<代码>T0之处,并应当汇编罚款。

另一种意见:你可以删除所有这些关联符号,使用暗中结合,撰写

{ A B C }

而不是<代码> A && B && C。

问题回答

暂无回答




相关问题
Is there a tool to model/simulate software concurrency?

Is there a good tool out there that can model an application concurrency/locking scheme in a graphical way and that can simulate some of the aspects? I know that Petri nets can be used for that more ...

Django models generic modelling

Say, there is a Page that has many blocks associated with it. And each block needs custom rendering, saving and data. Simplest it is, from the code point of view, to define different classes (hence, ...

Modeling by example: by Thomas Funkhouser

currently Im working on a portion on this research paper "modeling by example" Have tonnes of problems now.So if anyone has knowledge on this paper, help is badly needed here. I am using java opengl ...

3d modeling for data structures

I m looking for a 3D modeling/animation software. Honestly, I don t know if this is something achievable - but what I want to have is some kind of visual representation of various ideas. Speaking in ...

VHDL - When does a process() run for the first time?

Consider : process(a) According to the text i have : A process is first entered at the time of simulation, at which time it is executed until it suspends itself due to a wait statement or a ...

UML Diagram to Model API

I need to create a diagram to document a RESTFul API that build, which UML diagram should I use? Thanks in advance,

热门标签