Class: ADSL::Parser::ASTNot
- 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
1272 1273 1274 |
# File 'lib/adsl/parser/ast_nodes.rb', line 1272 def to_adsl "not(#{ @subformula.to_adsl })" end |
#typecheck_and_resolve(context) ⇒ Object
1265 1266 1267 1268 1269 1270 |
# File 'lib/adsl/parser/ast_nodes.rb', line 1265 def typecheck_and_resolve(context) subformula = @subformula.typecheck_and_resolve context raise "Substatement not a formula on line #{@subformula.lineno}" unless subformula.type == :formula return subformula.subformula if subformula.is_a? ADSL::DS::DSNot return ADSL::DS::DSNot.new :subformula => subformula end |