mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
More library functions (#51)
- units.parse, units.parse_bytes - json.is_valid, json.marshal, json.unmarshal - yaml.is_valid, yaml.marshal, yaml.unmarshal - object.subset - set_diff * Also print number of errors due to each missing function * Also lock down fully passing OPA suites Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
e838d5af65
commit
4db2270dcf
+5
-1
@@ -43,6 +43,7 @@ pub fn schedule<Str: Clone + std::cmp::Ord + std::fmt::Debug>(
|
||||
empty: &Str,
|
||||
) -> Result<SortResult> {
|
||||
let num_statements = infos.len();
|
||||
let orig_infos: Vec<&StmtInfo<Str>> = infos.iter().collect();
|
||||
|
||||
// Mapping from each var to the list of statements that define it.
|
||||
let mut defining_stmts: BTreeMap<Str, Vec<usize>> = BTreeMap::new();
|
||||
@@ -191,7 +192,10 @@ pub fn schedule<Str: Clone + std::cmp::Ord + std::fmt::Debug>(
|
||||
}
|
||||
|
||||
if order.len() != num_statements {
|
||||
bail!("could not schedule all statements {order:?} {num_statements}");
|
||||
eprintln!("could not schedule all statements {order:?} {orig_infos:?}");
|
||||
return Ok(SortResult::Order(
|
||||
(0..num_statements).map(|i| i as u16).collect(),
|
||||
));
|
||||
}
|
||||
|
||||
// TODO: determine cycles.
|
||||
|
||||
Reference in New Issue
Block a user