Module("system/posix/file",[Imports([Import("system/posix/error"),Import("term/string")]),Strategies([SDefNoArgs("STDIN_FILENO",PrimNoArgs("\"SSL_STDIN_FILENO\"")),SDefNoArgs("STDOUT_FILENO",PrimNoArgs("\"SSL_STDOUT_FILENO\"")),SDefNoArgs("STDERR_FILENO",PrimNoArgs("\"SSL_STDERR_FILENO\""))]),Strategies([SDefNoArgs("isatty",Seq(Match(Var("filedes")),AM(Prim("\"SSL_isatty\"",[Var("filedes")]),NoAnnoList(Int("1")))))]),Strategies([SDefNoArgs("modification-time",Seq(Match(Var("file")),Prim("\"SSL_modification_time\"",[Var("file")])))]),Strategies([SDefNoArgs("link-file",Seq(Match(NoAnnoList(Tuple([Var("old"),Var("new")]))),Prim("\"SSL_link\"",[Var("old"),Var("new")])))]),Strategies([SDefNoArgs("readdir",Seq(Match(Var("dir")),Prim("\"SSL_readdir\"",[Var("dir")]))),SDefNoArgs("getcwd",PrimNoArgs("\"SSL_getcwd\"")),SDefNoArgs("chdir",LChoice(Seq(Match(Var("pathname")),AM(Prim("\"SSL_chdir\"",[Var("pathname")]),NoAnnoList(Int("0")))),BA(Seq(CallNoArgs(SVar("conc-strings")),Seq(CallNoArgs(SVar("perror")),Fail)),NoAnnoList(Tuple([NoAnnoList(Str("\"SSL/chdir: Cannot change current working directory to \"")),RootApp(Id)]))))),SDefT("mkdir",[],[DefaultVarDec("mode")],Where(LChoice(Seq(Match(Var("pathname")),AM(Prim("\"SSL_mkdir\"",[Var("pathname"),Var("mode")]),NoAnnoList(Int("0")))),BA(Seq(CallNoArgs(SVar("conc-strings")),Seq(CallNoArgs(SVar("perror")),Fail)),NoAnnoList(Tuple([NoAnnoList(Str("\"SSL/mkdir: Cannot create directory \"")),RootApp(Id)])))))),SDefNoArgs("mkdir",CallT(SVar("mkdir"),[],[NoAnnoList(List([NoAnnoList(Op("Read",[])),NoAnnoList(Op("Write",[])),NoAnnoList(Op("Execute",[]))]))])),SDefNoArgs("rmdir",LChoice(Seq(Match(Var("pathname")),AM(Prim("\"SSL_rmdir\"",[Var("pathname")]),NoAnnoList(Int("0")))),BA(Seq(CallNoArgs(SVar("conc-strings")),Seq(CallNoArgs(SVar("perror")),Fail)),NoAnnoList(Tuple([NoAnnoList(Str("\"SSL/rmdir: Cannot delete directory \"")),RootApp(Id)])))))]),Strategies([SDefNoArgs("creat",Seq(Match(Var("pathname")),Prim("\"SSL_creat\"",[Var("pathname")]))),SDefNoArgs("open",Seq(Match(Var("pathname")),Prim("\"SSL_open\"",[Var("pathname")]))),SDefNoArgs("close",Seq(Match(Var("fd")),Prim("\"SSL_close\"",[Var("fd")]))),SDefNoArgs("dup",Seq(Match(Var("fd")),Prim("\"SSL_dup\"",[Var("fd")]))),SDefNoArgs("dup2",Seq(Match(NoAnnoList(Tuple([Var("fd1"),Var("fd2")]))),Prim("\"SSL_dup2\"",[Var("fd1"),Var("fd2")]))),SDefNoArgs("access",Seq(Match(NoAnnoList(Tuple([Var("path"),Var("permissions")]))),Prim("\"SSL_access\"",[Var("path"),Var("permissions")])))]),Signature([Constructors([OpDecl("F_OK",ConstType(SortNoArgs("AccessPermission"))),OpDecl("R_OK",ConstType(SortNoArgs("AccessPermission"))),OpDecl("W_OK",ConstType(SortNoArgs("AccessPermission"))),OpDecl("X_OK",ConstType(SortNoArgs("AccessPermission")))])]),Strategies([SDefNoArgs("fdopen",Seq(Match(NoAnnoList(Tuple([Var("fd"),Var("mode")]))),Seq(Prim("\"SSL_fdopen\"",[Var("fd"),Var("mode")]),Build(NoAnnoList(Op("Stream",[RootApp(Id)])))))),SDefNoArgs("fileno",Seq(Match(NoAnnoList(Op("Stream",[Var("stream")]))),Prim("\"SSL_fileno\"",[Var("stream")]))),SDefNoArgs("filemode",LChoice(Seq(Match(Var("pathname")),Seq(Prim("\"SSL_filemode\"",[Var("pathname")]),Match(NoAnnoList(Tuple([RootApp(Id),NoAnnoList(Int("0"))]))))),BA(Seq(CallNoArgs(SVar("conc-strings")),Seq(CallNoArgs(SVar("perror")),Fail)),NoAnnoList(Tuple([NoAnnoList(Str("\"SSL/filemode: Cannot get filemode from \"")),RootApp(Id)]))))),SDefNoArgs("isreg",Seq(Match(Var("mode")),Prim("\"SSL_S_ISREG\"",[Var("mode")]))),SDefNoArgs("isdir",Seq(Match(Var("mode")),Prim("\"SSL_S_ISDIR\"",[Var("mode")]))),SDefNoArgs("ischr",Seq(Match(Var("mode")),Prim("\"SSL_S_ISCHR\"",[Var("mode")]))),SDefNoArgs("isblk",Seq(Match(Var("mode")),Prim("\"SSL_S_ISBLK\"",[Var("mode")]))),SDefNoArgs("isfifo",Seq(Match(Var("mode")),Prim("\"SSL_S_ISFIFO\"",[Var("mode")]))),SDefNoArgs("islnk",Seq(Match(Var("mode")),Prim("\"SSL_S_ISLNK\"",[Var("mode")]))),SDefNoArgs("issock",Seq(Match(Var("mode")),Prim("\"SSL_S_ISSOCK\"",[Var("mode")])))]),Strategies([SDefNoArgs("pipe",PrimNoArgs("\"SSL_pipe\""))]),Signature([Constructors([OpDecl("Pipe",FunType([ConstType(SortNoArgs("Int")),ConstType(SortNoArgs("Int"))],ConstType(SortNoArgs("Pipe"))))])])])
