let yyact = [|
(fun _ -> failwith "parser")
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 1 : 'formula) in
Obj.repr(
# 85 "src/aorai/ltlparser.mly"
((_1,observed_expressions))
# 333 "src/aorai/ltlparser.ml"
: (Ltlast.formula * (string, (Cil_types.exp* string*Cil_types.predicate)) Hashtbl.t)))
; (fun __caml_parser_env ->
Obj.repr(
# 91 "src/aorai/ltlparser.mly"
(Ltlast.LTrue)
# 339 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
Obj.repr(
# 93 "src/aorai/ltlparser.mly"
(Ltlast.LFalse)
# 345 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _2 = (Parsing.peek_val __caml_parser_env 1 : 'formula) in
Obj.repr(
# 95 "src/aorai/ltlparser.mly"
( _2 )
# 352 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _2 = (Parsing.peek_val __caml_parser_env 0 : 'formula) in
Obj.repr(
# 98 "src/aorai/ltlparser.mly"
( Ltlast.LGlobally(_2) )
# 359 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _2 = (Parsing.peek_val __caml_parser_env 0 : 'formula) in
Obj.repr(
# 100 "src/aorai/ltlparser.mly"
( Ltlast.LFatally(_2) )
# 366 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'formula) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'formula) in
Obj.repr(
# 102 "src/aorai/ltlparser.mly"
( Ltlast.LUntil(_1,_3) )
# 374 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'formula) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'formula) in
Obj.repr(
# 104 "src/aorai/ltlparser.mly"
( Ltlast.LRelease(_1,_3) )
# 382 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _2 = (Parsing.peek_val __caml_parser_env 0 : 'formula) in
Obj.repr(
# 106 "src/aorai/ltlparser.mly"
( Ltlast.LNext(_2) )
# 389 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'formula) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'formula) in
Obj.repr(
# 109 "src/aorai/ltlparser.mly"
( Ltlast.LOr(_1,_3) )
# 397 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'formula) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'formula) in
Obj.repr(
# 111 "src/aorai/ltlparser.mly"
( Ltlast.LAnd(_1,_3) )
# 405 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _2 = (Parsing.peek_val __caml_parser_env 0 : 'formula) in
Obj.repr(
# 113 "src/aorai/ltlparser.mly"
( Ltlast.LNot(_2) )
# 412 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'formula) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'formula) in
Obj.repr(
# 115 "src/aorai/ltlparser.mly"
( Ltlast.LImplies(_1,_3) )
# 420 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'formula) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'formula) in
Obj.repr(
# 117 "src/aorai/ltlparser.mly"
( Ltlast.LIff(_1,_3) )
# 428 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _3 = (Parsing.peek_val __caml_parser_env 1 : string) in
Obj.repr(
# 120 "src/aorai/ltlparser.mly"
( Ltlast.LCall(_3))
# 435 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _3 = (Parsing.peek_val __caml_parser_env 1 : string) in
Obj.repr(
# 122 "src/aorai/ltlparser.mly"
( Ltlast.LReturn(_3))
# 442 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _3 = (Parsing.peek_val __caml_parser_env 1 : string) in
Obj.repr(
# 124 "src/aorai/ltlparser.mly"
( Ltlast.LCallOrReturn(_3))
# 449 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : 'logic_relation) in
Obj.repr(
# 128 "src/aorai/ltlparser.mly"
(
let id = get_fresh_ident () in
let (pred,exp) = _1 in
Hashtbl.add observed_expressions id
(exp, (Pretty_utils.sfprintf "%a" Cil.d_exp exp), pred);
Ltlast.LIdent(id)
)
# 462 "src/aorai/ltlparser.ml"
: 'formula))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'arith_relation) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'arith_relation) in
Obj.repr(
# 141 "src/aorai/ltlparser.mly"
( ( Prel(Cil_types.Req, Logic_utils.expr_to_term ~cast:true _1 ,Logic_utils.expr_to_term ~cast:true _3),
new_exp (BinOp(Cil_types.Eq, _1 , _3 , Cil.intType)) )
)
# 472 "src/aorai/ltlparser.ml"
: 'logic_relation))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'arith_relation) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'arith_relation) in
Obj.repr(
# 145 "src/aorai/ltlparser.mly"
( ( Prel(Cil_types.Rlt, Logic_utils.expr_to_term ~cast:true _1 , Logic_utils.expr_to_term ~cast:true _3),
new_exp (BinOp(Cil_types.Lt, _1 , _3 , Cil.intType)) )
)
# 482 "src/aorai/ltlparser.ml"
: 'logic_relation))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'arith_relation) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'arith_relation) in
Obj.repr(
# 149 "src/aorai/ltlparser.mly"
( ( Prel(Cil_types.Rgt, Logic_utils.expr_to_term ~cast:true _1 , Logic_utils.expr_to_term ~cast:true _3),
new_exp(BinOp(Cil_types.Gt, _1 , _3 , Cil.intType)) )
)
# 492 "src/aorai/ltlparser.ml"
: 'logic_relation))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'arith_relation) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'arith_relation) in
Obj.repr(
# 153 "src/aorai/ltlparser.mly"
( ( Prel(Cil_types.Rle, Logic_utils.expr_to_term ~cast:true _1 , Logic_utils.expr_to_term ~cast:true _3),
new_exp (BinOp(Cil_types.Le, _1 , _3 , Cil.intType) ))
)
# 502 "src/aorai/ltlparser.ml"
: 'logic_relation))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'arith_relation) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'arith_relation) in
Obj.repr(
# 157 "src/aorai/ltlparser.mly"
( ( Prel(Cil_types.Rge, Logic_utils.expr_to_term ~cast:true _1 , Logic_utils.expr_to_term ~cast:true _3),
new_exp (BinOp(Cil_types.Ge, _1 , _3 , Cil.intType) ))
)
# 512 "src/aorai/ltlparser.ml"
: 'logic_relation))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'arith_relation) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'arith_relation) in
Obj.repr(
# 161 "src/aorai/ltlparser.mly"
( ( Prel(Cil_types.Rneq,Logic_utils.expr_to_term ~cast:true _1 , Logic_utils.expr_to_term ~cast:true _3),
new_exp (BinOp(Cil_types.Ne , _1 , _3 , Cil.intType) ))
)
# 522 "src/aorai/ltlparser.ml"
: 'logic_relation))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : 'arith_relation) in
Obj.repr(
# 165 "src/aorai/ltlparser.mly"
( ( Prel(Cil_types.Rneq,Logic_utils.expr_to_term ~cast:true _1 ,
Logic_const.term
(TConst( CInt64(Int64.of_int 0,IInt,Some("0"))))
(Ctype Cil.intType)),
_1)
)
# 534 "src/aorai/ltlparser.ml"
: 'logic_relation))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'arith_relation_mul) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'arith_relation) in
Obj.repr(
# 177 "src/aorai/ltlparser.mly"
( new_exp (BinOp(Cil_types.PlusA, _1 , _3 , Cil.intType)) )
# 542 "src/aorai/ltlparser.ml"
: 'arith_relation))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'arith_relation_mul) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'arith_relation) in
Obj.repr(
# 179 "src/aorai/ltlparser.mly"
( new_exp (BinOp(Cil_types.MinusA, _1 , _3 , Cil.intType)) )
# 550 "src/aorai/ltlparser.ml"
: 'arith_relation))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : 'arith_relation_mul) in
Obj.repr(
# 181 "src/aorai/ltlparser.mly"
( _1 )
# 557 "src/aorai/ltlparser.ml"
: 'arith_relation))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'arith_relation_mul) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'access_or_const) in
Obj.repr(
# 187 "src/aorai/ltlparser.mly"
( new_exp (BinOp(Cil_types.Div, _1 , _3 , Cil.intType)) )
# 565 "src/aorai/ltlparser.ml"
: 'arith_relation_mul))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'arith_relation_mul) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'access_or_const) in
Obj.repr(
# 189 "src/aorai/ltlparser.mly"
( new_exp (BinOp(Cil_types.Mult, _1 , _3 , Cil.intType)) )
# 573 "src/aorai/ltlparser.ml"
: 'arith_relation_mul))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'arith_relation_mul) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'access_or_const) in
Obj.repr(
# 191 "src/aorai/ltlparser.mly"
( new_exp (BinOp(Cil_types.Mod, _1 , _3 , Cil.intType)) )
# 581 "src/aorai/ltlparser.ml"
: 'arith_relation_mul))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : 'access_or_const) in
Obj.repr(
# 193 "src/aorai/ltlparser.mly"
( _1 )
# 588 "src/aorai/ltlparser.ml"
: 'arith_relation_mul))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in
Obj.repr(
# 199 "src/aorai/ltlparser.mly"
( new_exp (Const(CInt64(Int64.of_string _1,IInt, Some(_1)))))
# 595 "src/aorai/ltlparser.ml"
: 'access_or_const))
; (fun __caml_parser_env ->
let _2 = (Parsing.peek_val __caml_parser_env 0 : string) in
Obj.repr(
# 201 "src/aorai/ltlparser.mly"
( new_exp (Const(CInt64(Int64.of_string ("-"^_2),IInt, Some("-"^_2)))))
# 602 "src/aorai/ltlparser.ml"
: 'access_or_const))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : 'access) in
Obj.repr(
# 203 "src/aorai/ltlparser.mly"
( new_exp (Lval(_1)) )
# 609 "src/aorai/ltlparser.ml"
: 'access_or_const))
; (fun __caml_parser_env ->
let _2 = (Parsing.peek_val __caml_parser_env 1 : 'arith_relation) in
Obj.repr(
# 205 "src/aorai/ltlparser.mly"
( _2 )
# 616 "src/aorai/ltlparser.ml"
: 'access_or_const))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'access_array) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : 'access) in
Obj.repr(
# 212 "src/aorai/ltlparser.mly"
( Aorai_option.fatal "NOT YET IMPLEMENTED : A->B pointed structure filed access." )
# 624 "src/aorai/ltlparser.ml"
: 'access))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 2 : 'access) in
let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in
Obj.repr(
# 214 "src/aorai/ltlparser.mly"
( let (my_host,my_offset) = (_1) in
let new_offset = Utils_parser.add_offset my_offset (Utils_parser.get_new_offset my_host my_offset _3) in
(my_host,new_offset))
# 635 "src/aorai/ltlparser.ml"
: 'access))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : 'access_array) in
Obj.repr(
# 219 "src/aorai/ltlparser.mly"
(_1)
# 642 "src/aorai/ltlparser.ml"
: 'access))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 3 : 'access_array) in
let _3 = (Parsing.peek_val __caml_parser_env 1 : 'access_or_const) in
Obj.repr(
# 223 "src/aorai/ltlparser.mly"
( Cil.addOffsetLval (Index (_3,NoOffset)) _1)
# 650 "src/aorai/ltlparser.ml"
: 'access_array))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : 'access_leaf) in
Obj.repr(
# 225 "src/aorai/ltlparser.mly"
(_1)
# 657 "src/aorai/ltlparser.ml"
: 'access_array))
; (fun __caml_parser_env ->
let _2 = (Parsing.peek_val __caml_parser_env 0 : 'access) in
Obj.repr(
# 230 "src/aorai/ltlparser.mly"
( Aorai_option.fatal "NOT YET IMPLEMENTED : &A 'address of' access." )
# 664 "src/aorai/ltlparser.ml"
: 'access_leaf))
; (fun __caml_parser_env ->
let _2 = (Parsing.peek_val __caml_parser_env 0 : 'access) in
Obj.repr(
# 232 "src/aorai/ltlparser.mly"
( Aorai_option.fatal "NOT YET IMPLEMENTED : *A dereferencement access.")
# 671 "src/aorai/ltlparser.ml"
: 'access_leaf))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in
Obj.repr(
# 234 "src/aorai/ltlparser.mly"
( Cil.var ( Data_for_aorai.get_varinfo _1) )
# 678 "src/aorai/ltlparser.ml"
: 'access_leaf))
; (fun __caml_parser_env ->
let _2 = (Parsing.peek_val __caml_parser_env 1 : 'access) in
Obj.repr(
# 236 "src/aorai/ltlparser.mly"
( _2 )
# 685 "src/aorai/ltlparser.ml"
: 'access_leaf))
; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0)))
|]