UQ-PAC / aslp

Partial evaluator for Arm's Architecture Specification Language (ASL)
Other
6 stars 2 forks source link

aslt changes + grammar + testing #53

Closed katrinafyi closed 3 months ago

katrinafyi commented 4 months ago

This PR will aim to address some inconveniences in the current aslt format (i.e. that from the AST's pp_raw methods). This should make the syntax more similar to a regular programming language (in particular, Python) and hence easier to parse with a variety of generic tools.

In the format itself,

In the ANTLR grammar,

In downstream projects,

mmcloughlin commented 4 months ago

In case it's of interest, I'm working on a Rust parser for ASLT (based on pest). It's a work in progress but it parses a reasonable subset right now.

katrinafyi commented 4 months ago

@mmcloughlin, that is interesting! Do you have plans to make use of ASLp for a verification project?

mmcloughlin commented 4 months ago

Do you have plans to make use of ASLp for a verification project?

Potentially, yes. I'm trying to see if it will work for our use case at the moment. The ASLT format is quite convenient.

The other thing we'll probably need is symbolic opcodes #52.

mmcloughlin commented 4 months ago

I've updated my Rust parser to support these new changes. All works fine.

katrinafyi commented 4 months ago

With the go-ahead of the Basil PR, this is scheduled for merge next Monday.

katrinafyi commented 3 months ago

@ncough Are the changes in this diff to be expected? It looks like some more CSE and some distributivity simplifications have been added?

ncough commented 3 months ago

Yeah, these should correspond to some simplifications over mul_int and add_int that were necessary to reduce bitvector slices down to a constant width. Given the resulting CSE mess, I may consider an alternative approach down the line. Nice to have this testing!