Class: Bparity::Synthesis::Synthesizer
- Inherits:
-
Object
- Object
- Bparity::Synthesis::Synthesizer
- Defined in:
- lib/bparity/synthesis.rb
Constant Summary collapse
- MAX_EXAMPLES_PER_OPERATION =
50- ASSUMPTIONS =
[ { "id" => "H1", "name" => "world_freeze", "enforced_by" => "runtime monitor" }, { "id" => "H2", "name" => "dynamic_methods_declared", "enforced_by" => "discovery" }, { "id" => "H3", "name" => "no_eval", "enforced_by" => "Prism static detection" }, { "id" => "H4", "name" => "runtime_identity_unobserved", "enforced_by" => "serializer" }, { "id" => "H5", "name" => "ieee_754", "enforced_by" => "declaration only" }, { "id" => "H6", "name" => "exceptions_are_outputs", "enforced_by" => "recorder" }, { "id" => "H7", "name" => "single_thread", "enforced_by" => "declaration only" } ].freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(records:, static_examples: [], source_facts: []) ⇒ Synthesizer
constructor
A new instance of Synthesizer.
Constructor Details
#initialize(records:, static_examples: [], source_facts: []) ⇒ Synthesizer
Returns a new instance of Synthesizer.
318 319 320 321 322 323 |
# File 'lib/bparity/synthesis.rb', line 318 def initialize(records:, static_examples: [], source_facts: []) @records = records @static_examples = static_examples @source_facts = source_facts @invariant_miner = InvariantMiner.new end |
Instance Method Details
#call ⇒ Object
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/bparity/synthesis.rb', line 325 def call subject_items = subjects { "spec_bundle_version" => SpecBundle::VERSION, "generated_at" => Time.now.utc.iso8601, "conformance_mode" => "refinement", "canonicalization" => canonicalization, "verification_assumptions" => ASSUMPTIONS, "subjects" => subject_items, "lts" => learned_models, "static_facts" => @source_facts.reject { |fact| fact["kind"] == "uncovered_branch" }, "gaps" => synthesis_gaps, "waivers" => [] } end |