3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-07 05:02:48 +00:00

fstar: address code review comments - document gen_rhs_expr_list and strip-components

Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/0a30f342-3941-4952-a54f-1bee84b022ef

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-06 01:51:11 +00:00 committed by GitHub
parent 4a2accf10c
commit c49b403922
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -50,6 +50,9 @@ jobs:
URL="https://github.com/FStarLang/FStar/releases/download/v${FSTAR_VERSION}/${ARCHIVE}"
echo "Downloading F* ${FSTAR_VERSION} from ${URL}" >&2
curl -fsSL -o "/tmp/${ARCHIVE}" "${URL}"
# The F* 2026 archive has structure: ./fstar/bin/fstar.exe
# --strip-components=2 removes both './' and 'fstar/' so that
# bin/fstar.exe lands directly in $HOME/fstar/bin/fstar.exe.
mkdir -p "$HOME/fstar"
tar -xzf "/tmp/${ARCHIVE}" -C "$HOME/fstar" --strip-components=2
echo "$HOME/fstar/bin" >> "$GITHUB_PATH"

View file

@ -332,6 +332,9 @@ let rec gen_rhs_expr (e: cexpr) : Tot string (decreases e) =
^ gen_rhs_expr_list args ^ ")"
and gen_rhs_expr_list (es: list cexpr) : Tot string (decreases es) =
(* Comma-separated list for C++ function arguments. Empty list yields ""
so EApp fn [] produces fn_name(), which is valid C++ for zero-arg calls
(e.g. builder helper functions that take no explicit arguments). *)
match es with
| [] -> ""
| [e] -> gen_rhs_expr e