Skip to content

Commit

Permalink
ogma-core: Fix missing stream name substitution. Refs #120.
Browse files Browse the repository at this point in the history
When using property names as arguments to trigger, the Spec2Copilot
backend does not apply the same variable/name substitution that was
applied in their definition, thus referring in the call to trigger to an
undefined argument.

This commit modifies the generation of trigger names in Copilot to be
able to apply the same name subsitution map, so that the stream name is
resolved.
  • Loading branch information
ivanperez-keera committed Jan 24, 2024
1 parent 2dfdf02 commit 8956f86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ogma-core/src/Language/Trans/Spec2Copilot.hs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ spec2Copilot specName typeMaps exprTransform showExpr spec =
++ propName ++ ") " ++ "[]"
where
handlerName = "handler" ++ requirementName r
propName = requirementName r
propName = safeMap nameSubstitutions (requirementName r)

-- Main program that compiles specification to C in two files (code and
-- header).
Expand Down

0 comments on commit 8956f86

Please sign in to comment.