1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283(**************************************************************************)(* *)(* This file is part of Frama-C. *)(* *)(* Copyright (C) 2007-2024 *)(* CEA (Commissariat à l'énergie atomique et aux énergies *)(* alternatives) *)(* *)(* you can redistribute it and/or modify it under the terms of the GNU *)(* Lesser General Public License as published by the Free Software *)(* Foundation, version 2.1. *)(* *)(* It is distributed in the hope that it will be useful, *)(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)(* GNU Lesser General Public License for more details. *)(* *)(* See the GNU Lesser General Public License version 2.1 *)(* for more details (enclosed in the file licenses/LGPLv2.1). *)(* *)(**************************************************************************)openCil_typesopenCil_datatypetypeacs=|ExpofStmt.t*exp|LvalofStmt.t*lval|InitofStmt.t*varinfo|TermofProperty.t*term_lvalletcompare(a:acs)(b:acs):int=matcha,bwith|Init(sa,xa),Init(sb,xb)->letcmp=Stmt.comparesasbinifcmp<>0thencmpelseVarinfo.comparexaxb|Init_,_->(-1)|_,Init_->(+1)|Lval(sa,la),Lval(sb,lb)->letcmp=Stmt.comparesasbinifcmp<>0thencmpelseLval.comparelalb|Lval_,_->(-1)|_,Lval_->(+1)|Exp(sa,ea),Exp(sb,eb)->letcmp=Stmt.comparesasbinifcmp<>0thencmpelseExp.compareeaeb|Exp_,_->(-1)|_,Exp_->(+1)|Term(sa,ta),Term(sb,tb)->letcmp=Property.comparesasbinifcmp<>0thencmpelseTerm_lval.comparetatbletpstmtfmt(s:stmt)=matchs.labelswith|Label(l,_,_)::_->Format.pp_print_stringfmtl|_->letloc,_=Stmt.locsinFormat.fprintffmt"L%d"loc.pos_lnumletprettyfmt=function|Init(s,x)->Format.fprintffmt"%a@%a"Varinfo.prettyxpstmts|Exp(s,e)->Format.fprintffmt"%a@%a"Exp.prettyepstmts|Lval(s,l)->Format.fprintffmt"%a@%a"Lval.prettylpstmts|Term(s,l)->Format.fprintffmt"%a@%s"Term_lval.prettyl(Property.Names.get_prop_name_ids)lettypeof=function|Init(_,x)->x.vtype|Lval(_,lv)->Cil.typeOfLvallv|Exp(_,e)->Cil.typeOfe|Term(_,lt)->matchCil.typeOfTermLvalltwith|Ctypety->ty|_->Cil_const.voidTypemoduleSet=Set.Make(structtypet=acsletcompare=compareend)