合金:是否可以检索使至少一个约束为假的“实例”

时间:2019-11-29 09:44:46

标签: alloy

我始终以相同的方式使用Alloy:要么查找给定约束集(=模型)的实例(解决方案),要么检查可以表示为断言的模型的特定属性(在以搜索反例)。但是,有一个新要求引起了我两个问题:

  1. 是否可以检索与不满足Alloy模型所包含约束的变量的所有关系分配?这意味着我想收集所有不是给定Alloy模型解决方案的示例。
  2. 如果是:我该怎么做?

非常感谢您!

1 个答案:

答案 0 :(得分:1)

如果为模型设置了<report id="list_efectcredit" model="proyecto_rc.account" string="Lmayor" name="proyecto_rc.report_account_view" file="proyecto_rc.report_lmayorefectivo" report_type="qweb-html" /> <template id="report_account_view"> <t t-call="web.html_container"> <t t-foreach="docs" t-as="o"> <t t-call="web.external_layout"> <div class="page"> <div class="page"> <br></br> <thead> <center> <h2>Ledger</h2> </center> <br> <p>Detail: <table class="customTable"> <thead> <tr> <th>Account</th> <th>Debit</th> <th>Credit</th> </tr> </thead> <tbody> <t t-set="i" t-value="1"/> <td> <span t-field="o.title"/> </td> <td> <span t-field="o.total_account_debit"/> </td> <td> <span t-field="o.total_account_credit"/> </td> <t t-set="i" t-value="i+1"/> </tbody> </table> </p> </br> </thead> </div> </div> </t> </t> </t> </template> 约束,那么pred将查找所有违反这些约束的实例。