class Z3::ReSort
Attributes
Public Class Methods
Source
# File lib/z3/sort/re_sort.rb, line 4 def initialize(seq_sort) @seq_sort = seq_sort super LowLevel.mk_re_sort(seq_sort) end
Calls superclass method
Public Instance Methods
Source
# File lib/z3/sort/re_sort.rb, line 40 def all_char new(LowLevel.mk_re_allchar(self)) end
Source
# File lib/z3/sort/re_sort.rb, line 32 def empty new(LowLevel.mk_re_empty(self)) end
‘re.none`, `re.all` and `re.allchar` - the empty language, every sequence, and every one element sequence. Values rather than operations, so they live here the way BoolSort#True does.
Source
# File lib/z3/sort/re_sort.rb, line 17 def from_const(val) new(LowLevel.mk_seq_to_re(seq_sort.from_const(val))) end
Source
# File lib/z3/sort/re_sort.rb, line 23 def from_value(v) return v if v.sort == self raise cant_convert(v) unless v.sort == seq_sort new(LowLevel.mk_seq_to_re(v)) end
The same conversion for a sequence that’s already an Expr, so a StringExpr or a SeqExpr of the basis sort can stand in for a regex too