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 92
    • Issues 92
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 5
    • Merge requests 5
  • 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
  • #77
Closed
Open
Issue created May 07, 2021 by Ferdie Reijnen@freijnenDeveloper

List-subtraction is explained in manual but does not exist.

The CIF manual (Chapter: Types and values, Section: Lists) explains that:

Several other standard operators and functions are available to work with lists, including the following:

[1, 4, 2, 4, 5] - [2]           // [1, 4, 4, 5] (removal of elements)
[1, 4, 2, 4, 5] - [4]           // [1, 2, 4, 5]
[1, 4, 2, 4, 5] - [8]           // [1, 4, 2, 4, 5]
[1, 2, 3, 4, 5] - [6, 4, 2, 3]  // [1, 5]
[1, 4, 4, 1, 1] - [1, 4, 1]     // [4, 1]

However, the following CIF model gives errors:

alg list int x1 = [1, 4, 2, 4, 5] - [2];

Error:

Binary operator "-" can not be applied to values of type "list[5] int[1..5]" and "list[1] int[2..2]".

Options:

  • Remove this part from the manual.
  • Implement Binary operator "-" for lists.
Assignee
Assign to
Time tracking

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