specman - Specman 中的列表生成
问题描述
我有类型 my_type : [a,b,c,d,e,f]; 我有 my_list : my_type 列表;
我想生成 my_list,但是 c、d、f 应该放在一起是有限制的。如果生成的列表中有 c、d 或 f,则必须是所有 3 个。(我可以在列表中没有它们)。
解决方案
干得好:
type my_type : [a,b,c,d,e,f];
{
my_list: list of my_type;
keep my_list.has(it in [c,d,f]) => ( ( c in my_list ) && ( d in my_list ) && ( f in my_list) );
}
推荐阅读
- boto3 - boto3,Windows 上的凭据文件在哪里?
- opencv - 如何将 findTransformEcc 限制为具有比例但没有剪切的部分仿射变换?
- javascript - 当类由 Javascript 分配时不显示 CSS 类
- c++ - 使用运算符 << 返回值
- vue.js - 将数据传递到 vuejs 中的组件
- postgresql - 如何在 postgres 中创建跨多个索引的排名
- html - 尝试访问对话框中的特定行时表中的范围问题(Vue.js,Element-ui)
- c# - 按长度排序数组
- java - 如何从一个没完没了的 Java 程序中退出并打印一条消息?
- macos - Mac brew doctor show 警告:在您的 PATH 中未找到 Homebrew 的 sbin,但您已安装将可执行文件放入 /usr/local/sbin 的公式