@@ -394,12 +394,12 @@ llvm_compositional_extract (Some lm) nm func_name lemmas checkSat setup tactic =
394394 lemmas' <- checkModuleCompatibility lm lemmas
395395 withMethodSpec checkSat lm nm setup $ \ cc method_spec ->
396396 do let value_input_parameters = mapMaybe
397- (\ (_, setup_value) -> setupValueAsExtCns setup_value)
397+ (\ (_, setup_value) -> setupValueAsVariable setup_value)
398398 (Map. elems $ method_spec ^. MS. csArgBindings)
399399 let reference_input_parameters = mapMaybe
400400 (\ case
401- LLVMPointsTo _ _ _ setup_value -> llvmPointsToValueAsExtCns setup_value
402- LLVMPointsToBitfield _ _ _ val -> setupValueAsExtCns val)
401+ LLVMPointsTo _ _ _ setup_value -> llvmPointsToValueAsVariable setup_value
402+ LLVMPointsToBitfield _ _ _ val -> setupValueAsVariable val)
403403 (method_spec ^. MS. csPreState ^. MS. csPointsTos)
404404 let input_parameters = nub $ value_input_parameters ++ reference_input_parameters
405405 let pre_free_variables = Map. fromList $
@@ -416,13 +416,13 @@ llvm_compositional_extract (Some lm) nm func_name lemmas checkSat setup tactic =
416416
417417 let return_output_parameter =
418418 case method_spec ^. MS. csRetValue of
419- Just setup_value -> setupValueAsExtCns setup_value
419+ Just setup_value -> setupValueAsVariable setup_value
420420 Nothing -> Nothing
421421 let reference_output_parameters =
422422 mapMaybe
423423 (\ case
424- LLVMPointsTo _ _ _ setup_value -> llvmPointsToValueAsExtCns setup_value
425- LLVMPointsToBitfield _ _ _ val -> setupValueAsExtCns val)
424+ LLVMPointsTo _ _ _ setup_value -> llvmPointsToValueAsVariable setup_value
425+ LLVMPointsToBitfield _ _ _ val -> setupValueAsVariable val)
426426 (method_spec ^. MS. csPostState ^. MS. csPointsTos)
427427 let output_parameters =
428428 nub $ filter (isNothing . (Map. !?) pre_free_variables) $
@@ -458,7 +458,7 @@ llvm_compositional_extract (Some lm) nm func_name lemmas checkSat setup tactic =
458458 extracted_func_const <-
459459 io $ scConstant' shared_context nmi extracted_func
460460 =<< scTypeOf shared_context extracted_func
461- input_terms <- io $ traverse (scExtCns shared_context) input_parameters
461+ input_terms <- io $ traverse (scVariable shared_context) input_parameters
462462 applied_extracted_func <- io $ scApplyAll shared_context extracted_func_const input_terms
463463 applied_extracted_func_selectors <-
464464 io $ forM [1 .. (length output_parameters)] $ \ i ->
@@ -512,17 +512,17 @@ llvm_compositional_extract (Some lm) nm func_name lemmas checkSat setup tactic =
512512 ps <- io (MS. mkProvedSpec MS. SpecProved extracted_method_spec stats vcs lemmaSet diff)
513513 returnLLVMProof (SomeLLVM ps)
514514
515- setupValueAsExtCns :: SetupValue (LLVM arch ) -> Maybe (ExtCns Term )
516- setupValueAsExtCns =
515+ setupValueAsVariable :: SetupValue (LLVM arch ) -> Maybe (ExtCns Term )
516+ setupValueAsVariable =
517517 \ case
518- SetupTerm term -> asExtCns $ ttTerm term
518+ SetupTerm term -> asVariable $ ttTerm term
519519 _ -> Nothing
520520
521- llvmPointsToValueAsExtCns :: LLVMPointsToValue arch -> Maybe (ExtCns Term )
522- llvmPointsToValueAsExtCns =
521+ llvmPointsToValueAsVariable :: LLVMPointsToValue arch -> Maybe (ExtCns Term )
522+ llvmPointsToValueAsVariable =
523523 \ case
524- ConcreteSizeValue val -> setupValueAsExtCns val
525- SymbolicSizeValue arr _sz -> asExtCns $ ttTerm arr
524+ ConcreteSizeValue val -> setupValueAsVariable val
525+ SymbolicSizeValue arr _sz -> asVariable $ ttTerm arr
526526
527527-- | Check that all the overrides/lemmas were actually from this module
528528checkModuleCompatibility ::
@@ -1599,7 +1599,7 @@ verifyPoststate cc mspec env0 globals ret mdMap invSubst =
15991599 [ (ecVarIndex ec, ec)
16001600 | tt <- mspec ^. MS. csPreState . MS. csFreshVars
16011601 , let ec = tecExt tt ]
1602- terms0 <- io $ traverse (scExtCns sc) ecs0
1602+ terms0 <- io $ traverse (scVariable sc) ecs0
16031603
16041604 let initialFree =
16051605 Set. fromList
@@ -1888,7 +1888,7 @@ setupArg sc sym ecRef tp = do
18881888 let len = Seq. length ecs
18891889 ec <- scFreshEC sc (" arg_" <> Text. pack (show len)) sc_tp
18901890 writeIORef ecRef (ecs Seq. |> TypedExtCns cty ec)
1891- scFlatTermF sc ( ExtCns ec)
1891+ scVariable sc ec
18921892
18931893setupArgs ::
18941894 SharedContext ->
0 commit comments