Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions regression/smv/process/process1.desc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
KNOWNBUG
CORE
process1.smv

^EXIT=0$
^file .* line 8: no support for asynchronous processes$
^EXIT=2$
^SIGNAL=0$
--
^warning: ignoring
--
This does not parse.
1 change: 1 addition & 0 deletions src/hw_cbmc_irep_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ IREP_ID_ONE(smv_setnotin)
IREP_ID_ONE(smv_signed_cast)
IREP_ID_ONE(smv_signed_word)
IREP_ID_ONE(smv_sizeof)
IREP_ID_ONE(smv_process_module_instance)
IREP_ID_ONE(smv_swconst)
IREP_ID_ONE(smv_union)
IREP_ID_ONE(smv_unsigned_cast)
Expand Down
20 changes: 15 additions & 5 deletions src/smvlang/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -589,16 +589,26 @@ simple_type_specifier:
;

module_type_specifier:
module_name
module_name parameter_list_paren_opt
{
init($$, ID_smv_module_instance);
to_smv_module_instance_type(stack_type($$)).base_name(stack_expr($1).id());
stack_expr($$).operands().swap(stack_expr($2).operands());
}
| module_name '(' parameter_list ')'
| process_Token module_name parameter_list_paren_opt
{
init($$, ID_smv_module_instance);
to_smv_module_instance_type(stack_type($$)).base_name(stack_expr($1).id());
stack_expr($$).operands().swap(stack_expr($3).operands());
init($$, ID_smv_process_module_instance);
}
;

parameter_list_paren_opt:
/* optional */
{
init($$);
}
| '(' parameter_list ')'
{
$$ = $2;
}
;

Expand Down
14 changes: 13 additions & 1 deletion src/smvlang/smv_typecheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ void smv_typecheckt::flatten_hierarchy(smv_parse_treet::modulet &smv_module)
instance.arguments(),
instance.source_location());
}

if(
element.is_var() &&
element.expr.type().id() == ID_smv_process_module_instance)
{
throw errort().with_location(element.expr.source_location())
<< "no support for asynchronous processes";
}
}
}

Expand Down Expand Up @@ -2277,8 +2285,12 @@ void smv_typecheckt::create_var_symbols(
else
symbol.pretty_name = strip_smv_prefix(symbol.name);

if(symbol.type.id() == ID_smv_module_instance)
if(
symbol.type.id() == ID_smv_module_instance ||
symbol.type.id() == ID_smv_process_module_instance)
{
symbol.is_input = false;
}
else
symbol.is_input = true;

Expand Down
Loading