Class: ADSL::Parser::ASTAllOf

Inherits:
ASTNode show all
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

#list_entity_classes_readObject



973
974
975
# File 'lib/adsl/parser/ast_nodes.rb', line 973

def list_entity_classes_read
  Set[context.classes[@class_name.text]]
end

#to_adslObject



977
978
979
# File 'lib/adsl/parser/ast_nodes.rb', line 977

def to_adsl
  "allof(#{@class_name.text})"
end

#typecheck_and_resolve(context) ⇒ Object

Raises:



967
968
969
970
971
# File 'lib/adsl/parser/ast_nodes.rb', line 967

def typecheck_and_resolve(context)
  klass_node, klass = context.classes[@class_name.text]
  raise ADSLError, "Unknown class name #{@class_name.text} on line #{@class_name.lineno}" if klass.nil?
  return ADSL::DS::DSAllOf.new :klass => klass
end