Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • E escet
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
    • Locked Files
  • Issues 93
    • Issues 93
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Eclipse ProjectsEclipse Projects
  • Eclipse ESCET (Supervisory Control Engineering Toolkit)
  • escet
  • Issues
  • #105
Closed
Open
Issue created Jun 07, 2021 by Bert Van Beek@bvanbeekMaintainer

CIF to CIF transformation may produce invalid models for algebraic parameters with int type instantiated with constant value

Consider the model:

group def G(alg int nr):
    alg bool x =
        switch nr:
            case 0 : true
            case 1 : false
            else     true
        end;
end

g0: G(0);
g1: G(1);

Eliminating the definition leads to:

group g0:
  alg bool x = switch nr: case 0: true case 1: false else true end;
  alg int nr = 0;
end
group g1:
  alg bool x = switch nr: case 0: true case 1: false else true end;
  alg int nr = 1;
end

Which leads to the following syntax error for case 1 where nr = 0 (and likewise for case 0 where nr = 1):

The switch "case" is of type "int[1..1]", which is not compatible of type "int[0..0]" of the control value of the switch.

The model simulates without any problem.

Edited Jun 08, 2021 by Dennis Hendriks
Assignee
Assign to
Time tracking

Copyright © Eclipse Foundation, Inc. All Rights Reserved.     Privacy Policy | Terms of Use | Copyright Agent