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

Solver has issues with variables of native java type #14

Open
michding opened this issue Jun 2, 2018 · 0 comments
Open

Solver has issues with variables of native java type #14

michding opened this issue Jun 2, 2018 · 0 comments
Labels

Comments

@michding
Copy link

michding commented Jun 2, 2018

If a variable has a java primitive type (such as java.lang.Integer), the solver throws an exception when invoked, while the VIATRA Query Result view is able to show the matches without issues for the pattern.

Error occured (ClassCastException): org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey cannot be cast to org.eclipse.viatra.query.runtime.emf.types.BaseEMFTypeKey
    hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueryHeader(Viatra2Logic.java:148)
    hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:95)
    hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:189)
    hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:137)
    hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:348)
    hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:116)
    hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:78)
    org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

After a bit of debugging, we figured this line (among a few others in this same unit) assumes that the type key is of type BaseEMFTypeKey<...>, but this is not always true (in this case it is JavaTransitiveInstancesKey).

@imbur imbur added the bug label Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants