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

Support new lifter unsupported opcode format #293

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ailrst
Copy link
Contributor

@ailrst ailrst commented Dec 19, 2024

Updates frontend to support the format in UQ-PAC/gtirb-semantics#22

Test code: gate_server_example.tar.gz

Also adds a case to loading cvt_bool_bv that wasn't covered previously.

@ailrst ailrst force-pushed the support-lifter-error-structure branch from 14c1641 to 5855138 Compare December 19, 2024 07:56
@ailrst ailrst changed the title Support new lifter unsupported opcode error format in https://github.com/UQ-PAC/gtirb-semantics/pull/22 Support new lifter unsupported opcode format Dec 19, 2024
}
Logger.error(s"""Semantics parse error:\n line: $line\n$extra""")
throw e
}
}

val parserMap = semantics.map(_.map((k: String, v: Array[Array[String]]) => (k, v.map(_.map(parse_insn)))))
val parserMap : Map[String, List[Either[(String,String), List[StmtContext]]]] =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(String, String) should probably be a case class instead of a tuple to make the semantics of it clearer

@l-kent
Copy link
Contributor

l-kent commented Dec 23, 2024

Would it be cleaner if Result.value was a List[StmtContext] and so then parserMap could be a Map[String, List[InsnSemantics]]? That seems like it would streamline some of the conversion steps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants