Class: ADSL::Parser::ASTEqual
- Defined in:
- lib/adsl/parser/ast_nodes.rb
Instance Method Summary collapse
Methods inherited from ASTNode
#==, #adsl_ast, #adsl_ast_size, #block_replace, #dup, #hash, is_formula?, is_objset?, is_statement?, node_type, #objset_has_side_effects?, #optimize, #preorder_traverse
Methods included from Verification::FormulaGenerators
#[], #and, #binary_op, #binary_op_with_any_number_of_params, #equiv, #exists, #false, #forall, #handle_quantifier, #implies, #in_formula_builder, #not, #or, #true
Methods included from Verification::Utils
#classname_for_classname, #infer_classname_from_varname, #t
Instance Method Details
#to_adsl ⇒ Object
1372 1373 1374 |
# File 'lib/adsl/parser/ast_nodes.rb', line 1372 def to_adsl "equal(#{ @objsets.map(&:to_adsl).join ", " })" end |
#typecheck_and_resolve(context) ⇒ Object
1362 1363 1364 1365 1366 1367 1368 1369 1370 |
# File 'lib/adsl/parser/ast_nodes.rb', line 1362 def typecheck_and_resolve(context) objsets = @objsets.map{ |o| o.typecheck_and_resolve context } types = objsets.map{ |o| o.type }.select{ |o| not o.nil? } # will raise an error if no single common supertype exists ADSL::DS::DSClass.common_supertype(types) return ADSL::DS::DSEqual.new :objsets => objsets end |