Instructions: Replace the template text and remove irrelevant text (including this line)
Describe the bug
A clear and concise description of what the bug is.
(Issues related to the runtime files should be reported to their maintainer, check the file header.)
To Reproduce
vimset ft=smlDefinition eval_const_def:
(eval_const g (IntC W1 i) = FlatV (W1V (i2w i))) ∧
(eval_const g (IntC W8 i) = FlatV (W8V (i2w i))) ∧
(eval_const g (IntC W32 i) = FlatV (W32V (i2w i))) ∧
(eval_const g (IntC W64 i) = FlatV (W64V (i2w i))) ∧
(eval_const g (StrC tconsts) = AggV (map (eval_const g) (map snd tconsts))) ∧
(eval_const g (ArrC tconsts) = AggV (map (eval_const g) (map snd tconsts))) ∧
(eval_const g (GepC ty ptr (t, idx) indices) =
case (eval_const g ptr, signed_v_to_num (eval_const g idx)) of
| (FlatV (PtrV ptr), Some n) =>
let ns = map (λ(t,ci). case signed_v_to_num (eval_const g ci) of None => 0 | Some n => n) indices in
(case get_offset ty ns of
| None => FlatV UndefV
| Some off => FlatV (PtrV (n2w ((w2n ptr) + (sizeof ty) * n + off))))
| _ => FlatV UndefV) ∧
(eval_const g (GlobalC var) =
case flookup g var of
| None => FlatV (PtrV 0w)
| Some (s,w) => FlatV (PtrV w)) ∧
(eval_const g UndefC = FlatV UndefV)
Termination
WF_REL_TAC `measure (const_size o snd)` >> rw [listTheory.MEM_MAP] >>
TRY
(TRY (PairCases_on `y`) >> simp [] >>
Induct_on `tconsts` >> rw [] >> rw [definition "const_size_def"] >>
res_tac >> fs [] >> NO_TAC) >>
Induct_on `indices` >> rw [] >> rw [definition "const_size_def"] >>
fs []
EndOne more case are these lines:
open HolKernel boolLib bossLib Parse; open llistTheory pathTheory; open settingsTheory memory_modelTheory; new_theory "llvm"; numLib.prefer_num ();
Expected behavior
Do not highlight these braces with red color.
Screenshots
Environment (please complete the following information):
Additional context
The original file with this source code is from https://github.com/facebook/infer/blob/master/sledge/semantics/llvmScript.sml
cc @mmottl
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
have you contacted the maintainer of the file?
Yes, I put him in cc of this issue.
well, it's a bit strange to open the issue here, when there is a specific method to contact the maintainer. Oh well.
I don't actively maintain the SML Vim file anymore. Though you can submit a PR at https://github.com/mmottl/vim-files, I don't usually sync my Vim files upstream anymore. I guess the fastest way to get anything fixed upstream would be to open a PR right here (please correct me if there is a better way).
That's some sort of HOL variant not SML.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()