[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-504950-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-504950-en":130},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","picat-programming-language-overview","Picat - Programming Language Overview","","Picat is a simple yet powerful, logic-based multi-paradigm programming language designed for general-purpose applications. It combines rule-based programming with declarative features such as explicit non-determinism, explicit uniﬁcation, functions, list comprehensions, constraints, and tabling. Alongside imperative constructs like assignments and loops, it supports symbolic computations as well as scripting and modeling tasks. Its virtual-machine implementation with garbage collection and dynamic memory management makes it efficient and scalable.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/picat-programming-language-overview/504950/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/picat-programming-language-overview/504950.png","ImageObject",300,407,{"name":42,"@type":43},"Alexandar","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-17","2026-10-04",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",10,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What kind of language is Picat?","Question",{"text":63,"@type":64},"Picat is a logic-based, multi-paradigm programming language aimed at general-purpose applications. It uses rule-based programming with pattern-matching rules.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Which declarative features does Picat provide?",{"text":68,"@type":64},"Picat includes explicit non-determinism, explicit uniﬁcation, functions, list comprehensions, constraints, and tabling to improve software development productivity.",{"name":70,"@type":61,"acceptedAnswer":71},"How does Picat implement efficient computation?",{"text":72,"@type":64},"The Picat implementation uses a virtual machine plus garbage collection and dynamic stack/data expansion when needed, supporting efficient and scalable execution.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},504950,1791290969,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,110,115,120,123,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":103,"slug":104},6,50,"technology",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":112,"show_sort_weight":113,"slug":114},8,"Research & Report",30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":55,"slug":125},"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":102,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":144,"read_time":145},962090768658,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Picat  \n2019  \nPicat  \nPicat is a simple, and yet powerful, logic-based multi-paradigm programming language aimed for general-purpose applications. Picat is a rule-based language, in which predicates, functions, and actors are deﬁned with pattern-matching rules. Picat incorporates many declarative language features for better productivity of software development, including explicit  \nnon-determinism, explicit uniﬁcation, functions, list comprehensions, constraints, and tabling. Picat also provides imperative language constructs, such as assignments and loops, for programming everyday things.  \nPicat  \nThe Picat implementation, which is based on a well-designed virtual machine and incorporates a memory manager that garbage-collects and expands the stacks and data areas when needed, is efﬁcient and scalable. Picat can be used for not only symbolic computations, which is a traditional application domain of declarative languages, but also for scripting and modeling tasks.  \nPicat  \nThe letters in the name summarize Picat's features:  \n1 Pattern-matching: Predicates and functions are deﬁned with pattern-matching rules.  \n2 Intuitive: Picat provides assignment and loop statements for programming everyday things.  \n3 Constraints: Picat supports constraint programming.  \n4 Actors: Actors are event-driven calls. An actor can be attached to a channel in order to watch and to process its events.  \n5 Tabling: Tabling can be used to store the results of certain calculations in memory, allowing the program to do a quick table lookup instead of repeatedly calculating a value.  \nPicat  \nPicat is a dynamically-typed language, in which type checking occurs at runtime. A variable name is an identiﬁer that begins with a capital letter or the underscore. An attributed variable is a variable that has a map of attribute-value pairs attached to it A value in Picat can be primitive or compound.  \nPicat  \nPicat> V1 = X1, V2 = _ab, V3 = _ % variables Picat> N1 = 12, N2 = 0xf3, N3 = 1 . 0e8 % numbers Picat> A1 = x1, A2 = ' AB', A3 = ” % atoms Picat> L = [a,b,c,d] % a list  \nPicat> write(\"hello\"++\"picat\") % strings [h,e,l,l,o,p,i,c,a,t]  \nPicat  \nPicat> S = $point(1 . 0,2 . 0) % a structure  \nPicat> S = new_struct(point,3) % create a structure S = point(_3b0,_3b4,_3b8)  \nPicat> A = {a,b,c,d} % an array  \nPicat> A = new_array(3) % create an array A = {_3b0,_3b4,_3b8}  \nPicat> M = new_map([one=1,two=2]) % create a map M = (map)[two = 2,one = 1]  \nPicat> M = new_set([one,two,three]) % create a map M = (map)[two,one,three]  \nPicat> X = 1 . .2 . . 10 % ranges  \nX = [1,3,5,7,9] Picat> X = 1   5  \nX = [1,2,3,4,5]        \nPicat  \nA predicate is deﬁned with pattern-matching rules. Picat has two types of rules: the nonbacktrackable rule Head, Cond => Body, and the backtrackable rule Head, Cond ?=> Body. The Head takes the form p(t1,   , tn) , where p is called the predicate name, and n is called the arity. The condition Cond, which is an optional goal, speciﬁes a condition under which the rule is applicable.  \nfib(0,F) => F=1 .  \nfib(N,F),N>1 => fib(N-1,F1),fib(N-2,F2),F=F1+F2 . fib(N,F) => throw $error(wrong_argument,fib,N) .  \nPicat  \nA function call always succeeds with a return value if no exception occurs. Functions are deﬁned with  \nnon-backtrackable rules in which the head is an equation F=X, where F is the function pattern in the form f(t1, . . . , tn)  \nand X holds the return value.  \nqsort([])=L => L=[] .  \nqsort([H | T])=L => L = qsort([E : E in T, E=\u003CH])++[Hqsort([E : E in T, E>H]) .  \nPicat  \n* Conditional Expressions  \nfib(N) = cond((N==0;N==1), 1,  \nfib(N-1)+fib(N-2))  \n* Foreach  \nforeach (E1 in D1, Cond1, . . . , En in Dn, Condn) Goal end  \n* While  \nwhile (Cond) Goal end  \n* Do while  \ndo Goal while (Cond)  \nPicat","cbCailGrxCQNJy21","https://ap.wps.com/l/cbCailGrxCQNJy21","pdf",85638,17,"English","# Picat Overview\n## Declarative and Imperative Features\n## Implementation and Use Cases\n## The Name as Feature Summary\n## Types, Variables, and Data Structures\n## Rules and Predicates\n## Functions and Conditional Expressions\n## Control Constructs","[{\"question\":\"What kind of language is Picat?\",\"answer\":\"Picat is a logic-based, multi-paradigm programming language aimed at general-purpose applications. It uses rule-based programming with pattern-matching rules.\"},{\"question\":\"Which declarative features does Picat provide?\",\"answer\":\"Picat includes explicit non-determinism, explicit uniﬁcation, functions, list comprehensions, constraints, and tabling to improve software development productivity.\"},{\"question\":\"How does Picat implement efficient computation?\",\"answer\":\"The Picat implementation uses a virtual machine plus garbage collection and dynamic stack/data expansion when needed, supporting efficient and scalable execution.\"}]","Picat - Programming Language Overview | PDF",1791080548,43]