1 Chord: An Extensible Program Analysis Framework Using CnC Mayur Naik Intel Labs Berkeley.

Slides:



Advertisements
Similar presentations
Mechanizing Program Analysis With Chord Mayur Naik Intel Labs Berkeley.
Advertisements

.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
A Randomized Dynamic Program Analysis for Detecting Real Deadlocks Pallavi Joshi  Chang-Seo Park  Koushik Sen  Mayur Naik ‡  Par Lab, EECS, UC Berkeley‡
Effective Static Deadlock Detection
1 Chao Wang, Yu Yang*, Aarti Gupta, and Ganesh Gopalakrishnan* NEC Laboratories America, Princeton, NJ * University of Utah, Salt Lake City, UT Dynamic.
Compilation 2011 Static Analysis Johnni Winther Michael I. Schwartzbach Aarhus University.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
Pointer Analysis – Part I Mayur Naik Intel Research, Berkeley CS294 Lecture March 17, 2009.
Conditional Must Not Aliasing for Static Race Detection Mayur Naik Alex Aiken Stanford University.
A Randomized Dynamic Program Analysis for Detecting Real Deadlocks Koushik Sen CS 265.
5.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 5: CPU Scheduling.
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
Cloud Computing Resource provisioning Keke Chen. Outline  For Web applications statistical Learning and automatic control for datacenters  For data.
Vertically Integrated Analysis and Transformation for Embedded Software John Regehr University of Utah.
Next Section: Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis (Wilson & Lam) –Unification.
Mayur Naik Alex Aiken John Whaley Stanford University Effective Static Race Detection for Java.
A High Performance Application Representation for Reconfigurable Systems Wenrui GongGang WangRyan Kastner Department of Electrical and Computer Engineering.
1 Control Flow Analysis Mooly Sagiv Tel Aviv University Textbook Chapter 3
1 Refinement-Based Context-Sensitive Points-To Analysis for Java Manu Sridharan, Rastislav Bodík UC Berkeley PLDI 2006.
Software Reliability Methods Sorin Lerner. Software reliability methods: issues What are the issues?
Compile-Time Deallocation of Individual Objects Sigmund Cherem and Radu Rugina International Symposium on Memory Management June, 2006.
Pointer analysis. Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis Andersen and.
Memory Management for Real-Time Java Wes Beebee and Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology Supported by: DARPA.
Data Structures and Programming.  John Edgar2.
Impact Analysis of Database Schema Changes Andy Maule, Wolfgang Emmerich and David S. Rosenblum London Software Systems Dept. of Computer Science, University.
SEC(R) 2008 Intel® Concurrent Collections for C++ - a model for parallel programming Nikolay Kurtov Software and Services.
P ARALLEL P ROCESSING I NSTITUTE · F UDAN U NIVERSITY 1.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University STATIC ANALYSES FOR JAVA IN THE PRESENCE OF DISTRIBUTED COMPONENTS AND.
The Quest for Minimal Program Abstractions Mayur Naik Georgia Tech Ravi Mangal and Xin Zhang (Georgia Tech), Percy Liang (Stanford), Mooly Sagiv (Tel-Aviv.
Finding Optimum Abstractions in Parametric Dataflow Analysis Xin Zhang Georgia Tech Mayur Naik Georgia Tech Hongseok Yang University of Oxford.
Magnetic Field Measurement System as Part of a Software Family Jerzy M. Nogiec Joe DiMarco Fermilab.
Clone-Cloud. Motivation With the increasing use of mobile devices, mobile applications with richer functionalities are becoming ubiquitous But mobile.
Deadlock Detection Nov 26, 2012 CS 8803 FPL 1. Part I Static Deadlock Detection Reference: Effective Static Deadlock Detection [ICSE’09]
Conrad Benham Java Opcode and Runtime Data Analysis By: Conrad Benham Supervisor: Professor Arthur Sale.
Pallavi Joshi* Mayur Naik † Koushik Sen* David Gay ‡ *UC Berkeley † Intel Labs Berkeley ‡ Google Inc.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Mantis: Automatic Performance Prediction for Smartphone Applications Yongin Kwon, Sangmin Lee, Hayoon Yi, Donghyun Kwon, Seungjun Yang, Byung-Gon Chun,
Debugging parallel programs. Breakpoint debugging Probably the most widely familiar method of debugging programs is breakpoint debugging. In this method,
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Pointer Analysis Survey. Rupesh Nasre. Aug 24, 2007.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Generating Precise and Concise Procedure Summaries Greta Yorsh Eran Yahav Satish Chandra.
Virtual Application Profiler (VAPP) Problem – Increasing hardware complexity – Programmers need to understand interactions between architecture and their.
Using Symbolic PathFinder at NASA Corina Pãsãreanu Carnegie Mellon/NASA Ames.
Effective Static Deadlock Detection Mayur Naik* Chang-Seo Park +, Koushik Sen +, David Gay* *Intel Research, Berkeley + UC Berkeley.
CAPP: Change-Aware Preemption Prioritization Vilas Jagannath, Qingzhou Luo, Darko Marinov Sep 6 th 2011.
Generating Precise and Concise Procedure Summaries Greta Yorsh Eran Yahav Satish Chandra.
Grigore Rosu Founder, President and CEO Professor of Computer Science, University of Illinois
Effective Static Deadlock Detection Mayur Naik (Intel Research) Chang-Seo Park and Koushik Sen (UC Berkeley) David Gay (Intel Research)
Pointer Analysis – Part I CS Pointer Analysis Answers which pointers can point to which memory locations at run-time Central to many program optimization.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
A Pattern Language for Parallel Programming Beverly Sanders University of Florida.
Specifying Multithreaded Java semantics for Program Verification Abhik Roychoudhury National University of Singapore (Joint work with Tulika Mitra)
Making k-Object-Sensitive Pointer Analysis More Precise with Still k-Limiting Tian Tan, Yue Li and Jingling Xue SAS 2016 September,
Muen Policy & Toolchain
Static and Dynamic Program Analysis: Synergies and Applications
Compositional Pointer and Escape Analysis for Java Programs
Harry Xu University of California, Irvine & Microsoft Research
About the Presentations
Abstract Major Cloud computing companies have started to integrate frameworks for parallel data processing in their product portfolio, making it easy for.
Online Subpath Profiling
runtime verification Brief Overview Grigore Rosu
Amir Kamil and Katherine Yelick
Intel® Parallel Studio and Advisor
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
자바 언어를 위한 정적 분석 (Static Analyses for Java) ‘99 한국정보과학회 가을학술발표회 튜토리얼
Amir Kamil and Katherine Yelick
Advanced Compiler Design
CSE 1020:Software Development
Presentation transcript:

1 Chord: An Extensible Program Analysis Framework Using CnC Mayur Naik Intel Labs Berkeley

2 About Chord … An extensible static/dynamic analysis framework for Java Started in 2006 as static “Checker of Races and Deadlocks” Portable: mostly written in Java, works on Java bytecode – independent of OS, JVM, Java version works at least on Linux, MacOS, Windows/Cygwin – few dependencies (e.g. not Eclipse-based) Open-source, available at Primarily used in Intel Labs and academia – by researchers in program analysis, systems, and machine learning – for applying program analyses to parallel/cloud computing problems – for advancing program analyses driven by these applications

3 Research Using Chord static race checker (PLDI’06, POPL’07) M. Naik, A. Aiken, J. Whaley static deadlock checker (ICSE’09) M. Naik, C. Park, D. Gay, K. Sen static atomic set serializability checker Z. Lai, S. Cheung, M. Naik Evaluating precision of static heap abstractions (OOPSLA’10, POPL’11) P. Liang, O. Tripp, M. Naik, M. Sagiv generalized dynamic deadlock checker (FSE’10) P. Joshi, M. Naik, K. Sen, D. Gay CloneCloud: partitioning and migration of apps between phone and cloud B. Chun, S. Ihm, P. Maniatis, M. Naik Mantis: estimating performance and resource usage of software (NIPS’10) B. Chun, L. Huang, P. Maniatis, M. Naik Precise and scalable static analyses (e.g. points-to, thread-escape, etc.) M. Naik, P. Liang, M. Sagiv debugging configuration options in systems software (e.g. Hadoop) A. Rabkin, R. Katz Advanced Program Analyses Application to Cloud ComputingApplication to Parallel Computing

4 programmers analysis specialists system builders Intended Audience of Chord Researchers prototyping program analysis algorithms Researchers with limited program analysis background prototyping systems having program analysis parts Users with no background in program analysis using it as a black box Initial focus Current focus Ultimate goal

5 Why CnC? Productivity: rapidly prototype systems by interconnecting reusable program analysis components in complex ways Performance: expose and exploit sharing and parallelism ubiquitous in program analysis

6 Example: Estimating Program Running Time* program P input I * Joint work with B. Chun, L. Huang, P. Maniatis (Intel) estimated running time of P(I) Problem: quickly and accurately estimate running time of given program on given input Applications: scheduling, resource allocation, etc. in cloud computing Assumption: program running time is independent of environment factors (OS, cache, etc.) Our solution: Mantis A novel combination of techniques from program analysis and machine learning

7 Architecture of Mantis feature instrumentor program P instrumented program inputs I 1, …, I N feature schemas profiler feature values, running time model generator static program slicer running time function over chosen features running time function over final features final feature evaluator (executable slice) estimated running time of P(I) input I feature evaluation costs offline component online component

8 Results for Lucene (search library) f(command line arguments)f = p q – 0.07 p 2 – 0.69 q q q p 2 keyword search on the Shakespeare and King James Bible dataset 3000 input samples, 10% for training 128 features (9 loop, 29 branch, 90 variable values) prediction error > 38% for strawman approach, < 7% for Mantis p = #processors/thread, q = #queries

9 Results for ImageJ (image processing) f(image size)f = w +.07h +.33wh +.02h 2 find local maxima of images from popular computer vision datasets 3000 images, 10% for training 5516 features (291 loop, 2935 branch, 2290 variable values) prediction error > 35% for strawman approach, < 6% for Mantis w = width of region of interest, h = height of image

10 Analysis Techniques How to efficiently find a concise heap abstraction in a given framework for a given program and client? Dynamic analysis: learn across executions (within program) Machine learning: learn across programs Applications Who needs to reason about the heap? Tools: race/deadlock/atomicity checking type-state verification program slicing Programmers: memory bloat removal program parallelization Heap Abstractions What heap abstraction frameworks are suitable for a given application? Classic: object allocation sites Newer: call stack (k-CFA), object recency, heap connectivity Future: regular expressions, … Example: Reasoning About Program Heaps* * Joint work with P. Liang, O. Tripp, M. Sagiv

11 Static Race Detection for Java [ PLDI’06,POPL’07 ] Is e1 (resp. e2) reachable from t1 (resp. t2)? – Call graph analysis Can e1 and e2 access the same location? – May-alias analysis Can e1 and e2 access thread-shared locations? – Thread-escape analysis Can t1 and t2 execute e1 and e2 in parallel? – May-happen-in-parallel analysis May t1 and t2 not hold a common lock while executing e1 and e2? – Conditional must-not alias analysis reachable(t1,e1)? reachable(t2,e2)? may-alias(e1,e2)? parallel(t1,e2,t2,e2)? unguarded(t1,e1,t2,e2)? shared(e1)? shared(e2)? // thread t1 // thread t2 sync (l1) { sync (l2) { … e1 … … e2 … } } candidate race: (t1,e1,t2,e2)

12 Can t1 get lock at l1 then l2 (~ for t2, l3, l4)? – Call graph analysis Can l1 and l4 be same lock (~ for l2 and l3)? – May-alias analysis Are locks at l1, l2, l3, l4 thread-shared? – Thread-escape analysis Can t1 and t2 execute l2 and l4 in parallel? – May-happen-in-parallel analysis Can t1 get non-reentrant locks at l1 and l2 (~ for t2, l3, l4)? – Must-alias analysis Can t1, t2 reach l1, l3 w/o common lock held? – Conditional must-not alias analysis reachable(t1,l1,l2)? reachable(t2,l3,l4)? may-alias(l1,l4)? may-alias(l2,l3)? parallel(t1,l2,t2,l4)? unguarded(t1,l1,t2,l3)? shared(l1)? shared(l2)? shared(l3)? shared(l4)? // thread t1 // thread t2 sync (l1) { sync (l3) { sync (l2) { … } sync (l4) { … } } } non-reent(t1,l1,l2)? non-reent(t2,l3,l4)? Static Deadlock Detection for Java [ ICSE’09 ] candidate deadlock: (t1,l1,l2,t2,l3,l4)

13 Analysis Techniques How to efficiently find a concise heap abstraction in a given framework for a given program and client? Dynamic analysis: learn across executions (within program) Machine learning: learn across programs Applications Who needs to reason about the heap? Tools: race/deadlock/atomicity checking type-state verification program slicing Programmers: memory bloat removal program parallelization Heap Abstractions What heap abstraction frameworks are suitable for a given application? Classic: object allocation sites Newer: call stack (k-CFA), object recency, heap connectivity Future: regular expressions, … Example: Reasoning About Program Heaps* * Joint work with P. Liang, O. Tripp, M. Sagiv

14 Dynamically Evaluating Precision of Static Heap Abstraction Frameworks (OOPSLA’10) Goal: Methodology for evaluating precision of given static heap abstraction framework for given program and client Frameworks: object allocation sites augmented with more context – call stack (k-CFA), object recency, heap connectivity Clients: motivated by concurrency – T HREAD E SCAPE, S HARED A CCESS, S HARED L OCK, N ON S TATIONARY F IELD Programs: 9 real-world programs from DaCapo benchmark suite Result: investigate all combinations

15 Empirical Result: Effect of call stack depth k Phase transition: sharp increase in precision beyond k ~ 5 Utility varied across clients but consistent across programs

16 Learning Minimal Abstractions (POPL’11) Goal: Methodology for finding minimal abstraction in given parametric abstraction framework for given program and client Abstraction framework: k-CFA with heap cloning – what k value to use for each call site and for each allocation site? Client: static race detection; uses points-to information pervasively Goal: find smallest k values that yield as precise results as uniform k-CFA for static race detection on a given program D ATALOG R EFINE : Deterministic iterative refinement; computes dependencies from effects (races) to causes (k values) H YBRID L EARN : Randomized refinement/coarsening; combination of: – S TAT R EFINE (a Monte-Carlo algorithm: running time is fixed but may not find minimal abstraction) – A CTIVE C OARSEN (a Las Vegas algorithm: running time is random but guaranteed to find minimal abstraction)

17 Empirical Result: HEDC (web crawler from ETH) Sum of k values of all sites in minimal abstraction computed by H YBRID L EARN that proves all queries in group Number of groups algorithmsum of k values of all sitesaverage k value of site uniform 2-CFA24,9022 D ATALOG R EFINE 19, H YBRID L EARN #races reported by uniform k-CFA: (k=0):16,306 (k=2): 10,292; (diff): 6,014 #call and allocation sites: 12,451 H YBRID L EARN partitions 6,014 races into 189 groups, each with a different minimal abstraction #queries in largest, smallest groups: 1190, 1 tiny abstraction enough for many groups (k value of 1 for only 1 site for 61 groups)

18 Analysis Techniques How to efficiently find a concise heap abstraction in a given framework for a given program and client? Dynamic analysis: learn across executions (within program) Machine learning: learn across programs Applications Who needs to reason about the heap? Tools: race/deadlock/atomicity checking type-state verification program slicing Programmers: memory bloat removal program parallelization Heap Abstractions What heap abstraction frameworks are suitable for a given application? Classic: object allocation sites Newer: call stack (k-CFA), object recency, heap connectivity Future: regular expressions, … Example: Reasoning About Program Heaps* * Joint work with P. Liang, O. Tripp, M. Sagiv

19 Parameterize static analysis with abstraction parameter dictating its precision/scalability tradeoff Obtain parameter value for each query by running program on a given input Group queries having same parameter value Run program on multiple inputs for better precision and scalability Leveraging Dynamic Analysis for Static Analysis Q i ⊬ W Q i ⊢ W program query Q i whole program W proofcounterex. static analysis abstraction A k proof counterex. parameter value H k program execution monitoring input data D j for W program trace P j ┴ dynamic analysis abstraction A i k j parameter value inferrer I

20 fully flow- and context-sensitive heap abstraction framework: sub-0-CFA with 2 partitions – local partition: sites reachable from at most one thread – shared partition: sites reachable from possibly multiple threads – 2^|sites| choices: which partition for each site? must avoid edge from shared to local partition Our Thread-Escape Analysis v1 = new h1 v2 = new h2 v1.f1 = v2 p1: … v2.f2 … g = v1 p2: … v2.f2 … if (*) v3 = new h3 v4 = new h4 v3.f3 = v4 else v4 = new h5 p3: … v4.f4 … v1 = new h v2 = new h v1.f1 = v2 p1: … v2.f2 … g = v1 p2: … v2.f2 … if (*) v3 = new h’ v4 = new h’ v3.f3 = v4 else v4 = new h p3: … v4.f4 … W = f3 v3 h3 h4 v4 h5 f1 h1 h2 v1v2 g at p3: A k = H k = f1 g v1 v2 v3 v4 at p3: f3 { h3,h4 }

21 Empirical Result: Precision of Our Thread-Escape Analysis benchmark # heap-accessing statements in appplication code reachable by dynamic R possibly local by dynamic U (% of R) proven local by our static (% of U) hedc (74%)141 (69%) weblech (62%)247 (94%) lusearch2,1421,785 (83%)1,428 (80%) hsqldb4,3872,616 (60%)2,571 (98%)

22 Kinds of Program Analyses in Chord static analysis written imperatively in Java static or dynamic analysis written declaratively in Datalog and solved using BDDs dynamic analysis written imperatively in Java seamlessly integrated!

23 Typical Chord Usage chord –Dchord.work.dir=… –Dchord.java.analysis.path=… –Dchord.dlog.analysis.path=… –Dchord.run.analyses=… run Java program to analyze [chord.properties file: entry point, classpath, etc.] Path specifying analyses written in Java [classes Path specifying analyses written in Datalog [*.dlog and *.datalog files] List of names of analyses defined in above paths to run on above program

24 Generic Program Analysis Template public class JavaAnalysis { protected Object[] consumes, produces, controls; public void run() { } public void run(Object ctrl, StepCollection sc) { for (each DataCollection dc consumed by sc) let sc2 be unique StepCollection producing dc let cc2 be CtrlCollection prescribing sc2 cc2.Put(ctrl); consumes[i] = dc.Get(ctrl); run(); for (each DataCollection dc produced by sc) dc.Put(ctrl, produces[i]) for (each CtrlCollection cc produced by sc) cc.Put(controls[i]) }

25 User-Defined Program // name of StepCollection induced by this analysis prescriber=…, // name of CtrlCollection prescribing this analysis consumes=…, // names of DataCollection’s consumed by this analysis produces=…, // names of DataCollection’s produced by this analysis controls = … // names of CtrlCollection’s produced by this analysis ) public class MyAnalysis extends JavaAnalysis { public void run() { // analysis-specific code reading consumes[*] and // writing produces[*] and controls[*] } public void run(Object ctrl, StepCollection sc) { // override default template behavior if necessary }

26 Specialized Program Analysis Templates JavaAnalysis ProgramDom ProgramRel DlogAnalysis RHSAnalysis DynamicAnalysis … program domain: a finite set of items of similar kind program relation: a finite set of tuples over domains Datalog analysis: computing output relations from input relations Reps-Horwitz-Sagiv interprocedural dataflow analysis engine

27 Example Program Domain Analysis // Domain of all lock acquisition points, including monitorenter // statements and entry basic blocks of synchronized prescriber=“L”, consumes={}, produces={“L”}, controls={}) public class DomL extends ProgramDom implements IAcqLockInstVisitor { public void visit(jq_Class c) { } public void visit(jq_Method m) { if (!m.isAbstract() && m.isSynchronized()) { EntryOrExitBasicBlock head = m.getCFG().entry(); add(head); } public void visitAcqLockInst(Quad q) { add(q); } … }

28 Example Program Relation Analysis // Relation containing each tuple (e,f) such that statement // e accesses instance field, static field, or array element prescriber=“EF”,consumes={“E”,“F”},produces={“EF”},controls={}) public class RelEF extends ProgramRel { public void fill() { DomE domE = (DomE) doms[0]; DomF domF = (DomF) doms[1]; for (int e = 0; e < domE.size(); e++) { Quad stmt = domE.get(e); jq_Field field = stmt.getField(); int f = domF.indexOf(field); add(e, f); }

29 input, intermediate, output program relations represented as BDDs program domains Example Datalog Analysis.include “E.dom”.include “F.dom”.include “T.dom”.bddvarorder E0xE1_T0_T1_F0 EF(e:E0, f:F0) input write(e:E0) input reach(t:T0, e:E0) input alias(e1:E0, e2:E1) input escape(e:E0) input unguarded(t1:T0, e1:E0, t2:T1, e2:E1) input hasWrite(e1:E0, e2:E1) candidate(e1:E0, e2:E1) datarace(t1:T0, e1:E0, t2:T1, e2:E1) output hasWrite(e1, e2) :- write(e1). hasWrite(e1, e2) :- write(e2). candidate(e1, e2) :- EF(e1,f), EF(e2, f), hasWrite(e1, e2), e1 <= e2. datarace(t1, e1, t2, e2) :- candidate(e1, e2), reach(t1, e1), reach(t2, e2), alias(e1, e2), escape(e1), escape(e2), unguarded(t1, e1, t2, e2). BDD variable ordering analysis constraints (Horn Clauses) solved via BDD operations

30 CnC/Habanero Java Runtime Seamless Integration of Analyses in Chord bytecode to quadcode (joeq) bytecode instrumentor (javassist) saxon XSLT bddbddb BuDDy Java2HTML static analysis Datalog analysis dynamic analysis program bytecode domain D 1 relation R 12 relatio n R 1 domain D 2 relation R 2 analysis result in XML analysis result in HTML program source program quadcode relation R 12 analysis program inputs domain D 1 analysis domain D 2 analysis example program analysis Java program

31 CnC/Habanero Java Runtime bytecode to quadcode (joeq) bytecode instrumentor (javassist) saxon XSLT bddbddb BuDDy Java2HTML static analysis Datalog analysis dynamic analysis program bytecode domain D 1 relation R 12 relatio n R 1 domain D 2 relation R 2 analysis result in XML analysis result in HTML program source program quadcode relation R 12 analysis program inputs domain D 1 analysis domain D 2 analysis example program analysis Java program user demands this to run starts, blocks on R 2, D 2 starts, runs to finish starts, blocks on D 1, D 2, R 1, R 12 starts, blocks on D 1 resumes, runs to finish Executing an Analysis in Chord starts, blocks on D 1 resumes, runs to finish

32 Benefits of Using CnC in Chord 1.Modularity analyses (steps) are written independently 2.Flexibility analyses can be made to interact in powerful ways with other analyses (by specifying data/control dependencies) 3.Efficiency analyses are executed in demand-driven fashion results computed by each analysis are automatically cached for reuse by other analyses without re-computation independent analyses are automatically executed in parallel 4.Reliability CnC’s “dynamic single assignment” property ensures result is same regardless of order in which analyses are executed

33 Chord Usage Statistics 3,881 visits came from 961 cities (Oct 1, 2008 – May 18, 2010)

34 Download Chord from: jchord.googlecode.com Chord project website: berkeley.intel-research.net/chord