Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow checking whether an object is of a certain type #10

Open
morxa opened this issue Nov 1, 2019 · 0 comments
Open

Allow checking whether an object is of a certain type #10

morxa opened this issue Nov 1, 2019 · 0 comments
Labels
enhancement New feature or request language

Comments

@morxa
Copy link
Collaborator

morxa commented Nov 1, 2019

Given a domain with

symbol domain Location = { C_BS_O, C_DS_I, C_CS1_I, C_CS2_I }

I'd like to check in a test whether my object is part of that domain, e.g.,

test(has_type(C_BS_O, Location))

This can be done manually, e.g.,:

bool fluent is_location(symbol location) {
domain:
  location in Location;
initially:
  (location) = true;
}

However, adding this for every type is cumbersome. It would be nice if such a predicate or function was generated automatically.

@vmatare vmatare added enhancement New feature or request language labels Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request language
Projects
None yet
Development

No branches or pull requests

2 participants