Skip to content

Parsing s-expressions when extracting solver modelย #2192

@victornicolet

Description

@victornicolet

Describe the improvement you'd like to request

The LocalSolver implementation in cedar-policy-symcc/src/symcc/solver.rs extracts solver models by looking for a specific text shape "(\n<the actual model>\n)\n".
A more robust implementation could instead parse the S-expression returned by the solver.
Reusing the implementation in decoder.rs would also make it easier to have a single implementation of what the solver output is expected to be.

Describe alternatives you've considered

Leave the lightweight implementation in place, since only CVC5 models that follow this convention are supported.

Additional context

No response

Is this something that you'd be interested in working on?

  • ๐Ÿ‘‹ I may be able to implement this internal improvement
  • โš ๏ธ This feature might incur a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    internal-improvementRefactoring, minor performance improvement, or other changes that Cedar users may never notice

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions