Skip to content

Add support for arrays with multiple indices in the Princess model #520

@daniel-raffler

Description

@daniel-raffler

Hello everyone,
Princess fails ModelTest.testGetArrays3 with an exception:

java.lang.IllegalArgumentException: unhandled model value store(const(const(0)), 3, store(const(124), 1, 123)) of type class ap.parser.IFunApp
	at org.sosy_lab.java_smt.solvers.princess.PrincessFormulaCreator.convertValue(PrincessFormulaCreator.java:250)
	at org.sosy_lab.java_smt.solvers.princess.PrincessFormulaCreator.convertValue(PrincessFormulaCreator.java:80)
	at org.sosy_lab.java_smt.solvers.princess.PrincessModel.getAssignmentsFromArraySelect(PrincessModel.java:221)
	at org.sosy_lab.java_smt.solvers.princess.PrincessModel.getAssignments(PrincessModel.java:156)
	at org.sosy_lab.java_smt.solvers.princess.PrincessModel.asList(PrincessModel.java:88)
	at org.sosy_lab.java_smt.basicimpl.CachingModel.asList(CachingModel.java:40)
	at org.sosy_lab.java_smt.api.Model.iterator(Model.java:55)
	at org.sosy_lab.java_smt.test.ModelTest.testModelIterator(ModelTest.java:1623)

The problem is on our side as the backend for Princess does not support array with more than one index while creating the model. We should add this missing feature. While we're at it we may also want to look into moving (part) of the conversion into an abstract class. The algorithm is always the same and we currently implement it for several solvers separately

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions