You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a variable has an enum type and a value is specified for that variable in the .vql file (ex. FTObstacle.color(ob1, FTPickUpColor::Other);), the solver throws an exception when invoked, while the VIATRA Query Result view is able to show the matches without issues for the pattern. See below example for our FTPickUpColor enum class, which contains the ::Other literal:
Error occured (UnsupportedOperationException): Can not transform pattern "ca.mcgill.ecse.fairtracks.queries.movableObstacleNotColoredOther"! Reason: Unknown constant type: class ca.mcgill.ecse.fairtracks.fairtracksDsl.FTPickUpColor
hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.transformPattern(RelationDefinitionIndexer.java:204)
hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.generateRelationDefinitions(RelationDefinitionIndexer.java:65)
hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator.transformBaseProperties(PatternGenerator.java:623)
hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternProvider.generateQueries(PatternProvider.java:59)
hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider.createModelGenerationMethod(ModelGenerationMethodProvider.java:56)
hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner.solve(ViatraReasoner.java:89)
hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:269)
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 some debugging, we figured out that this line is causing the bug as it is not able to detect that the Enum variable we are using (FTPickUpColor::Other) are actually instances of the EEnum class.
Note that this only occurs when we specify a value for the Enum variable (ex. ::Other), and not when we declare the Enum variable (ex. as a parameter in a pattern).
The text was updated successfully, but these errors were encountered:
If a variable has an enum type and a value is specified for that variable in the
.vql
file (ex.FTObstacle.color(ob1, FTPickUpColor::Other);
), the solver throws an exception when invoked, while the VIATRA Query Result view is able to show the matches without issues for the pattern. See below example for ourFTPickUpColor
enum class, which contains the::Other
literal:After some debugging, we figured out that this line is causing the bug as it is not able to detect that the Enum variable we are using (
FTPickUpColor::Other
) are actually instances of theEEnum
class.Note that this only occurs when we specify a value for the Enum variable (ex.
::Other
), and not when we declare the Enum variable (ex. as a parameter in a pattern).The text was updated successfully, but these errors were encountered: